query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Show the form for creating a new resource.
public function create($id,$id_tiket) { // // $pemesanan = DataPenerbangan::findOrFail($id); $pemesanan = DB::table('data_penerbangans') ->join('tikets', 'data_penerbangans.id_tiket', '=', 'tikets.id')->select('data_penerbangans.*', 'tikets.id','tikets.kelas','tikets.harga','tikets.bagasi_terdaftar','tikets.nama_maskapai')->where('id_tiket','=',$id_tiket)->get(); // dd($pemesanan); return view('admin.tambahpelanggan',['collections'=>$pemesanan,'idtiket'=>$id_tiket,'id'=>$id]); }
{ "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 é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 //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\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 return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\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 $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\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 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 {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "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\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "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}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // // User::create([ // 'nama' =>$request->get('nama'), // 'email' =>$request->get('email'), // 'password' =>Hash::make($request->get('password')), // ]); // return redirect()->route('pemesanan'); }
{ "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) { // }
{ "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 }", "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 /* 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 }", "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 }", "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 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 }", "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 showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\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 show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "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 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 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 show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "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 }", "#[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 display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "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($id)\n {\n //\n $this->_show($id);\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 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 abstract function display();", "abstract public function resource($resource);", "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}", "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.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // return view('admin.editpelanggan'); }
{ "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(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\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(form $form)\n {\n //\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\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($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($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(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()\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() {\n return view('routes::edit');\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($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($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\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 return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::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 $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($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) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "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 $data = Restful::find($id);\n return view('restful.edit', compact('data'));\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 return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\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\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.7854417", "0.7692986", "0.72741747", "0.72416574", "0.7173436", "0.706246", "0.70551765", "0.698488", "0.6948513", "0.694731", "0.69425464", "0.6929177", "0.6902573", "0.6899662", "0.6899662", "0.6878983", "0.6865711", "0.6861037", "0.6858774", "0.6847512", "0.6836162", "0.68129057", "0.68083996", "0.68082106", "0.6803853", "0.67966306", "0.6794222", "0.6794222", "0.6789979", "0.67861426", "0.678112", "0.677748", "0.67702436", "0.67625374", "0.6748088", "0.67475355", "0.67475355", "0.67446774", "0.6742005", "0.67374676", "0.6727497", "0.6714345", "0.6696231", "0.6693851", "0.6689907", "0.6689746", "0.6687102", "0.66870165", "0.6684574", "0.6670877", "0.66705006", "0.6667089", "0.6667089", "0.6663205", "0.66626745", "0.66603845", "0.66593564", "0.66560745", "0.66545844", "0.66447026", "0.6633528", "0.66319114", "0.66298395", "0.66298395", "0.6622365", "0.6621021", "0.66170275", "0.661664", "0.6612467", "0.66107714", "0.6608453", "0.65979743", "0.659645", "0.6596389", "0.6592672", "0.6591205", "0.6588125", "0.6582166", "0.6581656", "0.65811247", "0.65785724", "0.65782833", "0.6576397", "0.6570971", "0.6569483", "0.6568432", "0.656811", "0.6563493", "0.6563493", "0.65622604", "0.65602434", "0.65585065", "0.6557997", "0.65574414", "0.6556701", "0.65565753", "0.6556226", "0.6556107", "0.6549118", "0.65485924", "0.65463555" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\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(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(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(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);", "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, $id);", "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 }", "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 }", "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 }", "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 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 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 abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "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($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "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 }", "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() {\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 //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(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.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $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
set the additional options on the product
public function execute(\Magento\Framework\Event\Observer $observer) { $actionName = ""; try { $action = $this->http; if($action) { $actionName = $this->http->getFullActionName(); } } catch(Exception $e) { $actionName = ""; } if ($actionName == 'checkout_cart_add') { // assuming you are posting your custom form values in an array called extra_options... $extraOption = $this->http->getParam('extra_options'); if ($extraOption != "") { $product = $observer->getProduct(); // add to the additional options array $additionalOptions = array(); /* if ($additionalOption = $product->getCustomOption('additional_options')) { $additionalOptions = (array) unserialize($additionalOption->getValue()); } */ $additionalOptions[] = array( 'code' => 'pdpinfo', 'label' => __('Customize Design'), 'value' => '', 'json' => $extraOption, 'time' => microtime() ); // add the additional options array with the option code additional_options $observer->getProduct() ->addCustomOption('additional_options', serialize($additionalOptions)); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function catalogProductLoadAfter(Varien_Event_Observer $observer)\n{\n // set the additional options on the product\n if(Mage::getStoreConfigFlag('mycustom_section/mycustom_group2/field1')){\n $action = Mage::app()->getFrontController()->getAction();\n if ($action->getFullActionName() == 'checkout_cart_add')\n {\n\n \n $product = $observer->getProduct();\n // Mage::log($product);\n \n$totalCredits = Mage::getModel('kartparadigm_storecredit/creditinfo')->getCreditsOfProduct($product->getId());\n\n if($totalCredits > 0) {\n\n // if ($options = $action->getRequest()->getParam('extra_option'))\n //{\n //$product = $observer->getProduct();\n // Mage::log($product);\n\n // add to the additional options array\n $additionalOptions = array();\n if ($additionalOption = $product->getCustomOption('additional_options'))\n {\n $additionalOptions = (array) unserialize($additionalOption->getValue());\n }\n\n \n $additionalOptions[] = array(\n 'label' => \"Credits\",\n 'value' => $totalCredits,\n );\n\n \n // add the additional options array with the option code additional_options\n $observer->getProduct()\n ->addCustomOption('additional_options', serialize($additionalOptions));\n //}\n }\n }\n }\n}", "public function addAdditionalOptionsToQuote($observer)\n {\n $action = Mage::app()->getFrontController()->getAction();\n if ($action->getFullActionName() == 'checkout_cart_add')\n {\n Mage::log(\"checkout_cart_add\", Zend_Log::DEBUG, \"threekit.log\");\n // assuming you are posting your custom form values in an array called extra_options...\n if ($options = $action->getRequest()->getParam('clara_additional_options'))\n {\n $decodePost = json_decode($options, true);\n $product = $observer->getProduct();\n\n // add to the additional options array\n $additionalOptions = array();\n if ($additionalOption = $product->getCustomOption('additional_options'))\n {\n $additionalOptions = (array) unserialize($additionalOption->getValue());\n }\n foreach ($decodePost as $key => $value)\n {\n $additionalOptions[] = array(\n 'label' => $key,\n 'value' => $value,\n );\n }\n // add the additional options array with the option code additional_options\n $observer->getProduct()\n ->addCustomOption('additional_options', serialize($additionalOptions));\n }\n }\n }", "public function install() {\r\n\t\tadd_option(ShoppWholesale::OPTION_NAME, $this->defaults);\r\n\t}", "function add_options_packages() {\n $this->configure_propack();\n }", "protected function _afterLoad()\n {\n parent::_afterLoad();\n /**\n * Load product options\n */\n if ($this->getHasOptions()) {\n foreach ($this->getProductOptionsCollection() as $option) {\n $option->setProduct($this);\n $this->addOption($option);\n }\n }\n return $this;\n }", "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = $options[\"addedit\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$item->Body = \"<a class=\\\"ewAddEdit ewAdd\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"AddLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"AddLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"AddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\n\t\t$option = $options[\"action\"];\n\n\t\t// Set up options default\n\t\tforeach ($options as &$option) {\n\t\t\t$option->UseImageAndText = TRUE;\n\t\t\t$option->UseDropDownButton = FALSE;\n\t\t\t$option->UseButtonGroup = TRUE;\n\t\t\t$option->ButtonClass = \"btn-sm\"; // Class for button group\n\t\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t\t$item->Body = \"\";\n\t\t\t$item->Visible = FALSE;\n\t\t}\n\t\t$options[\"addedit\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonAddEdit\");\n\t\t$options[\"detail\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonDetails\");\n\t\t$options[\"action\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\n\t\t// Filter button\n\t\t$item = &$this->FilterOptions->Add(\"savecurrentfilter\");\n\t\t$item->Body = \"<a class=\\\"ewSaveFilter\\\" data-form=\\\"fuserslistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"SaveCurrentFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$item = &$this->FilterOptions->Add(\"deletefilter\");\n\t\t$item->Body = \"<a class=\\\"ewDeleteFilter\\\" data-form=\\\"fuserslistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"DeleteFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$this->FilterOptions->UseDropDownButton = TRUE;\n\t\t$this->FilterOptions->UseButtonGroup = !$this->FilterOptions->UseDropDownButton;\n\t\t$this->FilterOptions->DropDownButtonPhrase = $Language->Phrase(\"Filters\");\n\n\t\t// Add group option item\n\t\t$item = &$this->FilterOptions->Add($this->FilterOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "public function getProductOption();", "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = $options[\"addedit\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$addcaption = ew_HtmlTitle($Language->Phrase(\"AddLink\"));\n\t\t$item->Body = \"<a class=\\\"ewAddEdit ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"AddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\n\t\t$option = $options[\"detail\"];\n\t\t$DetailTableLink = \"\";\n\t\t$item = &$option->Add(\"detailadd_avaluo\");\n\t\t$url = $this->GetAddUrl(EW_TABLE_SHOW_DETAIL . \"=avaluo\");\n\t\t$caption = $Language->Phrase(\"Add\") . \"&nbsp;\" . $this->TableCaption() . \"/\" . $GLOBALS[\"avaluo\"]->TableCaption();\n\t\t$item->Body = \"<a class=\\\"ewDetailAddGroup ewDetailAdd\\\" title=\\\"\" . ew_HtmlTitle($caption) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($caption) . \"\\\" href=\\\"\" . ew_HtmlEncode($url) . \"\\\">\" . $caption . \"</a>\";\n\t\t$item->Visible = ($GLOBALS[\"avaluo\"]->DetailAdd && $Security->AllowAdd(CurrentProjectID() . 'avaluo') && $Security->CanAdd());\n\t\tif ($item->Visible) {\n\t\t\tif ($DetailTableLink <> \"\") $DetailTableLink .= \",\";\n\t\t\t$DetailTableLink .= \"avaluo\";\n\t\t}\n\n\t\t// Add multiple details\n\t\tif ($this->ShowMultipleDetails) {\n\t\t\t$item = &$option->Add(\"detailsadd\");\n\t\t\t$url = $this->GetAddUrl(EW_TABLE_SHOW_DETAIL . \"=\" . $DetailTableLink);\n\t\t\t$caption = $Language->Phrase(\"AddMasterDetailLink\");\n\t\t\t$item->Body = \"<a class=\\\"ewDetailAddGroup ewDetailAdd\\\" title=\\\"\" . ew_HtmlTitle($caption) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($caption) . \"\\\" href=\\\"\" . ew_HtmlEncode($url) . \"\\\">\" . $caption . \"</a>\";\n\t\t\t$item->Visible = ($DetailTableLink <> \"\" && $Security->CanAdd());\n\n\t\t\t// Hide single master/detail items\n\t\t\t$ar = explode(\",\", $DetailTableLink);\n\t\t\t$cnt = count($ar);\n\t\t\tfor ($i = 0; $i < $cnt; $i++) {\n\t\t\t\tif ($item = &$option->GetItem(\"detailadd_\" . $ar[$i]))\n\t\t\t\t\t$item->Visible = FALSE;\n\t\t\t}\n\t\t}\n\t\t$option = $options[\"action\"];\n\n\t\t// Set up options default\n\t\tforeach ($options as &$option) {\n\t\t\t$option->UseImageAndText = TRUE;\n\t\t\t$option->UseDropDownButton = TRUE;\n\t\t\t$option->UseButtonGroup = TRUE;\n\t\t\t$option->ButtonClass = \"btn-sm\"; // Class for button group\n\t\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t\t$item->Body = \"\";\n\t\t\t$item->Visible = FALSE;\n\t\t}\n\t\t$options[\"addedit\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonAddEdit\");\n\t\t$options[\"detail\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonDetails\");\n\t\t$options[\"action\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\n\t\t// Filter button\n\t\t$item = &$this->FilterOptions->Add(\"savecurrentfilter\");\n\t\t$item->Body = \"<a class=\\\"ewSaveFilter\\\" data-form=\\\"fsolicitudlistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"SaveCurrentFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$item = &$this->FilterOptions->Add(\"deletefilter\");\n\t\t$item->Body = \"<a class=\\\"ewDeleteFilter\\\" data-form=\\\"fsolicitudlistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"DeleteFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$this->FilterOptions->UseDropDownButton = TRUE;\n\t\t$this->FilterOptions->UseButtonGroup = !$this->FilterOptions->UseDropDownButton;\n\t\t$this->FilterOptions->DropDownButtonPhrase = $Language->Phrase(\"Filters\");\n\n\t\t// Add group option item\n\t\t$item = &$this->FilterOptions->Add($this->FilterOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "private function set_options_metadata($productId){\n\t\t$options = $this->getDoctrine()\n\t\t\t->getRepository('FgmsShopifyBundle:OptionsMeta')\n\t\t\t->findBy(array('productId'=>$productId),array('optionOrder'=>'ASC'));\n\t\t$output_array = array();\n\t\tforeach ($options as $option ){\n\t\t\t$output_array[] = $option->getOptionId(). '||' . $option->getOptionType() .'||'. $option->getOptionEnable(). '||' .$option->getPublishOn()->getTimestamp() . '||'. $option->getPublishOff()->getTimestamp() ;\n\t\t}\n\t\t$metaData = $this->shopify->call('GET','/admin/products/'.$productId.'/metafields.json');\n\t\t$metaId = 0;\n\t\t//$this->logger->notice('Metadata '.print_R($metaData,true));\n\t\tforeach ($metaData as $meta){\n\t\t\tif (($meta['namespace'] == 'FGMS') && ($meta['key']== 'options') ) {\n\t\t\t\t$metaId = $meta['id'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$str_data = implode('%%',$output_array);\n\t\t$request = $this->get('request');\n\t\t$request->query->set('action',($metaId == 0 ? 'create':'update'));\n\t\n\t\t$request->query->set('metaId',$metaId);\n\t\t$request->query->set('productId',$productId);\n\t\t$this->logger->notice('option str ' .' metaid ' . $metaId . ' '.$str_data);\n\t\t$params = array('value'=>(ShopifyClient::clean_data($str_data)));\n\t\tif ($metaId == 0){\n\t\t\t$params['namespace'] = 'FGMS';\n\t\t\t$params['key'] = 'options';\n\t\t\t$params['value_type'] = 'string';\n\t\t}\t\n\t\t$this->logger->notice('___________________' . print_R(ShopifyClient::update_metadata($this->shopify, $request, $params),true));\n\t}", "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = $options[\"addedit\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$addcaption = ew_HtmlTitle($Language->Phrase(\"AddLink\"));\n\t\t$item->Body = \"<a class=\\\"ewAddEdit ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"AddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\n\t\t$option = $options[\"action\"];\n\n\t\t// Set up options default\n\t\tforeach ($options as &$option) {\n\t\t\t$option->UseImageAndText = TRUE;\n\t\t\t$option->UseDropDownButton = FALSE;\n\t\t\t$option->UseButtonGroup = TRUE;\n\t\t\t$option->ButtonClass = \"btn-sm\"; // Class for button group\n\t\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t\t$item->Body = \"\";\n\t\t\t$item->Visible = FALSE;\n\t\t}\n\t\t$options[\"addedit\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonAddEdit\");\n\t\t$options[\"detail\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonDetails\");\n\t\t$options[\"action\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\n\t\t// Filter button\n\t\t$item = &$this->FilterOptions->Add(\"savecurrentfilter\");\n\t\t$item->Body = \"<a class=\\\"ewSaveFilter\\\" data-form=\\\"fneonatallistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"SaveCurrentFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$item = &$this->FilterOptions->Add(\"deletefilter\");\n\t\t$item->Body = \"<a class=\\\"ewDeleteFilter\\\" data-form=\\\"fneonatallistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"DeleteFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$this->FilterOptions->UseDropDownButton = TRUE;\n\t\t$this->FilterOptions->UseButtonGroup = !$this->FilterOptions->UseDropDownButton;\n\t\t$this->FilterOptions->DropDownButtonPhrase = $Language->Phrase(\"Filters\");\n\n\t\t// Add group option item\n\t\t$item = &$this->FilterOptions->Add($this->FilterOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "private function setAdditionalOptions(): void\n\t{\n\t\tforeach ( $this->configuration->getAdditionalOptions() as $additionalOptionIdentifier => $additionalOptionValue )\n\t\t{\n\t\t\tif ( true === in_array( $additionalOptionIdentifier, static::EXCLUDED_ADDITIONAL_OPTIONS, true ) )\n\t\t\t{\n\t\t\t\tldap_set_option( $this->ldapHandle, $additionalOptionIdentifier, $additionalOptionValue );\n\t\t\t}\n\t\t}\n\t}", "public function Mytestmethod( $observer )\n {\n $item = $observer->getQuoteItem();\n $qty = $item->getQty();\n $productId = $item->getProductId();\n $helper = Mage::helper( 'catalog/product_configuration' );\n $productModel = Mage::getModel( 'catalog/product' );\n //$attr = $productModel->getResource()->getAttribute('Size');\n $maal = $helper->getOptions( $item );\n $attribute_model = Mage::getModel( 'eav/entity_attribute' );\n $superAttr = array();\n $options = array();\n //Mage::log('all options');\n //Mage::log($item->getItemId());\n\n foreach( $maal as $key ) {\n $count = count( $key );\n if( $count < 2 ) {\n //Mage::log( 'fucker' );\n }\n if( $count > 2 ) {\n $labelcode = $key['option_id'];\n $valuecode = $key['value'];\n //$arr =$arrayName = array( $labelcode =>$valuecode);\n //array_push($superAttr,$arr);\n $options[$labelcode] = $valuecode;\n } else {\n $label = $key['label'];\n $labelcode = $attribute_model->getIdByCode( 'catalog_product', $label );\n $value = $key['value'];\n $attr = $productModel->getResource()->getAttribute( $label );\n if( $attr->usesSource() ) {\n $valuecode = $attr->getSource()->getOptionId( $value );\n //$arr =$arrayName = array( $labelcode =>$valuecode);\n //array_push($options,$arr);\n $superAttr[$labelcode] = $valuecode;\n }\n }\n }\n $final = array(\n 'super_attribute' => $superAttr,\n 'options' => $options \n );\n $final2 = http_build_query( $final );\n $coup = Mage::helper( 'webengage_coup' )->couponPost();\n $final3 = 'qty=' . $qty . '&' . 'product=' . $productId . '&' . $final2;\n //$attr = $productModel->getResource()->getAttribute('Test Custom Options');\n //$valuecode = $attr->getSource()->getOptionId('model 2');\n ////Mage::log($valuecode);\n $_SESSION['raku'] = $final3 . '&coup=' . $coup;\n }", "protected function setOptions()\n {\n if (in_array('options', $this->with)) {\n $options = Arr::get($this->field, 'options', []);\n\n if(!$options) {\n $newOptions = Arr::get($this->field, 'settings.advanced_options', []);\n\n if(\n !$newOptions\n && Arr::get($this->field,'element') == 'multi_payment_component'\n && Arr::get($this->field,'attributes.type') != 'single'\n ) {\n $pricingOptions = Arr::get($this->field, 'settings.pricing_options', []);\n foreach ($pricingOptions as $pricingOption) {\n $newOptions[] = [\n 'value' => $pricingOption['label'],\n 'label' => $pricingOption['label']\n ];\n }\n }\n\n $options = [];\n if($newOptions) {\n foreach ($newOptions as $option) {\n $value = sanitize_text_field($option['value']);\n $options[$value] = sanitize_text_field($option['label']);\n }\n }\n }\n $this->result[$this->attribute]['options'] = $options;\n }\n return $this;\n }", "function onDisplayProductAttributeOptions( $product_id )\n\t{\n\t\t$editable_by = 2;\n\t\t$app = JFactory::getApplication();\n\t\tif( $app->isAdmin() ) {\n\t\t\t$view = JRequest::getCmd('view', '' );\n\t\t\tif( $view == 'pos' ) { // display all for POS\n\t\t\t\t$editable_by = array( 0, 1, 2);\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t$vars = new JObject( );\n\t\t\n\t\t// Get extra fields for products\n\t\t$field_show = $this->getCustomFields( 'products', $product_id, true, $editable_by );\n\n\t\tif(count($field_show))\n\t\t{\n\t\t\t$vars->fields = $field_show;\n\t\t\t$html = $this->_getLayout( 'product_site_form', $vars );\n\t\t\techo $html;\n\t\t}\n\t}", "protected function prepareConfigurableProductOptions()\n {\n $configurableProductOptions = [];\n $configurableProductLinks = $this->getConfigurableProductLinks();\n\n if (isset($this->fields['product']['configurable_attributes_data'])) {\n $configurableAttributesData = $this->fields['product']['configurable_attributes_data'];\n\n foreach ($configurableAttributesData as $attributeId => $attributeData) {\n $attributeValues = [];\n foreach ($attributeData['values'] as $valueData) {\n $attributeValues[] = [\n 'value_index' => $valueData['value_index']\n ];\n }\n\n $configurableProductOptions[] = [\n 'attribute_id' => $attributeId,\n 'label' => $attributeData['label'],\n 'values' => $attributeValues\n ];\n }\n }\n\n $this->fields['product']['extension_attributes']['configurable_product_options'] = $configurableProductOptions;\n $this->fields['product']['extension_attributes']['configurable_product_links'] = $configurableProductLinks;\n unset($this->fields['product']['configurable_attributes_data']);\n unset($this->fields['attributes']);\n unset($this->fields['variations-matrix']);\n unset($this->fields['associated_product_ids']);\n }", "protected function _afterSave()\r\n {\r\n // invoke parent method\r\n parent::_afterSave();\r\n // check if package is new\r\n if ($this->_isNew == true) {\r\n // initialize the options\r\n $options = \tarray(\r\n \t\t\t'price'\t\t => 0,\r\n \t\t\t'price_type'\t=> 'fixed'\r\n \t\t);\r\n // load the available subscription information\r\n \t\t$subscriptionTypes = Mage::getModel('channel/subscription_type')\r\n \t\t ->getCollection();\r\n // create the custom options\r\n foreach ($subscriptionTypes as $subscription) {\r\n // initialize the array for the custom options\r\n $values = array();\r\n // set the default values\r\n $options['is_require'] = $subscription->getIsRequired();\r\n $options['type'] = $subscription->getType();\r\n // add the option information\r\n foreach ($subscription->getOptions() as $option) {\r\n $values[] = array(\r\n \t\t\t\t'title'\t\t => $option->getTitle(),\r\n \t\t\t\t'price'\t\t => $option->getPrice(),\r\n \t\t\t\t'price_type'\t=> $option->getPriceType(),\r\n \t\t\t 'sku'\t\t\t=> $option->getSku(),\r\n 'sort_order'\t=> $option->getSortOrder()\r\n \t\t\t);\r\n }\r\n // prepare the custom option\r\n \t$data = Mage::helper('channel')\r\n ->setCustomOption(\r\n $this->getId(),\r\n $subscription->getTitle(),\r\n $options,\r\n $values\r\n );\r\n // attache the custom option to the package\r\n \t\t$option = Mage::getModel('catalog/product_option')\r\n \t\t ->setData($data)\r\n \t\t ->setProduct($this)\r\n \t\t ->save();\r\n }\r\n }\r\n }", "private function setExternalProductDetails() {\n /** @var ExternalProductAdapter $product */\n $product = $this->product;\n\n $product->set_button_text($this->wcData->getButtonText());\n $product->set_product_url($this->wcData->getProductUrl());\n }", "public static function add_options(){\n\n \t\t$settings = array(\n \t\t\t'foundation' => 0\n \t\t);\n\n \t\tadd_option( 'zip_downloads', $settings ); \n\t}", "function jigoshop_upgrade_161() {\n\t\n\tJigoshop_Base::get_options()->add_option( 'jigoshop_catalog_product_button', 'cart' );\n\n}", "function activate() {\n\t\t\tadd_option('h2utp_options', json_encode($this->options));\n\t\t}", "function cg_activate() {\n\tadd_option('cg-option_3', 'any_value');\n}", "public function optionAction() \n {\n $result = array();\n \n $productIdOrSku = $this->getRequest()->getParam('product');\n $attributeOptionId = $this->getRequest()->getParam('id');\n\n try {\n \n $model = $this->getModel();\n $model->loadOptions($productIdOrSku, $attributeOptionId);\n $options = $model->getApiOptions(); \n \n $result = $options;\n \n \n } catch (Exception $e) {\n \n $result['error'] = true;\n $result['data'] = $e->getMessage();\n } \n \n $this->getResponse()->clearHeaders()->setHeader('Content-type','application/json',true)->setBody(Mage::helper('core')->jsonEncode($result));\n \n }", "private function setStockOptions() {\n // Reset the settings if this is a recrawl\n if ($this->getSaverData()->isRecrawl()) {\n // Set the stock quantity\n $this->product->set_stock_quantity(null);\n\n // Set backorders\n $this->product->set_backorders('no');\n\n // Set the low stock amount if it exists\n $this->product->set_low_stock_amount('');\n }\n\n // If the stock is not managed, set the stock status and stop.\n if (!$this->wcData->isManageStock()) {\n $this->product->set_manage_stock(false);\n $this->product->set_stock_status($this->wcData->getStockStatus());\n return;\n }\n\n // Stock is managed\n $this->product->set_manage_stock(true);\n\n // Set the stock quantity\n $this->product->set_stock_quantity($this->wcData->getStockQuantity());\n\n // Set backorders\n $this->product->set_backorders($this->wcData->getBackorders());\n\n // Set the low stock amount if it exists\n $this->product->set_low_stock_amount($this->wcData->getLowStockAmount());\n }", "public function salesQuoteItemSetProduct($observer)\n\t{\n\t\t$quoteItem = $observer->getQuoteItem();\n\t\t$product = $observer->getProduct();\n\n\t\tif ($product->isConfigurable() && $quoteItem->getHasChildren())\n\t\t{\n\t\t\tforeach ($quoteItem->getChildren() as $child)\n\t\t\t{\n\t\t\t\tforeach ($child->getProduct()->getProductOptionsCollection() as $option)\n\t\t\t\t{\n\t\t\t\t\t$option->setProduct($product);\n\t\t\t\t\t$product->addOption($option);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function prepareCustomOptions()\n {\n foreach ($this->getCustomOptions() as $option) {\n if (!is_object($option->getProduct()) || $option->getId()) {\n $this->addCustomOption($option->getCode(), $option->getValue());\n }\n }\n\n return $this;\n }", "public function extendProduct($product, $extender) \n\t{\n\t\t$this->load->model('catalog/product');\n\t\t$this->load->model('catalog/category');\n\t\t\n\t\t$languageId = $this->config->get('config_language_id');\t\t\n\t\t$productId = $product['product_id'];\n\t\t\n\t\t// Move description fields in sub array\t\n\t\t$descriptionFields = $this->getTableFields('product_description');\n\t\tunset($descriptionFields['product_id']);\t\t\n\t\t\n\t\t$product['product_description'] = array(\n\t\t\t$languageId => array(),\n\t\t);\n\t\tforeach ($descriptionFields as $key => $value) {\n\t\t\tif (array_key_exists($key, $product)) {\n\t\t\t\t$product['product_description'][$languageId][$key] = $product[$key];\n\t\t\t\tunset($product[$key]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Update manufacturer\n\t\tif (array_key_exists('manufacturer_id', $extender)) {\n\t\t\t$product['manufacturer_id'] = $this->addManufacturer($extender['manufacturer_id']);\n\t\t}\n\t\t\n\t\t// Update SEO url\n\t\tif (array_key_exists('keyword', $extender)) {\n\t\t\t$product['keyword'] = $extender['keyword'];\n\t\t}\n\t\t\n\t\t// Update image\n\t\tif (array_key_exists('image', $extender)) {\n\t\t\t$product['image'] = $this->addImage($extender['image']);\n\t\t} elseif (!empty($this->imageFileTpl)) {\n\t\t\t$values = array_values($product);\n\t\t\t$image = str_replace($this->imageTplPlaceholders, $values, $this->imageFileTpl);\n\t\t\t\n\t\t\t$product['image'] = $this->addImage($image);\n\t\t}\n\t\t\n\t\t// Status\n\t\t$product['status'] = array_key_exists('status', $extender) \n\t\t\t? $extender['status']\n\t\t\t: $this->productStatus;\n\t\t\n\t\t// Category processing\n\t\tif (array_key_exists('store_id', $extender)) {\n\t\t\t$product['product_store'] = array($extender['store_id']);\n\t\t} else {\n\t\t\t$product['product_store'] = array(0);\n\t\t}\n\t\t\n\t\t// Set store\n\t\tif (array_key_exists('category_id', $extender)) {\n\t\t\t$product['product_category'] = $this->addCategory($extender['category_id']);\n\t\t}\n\t\t\n\t\t//$product = array_merge($product, array('product_category' => $this->model_catalog_product->getProductCategories($productId)));\t\t\n\t\t//$product = array_merge($product, array('product_image' => $this->model_catalog_product->getProductImages($productId)));\n\t\t\n\t\t//$product = array_merge($product, array('product_attribute' => $this->model_catalog_product->getProductAttributes($productId)));\n\t\t//$product = array_merge($product, array('product_discount' => $this->model_catalog_product->getProductDiscounts($productId)));\n\t\t//$product = array_merge($product, array('product_filter' => $this->model_catalog_product->getProductFilters($productId)));\n\t\t//$product = array_merge($product, array('product_option' => $this->model_catalog_product->getProductOptions($productId)));\n\t\t//$product = array_merge($product, array('product_related' => $this->model_catalog_product->getProductRelated($productId)));\n\t\t//$product = array_merge($product, array('product_reward' => $this->model_catalog_product->getProductRewards($productId)));\n\t\t//$product = array_merge($product, array('product_special' => $this->model_catalog_product->getProductSpecials($productId)));\n\t\t//$product = array_merge($product, array('product_download' => $this->model_catalog_product->getProductDownloads($productId)));\n\t\t//$product = array_merge($product, array('product_layout' => $this->model_catalog_product->getProductLayouts($productId)));\n\t\t//$product = array_merge($product, array('product_store' => $this->model_catalog_product->getProductStores($productId)));\n\t\n\t\treturn $product;\n\t}", "public function salesConvertQuoteItemToOrderItem(Varien_Event_Observer $observer)\n{\n$quoteItem = $observer->getItem();\n if ($additionalOptions = $quoteItem->getOptionByCode('additional_options')) {\n $orderItem = $observer->getOrderItem();\n $options = $orderItem->getProductOptions();\n $options['additional_options'] = unserialize($additionalOptions->getValue());\n$var;\nif (count($options['additional_options'] > 0)) {\n if ($options['additional_options'][0]['value'] != '') \n $i = 0;\n $val = $options['additional_options'][0]['value'];\n\n}\n//Mage::log($val.\" trgy\");\n$orderItem->setCredits($val);\n $orderItem->setProductOptions($options);\n }\n\n}", "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = $options[\"action\"];\n\n\t\t// Set up options default\n\t\tforeach ($options as &$option) {\n\t\t\t$option->UseImageAndText = TRUE;\n\t\t\t$option->UseDropDownButton = TRUE;\n\t\t\t$option->UseButtonGroup = TRUE;\n\t\t\t$option->ButtonClass = \"btn-sm\"; // Class for button group\n\t\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t\t$item->Body = \"\";\n\t\t\t$item->Visible = FALSE;\n\t\t}\n\t\t$options[\"addedit\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonAddEdit\");\n\t\t$options[\"detail\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonDetails\");\n\t\t$options[\"action\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\n\t\t// Filter button\n\t\t$item = &$this->FilterOptions->Add(\"savecurrentfilter\");\n\t\t$item->Body = \"<a class=\\\"ewSaveFilter\\\" data-form=\\\"fv_auction_list_adminlistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"SaveCurrentFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$item = &$this->FilterOptions->Add(\"deletefilter\");\n\t\t$item->Body = \"<a class=\\\"ewDeleteFilter\\\" data-form=\\\"fv_auction_list_adminlistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"DeleteFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$this->FilterOptions->UseDropDownButton = TRUE;\n\t\t$this->FilterOptions->UseButtonGroup = !$this->FilterOptions->UseDropDownButton;\n\t\t$this->FilterOptions->DropDownButtonPhrase = $Language->Phrase(\"Filters\");\n\n\t\t// Add group option item\n\t\t$item = &$this->FilterOptions->Add($this->FilterOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "public function addproduct() {\n\n if (!$this->customer->isLogged()) {\n $this->session->data['redirect'] = $this->url->link('account/account', '', 'SSL');\n echo $this->url->link('account/login', '', 'SSL');\n exit();\n }\n\n\n $description_product = $this->request->post['description_product'];\n $image = $this->request->post['image'];\n $link_product = $this->request->post['link_product'];\n $name_product = $this->request->post['name_product'];\n $price_product = $this->request->post['price_product'];\n\t\t$category_id = $this->request->post['category_id'];\n $option_value = $this->request->post['option'];\n\n\n\t\t$data = array(\n\t\t\t'price'=>$price_product,\n\t\t\t'image'=>$image,\n\t\t\t'viewdemo'=>$link_product,\n\t\t\t'description'=>$description_product,\n\t\t\t'name'=>$name_product,\n\t\t\t'meta_keyword'=>$name_product,\n\t\t\t'meta_description'=>$name_product,\n\t\t\t'category_id'=>$category_id\n\t\t);\n $this->load->model('catalog/product');\n\n\n\n $product_id = $this->model_catalog_product->addProduct($data);\n $options = $this->model_catalog_product->getOptions();\n foreach ($options as $option) {\n if(isset($option_value[$option['option_id']]))\n {\n if(is_numeric($option_value[$option['option_id']]))\n {\n $IsOptions = $this->model_catalog_product->IsOptions($product_id,$option['option_id']);\n\n if(count($IsOptions)==0)\n {\n $product_option_id = $this->model_catalog_product->insertOption($product_id,$option['option_id']);\n $this->model_catalog_product->insertOptionValue($product_option_id,$product_id,$option['option_id'],$option_value[$option['option_id']]);\n }\n }\n else\n {\n $IsOptions = $this->model_catalog_product->IsOptions($product_id,$option['option_id']);\n $product_option_id = 0;\n if(count($IsOptions)==0)\n {\n $product_option_id = $this->model_catalog_product->insertOption($product_id,$option['option_id']);\n }\n $reset = $option_value[$option['option_id']];\n for($i = 0; $i<count($reset); $i++) {\n $this->model_catalog_product->insertOptionValue($product_option_id,$product_id,$option['option_id'],$reset[$i]);\n }\n }\n }\n\n }\n\t\techo $product_id;\n\t\tdie();\n\n }", "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = $options[\"action\"];\n\n\t\t// Set up options default\n\t\tforeach ($options as &$option) {\n\t\t\t$option->UseImageAndText = TRUE;\n\t\t\t$option->UseDropDownButton = FALSE;\n\t\t\t$option->UseButtonGroup = TRUE;\n\t\t\t$option->ButtonClass = \"btn-xs\"; // Class for button group\n\t\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t\t$item->Body = \"\";\n\t\t\t$item->Visible = FALSE;\n\t\t}\n\t\t$options[\"addedit\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonAddEdit\");\n\t\t$options[\"detail\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonDetails\");\n\t\t$options[\"action\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\n\t\t// Filter button\n\t\t$item = &$this->FilterOptions->Add(\"savecurrentfilter\");\n\t\t$item->Body = \"<a class=\\\"ewSaveFilter\\\" data-form=\\\"fvw_spmlistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"SaveCurrentFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$item = &$this->FilterOptions->Add(\"deletefilter\");\n\t\t$item->Body = \"<a class=\\\"ewDeleteFilter\\\" data-form=\\\"fvw_spmlistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"DeleteFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$this->FilterOptions->UseDropDownButton = TRUE;\n\t\t$this->FilterOptions->UseButtonGroup = !$this->FilterOptions->UseDropDownButton;\n\t\t$this->FilterOptions->DropDownButtonPhrase = $Language->Phrase(\"Filters\");\n\n\t\t// Add group option item\n\t\t$item = &$this->FilterOptions->Add($this->FilterOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "function virtual_product_type_options() {\n\t?>\n\t<div id=\"virtual_product_options\">\n\t\t<?php\n\t\t\t_e('Virtual products have no specific options.', 'jigoshop');\n\t\t?>\n\t</div>\n\t<?php\n}", "function inkpro_create_options() {\r\n\treturn array();\r\n}", "function init_extra_fields() {\n $temp = $this->uc->CallMethod('PickupLocations', array(), 'GET', $this->token);\n $pickups = array();\n if (is_array($temp)) {\n foreach ($temp as $t) {\n $pickups[$t['LocationId']] = $t['Name'];\n }\n }\n\n // obtine lista planurilor tarifare\n $temp = $this->uc->CallMethod('PriceTables', array(), 'GET', $this->token);\n\n $prices = array();\n if (is_array($temp)) {\n foreach ($temp as $t) {\n $prices[$t['PriceTableId']] = empty($t['Name']) ? $t['PriceTableId'] : $t['Name'];\n }\n }\n\n $this->form_fields += array(\n 'pickup' => array(\n 'title' => __('Punct de ridicare', 'urgentcargus'),\n 'type' => 'select',\n 'class' => 'select_height',\n 'options' => array(null => 'Alege punctul de ridicare') + $pickups\n ),\n 'priceplan' => array(\n 'title' => __('Plan tarifar', 'urgentcargus'),\n 'type' => 'select',\n 'class' => 'select_height',\n 'options' => array(null => 'Alege planul tarifar') + $prices\n ),\n 'insurance' => array(\n 'title' => __('', 'urgentcargus'),\n 'label' => __('Asigurare', 'urgentcargus'),\n 'type' => 'checkbox',\n 'default' => 'no'\n ),\n 'saturday' => array(\n 'title' => __('', 'urgentcargus'),\n 'label' => __('Livrare sambata', 'urgentcargus'),\n 'type' => 'checkbox',\n 'default' => 'no'\n ),\n 'morning' => array(\n 'title' => __('', 'urgentcargus'),\n 'label' => __('Livrare dimineata', 'urgentcargus'),\n 'type' => 'checkbox',\n 'default' => 'no'\n ),\n 'open' => array(\n 'title' => __('', 'urgentcargus'),\n 'label' => __('Deschidere colet', 'urgentcargus'),\n 'type' => 'checkbox',\n 'default' => 'no'\n ),\n 'repayment' => array(\n 'title' => __('Incasare ramburs', 'urgentcargus'),\n 'type' => 'select',\n 'class' => 'select_height',\n 'options' => array(\n 'cash' => 'Numerar',\n 'bank' => 'Transfer bancar'\n )\n ),\n 'payer' => array(\n 'title' => __('Platitor expeditie', 'urgentcargus'),\n 'type' => 'select',\n 'class' => 'select_height',\n 'options' => array(\n 'sender' => 'Expeditor',\n 'recipient' => 'Destinatar'\n )\n ),\n 'type' => array(\n 'title' => __('Tip expeditie', 'urgentcargus'),\n 'type' => 'select',\n 'class' => 'select_height',\n 'options' => array(\n 'parcel' => 'Colet',\n 'envelope' => 'Plic'\n )\n ),\n 'free' => array(\n 'title' => __('Plafon transport gratuit', 'urgentcargus'),\n 'type' => 'text',\n ),\n 'fixed' => array(\n 'title' => __('Cost fix transport', 'urgentcargus'),\n 'type' => 'text',\n ),\n 'height' => array(\n 'title' => __('Inaltime', 'urgentcargus'),\n 'type' => 'number',\n ),\n 'width' => array(\n 'title' => __('Latime', 'urgentcargus'),\n 'type' => 'number',\n ),\n 'length' => array(\n 'title' => __('Lungime', 'urgentcargus'),\n 'type' => 'number',\n ),\n 'service' => array(\n 'title' => __('Serviciu', 'urgentcargus'),\n 'type' => 'select',\n 'class' => 'select_height',\n 'options' => array(\n 0 => 'Inactiv',\n 1 => 'Activ'\n )\n ),\n );\n }", "protected function adjustOptionsValues()\n {\n $this->init();\n $this->create();\n }", "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = $options[\"action\"];\n\n\t\t// Set up options default\n\t\tforeach ($options as &$option) {\n\t\t\t$option->UseImageAndText = TRUE;\n\t\t\t$option->UseDropDownButton = FALSE;\n\t\t\t$option->UseButtonGroup = TRUE;\n\t\t\t$option->ButtonClass = \"btn-xs\"; // Class for button group\n\t\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t\t$item->Body = \"\";\n\t\t\t$item->Visible = FALSE;\n\t\t}\n\t\t$options[\"addedit\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonAddEdit\");\n\t\t$options[\"detail\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonDetails\");\n\t\t$options[\"action\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\n\t\t// Filter button\n\t\t$item = &$this->FilterOptions->Add(\"savecurrentfilter\");\n\t\t$item->Body = \"<a class=\\\"ewSaveFilter\\\" data-form=\\\"fspplistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"SaveCurrentFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$item = &$this->FilterOptions->Add(\"deletefilter\");\n\t\t$item->Body = \"<a class=\\\"ewDeleteFilter\\\" data-form=\\\"fspplistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"DeleteFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$this->FilterOptions->UseDropDownButton = TRUE;\n\t\t$this->FilterOptions->UseButtonGroup = !$this->FilterOptions->UseDropDownButton;\n\t\t$this->FilterOptions->DropDownButtonPhrase = $Language->Phrase(\"Filters\");\n\n\t\t// Add group option item\n\t\t$item = &$this->FilterOptions->Add($this->FilterOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "public function getProductCustomOptionsXmlObject(Mage_Catalog_Model_Product $product)\n {\n $xmlModel = Mage::getModel('xmlconnect/simplexml_element', '<product></product>');\n $optionsNode = $xmlModel->addChild('options');\n\n if ($product->hasPreconfiguredValues()) {\n $preConfiguredValues = $product->getPreconfiguredValues();\n $optionData = $preConfiguredValues->getData('options');\n }\n\n if (!$product->getId()) {\n return $xmlModel;\n }\n $xmlModel->addAttribute('id', $product->getId());\n if (!$product->isSaleable() || !sizeof($product->getOptions())) {\n return $xmlModel;\n }\n\n foreach ($product->getOptions() as $option) {\n $optionNode = $optionsNode->addChild('option');\n $type = $this->_getOptionTypeForXmlByRealType($option->getType());\n $code = 'options[' . $option->getId() . ']';\n if ($type == self::OPTION_TYPE_CHECKBOX) {\n $code .= '[]';\n }\n $optionNode->addAttribute('code', $code);\n $optionNode->addAttribute('type', $type);\n $optionNode->addAttribute('label', $xmlModel->escapeXml($option->getTitle()));\n if ($option->getIsRequire()) {\n $optionNode->addAttribute('is_required', 1);\n }\n\n /**\n * Process option price\n */\n $price = $option->getPrice();\n if ($price) {\n $optionNode->addAttribute('price', Mage::helper('xmlconnect')->formatPriceForXml($price));\n $formattedPrice = Mage::app()->getStore($product->getStoreId())->formatPrice($price, false);\n $optionNode->addAttribute('formated_price', $formattedPrice);\n }\n $optionId = $option->getOptionId();\n if ($type == self::OPTION_TYPE_CHECKBOX || $type == self::OPTION_TYPE_SELECT) {\n foreach ($option->getValues() as $value) {\n $code = $value->getId();\n $valueNode = $optionNode->addChild('value');\n $valueNode->addAttribute('code', $code);\n $valueNode->addAttribute('label', $xmlModel->escapeXml($value->getTitle()));\n\n if ($value->getPrice() != 0) {\n $price = Mage::helper('xmlconnect')->formatPriceForXml($value->getPrice());\n $valueNode->addAttribute('price', $price);\n $formattedPrice = $this->_formatPriceString($price, $product);\n $valueNode->addAttribute('formated_price', $formattedPrice);\n }\n if ($product->hasPreconfiguredValues()) {\n $this->_setCartSelectedValue($valueNode, $type, $this->_getPreconfiguredOption(\n $optionData, $optionId, $code\n ));\n }\n }\n } else {\n if ($product->hasPreconfiguredValues() && array_key_exists($option->getOptionId(), $optionData)) {\n $this->_setCartSelectedValue($optionNode, $type, $optionData[$optionId]);\n }\n }\n }\n return $xmlModel;\n }", "function lg_mac_activ_options()\n\t{\n\t\t$theme_opts =get_option('lgmac_opts');\n\t\tif(!$theme_opts) //si le theme est désactivé et réactivé plus tard il ne sera pas nécessaire de reactiver le theme\n\t\t\t{\t\t\t//afin de créer l'option\n\t\t\t\t\n\t\t\t\t//\n\t\t\t\t$opts =array(\n\t\t\t\t'image_01_url' => '',\n\t\t\t\t'slider_shortcode' =>'',\n\t\t\t\t'HeaderC' =>'',\n\t\t\t\t'FooterColor'=>'',\n\t\t\t\t'FooterCopyright'=>'',\n\t\t\t\t'lgmac_img_FirstBlock'=>'',\n\t\t\t\t'lgmac_img_firstblock133'=>'',\n\n\n\t\t\t\t);\n\t\t\t\tadd_option('lgmac_opts',$opts);\n\t\t\t}\n\t}", "function add_to_context( $context ) {\n\t\t$context['options'] = get_fields('options');\n\t\treturn $context;\n\t}", "private function setShippingOptions() {\n // Reset the settings if this is a recrawl\n if ($this->getSaverData()->isRecrawl()) {\n // Set dimensions and weight\n $this->product->set_weight('');\n $this->product->set_length('');\n $this->product->set_width('');\n $this->product->set_height('');\n\n // Set shipping class\n $this->product->set_shipping_class_id(0);\n }\n\n // No shipping for virtual products.\n if ($this->wcData->isVirtual()) {\n $this->product->set_virtual(true);\n return;\n }\n\n // Not a virtual product.\n $this->product->set_virtual(false);\n\n // Set dimensions and weight\n $this->product->set_weight($this->wcData->getWeight());\n $this->product->set_length($this->wcData->getLength());\n $this->product->set_width($this->wcData->getWidth());\n $this->product->set_height($this->wcData->getHeight());\n\n // Set shipping class\n $this->product->set_shipping_class_id($this->wcData->getShippingClassId());\n }", "function TS_VCSC_Set_Plugin_Options() {\r\n\t\t// Redirect Option\r\n\t\tadd_option('ts_vcsc_extend_settings_redirect', \t\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_activation', \t\t\t\t\t\t0);\r\n\t\t// Options for Theme Authors\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypes', \t\t\t\t 1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeWidget',\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeTeam',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeTestimonial',\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeLogo', \t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeSkillset',\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_additions', \t\t\t\t 1);\r\n\t\tadd_option('ts_vcsc_extend_settings_codeeditors', \t\t\t\t 1);\r\n\t\tadd_option('ts_vcsc_extend_settings_fontimport', \t\t\t\t 1);\r\n\t\tadd_option('ts_vcsc_extend_settings_iconicum', \t\t\t\t \t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_dashboard', \t\t\t\t\t\t1);\r\n\t\t// Options for Custom CSS/JS Editor\r\n\t\tadd_option('ts_vcsc_extend_settings_customCSS',\t\t\t\t\t\t\t'/* Welcome to the Custom CSS Editor! Please add all your Custom CSS here. */');\r\n\t\tadd_option('ts_vcsc_extend_settings_customJS', \t\t\t\t '/* Welcome to the Custom JS Editor! Please add all your Custom JS here. */');\r\n\t\t// Other Options\r\n\t\tadd_option('ts_vcsc_extend_settings_frontendEditor', \t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_buffering', \t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_mainmenu', \t\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsDomain', \t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_previewImages',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_visualSelector',\t\t\t\t\t1);\r\n add_option('ts_vcsc_extend_settings_nativeSelector',\t\t\t\t\t1);\r\n add_option('ts_vcsc_extend_settings_nativePaginator',\t\t\t\t\t'200');\r\n\t\tadd_option('ts_vcsc_extend_settings_backendPreview',\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_extended', \t\t\t\t 0);\r\n\t\tadd_option('ts_vcsc_extend_settings_systemInfo',\t\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_socialDefaults', \t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_builtinLightbox', \t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_lightboxIntegration', \t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_allowAutoUpdate', \t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_allowNotification', \t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_allowDeprecated', \t\t\t\t\t0);\r\n\t\t// Font Active / Inactive\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceMedia',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceIcon',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceAwesome',\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceBrankic',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCountricons',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCurrencies',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceElegant',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceEntypo',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceFoundation',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceGenericons',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceIcoMoon',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceMonuments',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceSocialMedia',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceTypicons',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceFontsAll',\t\t\t\t\t0);\t\t\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_Awesome',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_Entypo',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_Linecons',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_OpenIconic',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_Typicons',\t\t\t\t0);\t\t\r\n\t\t// Custom Font Data\r\n\t\tadd_option('ts_vcsc_extend_settings_IconFontSettings',\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustom',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomArray',\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomJSON',\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomPath',\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomPHP', \t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomName',\t\t\t\t\t'Custom User Font');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomAuthor',\t\t\t\t'Custom User');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomCount',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomDate',\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomDirectory',\t\t\t'');\r\n\t\t// Row + Column Extensions\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsRows',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsColumns',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsRowEffectsBreak',\t\t\t'600');\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsSmoothScroll',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsSmoothSpeed',\t\t\t\t'30');\r\n\t\t// Custom Post Types\r\n\t\tadd_option('ts_vcsc_extend_settings_customWidgets',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_customTeam',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_customTestimonial',\t\t\t\t\t0);\t\t\r\n\t\tadd_option('ts_vcsc_extend_settings_customSkillset',\t\t\t\t\t0);\t\t\r\n\t\tadd_option('ts_vcsc_extend_settings_customTimelines', \t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_customLogo', \t\t\t\t\t\t0);\r\n\t\t// tinyMCE Icon Shortcode Generator\r\n\t\tadd_option('ts_vcsc_extend_settings_useIconGenerator',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_useTinyMCEMedia', \t\t\t\t\t1);\r\n\t\t// Standard Elements\r\n\t\tadd_option('ts_vcsc_extend_settings_StandardElements',\t\t\t\t\t'');\r\n\t\t// Demo Elements\r\n\t\tadd_option('ts_vcsc_extend_settings_DemoElements', \t\t\t\t\t\t'');\r\n\t\t// WooCommerce Elements\r\n\t\tadd_option('ts_vcsc_extend_settings_WooCommerceUse',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_WooCommerceElements',\t\t\t\t'');\r\n\t\t// bbPress Elements\r\n\t\tadd_option('ts_vcsc_extend_settings_bbPressUse',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_bbPressElements',\t\t\t\t\t'');\r\n\t\t// Options for External Files\r\n\t\tadd_option('ts_vcsc_extend_settings_loadForcable',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadLightbox', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadTooltip', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadFonts', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadEnqueue',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadHeader',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadjQuery', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadModernizr',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadWaypoints', \t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadCountTo', \t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadMooTools', \t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadDetector', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadHammerNew', \t\t\t\t\t1);\r\n\t\t// Google Font Manager Settings\r\n\t\tadd_option('ts_vcsc_extend_settings_allowGoogleManager', \t\t\t\t1);\r\n\t\t// Single Page Navigator\r\n\t\tadd_option('ts_vcsc_extend_settings_allowPageNavigator', \t\t\t\t0);\r\n\t\t// EnlighterJS - Syntax Highlighter\r\n\t\tadd_option('ts_vcsc_extend_settings_allowEnlighterJS',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_allowThemeBuilder',\t\t\t\t\t0);\r\n\t\t// Post Type Menu Positions\r\n\t\t$TS_VCSC_Menu_Positions_Defaults_Init = array(\r\n\t\t\t'ts_widgets'\t\t\t\t\t=> 50,\r\n\t\t\t'ts_timeline'\t\t\t\t\t=> 51,\r\n\t\t\t'ts_team'\t\t\t\t\t\t=> 52,\r\n\t\t\t'ts_testimonials'\t\t\t\t=> 53,\r\n\t\t\t'ts_skillsets'\t\t\t\t\t=> 54,\r\n\t\t\t'ts_logos'\t\t\t\t\t\t=> 55,\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_menuPositions',\t\t\t\t\t\t$TS_VCSC_Menu_Positions_Defaults_Init);\r\n\t\t// Row Toggle Settings\r\n\t\t$TS_VCSC_Row_Toggle_Defaults_Init = array(\r\n\t\t\t'Large Devices' => 1200,\r\n\t\t\t'Medium Devices' => 992,\r\n\t\t\t'Small Devices' => 768,\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_rowVisibilityLimits', \t\t\t\t$TS_VCSC_Row_Toggle_Defaults_Init);\r\n\t\t// Language Settings: Countdown\r\n\t\t$TS_VCSC_Countdown_Language_Defaults_Init = array(\r\n\t\t\t'DayPlural' => 'Days',\r\n\t\t\t'DaySingular' => 'Day',\r\n\t\t\t'HourPlural' => 'Hours',\r\n\t\t\t'HourSingular' => 'Hour',\r\n\t\t\t'MinutePlural' => 'Minutes',\r\n\t\t\t'MinuteSingular' => 'Minute',\r\n\t\t\t'SecondPlural' => 'Seconds',\r\n\t\t\t'SecondSingular' => 'Second',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsCountdown', \t\t\t$TS_VCSC_Countdown_Language_Defaults_Init);\r\n\t\t// Language Settings: Google Maps PLUS\r\n\t\t$TS_VCSC_Google_MapPLUS_Language_Defaults_Init = array(\r\n\t\t\t'ListenersStart' => 'Start Listeners',\r\n\t\t\t'ListenersStop' => 'Stop Listeners',\r\n\t\t\t'MobileShow' => 'Show Google Map',\r\n\t\t\t'MobileHide' => 'Hide Google Map',\r\n\t\t\t'StyleDefault' => 'Google Standard',\r\n\t\t\t'StyleLabel' => 'Change Map Style',\r\n\t\t\t'FilterAll' => 'All Groups',\r\n\t\t\t'FilterLabel' => 'Filter by Groups',\r\n\t\t\t'SelectLabel' => 'Zoom to Location',\r\n\t\t\t'ControlsOSM' => 'Open Street',\r\n\t\t\t'ControlsHome' => 'Home',\r\n\t\t\t'ControlsBounds' => 'Fit All',\r\n\t\t\t'ControlsBike' => 'Bicycle Trails',\r\n\t\t\t'ControlsTraffic' => 'Traffic',\r\n\t\t\t'ControlsTransit' => 'Transit',\r\n\t\t\t'TrafficMiles' => 'Miles per Hour',\r\n\t\t\t'TrafficKilometer' => 'Kilometers per Hour',\r\n\t\t\t'TrafficNone' => 'No Data Available',\r\n\t\t\t'SearchButton' => 'Search Location',\r\n\t\t\t'SearchHolder' => 'Enter address to search for ...',\r\n\t\t\t'SearchGoogle' => 'View on Google Maps',\r\n\t\t\t'SearchDirections' => 'Get Directions',\r\n\t\t\t'OtherLink' => 'Learn More!',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsGoogleMapPLUS', \t\t$TS_VCSC_Google_MapPLUS_Language_Defaults_Init);\r\n\t\t// Language Settings: Google Maps (Deprecated)\r\n\t\t$TS_VCSC_Google_Map_Language_Defaults_Init = array(\r\n\t\t\t'TextCalcShow' => 'Show Address Input',\r\n\t\t\t'TextCalcHide' => 'Hide Address Input',\r\n\t\t\t'TextDirectionShow' => 'Show Directions',\r\n\t\t\t'TextDirectionHide' => 'Hide Directions',\r\n\t\t\t'TextResetMap' => 'Reset Map',\r\n\t\t\t'PrintRouteText' \t\t\t => 'Print Route',\r\n\t\t\t'TextViewOnGoogle' => 'View on Google',\r\n\t\t\t'TextButtonCalc' => 'Show Route',\r\n\t\t\t'TextSetTarget' => 'Please enter your Start Address:',\r\n\t\t\t'TextGeoLocation' => 'Get My Location',\r\n\t\t\t'TextTravelMode' => 'Travel Mode',\r\n\t\t\t'TextDriving' => 'Driving',\r\n\t\t\t'TextWalking' => 'Walking',\r\n\t\t\t'TextBicy' => 'Bicycling',\r\n\t\t\t'TextWP' => 'Optimize Waypoints',\r\n\t\t\t'TextButtonAdd' => 'Add Stop on the Way',\r\n\t\t\t'TextDistance' => 'Total Distance:',\r\n\t\t\t'TextMapHome' => 'Home',\r\n\t\t\t'TextMapBikes' => 'Bicycle Trails',\r\n\t\t\t'TextMapTraffic' => 'Traffic',\r\n\t\t\t'TextMapSpeedMiles' => 'Miles Per Hour',\r\n\t\t\t'TextMapSpeedKM' => 'Kilometers Per Hour',\r\n\t\t\t'TextMapNoData' => 'No Data Available!',\r\n\t\t\t'TextMapMiles' => 'Miles',\r\n\t\t\t'TextMapKilometes' => 'Kilometers',\r\n\t\t\t'TextMapActivate' => 'Show Google Map',\r\n\t\t\t'TextMapDeactivate' => 'Hide Google Map',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsGoogleMap', \t\t\t$TS_VCSC_Google_Map_Language_Defaults_Init);\r\n\t\t// Language Settings: Isotope Posts\r\n\t\t$TS_VCSC_Isotope_Posts_Language_Defaults_Init = array(\r\n\t\t\t'ButtonFilter'\t\t => 'Filter Posts', \r\n\t\t\t'ButtonLayout'\t\t => 'Change Layout',\r\n\t\t\t'ButtonSort'\t\t => 'Sort Criteria',\r\n\t\t\t// Standard Post Strings\r\n\t\t\t'Date' \t\t\t\t => 'Post Date', \r\n\t\t\t'Modified' \t\t\t => 'Post Modified', \r\n\t\t\t'Title' \t\t\t => 'Post Title', \r\n\t\t\t'Author' \t\t\t => 'Post Author', \r\n\t\t\t'PostID' \t\t\t => 'Post ID', \r\n\t\t\t'Comments' \t\t\t => 'Number of Comments',\r\n\t\t\t// Layout Strings\r\n\t\t\t'SeeAll'\t\t\t => 'See All',\r\n\t\t\t'Timeline' \t\t\t => 'Timeline',\r\n\t\t\t'Masonry' \t\t\t => 'Centered Masonry',\r\n\t\t\t'FitRows'\t\t\t => 'Fit Rows',\r\n\t\t\t'StraightDown' \t\t => 'Straigt Down',\r\n\t\t\t// WooCommerce Strings\r\n\t\t\t'WooFilterProducts' => 'Filter Products',\r\n\t\t\t'WooTitle' => 'Product Title',\r\n\t\t\t'WooPrice' => 'Product Price',\r\n\t\t\t'WooRating' => 'Product Rating',\r\n\t\t\t'WooDate' => 'Product Date',\r\n\t\t\t'WooModified' => 'Product Modified',\r\n\t\t\t// General Strings\r\n\t\t\t'Categories' => 'Categories',\r\n\t\t\t'Tags' => 'Tags',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsIsotopePosts', \t\t\t$TS_VCSC_Isotope_Posts_Language_Defaults_Init);\r\n\t\t// Options for Lightbox Settings\r\n\t\t$TS_VCSC_Lightbox_Setting_Defaults_Init = array(\r\n\t\t\t'thumbs' => 'bottom',\r\n\t\t\t'thumbsize' => 50,\r\n\t\t\t'animation' => 'random',\r\n\t\t\t'captions' => 'data-title',\r\n\t\t\t'closer' => 1, // true/false\r\n\t\t\t'duration' => 5000,\r\n\t\t\t'share' => 0, // true/false\r\n\t\t\t'social' \t => 'fb,tw,gp,pin',\r\n\t\t\t'notouch' => 1, // true/false\r\n\t\t\t'bgclose'\t\t\t => 1, // true/false\r\n\t\t\t'nohashes'\t\t\t => 1, // true/false\r\n\t\t\t'keyboard'\t\t\t => 1, // 0/1\r\n\t\t\t'fullscreen'\t\t => 1, // 0/1\r\n\t\t\t'zoom'\t\t\t\t => 1, // 0/1\r\n\t\t\t'fxspeed'\t\t\t => 300,\r\n\t\t\t'scheme'\t\t\t => 'dark',\r\n\t\t\t'removelight' => 0,\r\n\t\t\t'customlight' => 0,\r\n\t\t\t'customcolor'\t\t => '#ffffff',\r\n\t\t\t'backlight' \t\t => '#ffffff',\r\n\t\t\t'usecolor' \t\t => 0, // true/false\r\n\t\t\t'background' => '',\r\n\t\t\t'repeat' => 'no-repeat',\r\n\t\t\t'overlay' => '#000000',\r\n\t\t\t'noise' => '',\r\n\t\t\t'cors' => 0, // true/false\r\n\t\t\t'scrollblock' => 'css',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_defaultLightboxSettings',\t\t\t$TS_VCSC_Lightbox_Setting_Defaults_Init);\r\n\t\tadd_option('ts_vcsc_extend_settings_defaultLightboxAnimation', \t\t\t'random');\r\n\t\t// Options for Envato Sales Data\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoData', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoInfo', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoLink', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoPrice', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoRating', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoSales', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoCheck', \t\t\t\t\t 0);\r\n\t\t$roles \t\t\t\t\t\t\t\t= get_editable_roles();\r\n\t\tforeach ($GLOBALS['wp_roles']->role_objects as $key => $role) {\r\n\t\t\tif (isset($roles[$key]) && $role->has_cap('edit_pages') && !$role->has_cap('ts_vcsc_extend')) {\r\n\t\t\t\t$role->add_cap('ts_vcsc_extend');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function setProducts_options( $products_options ) {\n\t\t$this->products_options = $products_options;\n\t}", "public static function set_options() {\r\n\t\tself::add_option(\"my_option\", \"foo\");\r\n\t}", "public function SetPanelSettings()\n\t{\n\t\t$this->productClass = GetClass('ISC_PRODUCT');\n\t\t$this->db = $GLOBALS['ISC_CLASS_DB'];\n\n\t\tif(!empty($_SESSION['ProductErrorMessage'])) {\n\t\t\tFlashMessage($_SESSION['ProductErrorMessage'], 'error');\n\t\t}\n\t\t$GLOBALS['ProductDetailFlashMessages'] = GetFlashMessageBoxes();\n\n\t\t$GLOBALS['ProductName'] = isc_html_escape($this->productClass->GetProductName());\n\t\t$GLOBALS['ProductNamedBy'] = $this->productClass->GetProductNamedBy();\n\t\t$GLOBALS['ProductId'] = $this->productClass->GetProductId();\n\t\t$GLOBALS['ProductPrice'] = '';\n\t\t\n\t\t$funnyDesc = $this->productClass->GetFunnyDesc();\n\t\tif(!empty($funnyDesc)) {\n\t\t\t$GLOBALS['FunnyDescription'] = $funnyDesc;\n\t\t} else {\n\t\t\t$GLOBALS['ShowFunnyDescription'] = \"display:none;\";\n\t\t}\n\n\t\tif(isset($_SESSION['ProductErrorMessage']) && $_SESSION['ProductErrorMessage']!='') {\n\t\t\t$GLOBALS['HideProductErrorMessage']='';\n\t\t\t$GLOBALS['ProductErrorMessage']=$_SESSION['ProductErrorMessage'];\n\t\t\tunset($_SESSION['ProductErrorMessage']);\n\t\t}\n\n\t\t$product = $this->productClass->getProduct();\n\t\t\n\t\t// We've got a lot to do on this page, so to make it easier to follow,\n\t\t// everything is broken down in to smaller functions.\n\t\t$this->SetProductImages();\n\t\t$this->SetPricingDetails();\n\n\t\tif (GetConfig('ShowAddThisLink')) {\n\t\t\t$GLOBALS['AddThisLink'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('AddThisLink');\n\t\t}\n\t}", "public function setOptions($optionVars);", "public static function bkap_get_extra_options(){\n\n return apply_filters( 'bkap_extra_options', array(\n \n 'bkap_resource' => array(\n 'id' => '_bkap_resource',\n 'wrapper_class' => 'show_if_simple',\n 'label' => __( 'Booking Resource', 'woocommerce-booking' ),\n 'description' => __( 'Booking Resource Description.', 'woocommerce-booking' ),\n 'default' => 'no',\n ),\n ) );\n }", "function jigoshop_upgrade_150() {\n\t\n\tJigoshop_Base::get_options()->add_option( 'jigoshop_cart_shows_shop_button', 'no' );\n\tJigoshop_Base::get_options()->add_option( 'jigoshop_enable_postcode_validating', 'no' );\n\tJigoshop_Base::get_options()->add_option( 'jigoshop_product_thumbnail_columns', '3' );\n\t\n}", "public function apply()\n {\n /** @var EavSetup $eavSetup */\n $eavSetup = $this->eavSetupFactory->create(['setup' => $this->moduleDataSetup]);\n\n if (!$eavSetup->getAttribute(Product::ENTITY, 'am_shipping_type')) {\n $eavSetup->addAttribute(\n Product::ENTITY,\n 'am_shipping_type',\n [\n 'type' => 'varchar',\n 'backend' => '',\n 'frontend' => '',\n 'label' => 'Shipping Type',\n 'input' => 'select',\n 'class' => '',\n 'source' => '',\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'visible' => true,\n 'required' => false,\n 'user_defined' => false,\n 'default' => 0,\n 'searchable' => false,\n 'filterable' => false,\n 'comparable' => false,\n 'visible_on_front' => false,\n 'used_in_product_listing' => true,\n 'unique' => false,\n 'apply_to' => ''\n ]\n );\n }\n }", "static function get_options(){\n\t\t\t\tglobal $gdlr_core_item_pdb;\n\t\t\t\t\n\t\t\t\treturn array(\n\t\t\t\t\t'general' => array(\n\t\t\t\t\t\t'title' => esc_html__('General', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'image' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Image', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'upload',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'thumbnail-size' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Thumbnail Size', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'combobox',\n\t\t\t\t\t\t\t\t'options' => 'thumbnail-size',\n\t\t\t\t\t\t\t\t'default' => 'full'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'title' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Title', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'default' => esc_html__('Promo Box Item Title', 'goodlayers-core'),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Content', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'tinymce',\n\t\t\t\t\t\t\t\t'default' => esc_html__('Promo box item sample content', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'wrapper-class' => 'gdlr-core-fullsize'\n\t\t\t\t\t\t\t),\t\n\t\t\t\t\t\t\t'text-align' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Text Align', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'radioimage',\n\t\t\t\t\t\t\t\t'options' => 'text-align',\n\t\t\t\t\t\t\t\t'default' => 'center'\n\t\t\t\t\t\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\t'frame' => array(\n\t\t\t\t\t\t'title' => esc_html__('Frame Style', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'enable-frame' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Enable Frame', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t'default' => 'enable'\n\t\t\t\t\t\t\t), \n\t\t\t\t\t\t\t'enable-shadow' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Enable Shadow', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t'default' => 'enable',\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\n\t\t\t\t\t\t\t), \n\t\t\t\t\t\t\t'frame-padding' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Frame Padding', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'custom',\n\t\t\t\t\t\t\t\t'item-type' => 'padding',\n\t\t\t\t\t\t\t\t'data-input-type' => 'pixel',\n\t\t\t\t\t\t\t\t'default' => array( 'top'=>'30px', 'right'=>'30px', 'bottom'=>'10px', 'left'=>'30px', 'settings'=>'unlink' ),\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'frame-background-color' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Frame Background Color', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'frame-border-width' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Frame Border Width', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'custom',\n\t\t\t\t\t\t\t\t'item-type' => 'padding',\n\t\t\t\t\t\t\t\t'data-input-type' => 'pixel',\n\t\t\t\t\t\t\t\t'default' => array( 'top'=>'0px', 'right'=>'1px', 'bottom'=>'1px', 'left'=>'1px', 'settings'=>'unlink' ),\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'frame-border-color' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Frame Border Color', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\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\t'typography' => array(\n\t\t\t\t\t\t'title' => esc_html__('Typography', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'title-size' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Title Size', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'fontslider',\n\t\t\t\t\t\t\t\t'default' => '14px'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'content-size' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Content Size', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'fontslider',\n\t\t\t\t\t\t\t\t'default' => '14px'\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\t'color' => array(\n\t\t\t\t\t\t'title' => esc_html__('Color', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'title-color' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Title Color', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'colorpicker'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'content-color' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Content Color', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'colorpicker'\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\t'spacing' => array(\n\t\t\t\t\t\t'title' => esc_html__('Spacing', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'padding-bottom' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Padding Bottom ( Item )', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'data-input-type' => 'pixel',\n\t\t\t\t\t\t\t\t'default' => $gdlr_core_item_pdb\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}", "protected function _beforeToHtml(){\n\t\tif($this->getType()==\"featured/widget\")\n\t\t{\n\t\t\t$this->setWidgetOptions();\n\t\t}\n $this->setProductCollection($this->_getProductCollection());\n\t}", "function setSyncItemsCodeProduct()\n {\n }", "function addcustom_field_product(){\r\n\tglobal $post;\r\n \r\n//would normally get printed to the screen/output to browser\r\n \r\n\t$pid=$post->ID;\r\n\t$_enable_warehouse=get_metadata('post',$pid,'_enable_warehouse',true);\r\n\t$_warehouse_flag=get_metadata('post',$pid,'_warehouse_flag',true);\r\n\t$chk='';\r\n\tif($_enable_warehouse==1) $chk='checked=checked';\r\n\tif($_warehouse_flag=='A' && $_enable_warehouse==1) $disabled=' disabled=disabled';\r\n\t$head='<div class=\"dokan-section-heading\" data-togglehandler=\"dokan_product_shipping_tax\">\r\n <h2><i class=\"fa fa-truck\" aria-hidden=\"true\"></i>Manage Warehouse</h2>\r\n <p>Manage Warehouse for this product</p>\r\n <a href=\"#\" class=\"dokan-section-toggle\">\r\n <i class=\"fa fa-sort-desc fa-flip-vertical\" aria-hidden=\"true\"></i>\r\n </a>\r\n <div class=\"dokan-clearfix\"></div>\r\n </div>';\r\n\t$output= ' <div class=\"dokan-edit-row dokan-clearfix\">'.$head.'<div class=\"dokan-section-content\"><div class=\"dokan-form-group\">\r\n <label class=\"\"> <input type=\"checkbox\" id=\"_enable_warehouse\" class=\"_enable_warehouse\" name=\"_enable_warehouse\" value=\"1\"' .$chk. $disabled .'>Ships from Eartheries Warehouse- By checking this box I have agreed to the terms and condition set out by Eartheries Limited regarding warehousing\r\n\t\t\t\t</label>\r\n\t\t\t\t<input type=\"hidden\" class=\"_warehouse_flag\" name=\"_warehouse_flag\" id=\"_warehouse_flag\" value=\"0\">\r\n\t\t\t\t</div></div></div>';\r\n\t\t\t\t\r\n\t\t\t\t\r\n\techo $output1=\"<script>\r\n\t\t$('.dokan-product-edit-form').on('change', '._enable_warehouse', function() {\r\n\t\t\t\r\n\t\t\t$('#_warehouse_flag').val('2');\r\n\t\t\t\t\r\n\t\t});\r\n\t\t \r\n\t\r\n\t</script>\";\r\n\t\techo $output ;\t\r\n\t\r\n}", "public function setOptions()\n\t{\n\t\tupdate_option($this->optionVar, serialize($this->options));\n\t}", "public function options_init() {\n\t\t\tglobal $allowedtags;\n\t\t\t$allowedtags['p'] = array();\n\t\t\t$this->allowedtags = $allowedtags;\n\n\t\t // set options equal to defaults\n\t\t $this->_options = get_option( $this->options_group[0]['options_name'] );\n\t\t if ( false === $this->_options ) {\n\t\t\t\t$this->_options = $this->get_defaults();\n\t\t }\n\t\t if ( isset( $_GET['undo'] ) && !isset( $_GET['settings-updated'] ) && is_array( $this->get_option('previous') ) ) {\n\t\t \t$this->_options = $this->get_option('previous');\n\t\t }\n\t\t update_option( $this->options_group[0]['options_name'], $this->_options );\t\t\n\t\t \n\t\t}", "function admin_init() {\r\n register_setting('e_tools_options', 'e_tools');\r\n}", "protected function setOptions()\n {\n $options = \\XLite::getInstance()->getOptions('skin_details');\n \n if (isset($options['skin']) && $options['skin'] === 'default') {\n $options['skin'] = 'customer';\n }\n\n foreach (array('skin', 'locale') as $name) {\n if (!isset($this->$name)) {\n $this->$name = $options[$name];\n }\n }\n\n $this->setPath();\n }", "public function register_options() {\n\t\tparent::register_options();\n\n\t}", "private function set_end_options(): void {\n Simply_Static\\Options::instance()\n ->set('additional_files', Utils::array_to_option_string($this->files))\n ->set('additional_urls', Utils::array_to_option_string($this->urls))\n ->set('archive_end_time', Simply_Static\\Util::formatted_datetime())\n ->save();\n }", "public function getCustomOptions($product) {\n $options = array ();\n $optionsData = $product->getOptions ();\n foreach ( $optionsData as $option ) {\n $optionVal = array ();\n $optionValues = $option->getValues ();\n foreach ( $optionValues as $optVal ) {\n $optionVal [] = array (\n static::OPTIONID => $optVal->getOptionId (),\n 'option_type_id' => $optVal->getOptionTypeId (),\n 'sku' => $optVal->getSku (),\n 'sort_order' => $optVal->getSortOrder (),\n static::TITLE => $optVal->getTitle (),\n static::PRICE => $optVal->getPrice (),\n 'price_type' => $optVal->getPriceType () \n );\n }\n \n $options [] = array (\n 'type' => $option->getType (),\n static::OPTIONID => $option->getOptionId (),\n 'product_id' => $option->getProductId (),\n 'type' => $option->getType (),\n 'is_require' => $option->getIsRequire (),\n 'sort_order' => $option->getSortOrder (),\n static::TITLE => $option->getTitle (),\n static::PRICE => $option->getPrice (),\n 'price_type' => $option->getPriceType (),\n 'option_value' => $optionVal \n );\n }\n \n return $options;\n }", "public function additional_plugin_setup() {\n\n\t\t$page_main = $this->_admin_pages[ 'vfb-pro' ];\n\n\t\t// If first time editing, disable advanced items by default.\n\t\tif( false === get_user_option( 'manage' . $page_main . 'columnshidden' ) ) {\n\t\t\t$user = wp_get_current_user();\n\t\t\tupdate_user_option( $user->ID, 'manage' . $page_main . 'columnshidden', array( 0 => 'merge-tag' ), true );\n\t\t}\n\n\t\tif ( !get_option( 'vfb_dashboard_widget_options' ) ) {\n\t\t\t$widget_options['vfb_dashboard_recent_entries'] = array(\n\t\t\t\t'items' => 5,\n\t\t\t);\n\t\t\tupdate_option( 'vfb_dashboard_widget_options', $widget_options );\n\t\t}\n\n\t}", "function productoption()\n\t{\n\t\t$res = $this->product_model->productOptionList();\n\t\techo \"<pre />\";\n\t\tprint_r($res);\n\t\texit;\n\t\t\n\t\t//check if product type list is pulled. if not, list is set to empty array\n\t\t// $productTypeList = ( $res->rc == 0 ) ? $res->data->producttypelist : array();\n\t\t\n\t\t// $data['mainContent'] = 'producttype_list_view.tpl';\n\t\t\n\t\t// $data['data'] = array(\n\t\t\t// 'baseUrl'\t\t\t=> base_url(),\n\t\t\t// 'title'\t\t\t\t=> 'Product Type',\n\t\t\t// 'msgClass'\t\t\t=> $this->msgClass,\n\t\t\t// 'msgInfo'\t\t\t=> $this->msgInfo,\n\t\t\t// 'productTypeList'\t=> $productTypeList\n\t\t// );\n\t\t\n\t\t// $this->load->view($this->globalTpl, $data);\t\n\t}", "function yaz_set_option($id, $options)\n{\n}", "public function configureVariantAttributes(Product $product, Detail $detail)\n {\n if (count($product->variant) === 0) {\n return;\n }\n\n $article = $detail->getArticle();\n $detailOptions = $detail->getConfiguratorOptions();\n if (!$article->getConfiguratorSet()) {\n $configSet = new Set();\n $configSet->setName('Set-' . $article->getName());\n $configSet->setArticles([$article]);\n $configSet->setType(0);\n $article->setConfiguratorSet($configSet);\n } else {\n $configSet = $article->getConfiguratorSet();\n }\n if ($product->configuratorSetType !== null) {\n $configSet->setType($product->configuratorSetType);\n }\n\n foreach ($product->variant as $key => $value) {\n $group = $this->getGroupByName($configSet, $key);\n\n $option = $this->getOrCreateOptionByName($configSet, $group, $value);\n\n $configSet = $this->addGroupToConfiguratorSet($configSet, $group);\n $configSet = $this->addOptionToConfiguratorSet($configSet, $option);\n\n $this->manager->persist($option);\n $this->manager->persist($group);\n if (!$detailOptions->contains($option)) {\n $detailOptions->add($option);\n }\n }\n\n $this->manager->persist($configSet);\n\n $detail->setConfiguratorOptions($detailOptions);\n $this->manager->persist($detail);\n $this->manager->persist($article);\n\n $this->deleteUnusedOptions($product, $detailOptions, $configSet);\n\n $this->manager->flush();\n\n foreach ($product->variant as $key => $value) {\n $group = $this->getGroupByName($configSet, $key);\n $option = $this->getOrCreateOptionByName($configSet, $group, $value);\n\n //translate configurator groups and configurator options\n $this->addGroupTranslation($group, $product);\n $this->addOptionTranslation($option, $product);\n }\n }", "public function initOptions() {\n parent::initOptions();\n $this->_options->setOpt(\"WTPSI Company ID\",'wtpsicpnyid','text',array('compulsory'=>false), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI XML ID\",'wtpsixmlid','text',array('compulsory'=>false), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI UserName\",'wtpsiusername','text',array('compulsory'=>false), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI Password\",'wtpsixmlpasswd','text',array('compulsory'=>false), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI WTP Login\",'wtpsiwtplogin','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI User Contact\",'wtpsicontactuser','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI Contact Password \",'wtpsicontactpasswd','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI POSNO \",'wtpsiposno','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"Utiliser le login company\",'wtpsiusecpny','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI WSDL \",'wtpsiwsdl','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI Add-Ons WSDL \",'wtpsiaddonswsdl','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"VALIDATION des WTP : allproj\",'wtpvalidationallproj','boolean',array('compulsory'=>true), false ,'EPassLibre');\n $this->_options->setOpt(\"VALIDATION des WTP 64 bits\", 'wtp64bits', 'boolean',array('compulsory'=>true), false ,'EPassLibre');\n }", "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = &$options[\"action\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageAddLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageAddLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\n\n\t\t// Edit\n\t\t$item = &$option->Add(\"edit\");\n\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageEditLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageEditLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->EditUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\t$item->Visible = ($this->EditUrl <> \"\" && $Security->CanEdit());\n\n\t\t// Set up action default\n\t\t$option = &$options[\"action\"];\n\t\t$option->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\t\t$option->UseImageAndText = TRUE;\n\t\t$option->UseDropDownButton = FALSE;\n\t\t$option->UseButtonGroup = TRUE;\n\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "public function setupOptions() {\n $this->data = array('' => '') + $this->data;\n\n if (!isset($this->htmlOptions['class'])) {\n $this->htmlOptions['class'] = '';\n }\n\n // Include the base css if required\n if ($this->includeBaseCss) {\n\n if (stripos($this->htmlOptions['class'], 'yii-selectize') === false) {\n $this->htmlOptions['class'] .= ' yii-selectize';\n }\n\n // Add the full width class if fullWidth option is set to true\n if ($this->fullWidth && stripos($this->htmlOptions['class'], 'full-width') === false) {\n $this->htmlOptions['class'] .= ' full-width';\n }\n } else if ($this->fullWidth) { // if full with is required but the base css is not included\n if (!isset($this->htmlOptions['style'])) {\n $this->htmlOptions['style'] = '';\n }\n\n // we add the style attribute\n if (stripos($this->htmlOptions['style'], 'width:') === false) {\n $this->htmlOptions['style'] .= ' width: 100%;';\n }\n }\n\n // If the placeholder property is set we'll overwrite the htmlOptions attribute\n if (!empty($this->placeholder)) {\n $this->htmlOptions['placeholder'] = $this->placeholder;\n }\n\n // If the multiple property is set we'll overwrite the htmlOptions attribute\n if (!empty($this->multiple)) {\n $this->htmlOptions['multiple'] = $this->multiple;\n }\n\n // Set the selected attributed to the given options\n if (!empty($this->selectedValues)) {\n foreach ($this->selectedValues as $valueId) {\n $this->htmlOptions['options'][$valueId]['selected'] = true;\n }\n }\n\n }", "public static function getProductOptions()\n {\n return self::get('product') ?: [];\n }", "function civiq_ballots_ajax_add_more_options($form, $form_state) {\r\n return $form['options'];\r\n}", "function modify_js_options( $options ) {\n // Addon Options Cleaned Up A Bit (lowest pri)\n //\n if ( $this->slplus->is_CheckTrue( $this->addon->options['hide_bubble'] ) ) {\n\t $this->slplus->SmartOptions->bubblelayout->value = '';\n }\n\n // Options From URL Passing (Second Highest Priority)\n //\n $new_options = array();\n if ( ! empty( $_REQUEST['address'] ) && $this->is_address_passed_by_URL() ) {\n $new_options['immediately_show_locations'] = '1';\n $new_options['use_sensor'] = false;\n }\n\n // Widget Options (Highest Pri)\n //\n $widget_options = array();\n if ( $this->addon->widget->is_initial_widget_search( $_REQUEST ) ) {\n $widget_options = array(\n 'disable_initial_directory' => false ,\n 'immediately_show_locations' => '1' ,\n 'map_initial_display' => 'map',\n 'use_sensor' => false\n );\n\n // Discrete State Output - recenter map\n //\n if ( isset( $_REQUEST['slp_widget']['state'] ) && ! empty( $_REQUEST['slp_widget']['state'] ) ) {\n $widget_options['map_center'] = $_REQUEST['slp_widget']['state'];\n }\n\n // Set Radius\n //\n if ( ( isset( $_REQUEST['widget_address'] ) ) && isset( $_REQUEST['radius'] ) ) {\n $widget_options['initial_radius'] = $_REQUEST['radius'];\n }\n }\n\n if ( empty( $this->addon->options['map_region'] ) ) {\n $this->attribute_special_processing( 'map_region' );\n }\n\n // Lowest Priority On Left: current options (slplus->options), then addon options, then attribute settings, then URL passing stuff, then our widget needs\n $all_options = array_merge( $options, $this->addon->options , $this->attribute_js_options, $new_options , $widget_options );\n\n // Only keep original options that were changed or \"for our JS\" settings\n\t //\n\t // NOTE: None of the SmartOptions should appear here\n\t //\n\t $for_our_js = array(\n\t \t'address_autocomplete',\n\t \t'disable_initial_directory',\n\t 'selector_behavior',\n\t );\n\t foreach ( $all_options as $key => $value ) {\n\t \tif ( array_key_exists( $key , $options ) || in_array( $key , $for_our_js ) ) {\n\t \t\t$options[ $key ] = $all_options[ $key ]; // overwrite\n\t\t }\n\t }\n\n return $options;\n }", "function store(){\n update_option( $this->option_name, $this->settings );\n }", "function add_allowed_options($new_options, $options = '')\n {\n }", "function wcfmgs_shop_manager_capability_option_updates( $options = array() ) {\r\n \t\r\n\t\t$options = get_option( 'wcfm_shop_manager_capability_options' );\r\n\t\t$shop_manager_role = get_role( 'shop_manager' );\r\n\t\t\r\n\t\t// Delete Media Capability\r\n\t\tif( isset( $options['delete_media'] ) && $options[ 'delete_media' ] == 'yes' ) {\r\n\t\t\t$shop_manager_role->remove_cap( 'delete_attachments' );\r\n\t\t\t$shop_manager_role->remove_cap( 'delete_posts' );\r\n\t\t} else {\r\n\t\t\t$shop_manager_role->add_cap( 'delete_attachments' );\r\n\t\t\t$shop_manager_role->add_cap( 'delete_posts' );\r\n\t\t}\r\n\t\t\t\r\n\t\t// Booking Capability\r\n\t\tif( wcfm_is_booking() ) {\r\n\t\t\tif( isset( $options['manage_booking'] ) && $options[ 'manage_booking' ] == 'yes' ) {\r\n\t\t\t\t$shop_manager_role->remove_cap( 'manage_bookings' );\r\n\t\t\t} else {\r\n\t\t\t\t$shop_manager_role->add_cap( 'manage_bookings' );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Appointment Capability\r\n\t\tif( WCFM_Dependencies::wcfmu_plugin_active_check() ) {\r\n\t\t\tif( WCFMu_Dependencies::wcfm_wc_appointments_active_check() ) {\r\n\t\t\t\tif( isset( $options['manage_appointment'] ) && $options[ 'manage_appointment' ] == 'yes' ) {\r\n\t\t\t\t\t$shop_manager_role->remove_cap( 'manage_appointments' );\r\n\t\t\t\t\t$shop_manager_role->remove_cap( 'manage_others_appointments' );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$shop_manager_role->add_cap( 'manage_appointments' );\r\n\t\t\t\t\t$shop_manager_role->add_cap( 'manage_others_appointments' );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Submit Products\r\n\t\tif( isset( $options[ 'submit_products' ] ) && $options[ 'submit_products' ] == 'yes' ) {\r\n\t\t\t$shop_manager_role->remove_cap( 'edit_products' );\r\n\t\t\t$shop_manager_role->remove_cap( 'manage_products' );\r\n\t\t\t$shop_manager_role->remove_cap( 'read_products' );\r\n\t\t} else {\r\n\t\t\t$shop_manager_role->add_cap( 'edit_products' );\r\n\t\t\t$shop_manager_role->add_cap( 'manage_products' );\r\n\t\t\t$shop_manager_role->add_cap( 'read_products' );\r\n\t\t}\r\n\t\t\r\n\t\t// Publish Coupon\r\n\t\tif( isset( $options[ 'publish_products' ] ) && $options[ 'publish_products' ] == 'yes' ) {\r\n\t\t\t$shop_manager_role->remove_cap( 'publish_products' );\r\n\t\t} else {\r\n\t\t\t$shop_manager_role->add_cap( 'publish_products' );\r\n\t\t}\r\n\t\t\r\n\t\t// Live Products Edit\r\n\t\tif( isset( $options[ 'edit_live_products' ] ) && $options[ 'edit_live_products' ] == 'yes' ) {\r\n\t\t\t$shop_manager_role->remove_cap( 'edit_published_products' );\r\n\t\t} else {\r\n\t\t\t$shop_manager_role->add_cap( 'edit_published_products' );\r\n\t\t}\r\n\t\t\r\n\t\t// Delete Products\r\n\t\tif( isset( $options[ 'delete_products' ] ) && $options[ 'delete_products' ] == 'yes' ) {\r\n\t\t\t$shop_manager_role->remove_cap( 'delete_published_products' );\r\n\t\t\t$shop_manager_role->remove_cap( 'delete_products' );\r\n\t\t} else {\r\n\t\t\t$shop_manager_role->add_cap( 'delete_published_products' );\r\n\t\t\t$shop_manager_role->add_cap( 'delete_products' );\r\n\t\t}\r\n\t\t\r\n\t\t// Submit Cuopon\r\n\t\tif( isset( $options[ 'submit_coupons' ] ) && $options[ 'submit_coupons' ] == 'yes' ) {\r\n\t\t\t$shop_manager_role->remove_cap( 'edit_shop_coupons' );\r\n\t\t\t$shop_manager_role->remove_cap( 'manage_shop_coupons' );\r\n\t\t\t$shop_manager_role->remove_cap( 'read_shop_coupons' );\r\n\t\t} else {\r\n\t\t\t$shop_manager_role->add_cap( 'edit_shop_coupons' );\r\n\t\t\t$shop_manager_role->add_cap( 'manage_shop_coupons' );\r\n\t\t\t$shop_manager_role->add_cap( 'read_shop_coupons' );\r\n\t\t}\r\n\t\t\r\n\t\t// Publish Coupon\r\n\t\tif( isset( $options[ 'publish_coupons' ] ) && $options[ 'publish_coupons' ] == 'yes' ) {\r\n\t\t\t$shop_manager_role->remove_cap( 'publish_shop_coupons' );\r\n\t\t} else {\r\n\t\t\t$shop_manager_role->add_cap( 'publish_shop_coupons' );\r\n\t\t}\r\n\t\t\r\n\t\t// Live Coupon Edit\r\n\t\tif( isset( $options[ 'edit_live_coupons' ] ) && $options[ 'edit_live_coupons' ] == 'yes' ) {\r\n\t\t\t$shop_manager_role->remove_cap( 'edit_published_shop_coupons' );\r\n\t\t} else {\r\n\t\t\t$shop_manager_role->add_cap( 'edit_published_shop_coupons' );\r\n\t\t}\r\n\t\t\r\n\t\t// Delete Coupon\r\n\t\tif( isset( $options[ 'delete_coupons' ] ) && $options[ 'delete_coupons' ] == 'yes' ) {\r\n\t\t\t$shop_manager_role->remove_cap( 'delete_published_shop_coupons' );\r\n\t\t\t$shop_manager_role->remove_cap( 'delete_shop_coupons' );\r\n\t\t} else {\r\n\t\t\t$shop_manager_role->add_cap( 'delete_published_shop_coupons' );\r\n\t\t\t$shop_manager_role->add_cap( 'delete_shop_coupons' );\r\n\t\t}\r\n }", "public function add_global_custom_options()\n {\n add_options_page('Plugin options', 'Plugin options', 'manage_options', 'functions','global_custom_options');\n }", "public function options_update() {\n\t\tregister_setting( $this->plugin_name, $this->plugin_name, array($this, 'validate', 'default' => array( \"url_nerd_instance\" => \"\", \"category_weight\" => \"0.04\", \"entity_weight\" => \"0.7\" ) ) );\n\t}", "function SetupOtherOptions() {\r\n\t\tglobal $Language, $Security;\r\n\t\t$options = &$this->OtherOptions;\r\n\t\t$option = &$options[\"action\"];\r\n\r\n\t\t// Add\r\n\t\t$item = &$option->Add(\"add\");\r\n\t\t$addcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageAddLink\"));\r\n\t\tif ($this->IsModal) // Modal\r\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->AddUrl) . \"',caption:'\" . $addcaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\r\n\t\telse\r\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\r\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\r\n\r\n\t\t// Edit\r\n\t\t$item = &$option->Add(\"edit\");\r\n\t\t$editcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageEditLink\"));\r\n\t\tif ($this->IsModal) // Modal\r\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->EditUrl) . \"',caption:'\" . $editcaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\r\n\t\telse\r\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->EditUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\r\n\t\t$item->Visible = ($this->EditUrl <> \"\" && $Security->CanEdit());\r\n\r\n\t\t// Copy\r\n\t\t$item = &$option->Add(\"copy\");\r\n\t\t$copycaption = ew_HtmlTitle($Language->Phrase(\"ViewPageCopyLink\"));\r\n\t\tif ($this->IsModal) // Modal\r\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->CopyUrl) . \"',caption:'\" . $copycaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\r\n\t\telse\r\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->CopyUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\r\n\t\t$item->Visible = ($this->CopyUrl <> \"\" && $Security->CanAdd());\r\n\r\n\t\t// Delete\r\n\t\t$item = &$option->Add(\"delete\");\r\n\t\t$item->Body = \"<a onclick=\\\"return ew_ConfirmDelete(this);\\\" class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->DeleteUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\r\n\t\t$item->Visible = ($this->DeleteUrl <> \"\" && $Security->CanDelete());\r\n\t\t$option = &$options[\"detail\"];\r\n\t\t$DetailTableLink = \"\";\r\n\t\t$DetailViewTblVar = \"\";\r\n\t\t$DetailCopyTblVar = \"\";\r\n\t\t$DetailEditTblVar = \"\";\r\n\r\n\t\t// \"detail_observacion_tutor\"\r\n\t\t$item = &$option->Add(\"detail_observacion_tutor\");\r\n\t\t$body = $Language->Phrase(\"ViewPageDetailLink\") . $Language->TablePhrase(\"observacion_tutor\", \"TblCaption\");\r\n\t\t$body .= str_replace(\"%c\", $this->observacion_tutor_Count, $Language->Phrase(\"DetailCount\"));\r\n\t\t$body = \"<a class=\\\"btn btn-default btn-sm ewRowLink ewDetail\\\" data-action=\\\"list\\\" href=\\\"\" . ew_HtmlEncode(\"observacion_tutorlist.php?\" . EW_TABLE_SHOW_MASTER . \"=tutores&fk_Dni_Tutor=\" . urlencode(strval($this->Dni_Tutor->CurrentValue)) . \"\") . \"\\\">\" . $body . \"</a>\";\r\n\t\t$links = \"\";\r\n\t\tif ($GLOBALS[\"observacion_tutor_grid\"] && $GLOBALS[\"observacion_tutor_grid\"]->DetailView && $Security->CanView() && $Security->AllowView(CurrentProjectID() . 'observacion_tutor')) {\r\n\t\t\t$links .= \"<li><a class=\\\"ewRowLink ewDetailView\\\" data-action=\\\"view\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MasterDetailViewLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->GetViewUrl(EW_TABLE_SHOW_DETAIL . \"=observacion_tutor\")) . \"\\\">\" . ew_HtmlImageAndText($Language->Phrase(\"MasterDetailViewLink\")) . \"</a></li>\";\r\n\t\t\tif ($DetailViewTblVar <> \"\") $DetailViewTblVar .= \",\";\r\n\t\t\t$DetailViewTblVar .= \"observacion_tutor\";\r\n\t\t}\r\n\t\tif ($GLOBALS[\"observacion_tutor_grid\"] && $GLOBALS[\"observacion_tutor_grid\"]->DetailEdit && $Security->CanEdit() && $Security->AllowEdit(CurrentProjectID() . 'observacion_tutor')) {\r\n\t\t\t$links .= \"<li><a class=\\\"ewRowLink ewDetailEdit\\\" data-action=\\\"edit\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MasterDetailEditLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->GetEditUrl(EW_TABLE_SHOW_DETAIL . \"=observacion_tutor\")) . \"\\\">\" . ew_HtmlImageAndText($Language->Phrase(\"MasterDetailEditLink\")) . \"</a></li>\";\r\n\t\t\tif ($DetailEditTblVar <> \"\") $DetailEditTblVar .= \",\";\r\n\t\t\t$DetailEditTblVar .= \"observacion_tutor\";\r\n\t\t}\r\n\t\tif ($GLOBALS[\"observacion_tutor_grid\"] && $GLOBALS[\"observacion_tutor_grid\"]->DetailAdd && $Security->CanAdd() && $Security->AllowAdd(CurrentProjectID() . 'observacion_tutor')) {\r\n\t\t\t$links .= \"<li><a class=\\\"ewRowLink ewDetailCopy\\\" data-action=\\\"add\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MasterDetailCopyLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->GetCopyUrl(EW_TABLE_SHOW_DETAIL . \"=observacion_tutor\")) . \"\\\">\" . ew_HtmlImageAndText($Language->Phrase(\"MasterDetailCopyLink\")) . \"</a></li>\";\r\n\t\t\tif ($DetailCopyTblVar <> \"\") $DetailCopyTblVar .= \",\";\r\n\t\t\t$DetailCopyTblVar .= \"observacion_tutor\";\r\n\t\t}\r\n\t\tif ($links <> \"\") {\r\n\t\t\t$body .= \"<button class=\\\"dropdown-toggle btn btn-default btn-sm ewDetail\\\" data-toggle=\\\"dropdown\\\"><b class=\\\"caret\\\"></b></button>\";\r\n\t\t\t$body .= \"<ul class=\\\"dropdown-menu\\\">\". $links . \"</ul>\";\r\n\t\t}\r\n\t\t$body = \"<div class=\\\"btn-group\\\">\" . $body . \"</div>\";\r\n\t\t$item->Body = $body;\r\n\t\t$item->Visible = $Security->AllowList(CurrentProjectID() . 'observacion_tutor');\r\n\t\tif ($item->Visible) {\r\n\t\t\tif ($DetailTableLink <> \"\") $DetailTableLink .= \",\";\r\n\t\t\t$DetailTableLink .= \"observacion_tutor\";\r\n\t\t}\r\n\t\tif ($this->ShowMultipleDetails) $item->Visible = FALSE;\r\n\r\n\t\t// Multiple details\r\n\t\tif ($this->ShowMultipleDetails) {\r\n\t\t\t$body = $Language->Phrase(\"MultipleMasterDetails\");\r\n\t\t\t$body = \"<div class=\\\"btn-group\\\">\";\r\n\t\t\t$links = \"\";\r\n\t\t\tif ($DetailViewTblVar <> \"\") {\r\n\t\t\t\t$links .= \"<li><a class=\\\"ewRowLink ewDetailView\\\" data-action=\\\"view\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MasterDetailViewLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->GetViewUrl(EW_TABLE_SHOW_DETAIL . \"=\" . $DetailViewTblVar)) . \"\\\">\" . ew_HtmlImageAndText($Language->Phrase(\"MasterDetailViewLink\")) . \"</a></li>\";\r\n\t\t\t}\r\n\t\t\tif ($DetailEditTblVar <> \"\") {\r\n\t\t\t\t$links .= \"<li><a class=\\\"ewRowLink ewDetailEdit\\\" data-action=\\\"edit\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MasterDetailEditLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->GetEditUrl(EW_TABLE_SHOW_DETAIL . \"=\" . $DetailEditTblVar)) . \"\\\">\" . ew_HtmlImageAndText($Language->Phrase(\"MasterDetailEditLink\")) . \"</a></li>\";\r\n\t\t\t}\r\n\t\t\tif ($DetailCopyTblVar <> \"\") {\r\n\t\t\t\t$links .= \"<li><a class=\\\"ewRowLink ewDetailCopy\\\" data-action=\\\"add\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MasterDetailCopyLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->GetCopyUrl(EW_TABLE_SHOW_DETAIL . \"=\" . $DetailCopyTblVar)) . \"\\\">\" . ew_HtmlImageAndText($Language->Phrase(\"MasterDetailCopyLink\")) . \"</a></li>\";\r\n\t\t\t}\r\n\t\t\tif ($links <> \"\") {\r\n\t\t\t\t$body .= \"<button class=\\\"dropdown-toggle btn btn-default btn-sm ewMasterDetail\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MultipleMasterDetails\")) . \"\\\" data-toggle=\\\"dropdown\\\">\" . $Language->Phrase(\"MultipleMasterDetails\") . \"<b class=\\\"caret\\\"></b></button>\";\r\n\t\t\t\t$body .= \"<ul class=\\\"dropdown-menu ewMenu\\\">\". $links . \"</ul>\";\r\n\t\t\t}\r\n\t\t\t$body .= \"</div>\";\r\n\r\n\t\t\t// Multiple details\r\n\t\t\t$oListOpt = &$option->Add(\"details\");\r\n\t\t\t$oListOpt->Body = $body;\r\n\t\t}\r\n\r\n\t\t// Set up detail default\r\n\t\t$option = &$options[\"detail\"];\r\n\t\t$options[\"detail\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonDetails\");\r\n\t\t$option->UseImageAndText = TRUE;\r\n\t\t$ar = explode(\",\", $DetailTableLink);\r\n\t\t$cnt = count($ar);\r\n\t\t$option->UseDropDownButton = ($cnt > 1);\r\n\t\t$option->UseButtonGroup = TRUE;\r\n\t\t$item = &$option->Add($option->GroupOptionName);\r\n\t\t$item->Body = \"\";\r\n\t\t$item->Visible = FALSE;\r\n\r\n\t\t// Set up action default\r\n\t\t$option = &$options[\"action\"];\r\n\t\t$option->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\r\n\t\t$option->UseImageAndText = TRUE;\r\n\t\t$option->UseDropDownButton = TRUE;\r\n\t\t$option->UseButtonGroup = TRUE;\r\n\t\t$item = &$option->Add($option->GroupOptionName);\r\n\t\t$item->Body = \"\";\r\n\t\t$item->Visible = FALSE;\r\n\t}", "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = &$options[\"action\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$addcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageAddLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->AddUrl) . \"'});\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\n\n\t\t// Edit\n\t\t$item = &$option->Add(\"edit\");\n\t\t$editcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageEditLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->EditUrl) . \"'});\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->EditUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\t$item->Visible = ($this->EditUrl <> \"\" && $Security->CanEdit());\n\n\t\t// Copy\n\t\t$item = &$option->Add(\"copy\");\n\t\t$copycaption = ew_HtmlTitle($Language->Phrase(\"ViewPageCopyLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,btn:'AddBtn',url:'\" . ew_HtmlEncode($this->CopyUrl) . \"'});\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->CopyUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\t$item->Visible = ($this->CopyUrl <> \"\" && $Security->CanAdd());\n\n\t\t// Delete\n\t\t$item = &$option->Add(\"delete\");\n\t\tif ($this->IsModal) // Handle as inline delete\n\t\t\t$item->Body = \"<a onclick=\\\"return ew_ConfirmDelete(this);\\\" class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode(ew_UrlAddQuery($this->DeleteUrl, \"a_delete=1\")) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->DeleteUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\t$item->Visible = ($this->DeleteUrl <> \"\" && $Security->CanDelete());\n\n\t\t// Set up action default\n\t\t$option = &$options[\"action\"];\n\t\t$option->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\t\t$option->UseImageAndText = TRUE;\n\t\t$option->UseDropDownButton = FALSE;\n\t\t$option->UseButtonGroup = TRUE;\n\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = &$options[\"action\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$addcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageAddLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->AddUrl) . \"'});\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\n\n\t\t// Edit\n\t\t$item = &$option->Add(\"edit\");\n\t\t$editcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageEditLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->EditUrl) . \"'});\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->EditUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\t$item->Visible = ($this->EditUrl <> \"\" && $Security->CanEdit());\n\n\t\t// Copy\n\t\t$item = &$option->Add(\"copy\");\n\t\t$copycaption = ew_HtmlTitle($Language->Phrase(\"ViewPageCopyLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,btn:'AddBtn',url:'\" . ew_HtmlEncode($this->CopyUrl) . \"'});\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->CopyUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\t$item->Visible = ($this->CopyUrl <> \"\" && $Security->CanAdd());\n\n\t\t// Delete\n\t\t$item = &$option->Add(\"delete\");\n\t\tif ($this->IsModal) // Handle as inline delete\n\t\t\t$item->Body = \"<a onclick=\\\"return ew_ConfirmDelete(this);\\\" class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode(ew_UrlAddQuery($this->DeleteUrl, \"a_delete=1\")) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->DeleteUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\t$item->Visible = ($this->DeleteUrl <> \"\" && $Security->CanDelete());\n\n\t\t// Set up action default\n\t\t$option = &$options[\"action\"];\n\t\t$option->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\t\t$option->UseImageAndText = TRUE;\n\t\t$option->UseDropDownButton = FALSE;\n\t\t$option->UseButtonGroup = TRUE;\n\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "public static function add_option() {\n\t\tFrmAppHelper::permission_check('frm_edit_forms');\n check_ajax_referer( 'frm_ajax', 'nonce' );\n\n\t\t$id = FrmAppHelper::get_post_param( 'field_id', 0, 'absint' );\n\t\t$opt_type = FrmAppHelper::get_post_param( 'opt_type', '', 'sanitize_text_field' );\n\t\t$opt_key = FrmAppHelper::get_post_param( 'opt_key', 0, 'absint' );\n\n $field = FrmField::getOne($id);\n\n if ( 'other' == $opt_type ) {\n\t\t\t$opt = __( 'Other', 'formidable' );\n $other_val = '';\n $opt_key = 'other_' . $opt_key;\n } else {\n\t\t\t$opt = __( 'New Option', 'formidable' );\n }\n $field_val = $opt;\n\n $field_data = $field;\n\t\t$field = (array) $field;\n\t\t$field['separate_value'] = isset( $field_data->field_options['separate_value'] ) ? $field_data->field_options['separate_value'] : 0;\n\t\tunset( $field_data );\n\n\t\t$field_name = 'item_meta[' . $id . ']';\n\t\t$html_id = FrmFieldsHelper::get_html_id( $field );\n $checked = '';\n\n if ( 'other' == $opt_type ) {\n\t\t\tinclude( FrmAppHelper::plugin_path() . '/pro/classes/views/frmpro-fields/other-option.php' );\n } else {\n\t\t\trequire( FrmAppHelper::plugin_path() . '/classes/views/frm-fields/single-option.php' );\n }\n wp_die();\n }", "public function SetPanelSettings()\r\n\t\t{\r\n\t\t\t$products = $this->getProducts();\r\n\t\t\t$GLOBALS['ProductsOffersList'] = \"\";\r\n\r\n\t\t\t// Should we hide the comparison button?\n\t\t\tif(GetConfig('EnableProductComparisons') == 0 || count($products) < 2) {\n\t\t\t\t$GLOBALS['HideCompareItems'] = \"none\";\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(GetConfig('ShowProductRating') == 0) {\r\n\t\t\t\t$GLOBALS['HideProductRating'] = \"display: none\";\r\n\t\t\t}\r\n\r\n\t\t\t$display_mode = ucfirst(GetConfig(\"CategoryDisplayMode\"));\r\n\t\t\tif ($display_mode == \"Grid\") {\r\n\t\t\t\t$display_mode = \"\";\r\n\t\t\t}\r\n\t\t\t$GLOBALS['DisplayMode'] = $display_mode;\r\n\r\n\t\t\tif ($display_mode == \"List\") {\r\n\t\t\t\tif (GetConfig('ShowAddToCartLink') && count($products) > 0) {\r\n\t\t\t\t\t$GLOBALS['HideAddButton'] = '';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$GLOBALS['HideAddButton'] = 'none';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$GLOBALS['ListJS'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"ListCheckForm\");\r\n\t\t\t}\r\n\r\n\t\t\t$GLOBALS['CompareButton'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CompareButton\" . $display_mode);\r\n\r\n\t\t\tif (GetConfig('CategoryProductsPerPage') > 0) {\n\t\t\t\t$this->_numpages = ceil(count($products) / GetConfig('CategoryProductsPerPage'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->_numpages = 0;\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ($display_mode == \"List\" && $this->_numpages > 1) {\r\n\t\t\t\t$GLOBALS['CompareButtonTop'] = $GLOBALS['CompareButton'];\r\n\t\t\t}\r\n\r\n\t\t\t$GLOBALS['AlternateClass'] = '';\r\n\t\t\tforeach($products as $row) {\r\n\t\t\t\t$this->setProductGlobals($row);\r\n\r\n\t\t\t\t// for list style\r\n\t\t\t\tif ($display_mode == \"List\") {\r\n\t\t\t\t\t// get a small chunk of the product description\r\n\t\t\t\t\t$desc = isc_substr(strip_tags($row['proddesc']), 0, 225);\r\n\t\t\t\t\tif (isc_strlen($row['proddesc']) > 225) {\r\n\t\t\t\t\t\t// trim the description back to the last period or space so words aren't cut off\r\n\t\t\t\t\t\t$period_pos = isc_strrpos($desc, \".\");\r\n\t\t\t\t\t\t$space_pos = isc_strrpos($desc, \" \");\r\n\t\t\t\t\t\t// find the character that we should trim back to. -1 on space pos for a space that follows a period, so we dont end up with 4 periods\r\n\t\t\t\t\t\tif ($space_pos - 1 > $period_pos) {\r\n\t\t\t\t\t\t\t$pos = $space_pos;\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$pos = $period_pos;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$desc = isc_substr($desc, 0, $pos);\r\n\t\t\t\t\t\t$desc .= \"...\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$GLOBALS['ProductDescription'] = $desc;\r\n\r\n\t\t\t\t\t$GLOBALS['AddToCartQty'] = \"\";\r\n\r\n\t\t\t\t\tif (CanAddToCart($row) && GetConfig('ShowAddToCartLink')) {\r\n\t\t\t\t\t\tif (isId($row['prodvariationid']) || trim($row['prodconfigfields'])!='' || $row['prodeventdaterequired']) {\r\n\t\t\t\t\t\t\t$GLOBALS['AddToCartQty'] = '<a href=\"' . $GLOBALS[\"ProductURL\"] . '\">' . $GLOBALS['ProductAddText'] . \"</a>\";\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$GLOBALS['CartItemId'] = $GLOBALS['ProductId'];\r\n\t\t\t\t\t\t\t// If we're using a cart quantity drop down, load that\r\n\t\t\t\t\t\t\tif (GetConfig('TagCartQuantityBoxes') == 'dropdown') {\r\n\t\t\t\t\t\t\t\t$GLOBALS['Quantity0'] = \"selected=\\\"selected\\\"\";\r\n\t\t\t\t\t\t\t\t$GLOBALS['QtyOptionZero'] = '<option %%GLOBAL_Quantity0%% value=\"0\">'.GetLang('Quantity').'</option>';\r\n\t\t\t\t\t\t\t\t$GLOBALS['QtySelectStyle'] = 'width: auto;';\r\n\t\t\t\t\t\t\t\t$GLOBALS['AddToCartQty'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CartItemQtySelect\");\r\n\t\t\t\t\t\t\t// Otherwise, load the textbox\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$GLOBALS['ProductQuantity'] = 0;\r\n\t\t\t\t\t\t\t\t$GLOBALS['AddToCartQty'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CartItemQtyText\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} // for grid style\r\n\t\t\t\telse {\r\n\t\t\t\t\t$GLOBALS[\"CompareOnSubmit\"] = \"onsubmit=\\\"return compareProducts(config.CompareLink)\\\"\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$GLOBALS['ProductsOffersList'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"HomeProductsOfferItem\" . $display_mode);\r\n\t\t\t}\r\n\r\n\t\t\tif(count($products) == 0) {\r\n\t\t\t\t// There are no products in this category\r\n\t\t\t\t$GLOBALS['ProductsOffersList'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CategoryNoProductsMessage\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t// Paging\r\n\t\tif(count($products) <= GetConfig('CategoryProductsPerPage')) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Workout the paging data\n\t\t$GLOBALS['SNIPPETS']['PagingData'] = \"\";\n\t\t\n\t\t$maxPagingLinks = 5;\n\t\tif($GLOBALS['ISC_CLASS_TEMPLATE']->getIsMobileDevice()) {\n\t\t\t$maxPagingLinks = 3;\n\t\t}\n\t\t\n\t\t$start = max($this->_page-$maxPagingLinks,1);\n\t\t$end = min($this->_page+$maxPagingLinks, $this->_numpages);\n\t\t\n\t\t$queryStringAppend = array(\n\t\t\t\t'sort' => $this->_sort,\n\t\t);\n\t\t\n\t\tif(!empty($_GET['price_min'])) {\n\t\t\t$queryStringAppend['price_min'] = (float)$_GET['price_min'];\n\t\t}\n\t\t\n\t\tif(!empty($_GET['price_max'])) {\n\t\t\t$queryStringAppend['price_max'] = (float)$_GET['price_max'];\n\t\t}\n\t\t\n\t\t\n\t\tfor ($page = $start; $page <= $end; $page++) {\n\t\t\tif($page == $this->_page) {\n\t\t\t\t$snippet = \"CategoryPagingItemCurrent\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$snippet = \"CategoryPagingItem\";\n\t\t\t}\n\t\t\n\t\t\t$pageQueryStringAppend = $queryStringAppend;\n\t\t\t$pageQueryStringAppend['page'] = $page;\r\n\t\t\t$GLOBALS['PageLink'] = $this->getPageLink($pageQueryStringAppend);\n\t\t\t$GLOBALS['PageNumber'] = $page;\n\t\t\t$GLOBALS['SNIPPETS']['PagingData'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet($snippet);\n\t\t}\n\t\t\n\t\t// Parse the paging snippet\n\t\tif($this->_page > 1) {\n\t\t\t// Do we need to output a \"Previous\" link?\n\t\t\t$pageQueryStringAppend = $queryStringAppend;\n\t\t\t$pageQueryStringAppend['page'] = $this->_page- 1;\n\t\t\t$GLOBALS['PrevLink'] = $this->getPageLink($pageQueryStringAppend);\n\t\t\t$GLOBALS['SNIPPETS']['CategoryPagingPrevious'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CategoryPagingPrevious\");\n\t\t}\n\t\t\n\t\tif($this->_page < $this->_numpages) {\n\t\t\t// Do we need to output a \"Next\" link?\n\t\t\t$pageQueryStringAppend = $queryStringAppend;\n\t\t\t$pageQueryStringAppend['page'] = $this->_page + 1;\r\n\t\t\t$GLOBALS['NextLink'] = $this->getPageLink($pageQueryStringAppend);\n\t\t\t$GLOBALS['SNIPPETS']['CategoryPagingNext'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CategoryPagingNext\");\n\t\t}\n\t\t\n\t\t$output = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CategoryPaging\");\n\t\t$output = $GLOBALS['ISC_CLASS_TEMPLATE']->ParseSnippets($output, $GLOBALS['SNIPPETS']);\n\t\t$GLOBALS['SNIPPETS']['CategoryPaging'] = $output;\r\n\t\t}", "function related_products_metaboxes() {\n add_meta_box(\n 'related_products',\n 'Choose Related Products',\n 'related_products_list_html',\n 'rfib_products',\n 'normal',\n 'default'\n );\n}", "public function getNewChildSelectOptions()\n {\n /** @var CustomGento_ProductBadges_Model_Rule_Condition_Product_BaseCondition $productCondition */\n $productCondition = Mage::getModel('customgento_productbadges/rule_condition_product_baseCondition');\n $productAttributes = $productCondition->loadAttributeOptions()->getAttributeOption();\n\n $attributes = array();\n foreach ($productAttributes as $code => $label) {\n $class = 'customgento_productbadges/rule_condition_product_baseCondition';\n\n $attributes[] = array(\n 'value' => $class . '|' . $code,\n 'label' => $label\n );\n }\n\n // Adding day interval attributes\n /** @var CustomGento_ProductBadges_Model_Rule_Condition_Product_DayInterval $dayIntervalCondition */\n $dayIntervalCondition = Mage::getModel('customgento_productbadges/rule_condition_product_dayInterval');\n $dayIntervalAttribute = $dayIntervalCondition->loadAttributeOptions()->getAttributeOption();\n foreach ($dayIntervalAttribute as $code => $label) {\n $class = 'customgento_productbadges/rule_condition_product_dayInterval';\n\n $attributes[] = array(\n 'value' => $class . '|' . $code,\n 'label' => $label\n );\n }\n\n /** @var CustomGento_ProductBadges_Helper_Config $configHelper */\n $configHelper = Mage::helper('customgento_productbadges/config');\n\n $rulesConfigs = $configHelper->getRulesConfigurations();\n\n /** @var CustomGento_ProductBadges_Model_Rule_Config $configModel */\n foreach ($rulesConfigs as $configModel) {\n $attributes[] = array(\n 'value' => $configModel->getConditionClass() . '|' . $configModel->getInternalCode(),\n 'label' => $configModel->getLabel()\n );\n }\n\n // Sort again alphabetically\n usort($attributes, function ($a, $b) {\n return strcmp($a['label'], $b['label']);\n });\n\n $conditions = array(\n array(\n 'value' => '',\n 'label' => Mage::helper('rule')->__('Please choose a condition to add...')\n ),\n array(\n 'value' => 'catalogrule/rule_condition_combine',\n 'label' => Mage::helper('catalogrule')->__('Conditions Combination')\n ),\n array(\n 'label' => Mage::helper('catalogrule')->__('Product Attribute'),\n 'value' => $attributes\n ),\n );\n\n return $conditions;\n }", "function uds_pricing_render_product_options($product = null, $properties = array())\n{\n\tglobal $uds_pricing_column_options;\n\n\tforeach($uds_pricing_column_options as $key => $option) {\n\t\t$default = $product == null ? $option['default'] : $product[$key];\n\t\techo call_user_func('uds_pricing_render_product_options_'.$option['type'], $key, $default);\n\t}\n\t\n\tif(!empty($properties)) {\n\t\techo \"<div class='properties-separator'><h3>Properties</h3></div>\";\n\t\tforeach($properties as $name => $type) {\n\t\t\techo uds_pricing_render_product_options_property($name, $type, $product);\n\t\t}\n\t}\n}", "public function extractOptions()\n {\n if ($this->hasMultipleItems()) {\n $items = [];\n foreach ($this->productOptions as $productOption) {\n $id = $productOption->id;\n $text = $productOption->description;\n\n $item = [];\n $item[\"Variation\"] = new \\stdClass();\n $item[\"Variation\"]->text = $text;\n $item[\"Variation\"]->value = $id;\n $items[] = $item;\n }\n $this->options = $items;\n return true;\n } else {\n return false;\n }\n }", "function rental_options_product_tab_content() {\n\tglobal $post;\n\t?><div id='rental_options' class='panel woocommerce_options_panel'><?php\n\t\t?><div class='options_group'><?php\n\t\t\twoocommerce_wp_checkbox( array(\n\t\t\t\t'id' \t\t=> '_enable_option',\n\t\t\t\t'label' \t=> __( 'Enable rental option X', 'woocommerce' ),\n\t\t\t) );\n\t\t\twoocommerce_wp_text_input( array(\n\t\t\t\t'id'\t\t\t=> '_text_input_y',\n\t\t\t\t'label'\t\t\t=> __( 'What is the value of Y', 'woocommerce' ),\n\t\t\t\t'desc_tip'\t\t=> 'true',\n\t\t\t\t'description'\t=> __( 'A handy description field', 'woocommerce' ),\n\t\t\t\t'type' \t\t\t=> 'text',\n\t\t\t) );\n\t\t?></div>\n\n\t</div><?php\n}", "public static function es_admin_option() {\n\t}", "public function getProducts_options() {\n\t\treturn $this->products_options;\n\t}", "static function onActivate() {\n $options = get_option(self::$optionsKey);\n if (!is_null($options)) {\n // write default options into database\n $options = array();\n $options['allowedTags'] = self::$allowedTags;\n $options['remoteStoreUrl'] = self::$remoteStoreUrl;\n $options['rteWebpackage'] = self::$rteWebpackage;\n add_option(self::$optionsKey, $options);\n }\n }", "function set_gtpressMenu_options() {\r\n\tadd_option('gtpressMenu_default_menu');\r\n\tadd_option('gtpressMenu_default_submenu');\r\n\tadd_option('gtpressMenu_disabled_menu_items');\r\n\tadd_option('gtpressMenu_disabled_submenu_items');\r\n\tadd_option('gtpressMenu_disabled_metas');\r\n\tadd_option('gtpressMenu_admins_see_everything');\r\n\r\n\tupdate_option('gtpressMenu_disabled_menu_items', array());\r\n\tupdate_option('gtpressMenu_disabled_submenu_items', array());\r\n\tupdate_option('gtpressMenu_disabled_metas', array());\r\n\tupdate_option('gtpressMenu_admins_see_everything', false);\r\n}", "function addVariation($data,$form){\r\n\t\tif(isset($data['ProductAttributes'])){\r\n\t\t\t$data['ProductAttributes'] = Convert::raw2sql($data['ProductAttributes']);\r\n\t\t\t$variation = $this->owner->getVariationByAttributes($data['ProductAttributes']);\r\n\t\t\tif($variation) {\r\n\t\t\t\tif($variation->canPurchase()) {\r\n\t\t\t\t\t$quantity = round($data['Quantity'], $variation->QuantityDecimals());\r\n\t\t\t\t\tif(!$quantity) {\r\n\t\t\t\t\t\t$quantity = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tShoppingCart::singleton()->addBuyable($variation,$quantity);\r\n\t\t\t\t\tif($variation->IsInCart()) {\r\n\t\t\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.SUCCESSFULLYADDED\",\"Added to cart.\");\r\n\t\t\t\t\t\t$status = \"good\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.NOTSUCCESSFULLYADDED\",\"Not added to cart.\");\r\n\t\t\t\t\t\t$status = \"bad\";\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$msg = _t(\"ProductWithVariationDecorator.VARIATIONNOTAVAILABLE\",\"That option is not available.\");\r\n\t\t\t\t\t$status = \"bad\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.VARIATIONNOTAVAILABLE\",\"That option is not available.\");\r\n\t\t\t\t$status = \"bad\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$msg = _t(\"ProductWithVariationDecorator.VARIATIONNOTFOUND\",\"The item(s) you are looking for are not available.\");\r\n\t\t\t$status = \"bad\";\r\n\t\t}\r\n\t\tif(Director::is_ajax()){\r\n\t\t\treturn ShoppingCart::singleton()->setMessageAndReturn($msg, $status);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$form->sessionMessage($msg,$status);\r\n\t\t\tDirector::redirectBack();\r\n\t\t}\r\n\t}", "private function prepareExternalProduct() {\n if ($this->getSaverData()->isFirstPage()) {\n $this->setPrice();\n $this->setSKU();\n $this->setEnableReviews();\n $this->setMenuOrder();\n $this->setExternalProductDetails();\n }\n\n $this->setTags();\n $this->setAttributes();\n }", "function product_attachment_field_purpose( $form_fields, $post ) {\nif ( get_parent_post_type($post) == 'products' ) {\n\n\t$option = array ('','Front','Back');\n\t$html = \"<select name='attachments[{$post->ID}][custom_purpose]' id='attachments[{$post->ID}][custom_purpose]'>\\n\";\n\t\n\tforeach ($option as $key => $value) {\n $html.= \"<option value='\".strtolower($value).\"'\";\n \tif ( get_post_meta( $post->ID, '_custom_purpose', true ) == strtolower($value)){\n $html.= ' selected=\"selected\"';\n }\n $html.= \">\".$value.\"</option>\\n\";\n }\n\n $html.= \"</select>\\n\";\n\n\n\t$form_fields['custom_purpose'] = array(\n\t\t'label' => 'Custom Purpose', \n\t\t'input' => 'html',\n\t\t'html' => $html,\n\t\t'helps' => 'Add Custom Purpose',\n\t\t'required' => TRUE, \n\t);\n}\n\treturn $form_fields;\n}", "private function prepareSimpleProduct() {\n if ($this->getSaverData()->isFirstPage()) {\n $this->setPrice();\n $this->setDownloadOptions();\n $this->setSKU();\n $this->setStockOptions();\n $this->setSoldIndividually();\n $this->setShippingOptions();\n $this->setPurchaseNote();\n $this->setEnableReviews();\n $this->setMenuOrder();\n }\n\n $this->setTags();\n $this->setAttributes();\n }", "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 static function bkap_add_resource_section_callback( $product_id ) {\n \t\t\n \t?>\n \t<span class=\"bkap_type_box\" style=\"margin-left: 15%;\"> \n\n <?php foreach ( self::bkap_get_extra_options() as $key => $option ) :\n if ( metadata_exists( 'post', $product_id, '_' . $key ) ) {\n $bkap_resource_option = get_post_meta( $product_id, '_bkap_resource', true );\n\n $selected_value = '';\n if( $bkap_resource_option == \"on\" ){\n $selected_value = 'checked';\n }\n \n } else {\n $selected_value = 'yes' === ( isset( $option['default'] ) ? $option['default'] : 'no' );\n }\n \n ?>\n <label for=\"<?php echo esc_attr( $option['id'] ); ?>\" class=\"<?php echo esc_attr( $option['wrapper_class'] ); ?> tips\" data-tip=\"<?php echo esc_attr( $option['description'] ); ?>\">\n <?php echo esc_html( $option['label'] ); ?>:\n <input type=\"checkbox\" name=\"<?php echo esc_attr( $option['id'] ); ?>\" id=\"<?php echo esc_attr( $option['id'] ); ?>\" <?php echo $selected_value; ?> />\n </label>\n <?php endforeach; ?>\n </span>\n\n <?php\n }", "public function applyOptions(): void\n {\n if ($this->hasEndpoint()) {\n $this->withOptions(['endpoint' => $this->endpoint]);\n }\n\n $this->setProp('value', $this->attribute);\n $this->setProp('entities', $this->options(), false);\n }", "function uds_pricing_render_product_options_property($name, $type, $product)\n{\n\t$out = \"<div>\";\n\t$out .= \"<label>$name</label>\";\n\t$html_name = sanitize_title_with_dashes($name);\n\tswitch($type) {\n\t\tcase 'checkbox':\n\t\t\t$checked = $product['properties'][$name] == 'on' ? \"checked='checked'\" : \"\" ;\n\t\t\t$out .= \"<input type='checkbox' name='{$html_name}[]' $checked />\";\n\t\t\tbreak;\n\t\tcase 'text':\n\t\tdefault:\n\t\t\t$out .= \"<input type='text' name='{$html_name}[]' value='{$product['properties'][$name]}' class='text' />\";\n\t}\n\t$out .= \"<div class='clear'></div>\";\n\t$out .= \"</div>\";\n\t\n\treturn $out;\n}", "public function single_product_product_variations_custom_output() {\n\t\t\tif ( ! defined( 'CFVSW_VER' ) && class_exists( 'woocommerce' ) && is_product() && astra_get_option( 'single-product-select-variations' ) ) {\n\t\t\t\tadd_filter( 'woocommerce_dropdown_variation_attribute_options_html', array( $this, 'single_product_variations_custom_html' ), 999, 2 );\n\t\t\t}\n\t\t}", "function eventspractice_options() {\n\n $options = array (\n 'Option 1' => 'A',\n 'Option 2' => 'B',\n 'Option 3' => 'C'\n );\n\n if ( !get_option( 'eventspractice_options' ) ){\n add_option( 'eventspractice_option', $options );\n }\n update_option( 'eventspractice_option', $options );\n\n\n // add_option( 'eventspractice_option', 'My NEW Plugin Options' );\n // update_option( 'eventspractice_option', 'This is a test with the Options API' );\n // delete_option( 'eventspractice_option' );\n\n}", "function woo_add_custom_general_fields() {\r\n\t// You can create text, textarea, select, checkbox and custom fields\r\n\r\n\tglobal $woocommerce, $post;\r\n\r\n\techo '<div class=\"options_group\">';\r\n\r\n\t// Custom fields will be created here...\r\n\t?>\r\n\t<p class=\"form-field custom_field_type\">\r\n\t\t<label for=\"custom_field_type\"><?php echo __( 'Packs', 'p18a' ); ?></label>\r\n\t\t<span class=\"wrap\">\r\n\t\t<?php\r\n\t\t$packs = get_post_meta( $post->ID, 'pri_packs', true );\r\n\t\tif(!empty($packs)){\r\n\t\t\tforeach($packs as $pack){\r\n\t\t\t\techo $pack['PACKNAME'].' '.$pack['PACKQUANT'].'<br>';\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t_e('There are no packs for this product','p18a');\r\n\t\t}\r\n\r\n\r\n\t\t?>\r\n\t</span>\r\n\r\n\t</p>\r\n\t<?php\r\n\r\n\techo '</div>';\r\n\r\n}", "public function init_option() {\n\t\tglobal $wpdb;\n\n\t\t$sections = array(\n\t\t\tarray(\n\t\t\t\t'id' => 'wp_price_chart_opt',\n\t\t\t\t'title' => __( 'General', 'wp-reviews-insurance' )\n\t\t\t),\n\t\t);\n\n\t\t// Get List Symbol\n\t\t$symbol_list = $wpdb->get_results( \"SELECT SYMBOL_ID, SYMBOL FROM {$wpdb->prefix}socks_symbol\", ARRAY_A );\n\t\t$list = array();\n\t\tforeach ( $symbol_list as $r ) {\n\t\t\t$list[ $r['SYMBOL_ID'] ] = $r['SYMBOL'];\n\t\t}\n\n\t\t$fields = array(\n\t\t\t'wp_price_chart_opt' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'default_symbol',\n\t\t\t\t\t'label' => __( 'Default Symbol', 'wedevs' ),\n\t\t\t\t\t'desc' => __( 'Use [price-chart] ShortCode in WordPress', 'wedevs' ),\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'options' => $list\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'chart_height',\n\t\t\t\t\t'label' => __( 'Chart Height', 'wp-reviews-insurance' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => '130',\n\t\t\t\t\t'desc' => '',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'default_show_ago',\n\t\t\t\t\t'label' => __( 'Show ago Hour (default)', 'wp-reviews-insurance' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => '5',\n\t\t\t\t\t'desc' => '',\n\t\t\t\t),\n\t\t\t),\n\n\t\t);\n\n\t\t$this->setting = new SettingAPI();\n\n\t\t//set sections and fields\n\t\t$this->setting->set_sections( $sections );\n\t\t$this->setting->set_fields( $fields );\n\n\t\t//initialize them\n\t\t$this->setting->admin_init();\n\t}", "function hello_world_install() {\nadd_option(\"ernaehrungsnews_anzahl\", '3', '', 'yes');\nadd_option(\"ernaehrungsnews_trimmer\", '100', '', 'yes');\nadd_option(\"ernaehrungsnews_kategorieId\", '3', '', 'yes');\n\n\n\n}", "abstract function fields_options();" ]
[ "0.7350004", "0.66863334", "0.66532767", "0.6475836", "0.6460801", "0.643826", "0.6429967", "0.64079016", "0.6401282", "0.6386508", "0.63732004", "0.63626105", "0.6298049", "0.6276353", "0.62661636", "0.6212931", "0.62036175", "0.6188565", "0.61757505", "0.6125083", "0.6123281", "0.61038274", "0.60670644", "0.6059215", "0.6025847", "0.6021048", "0.60093755", "0.60013384", "0.5998461", "0.5992864", "0.5976954", "0.59651995", "0.596302", "0.59505635", "0.5949385", "0.5918078", "0.5917863", "0.59083056", "0.58969957", "0.5895084", "0.58908963", "0.58835435", "0.5869198", "0.5868755", "0.58447766", "0.5838818", "0.58289075", "0.58239454", "0.58193535", "0.5816244", "0.5799789", "0.57952654", "0.5791365", "0.57892877", "0.57863164", "0.57825315", "0.5774001", "0.5770738", "0.57667744", "0.5757253", "0.5749941", "0.5749471", "0.5746601", "0.57449055", "0.57441837", "0.571762", "0.57156295", "0.5711743", "0.5706382", "0.5699249", "0.56906885", "0.5690479", "0.56899637", "0.56897426", "0.5689105", "0.5689105", "0.5676323", "0.56702894", "0.5668604", "0.5667339", "0.56616414", "0.5659876", "0.5657495", "0.56491", "0.56454", "0.5643764", "0.5640632", "0.562367", "0.5621129", "0.56186384", "0.56168157", "0.5616777", "0.5611135", "0.56110084", "0.5608305", "0.560759", "0.5606194", "0.56049436", "0.5602273", "0.5597229", "0.55821687" ]
0.0
-1
$book = new Book();
public function practice15() { //$books = Book::where('title', 'LIKE', '%Harry Potter%')->orWhere //('published_year', '>=', 1998)->get(); $books = Book::where('author', 'LIKE', '%Weir%')->get(); if ($books->isEmpty()) { dump('No matches found'); } else { dump($books->toArray()); foreach ($books as $book) { $book->delete(); dump('Deletion complete; check the database to see if it worked...'); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(){\n // make sure you do something like that in your index.php\n require_once('models/book.php');\n $this->book = new Book();\n }", "public function __construct($book)\n {\n $this->book = $book;\n }", "public function __construct($book)\n {\n $this->book = $book;\n }", "public function __construct(Book $book)\n {\n $this->BookModel = $book;\n }", "function __construct($bookTitle, $bookPrice) {\n\n $this->bookTitle = $bookTitle;\n $this->bookPrice = $bookPrice;\n}", "public function pc()\n {\n return new MiBook();\n }", "public function get_book();", "function makePHPBook() {\n return new OReillyPHPBook();\n }", "public function run()\n {\n $book = new Book();\n $book->title = 'To kill a mockingbird';\n $book->synopsis = 'To Kill a Mockingbird is Harper Lee’s 1961 Pulitzer Prize-winning novel about a child’s view of race and justice in the Depression-era South. The book sells one million copies per year, and Scout remains one of the most beloved characters in American fiction.';\n $book->author = 'Harper Lee';\n $book->genre = 'Southern Gothic';\n $book->logo_path = '../assets/img/theme/mockingbird.jpg';\n $book->no_of_issues = 8;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'Robinson Crusoe';\n $book->synopsis = 'Robinson Crusoe was published in 1719 during the Enlightenment period of the 18th century. In the novel Crusoe sheds light on different aspects of Christianity and his beliefs. The book can be considered a spiritual autobiography as Crusoe\\'s views on religion drastically change from the start of his story and then the end.';\n $book->author = 'Daniel Defoe';\n $book->genre = 'Robinsonadec';\n $book->logo_path = '../assets/img/theme/crusoe.jpg';\n $book->no_of_issues = 5;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'Crime and punishment';\n $book->synopsis = 'Crime and Punishment was first published in the literary journal The Russian Messenger in twelve monthly installments during 1866. It was later published in a single volume. It is the second of Dostoevsky\\'s full-length novels following his return from ten years of exile in Siberia. Crime and Punishment is considered the first great novel of his \"mature\" period of writing. The novel is often cited as one of the supreme achievements in literature';\n $book->author = 'Fyodor Dostoevsky';\n $book->genre = 'Philosophical';\n $book->logo_path = '../assets/img/theme/punishment.jpg';\n $book->no_of_issues = 12;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'The Trial';\n $book->synopsis = 'The Trial tells the story of Josef K., a man arrested and prosecuted by a remote, inaccessible authority, with the nature of his crime revealed neither to him nor to the reader.';\n $book->author = 'Franz Kafka';\n $book->genre = 'Philosophical';\n $book->logo_path = '../assets/img/theme/trial.jpg';\n $book->no_of_issues = 4;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'Anna Karenina';\n $book->synopsis = 'A complex novel in eight parts, with more than a dozen major characters, it is spread over more than 800 pages (depending on the translation and publisher), typically contained in two volumes. It deals with themes of betrayal, faith, family, marriage, Imperial Russian society, desire, and rural vs. city life. The plot centers on an extramarital affair between Anna and dashing cavalry officer Count Alexei Kirillovich Vronsky that scandalizes the social circles of Saint Petersburg and forces the young lovers to flee to Italy in a search for happiness. After they return to Russia, their lives further unravel.';\n $book->author = 'Leo Tolstoy';\n $book->genre = 'Realist novel';\n $book->logo_path = '../assets/img/theme/karenina.jpg';\n $book->no_of_issues = 15;\n\n $book->save();\n }", "public function getBookList() \n {\n return array( \n \"Balagurusamy\" => new Book(\"Balagurusamy\", \"Balagurusamy\", \"C programming\"), \n \"CMM in Practice\" => new Book(\"CMM in Practice\", \"Pankaj Jalote\", \"\"), \n \"PHP for Dummies\" => new Book(\"PHP for Dummies\", \"Some Smart Guy\", \"\") \n ); \n }", "public function getBook()\n {\n return $this->_book;\n }", "function testAddBook()\n {\n //Arrange\n $first_name = \"John\";\n $last_name = \"Steinbeck\";\n $test_author = new Author($first_name, $last_name);\n $test_author->save();\n\n $title = \"Grapes of Wrath\";\n $test_book = new Book($title);\n $test_book->save();\n\n //Act\n $test_author->addBook($test_book);\n\n //Assert\n $this->assertEquals($test_author->getBook(), [$test_book]);\n\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function run()\n {\n $book = new Book();\n $book->name = 'Tactical Thinking: 50 Brain-Training Puzzles to Change the Way You Think';\n $book->author = 'Charles Phillips';\n $book->price = 80000;\n $book->category_id = 1;\n $book->avatar = 'abc.jpg';\n $book->status = 'have book';\n $book->save();\n\n $book = new Book();\n $book->name = 'Tactical Thinking: 50 Brain-Training Puzzles to Change the Way You Think';\n $book->author = 'Charles Phillips';\n $book->price = 80.000;\n $book->category_id = 1;\n $book->avatar = 'abc.jpg';\n $book->status = 'out of book';\n $book->save();\n }", "public function __construct(AddBook $addBook)\n {\n $this->addBook = $addBook;\n }", "public function show(Book $book)\n {\n echo \"show\";\n }", "public function show(newbook $newbook)\n {\n //\n }", "public function book() {\n return $this->hasOne(Book::class);\n }", "public function books(): Collection;", "public function show($book)\n {\n //dd($book);\n }", "public function __construct()\n {\n //$this->student = $student;\n }", "public function book()\n {\n return $this->belongsTo(Book::class);\n }", "public function testExample()\n {\n $book = new Book(['name'=>'The 3 Little ninjas']);\n $this->assertEquals('The 3 Little ninjas', $book->name);\n }", "public function practice4()\n {\n $book = new Book();\n\n # Set the properties\n # Note how each property corresponds to a field in the table\n $book->title = 'Harry Potter and the Sorcerer\\'s Stone';\n $book->author = 'J.K. Rowling';\n $book->published_year = 1997;\n $book->cover_url = 'http://prodimage.images-bn.com/pimages/9780590353427_p0_v1_s484x700.jpg';\n $book->purchase_url = 'http://www.barnesandnoble.com/w/harry-potter-and-the-sorcerers-stone-j-k-rowling/1100036321?ean=9780590353427';\n\n # Invoke the Eloquent `save` method to generate a new row in the\n # `books` table, with the above data\n $book->save();\n\n dump('Added: ' . $book->title);\n }", "public function book()\n {\n return $this->belongsTo('App\\Book');\n }", "public function getName()\n {\n return 'book';\n }", "public function __construct(Booking $booking)\n {\n $this->booking = $booking;\n }", "public function __construct(Booking $booking)\n {\n $this->booking = $booking;\n }", "function testAddBook()\n {\n\n //Arrange\n $title = \"Harry Houdinis Magic\";\n $id = null;\n $test_book = new Book($title, $id);\n $test_book->save();\n\n $title2 = \"Harry and Maggies Adventures\";\n $test_book2 = new Book($title2, $id);\n $test_book2->save();\n\n $name = \"Harry Houdini\";\n $id = null;\n $test_author = new Author($name, $id);\n $test_author->save();\n\n $name2 = \"Maggie Pie\";\n $test_author2 = new Author($name2, $id);\n $test_author2->save();\n\n //Act\n $test_author->addBook($test_book);\n $test_author->addBook($test_book2);\n $test_author2->addBook($test_book2);\n\n //Assert\n $this->assertEquals($test_author->getBooks(), [$test_book, $test_book2]);\n $this->assertEquals($test_author2->getBooks(), [$test_book2]);\n }", "public function __construct() \r\n\t{\r\n\t\tparent::__construct();\r\n\t\t\r\n\t\tinclude APP_ROOT.'/Models/Author.php';\r\n\t\t$this->Author = new Author();\r\n\t}", "function makeNodeJsBook() {\n return new OReillyNodeJsBook();\n }", "public function testBean()\n\t{\n\t\tR::nuke();\n\t\t$book = R::dispense( 'book' );\n\t\t$pages = R::dispense( 'page', 2 );\n\t\t$ads = R::dispense('ad', 3 );\n\t\t$tags = R::dispense( 'tag', 2 );\n\t\t$author = R::dispense( 'author' );\n\t\t$coauthor = R::dispense( 'author' );\n\t\t$book->alias( 'magazine' )->ownAd = $ads;\n\t\t$book->ownPage = $pages;\n\t\t$book->sharedTag = $tags;\n\t\t$book->via( 'connection' )->sharedUser = array( R::dispense( 'user' ) );\n\t\t$book->author = $author;\n\t\t$book->coauthor = $coauthor;\n\t\tR::store( $book );\n\t\t$book = $book->fresh();\n\t\tasrt( count($book->ownPage), 2 );\n\t\tasrt( count($book->alias('magazine')->ownAd), 3 );\n\t\t$book->ownAd = array();\n\t\tarray_pop( $book->ownPage );\n\t\tR::store( $book );\n\t\t$book = $book->fresh();\n\t\tasrt( count($book->ownPage), 1 );\n\t\tasrt( count($book->alias('magazine')->ownAd), 0 );\n\t}", "public function __construct(){\r\n \r\n }", "public function __construct(){\r\n \r\n }", "private function __construct() { }", "private function __construct() { }", "public function book(){\n return $this.belongsTo(Book::class);\n }", "function __construct() {\n}", "function __construct() {\n}", "function __construct() {\n}", "function __construct() {\n}", "function __construct() {\n}", "function __construct() {\n}", "function EM_Booking( $booking_data = false ){\r\n\t\tif( $booking_data !== false ){\r\n\t\t\t//Load booking data\r\n\t\t\t$booking = array();\r\n\t\t\tif( is_array($booking_data) ){\r\n\t\t\t\t$booking = $booking_data;\r\n\t\t\t\t//Also create a person out of this...\r\n\t\t\t \t$this->person = new EM_Person($booking_data);\r\n\t\t\t}elseif( $booking_data > 0 ){\r\n\t\t\t\t//Retreiving from the database\t\t\r\n\t\t\t\tglobal $wpdb;\t\t\t\r\n\t\t\t\t$sql = \"SELECT * FROM \". $wpdb->prefix . EM_BOOKINGS_TABLE .\" WHERE booking_id ='$booking_data'\"; \r\n\t\t\t \t$booking = $wpdb->get_row($sql, ARRAY_A);\r\n\t\t\t \t//Get the person for this booking\r\n\t\t\t \t$this->person = new EM_Person($booking['person_id']);\r\n\t\t\t}\r\n\t\t\t//Save into the object\r\n\t\t\t$this->to_object($booking);\r\n\t\t}\r\n\t}", "public function __construct (){}", "public function __construct( )\n {\n }", "function __construct(){\n\n\n }", "function __construct(){\n\n\n }", "function __construct(){\n\n\n }", "function __construct(){\n\n\n }", "function __construct(){\n\n\n }", "function __construct(){\n\n\n }", "function __construct(){\n\n\n }", "private function __construct(){ \n }", "public function __construct() { }", "public function __construct() { }", "public function __construct() { }", "public function __construct() { }", "public function __construct() { }", "public function __construct() { }", "function __construct(){}", "function __construct(){}", "function __construct(){}", "public function __construct() {\n }", "function __construct(){\n }", "function __construct() {\n $this->contact = new QuadernoContact(array(\n 'first_name' => 'Joseph',\n 'last_name' => 'Tribbiani',\n 'contact_name' => 'Friends Staff'));\n $this->contact->save();\n\n $this->item = new QuadernoDocumentItem(array(\n 'description' => 'concepto 1',\n 'price' => 100.0,\n 'quantity' => 20\n ));\n }", "public function getBook($isbn);", "function __construct() \n {\n }", "public function __construct(BookRepositoryInterface $books)\n {\n $this->book = $books;\n }", "public function __construct()\n {\n\n\n\n }", "public function __construct()\n {\n\n\n\n }", "public function __construct(){ }", "public function __construct(){ }", "public function __construct(){ }", "function AAtribut()\r\n{\r\n\r\n$this->database = new Database();\r\n\r\n}", "private function __construct() {;}", "public function __construct(){}", "public function __construct(){}", "public function __construct(){}", "public function __construct(){}", "public function __construct(){}", "public function __construct(){}", "public function __construct(){}", "public function __construct(){}", "public function __construct(){}", "public function __construct(){}", "public function __construct(){}", "public function __construct(){}", "public function __construct(){}", "public function __construct(){}", "public function __construct(){}" ]
[ "0.80280995", "0.79255366", "0.79255366", "0.7363427", "0.7297412", "0.6908077", "0.68804026", "0.6843309", "0.6593419", "0.65020704", "0.6411545", "0.63712853", "0.6367311", "0.6367311", "0.6367311", "0.6367311", "0.6367311", "0.6367311", "0.6367311", "0.6367311", "0.6367311", "0.6367311", "0.6367311", "0.62086993", "0.6192256", "0.6152401", "0.6141637", "0.6096401", "0.6088798", "0.60708576", "0.6058531", "0.6026418", "0.60153025", "0.6001329", "0.5971943", "0.59706044", "0.59705067", "0.59705067", "0.59689856", "0.59647864", "0.5937395", "0.5933462", "0.59278035", "0.59278035", "0.5909814", "0.5909814", "0.58988684", "0.5875262", "0.5875262", "0.5875262", "0.5875262", "0.5875262", "0.5875262", "0.5867665", "0.58462846", "0.58377206", "0.58321476", "0.58321476", "0.58321476", "0.58321476", "0.58321476", "0.58321476", "0.58321476", "0.58319074", "0.58261085", "0.58261085", "0.58261085", "0.58261085", "0.58261085", "0.58261085", "0.58211744", "0.58211744", "0.58211744", "0.5812616", "0.5808984", "0.58055913", "0.5800941", "0.5800429", "0.58000094", "0.5795833", "0.5795833", "0.57896537", "0.57896537", "0.57896537", "0.5789618", "0.57883877", "0.57848936", "0.57848936", "0.57848936", "0.57848936", "0.57848936", "0.57848936", "0.57848936", "0.57848936", "0.57848936", "0.57848936", "0.57848936", "0.57848936", "0.57848936", "0.57848936", "0.57848936" ]
0.0
-1
First get a book to delete
public function practice7() { $book = Book::where('author', '=', 'F. Scott Fitzgerald')->first(); if (!$book) { dump('Did not delete- Book not found.'); } else { $book->delete(); dump('Deletion complete; check the database to see if it worked...'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteFromBook(Book $book);", "public function deleteBook()\n {\n $id = $_POST['id'];\n $time = DELETE_AFTER;\n if (USE_ONE_TABLE) {\n $sql = \"UPDATE `books_authors` SET `deleted` = DATE_ADD(NOW(), interval $time HOUR) WHERE `id` = ?\";\n } else {\n $sql = \"UPDATE `books` SET `deleted` = DATE_ADD(NOW(), interval $time HOUR) WHERE `id` = ?\";\n }\n $this->findBySql($sql, [$id]);\n\n }", "public function practice7()\n {\n $book = Book::where('author', '=', 'J.K. Rowling')->first();\n\n if (!$book) {\n dump('Did not delete- Book not found.');\n } else {\n $book->delete();\n dump('Deletion complete; check the database to see if it worked...');\n }\n }", "public function getDoDelete($id) {\n $book = \\P4\\Book::find($id);\n\n if(is_null($book)) {\n \\Session::flash('message','Book not found.');\n return redirect('\\books');\n }\n\n # First remove any tags associated with this book\n if($book->tags()) {\n $book->tags()->detach();\n }\n\n # Then delete the book\n $book->delete();\n\n # Done\n \\Session::flash('message',$book->title.' was deleted.');\n return redirect('/books');\n\n }", "public function delete_book($id_book) {\n\t\t$data = ['deleted' => 1];\n\t\tBooksCModel::update_book($id_book, $data);\n\t\treturn redirect()->back()->with('success','Xóa truyện thành công');\n\t}", "public function deleteBook()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t$bookid = $_POST['book_id'];\n\t\t\t$reason = $_POST['reason'];\n\t\t\t$staff_id = cookie('staffAccount');\n\t\t\t$remove_time = date('Y-m-d');\n\t\t\t$book_id = intval($bookid);\n\t\t\t$book = D('Remove');\n\n\t\t\t$sql1 = \"select * from lib_book_unique where book_id = {$book_id};\";\n\t\t\t$ret1 = $book->query($sql1);\n\t\t\tif ($ret1) {\n\t\t\t\t$sql2 = \"select * from lib_remove where book_id = {$book_id};\";\n\t\t\t\t$ret2 = $book->query($sql2);\n\t\t\t\tif ($ret2) {\n\t\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t\t'msg' => 'It has been deleted!'\n\t\t\t\t\t));\n\t\t\t\t\techo $json;\n\t\t\t\t} else {\n\t\t\t\t\t$sql3 = \"select * from lib_borrow where book_id = {$book_id};\";\n\t\t\t\t\t$ret3 = $book->query($sql3);\n\t\t\t\t\tif ($ret3) {\n\t\t\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t\t\t'msg' => 'It has been borrowed!'\n\t\t\t\t\t\t));\n\t\t\t\t\t\techo $json;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$sql = \"insert into lib_remove \n\t\t\t\t\t\t\t\tvalues('{$book_id}','{$reason}','{$remove_time}','{$staff_id}');\";\n\t\t\t\t\t\t$return = $book->execute($sql);\n\t\t\t\t\t\tif ($return) {\n\t\t\t\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t\t\t\t'code' => 'success',\n\t\t\t\t\t\t\t\t'msg' => 'Delete successfully!'\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\techo $json;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t\t\t\t'msg' => 'SQL Error!'\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\techo $json;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'This book is not exist!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t}\n\n\n\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "public function destroy($id)\n {\n //\n \n $book = Library::find($id);\n //print_r($book);\n $book->delete();\n return Redirect::to('library');\n }", "function RemoveSingleBook()\n {\n $id_libro = $_POST[\"id_libro\"];\n $cart = new Carrello;\n $cart->RemoveSingleBook($id_libro);\n $book = new Libri;\n $libro = $book->GetBook($id_libro);\n return $libro[\"titolo\"].\"$$$\".$libro[\"autore\"].\"$$$\".$libro[\"prezzo\"].\"$$$\".$libro[\"path_copertina\"];\n }", "function delete_book( $id ) {\r\n\treturn wp_delete_post($id);\r\n}", "public function getDelete($id)\n {\n $book =\\foobooks\\Book::find($id);\n\t\t$book->tags()->sync([]);\n\t\t\n\t\t$book->delete();\n\t\t\\Session::flash('flash_message','The book has been deleted');\n\t\treturn redirect('/books');\n }", "function delete_booksinn($id)\n {\n return $this->db->delete('booksinn',array('id'=>$id));\n }", "public function delete($id){\n $library = Library::find(Auth::user()->library->id);\n $library->books()->detach($id);\n return redirect('/');\n }", "public function destroy(book $book)\n {\n //\n }", "public function deleteBook($bookID)\n {\n \tinclude(\"../Database/db_connect.php\");\n\n\t\t$result = mysqli_query($dbhandle, \"SELECT * FROM books WHERE Groupnumber = '31' AND Bookid='$bookID'\") or die (mysql_error());\n\n \t//if this book doesn't exist, error out\n \tif(mysqli_num_rows($result) == 0)\n \t{\n \t\t$_SESSION[\"error\"] = \"cannot delete book, book doesn't exist\";\n \t}\n\n \t//if it exists get a list of copyID's\n \telse\n \t{\n \t\t$result2 = mysqli_query($dbhandle, \"SELECT * from bookscopy WHERE Groupnumber = '31' AND Bookid = '$bookID'\") or die (mysql_error());\n \t\t$copyIDList = array();\n\n \t\twhile($row = mysqli_fetch_array($result2))\n \t\t{\n \t\t\t$result3 = mysqli_query($dbhandle, \"SELECT * FROM shelves WHERE Groupnumber = '31' AND Copyid = '$row[Copyid]'\") or die (mysql_error());\n \t\t\t$shelf_data = mysqli_fetch_array($result3);\n \t\t\t$copyIDList[$shelf_data['Copyid']] = $shelf_data['Shelfid'];\n \t\t}\n\n \t\t//remove book from database\n //remove copy id's from shelf\n foreach($copyIDList as $copyIDKey => $shelfIDValue)\n {\n for($i = 0; $i < 10; $i++)\n {\n if($this->shelf[$i]->index == $shelfIDValue)\n {\n $this->shelf[$i]->deleteBook($copyIDKey);\n mysqli_query($dbhandle, \"DELETE FROM loanHistory WHERE Groupnumber = '31' AND Copyid = '$copyIDKey'\");\n }\n }\n }\n\n mysqli_query($dbhandle, \"DELETE FROM bookscopy WHERE Groupnumber = '31' AND Bookid = '$bookID'\") or die (mysql_error());\n mysqli_query($dbhandle, \"DELETE FROM books WHERE Groupnumber = '31' AND Bookid = '$bookID'\") or die (mysql_error());\n \t}\n\n \tinclude(\"../Database/db_close.php\");\n }", "public function deletebook($id)\n {\n Book::where('Id',$id)->delete();\n return response(array(\n 'success' => true,\n 'message' => 'Delete book successfully',\n\n ),200);\n }", "public function deletebook($id)\n {\n $id = Crypt::decryptString($id);\n DB::table('books')\n ->where('id', $id)\n ->delete();\n\n return redirect()\n ->route('books');\n }", "public function deleteBook ($session, $id) {\n\n // make a variable for books\n $books = $session->get('books');\n // remove book from books\n unset($books[$id]);\n // not necessarily sure why I need to do this\n $session->put('books', $books);\n\n }", "function delete_book($piecemakerId) \n\t{\n global $wpdb;\n @unlink($this->plugin_path.$this->books_dir.\"/\".$piecemakerId.\".xml\");\n\n $sql = \"delete from `\".$this->table_name.\"` where `id` = '\".$piecemakerId.\"'\";\n $wpdb->query($sql);\n\n unset($_POST['do']);\n $this->manage_books();\n\t}", "public function deleteBook($bookId)\n {\n $book = Book::findOrFail($bookId);\n $book->is_active = 0;\n $book->save();\n return $this->topBooks();\n\n }", "public function getDoDelete($id) {\n $list = \\App\\Lists::find($id);\n $entries = \\App\\Entry::where('list_id',$id)->get();\n\n if(is_null($list)) {\n \\Session::flash('message','Not found.');\n return redirect('/profile');\n }\n\n # First remove any entries associated with this book\n if(isset($entries)) {\n foreach($entries as $entry){\n $entry->delete();\n }\n }\n\n # Then delete the book\n $list->delete();\n\n # Done\n \\Session::flash('message',$list->subject.' was deleted.');\n return redirect('/profile');\n\n }", "public function delete($id){\n\t\t$this->book_model->delBook($id);\n\t\t// arahkan ke method 'books' di kontroller 'dashboard'\n\t\tredirect('dashboard/books');\n\t}", "public function deletebookById($id)\n {\n return $this->bookDao->deletebookById($id);\n }", "public function bookDelete(Request $request){\n try{\n $id = Crypt::decryptString($request->book_id);\n } catch (DecryptException $e) {\n return 'DD-E0002';\n }\n\n $logs = New LogsBookUpdate;\n $logs->action = 1;\n $logs->user_id = auth()->user()->id;\n $logs->book_id = $id;\n $logs->save();\n\n $book = Book::find($id);\n $book->status = Carbon::now();\n $book->update();\n\n return redirect()->route('welcome');\n }", "public function destroy(Book $book)\n {\n $this->service->setInstance($book); //setting already fetched instance into repository, so Laravel didn`t do it without purpose\n\n $result = $this->service->destroy();\n\n if ($result === false || blank($result)) {\n return response()->json([\n 'success' => false,\n 'message' => 'not deleted'\n ], Response::HTTP_BAD_REQUEST);\n }\n\n return response()->json([\n 'success' => true,\n 'message' => 'deleted',\n 'code' => Response::HTTP_ACCEPTED,\n ], Response::HTTP_ACCEPTED);\n }", "public function destroy(Book $book)\n {\n $book->delete();\n<<<<<<< 4f95b62a3e11769b3815c3c24aa6c4661f507165\n\n=======\n>>>>>>> add update data of admin\n return Redirect::to('books');\n }", "public function delete ()\n {\n $query = \"DELETE FROM \" . $this->table_name . \" WHERE book_id = ?\";\n\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(1, $this->book_id);\n\n if($result = $stmt->execute()){\n return true;\n }\n else\n {\n return false;\n }\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "function delete(){\r\n\t\tglobal $wpdb;\r\n\t\t$sql = $wpdb->prepare(\"DELETE FROM \". $wpdb->prefix.EM_BOOKINGS_TABLE . \" WHERE booking_id=%d\", $this->id);\r\n\t\treturn ( $wpdb->query( $sql ) !== false );\r\n\t}", "public function deleteBook($id)\n {\n MyLogger::info(\"Entering OwnedBookBusinessService.deleteBook\");\n //creates a connection\n $db = new Connection();\n $conn = $db->open();\n \n //calls the data service\n $service = new OwnedBookDataService($conn);\n \n //sends the model to the delete function in the data service\n $success = $service->removeBookFromList($id);\n \n //closes the connection\n $conn = null;\n \n //if it is successful return true\n if ($success == 1) { return true; }\n \n //else return false\n else { return false; }\n MyLogger::info(\"Exiting OwnedBookBusinessService.deleteBook\");\n }", "public function delete(Request $request){\n $ISBN = $request->input('ISBN');\n $currentBook = new Book();\n $currentBook = Book::where('ISBN', $ISBN)->first();\n $books = Book::where('position', '>', $currentBook->position)->get();\n\n //update position of other books\n foreach($books as $resultingBook){\n $book = new Book();\n $book = Book::where('ISBN', '=', $resultingBook->ISBN)->first();\n $book->position --;\n $book->update([\"position\" => $book->position]);\n }\n Book::where('ISBN', $ISBN)->delete();\n return redirect('');\n }", "public function testDeleteOne()\n {\n $obj_request = new \\google\\appengine\\datastore\\v4\\CommitRequest();\n $obj_request->setMode(\\google\\appengine\\datastore\\v4\\CommitRequest\\Mode::NON_TRANSACTIONAL);\n $obj_mutation = $obj_request->mutableDeprecatedMutation();\n $obj_key = $obj_mutation->addDelete();\n $obj_key->mutablePartitionId()->setDatasetId('Dataset')->setNamespace('Test');\n $obj_key->addPathElement()->setKind('Book')->setName('PoEAA');\n\n $this->apiProxyMock->expectCall('datastore_v4', 'Commit', $obj_request, new \\google\\appengine\\datastore\\v4\\CommitResponse());\n\n $obj_store = $this->getBookstoreWithTestNamespace();\n $obj_result = $obj_store->delete($obj_store->createEntity()->setKeyName('PoEAA'));\n\n $this->assertEquals($obj_result, TRUE);\n $this->apiProxyMock->verify();\n }", "public function destroy(Book $book)\n {\n echo \"haha\";\n }", "public function deleteBook($id) {\n\n $book = Libro::findOrFail($id);\n $book->delete();\n\n return(\"Libro eliminado con exito... Será redirigido al listado de libros en 5 segundos.\");\n }", "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 delete() {\n\t\tif(!$this->hasPermission(\\OCP\\PERMISSION_DELETE)) {\n\t\t\tthrow new Exception(self::$l10n->t('You don\\'t have permissions to delete the address book.'), 403);\n\t\t}\n\t\treturn $this->backend->deleteAddressBook($this->getId());\n\t}", "public function destroy(Book $book)\n {\n $book->find('id');\n $book->delete();\n //\n\n return redirect()->route(\"books.index\")\n ->with('delete',$book->book_name.' delete Successfully');\n }", "public function deleteBook($id) {\n\n $stmt = $this->db-> prepare(\"DELETE FROM book WHERE id = :id\");\n $stmt-> bindValue(':id', $id);\n\n $stmt-> execute();\n }", "function wpbs_delete_booking($booking_id)\n{\n\n return wp_booking_system()->db['bookings']->delete($booking_id);\n\n}", "function delete(){\n\t\tglobal $wpdb;\n\t\t$booking_ids = array();\n\t\tif( !empty($this->bookings) ){\n\t\t\t//get the booking ids tied to this event or preloaded into this object\n\t\t\tforeach( $this->bookings as $EM_Booking ){\n\t\t\t\t$booking_ids[] = $EM_Booking->booking_id;\n\t\t\t}\n\t\t\t$result_tickets = true;\n\t\t\t$result = true;\n\t\t\tif( count($booking_ids) > 0 ){\n\t\t\t\t//Delete bookings and ticket bookings\n\t\t\t\t$result_tickets = $wpdb->query(\"DELETE FROM \". EM_TICKETS_BOOKINGS_TABLE .\" WHERE booking_id IN (\".implode(',',$booking_ids).\");\");\n\t\t\t\t$result = $wpdb->query(\"DELETE FROM \".EM_BOOKINGS_TABLE.\" WHERE booking_id IN (\".implode(',',$booking_ids).\")\");\n\t\t\t}\n\t\t}elseif( !empty($this->event_id) ){\n\t\t\t//faster way of deleting bookings for an event circumventing the need to load all bookings if it hasn't been loaded already\n\t\t\t$event_id = absint($this->event_id);\n\t\t\t$booking_ids = $wpdb->get_col(\"SELECT booking_id FROM \".EM_BOOKINGS_TABLE.\" WHERE event_id = '$event_id'\");\n\t\t\t$result_tickets = $wpdb->query(\"DELETE FROM \". EM_TICKETS_BOOKINGS_TABLE .\" WHERE booking_id IN (SELECT booking_id FROM \".EM_BOOKINGS_TABLE.\" WHERE event_id = '$event_id')\");\n\t\t\t$result = $wpdb->query(\"DELETE FROM \".EM_BOOKINGS_TABLE.\" WHERE event_id = '$event_id'\");\n\t\t}else{\n\t\t\t//we have not bookings loaded to delete, nor an event to delete bookings from, so bookings are considered 'deleted' since there's nothing ot delete\n\t\t\t$result = $result_tickets = true;\n\t\t}\n\t\tdo_action('em_bookings_deleted', $result, $booking_ids);\n\t\treturn apply_filters('em_bookings_delete', $result !== false && $result_tickets !== false, $booking_ids, $this);\n\t}", "public function destroy(Book $book)\n {\n \n $findBook = Book::find( $book->id);\n\t\tif($findBook->delete()){\n \n return redirect()->route('books.index')\n ->with('success' , 'Book deleted successfully');\n }\n\n return back()->withInput()->with('error' , 'Book could not be deleted');\n }", "public function practice15()\n {\n //$books = Book::where('title', 'LIKE', '%Harry Potter%')->orWhere\n //('published_year', '>=', 1998)->get();\n\n $books = Book::where('author', 'LIKE', '%Weir%')->get();\n\n if ($books->isEmpty()) {\n dump('No matches found');\n } else {\n dump($books->toArray());\n\n foreach ($books as $book) {\n $book->delete();\n dump('Deletion complete; check the database to see if it worked...');\n }\n \n }\n }", "public function destroy($book)\n {\n return $this->successResponse($this->bookService->deleteBook($book));\n }", "function delete(){\r\n\t\tglobal $wpdb;\r\n\t\t$sql = $wpdb->prepare(\"DELETE FROM \". EM_TICKETS_BOOKINGS_TABLE . \" WHERE ticket_booking_id=%d\", $this->id);\r\n\t\t$result = $wpdb->query( $sql );\r\n\t\treturn apply_filters('em_ticket_booking_delete', ($result !== false ), $this);\r\n\t}", "public function delete($id)\n\t{\n\t\t$this->book_model->delBook($id);\n\t\t// arahkan ke method 'books' di kontroller 'dashboard'\n\t\tredirect('dashboard/books');\n\t}", "public function delete(Request $request) {\n\n # Get the book to be deleted\n $book = Book::find($request->id);\n\n if(!$book) {\n Session::flash('message', 'Deletion failed; book not found.');\n return redirect('/books');\n }\n\n $book->tags()->detach();\n\n $book->delete();\n\n # Finish\n Session::flash('message', $book->title.' was deleted.');\n return redirect('/books');\n }", "public function deletebook($book_id)\r\n {\r\n $sql = \"DELETE FROM book WHERE book_id = :book_id\";\r\n $query = $this->db->prepare($sql);\r\n $parameters = array(':book_id' => $book_id);\r\n // useful for debugging: you can see the SQL behind above construction by using:\r\n // echo '[ PDO DEBUG ]: ' . Helper::debugPDO($sql, $parameters); exit();\r\n $query->execute($parameters);\r\n }", "public function destroy(int $book)\n {\n return $this->successResponse($this->client->destroyBook($book));\n }", "public function destroy(Book $book)\n {\n $book->delete();\n\n return redirect()->route('books.index')->with('success','Livro excluído com sucesso!');\n }", "public function destroy(Book $book)\n {\n $book->delete();\n return response()->json([\n 'status_code' => 200,\n 'message' => \"Livre supprimé\",\n ]); \n }", "public function destroy($id)\n {\n return Book::destroy($id);\n }", "public function destroy(Book $book)\n {\n $this->repository->delete($book->id);\n \\Session::flash('message', 'Livro excluída com sucesso.');\n return redirect()->route('books.index');\n }", "public function destroy(Book $book)\n {\n $book->delete();\n return redirect()->route('books.index');\n }", "public function destroy(newbook $newbook)\n {\n //\n }", "public function destroy(Book $book)\n {\n return response()->json($book->delete());\n }", "public function delete(User $user, Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n Book::destroy($book->id);\n return redirect('/books')->with('status', 'Data Buku Berhasil Dihapus!');\n }", "static public function deleteProduct($bookId)\r\n {\r\n $db = Database::getConnect();\r\n $sql = \"UPDATE books SET `deleted_at` = CURRENT_TIMESTAMP WHERE `book_id` = '{$bookId}'\";\r\n\r\n $rs = $db->query($sql);\r\n return $rs;\r\n }", "public function actionDelete($id)\n {\n $book = $this->findModel($id);\n $book->status_id = Yii::$app->params['status']['deleted'];\n $book->update(false);\n Yii::info($id . '_delete', 'book');\n Yii::$app->session->addFlash('success', Yii::t('app', 'Book was deleted successfully.'));\n\n return $this->redirect(['index']);\n }", "public function destroy(Book $book)\n {\n $book->delete();\n return redirect('/books');\n }", "public function destroy($id)\n {\n $book = Book::find($id);\n $check = Book::where('author_id',Auth::id())->first();\n\n if ($check->author_id == Auth::id()) {\n if ($book->cover_image != 'no_image.jpg') {\n Storage::delete('public/storage/cover_images/' . $book->cover_image);\n }\n\n $book->delete();\n return redirect('/book')->with('success', 'Book Deleted!!!');\n }\n }", "public function destroy($id)\n {\n // Ambil data sesuai $id\n $book_to_destroy = \\App\\Book::findOrFail($id);\n\n // Delete\n $book_to_destroy->delete();\n\n // redirect ke halaman index\n return redirect()->route(\"books.index\")->with(\"status\", \"Book successfully move to trash\");\n }", "public static function get_all_books_delete() {\n\t\t$books = BooksQModel::get_books_delete();\n\n\t\tforeach ($books as $book) {\n\t\t\t//shorted description\n\t\t\tif (strlen($book->description) >= 122)\n\t\t\t\t$book->description = mb_substr($book->description, 0, 120).'...';\n\t\t\t//get uploader\n\t\t\t$uploader = UsersQModel::get_user_by_id($book->id_uploader);\n\t\t\tif ($uploader != null)\n\t\t\t\t$book->uploader = $uploader->name;\n\t\t\telse\n\t\t\t\t$book->uploader = 'Đang cập nhật';\n\t\t}\n\n\t\treturn $books;\n\t}", "function delete_booktype($id)\n {\n return $this->db->delete('booktypes',array('id'=>$id));\n }", "public function destroy(Book $book)\n {\n $book->delete();\n return redirect('/shops');\n }", "public function destroy($id)\n {\n $book = Reserva::findOrFail($id);\n DB::table('reservas_mesas')->where('date', $book->date)->where('idTable', $book->idTable)->update([$book->time => false]);\n $book->delete();\n return redirect()->route('books.index');\n }", "public function destroy(Request $request, $bookid)\n {\n $token = $request->bearerToken();\n\n\n $user = DB::table('users')\n ->join('role_user', 'users.id', '=', 'role_user.userid')\n ->join('roles', 'roles.id', '=', 'role_user.roleid')\n ->select('users.api_token', 'roles.id')->where([['users.api_token','=', $token], ['roles.id', '1']])->get();\n \n\n //to delete a single book\n if ((Book::where('Bookid', $bookid)->exists()) && $user->isNotEmpty() ) {\n $book = Book::find($bookid);\n $book->delete();\n return response()->json([\n \"message\" => \"Book deleted successfully\"\n ], 200);\n }\n else {\n // return response()->json([\n // \"message\" => \"Book not found\"\n // ], 404);\n return response()->json([\"message\" => \"Unavailable token\"], 401);\n\n }\n }", "public function destroy($id)\n {\n $booktodelete = books::find($id);\n if ($booktodelete) {\n $booktodelete->delete();\n return response()->json('success');\n }\n return 'Not found';\n }", "public function destroy($id)\n {\n $book = Book::find($id);\n\n if($book->cover_image != 'no_book_image.jpg')\n {\n Storage::delete('public/cover_images/'.$book->cover_image);\n }\n $book->delete();\n\n return redirect()->route('booklist')->with('success','Book Removed from Library.');\n }", "public function destroy(Book $book)\n {\n $book->delete();\n\n return response()->json([\"id\" => $book->id], 200);\n }", "public function destroy($isbn)\n {\n $Book = Book::where('id', $isbn)->first();\n if($Book != null){\n $Book->delete();\n return (['message' =>'Borrado Correctamente', 'code'=> 201]);\n\n }\n return (['message' =>'ISBN incorrecto','code'=> 404]);\n\n }", "public function delete(Request $request, $id)\n {\n //Delete records in a staging table\n Book::find($id)->authors()->detach();\n //Delete author\n Book::find($id)->remove();\n\n return redirect()->back()->with('status', 'Book deleted!');\n }", "function remove_book($db, $bookid)\n{\n\t$sql = \"UPDATE textbooks SET removed = 1 where id = :id\";\n\t$st = $db->prepare($sql);\n\t$st->execute(array(':id'=>$bookid));\n\treturn;\n}", "public function destroy(BookAction $action, int $id)\n {\n $book = Book::findOrFail($id);\n $this->authorize('delete',$book);\n $result = $action->delete($book);\n if ($result) {\n return response()->json(['message' => 'successfull'], 200);\n } else {\n return response()->json(['message' => 'fail']);\n }\n }", "public function get_book();", "public function destroy(Book $book)\n {\n $book->delete();\n return redirect()->route('books.index')->with('success', 'Book Has Been Deleted Successfully');\n }", "public function destroy(Book $book)\n {\n $book->delete();\n\n return response()->json(null, 204);\n }", "public function destroy($id)\n {\n //\n $book = Book::findOrFail($id);\n\n $book->delete();\n return redirect()->route('books.index')\n ->with(['status' => 'Buku '.$book->title. ' dipindah ke tempat sampah']);\n }", "public function destroy($id)\n {\n $book = Book::find($id);\n $size = count($book->Order_details);\n $imgcount = count($book->Images);\n if ($size == 0 && $imgcount == 0) {\n $book->delete();\n return redirect()->route('book.index')->with('success', 'Delete book successfully');\n }\n return redirect()->route('book.index')->with('errors', 'Cannot delete!');\n }", "public function destroy(Book $book)\n {\n $book->delete();\n\n return redirect()->route('books.index');\n }", "public function destroy(Book $book)\n {\n $book->delete();\n }", "public function destroy(Request $request)\n {\n $req =$request['0'];\n // print_r($req);exit();\n\n // $data =Rent::find($req['id'])->where('book_id',$req['book_id'])->delete();\n $data =DB::table('rents')->where('book_id', $req['id'])->delete();\n\n $booked = DB::table('books')\n ->where('id', $req['id'])\n ->update(['booked_status' => '0']);\n \n }", "public function deleteBookTitle(){\r\n $this->title = \"\";\r\n }", "public function confirmDeleteBook()\n\t{\n\t\t$this->delete_book_model->deleteBook($this->input->post('bookISBN'));\n\t\tredirect($this->config->base_url());\n\t}", "public function destroy(Book $book)\n {\n $book->delete();\n\n return redirect('/books');\n }", "public function destroy($id)\n {\n $book = Book::find($id);\n $book->delete();\n\n return redirect()->route('books.index')->with(\"eliminar\", \"Ok\");\n }", "public function rmbook($itemid){\n \n $api = new Api();\n $api->rmitem($itemid);\n $itemid = mysql_real_escape_string( $itemid);\n $sql = \"delete FROM book where itemid='$itemid'\";\n mysql_query($sql);\n \n }", "public function destroy(Book $book)\n {\n\n Book::destroy($book->id);\n return redirect('/books');\n }", "public function delete($id)\n {\n Book::findOrFail($id)->delete();\n\n return response('Book deleted Successfully', 200);\n }", "public function delete(Application $app, int $id)\n {\n $book = $app['orm.em']->getRepository(Books::class)\n ->find($id);\n\n if (!$book) {\n $app->abort(404, 'No book found for id '.$id);\n }\n\n $app['orm.em']->remove($book);\n $app['orm.em']->flush();\n\n return $app->redirect($app['url_generator']->generate('book_index'));\n }", "public function delete(string $isbn)\n {\n if (UserController::isCurrentAdmin()) {\n $this->_model->removeTake($isbn);\n header('Location: ' . WEB_ROOT . 'emprunt/admin');\n } elseif (UserController::isConnected()) {\n $this->_model->removeTake($isbn, $_SESSION['code']);\n header('Location: ' . WEB_ROOT . 'profil/' . $_SESSION['code']);\n } else {\n throw new Exception('Veuillez vous connecter');\n }\n }", "public function destroy( $id)\n {\n Book::destroy($id);\n return redirect(\"/api/books\"); \n }" ]
[ "0.74498904", "0.7313731", "0.6862981", "0.6697465", "0.6666762", "0.6635976", "0.6616745", "0.6591009", "0.65835017", "0.65826815", "0.6559451", "0.655623", "0.6545079", "0.65187466", "0.6509385", "0.6467198", "0.64564174", "0.64061874", "0.6401843", "0.639456", "0.6372571", "0.63505477", "0.63242143", "0.63105047", "0.6304936", "0.62990355", "0.62865156", "0.62865156", "0.62865156", "0.62865156", "0.62865156", "0.62865156", "0.62865156", "0.62865156", "0.62865156", "0.62865156", "0.62825984", "0.62761617", "0.62712735", "0.6242654", "0.6240073", "0.620334", "0.6187564", "0.6161351", "0.61597025", "0.6147784", "0.6139669", "0.6132708", "0.6110644", "0.60962", "0.6088941", "0.60853136", "0.6085236", "0.6080923", "0.6065778", "0.6062258", "0.60339475", "0.6029997", "0.60291016", "0.6009077", "0.6000822", "0.60007554", "0.5998353", "0.59896576", "0.59839314", "0.59728396", "0.5967224", "0.59669983", "0.5959022", "0.5948239", "0.5947311", "0.5939424", "0.5938749", "0.59165335", "0.59131503", "0.5905181", "0.58947015", "0.5879918", "0.5871928", "0.5857581", "0.58493155", "0.5848142", "0.5847978", "0.5847232", "0.5842362", "0.58383155", "0.58253455", "0.5821324", "0.5811453", "0.58088934", "0.5806525", "0.58018994", "0.57913995", "0.5783422", "0.57683283", "0.5757932", "0.5757437", "0.5755279", "0.57305795", "0.57279414" ]
0.67010933
3
Demonstrates the `first` method
public function practice5() { $book = Book::where('slug', '=', 'the-martian')->first(); dump($book); dump($book->toArray()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first() {}", "public function getFirst();", "public function first()\n {\n }", "public function getFirst() {}", "public function first(): mixed;", "public function first(): mixed;", "function getFirst() ;", "public function getFirst()\n\t{\t\treturn $this->first;\n\t}", "public function firstItem();", "public function first(){\n // return $this->_results[0];\n return $this->results()[0];\n }", "public function first()\n {\n // return $this->_results[0];\n return $this->results()[0];\n }", "public function first()\n {\n return $this->take(1)->get()->first();\n }", "public function first() {\n return $this->nth( 0 );\n }", "public function getFirst()\n {\n return $this->first;\n }", "public function getFirst()\n {\n return $this->first;\n }", "public function getFirst()\n\t{\n\t\treturn $this->first;\n\t}", "public function first(){\n\n //using the above (results) method here\n return $this->results()[0]; //depends on the version of your PHP server\n //return $this->results[0];\n }", "public function testFirst()\r\n {\r\n self::assertEquals(1, Arr::first([1, 2, 3]));\r\n self::assertEquals('a', Arr::first(['a', 'b', 'c']));\r\n self::assertNotEquals('b', Arr::first(['a', 'b', 'c']));\r\n\r\n self::assertEquals(2, Arr::first([1, 2, 3], function ($value) {\r\n return $value === 2;\r\n }));\r\n self::assertEquals(null, Arr::first([1, 2, 3], function ($value) {\r\n return $value === 20;\r\n }));\r\n\r\n self::assertInternalType('int', Arr::first([1, 2, 3]));\r\n self::assertInternalType('string', Arr::first(['a', 'b', 'c']));\r\n }", "public function findFirst();", "public static function first(array $options = array());", "public function first(): mixed\n {\n return Iterators::first($this->iterator);\n }", "public function First()\n {\n return $this->Results()[0];\n }", "public function First()\n {\n }", "public function First()\n {\n }", "public function First()\n {\n }", "public function first() {\n\t\t$result = $this->get_result();\n\n\t\treturn array_shift( $result );\n\t}", "public function first(){\n return $this->find(1);\n }", "public function first()\n {\n return $this->results()[0];\n }", "function first()\n{\n\t$this->rewind();\n\treturn $this->current();\n}", "public function first(): string;", "public function first()\n {\n return $this->results()[0];\n }", "public function first()\n {\n $sql = $this->get() . ' LIMIT 1';\n $this->query = $sql;\n }", "public function getFirstResult();", "public function getFirstResult();", "public function getFirstItem() {}", "public function getFirstItem() {}", "public function getFirstItem();", "public function firstOrFail();", "public function findFirst()\n {\n }", "public function testFirst()\n {\n $this->collection->seek(2);\n $this->collection->first();\n $this->assertEquals(0, $this->collection->key());\n $this->assertEquals(1, $this->collection->current());\n }", "public function first() {\n\n\t\treturn $this->search[0];\n\n\t}", "public function first() {\n\t\treturn $this->valueForKey($this->firstKey());\n\t}", "public function getFirst()\n {\n return 1;\n }", "public function first() {\n return reset($this->list);\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "function array_first($array)\n {\n return arr::first($array);\n }", "final public function first()\n {\n $queryBuilder = $this->createQueryBuilder();\n $queryBuilder->selectAll();\n $queryBuilder->limit(1);\n\n return $this->fetchOne($queryBuilder);\n }", "final public function getFirst() {\n\t\treturn null;\n\t}", "public static function first($array) {\n\t\treturn $array[0];\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first() {\n\t\treturn $this->items[0];\n\t}", "function first ()\n {\n return $this->A ? $this->A[0] : null;\n }", "final public function first()\n {\n $items = $this->all();\n if (count($items) === 0) {\n return null;\n }\n return reset($items);\n }", "public function first(callable $predicate): Option;", "public function first()\n {\n $this->rewind();\n return $this->current();\n }", "public function first(): OptionalInterface;", "public function peekFirst();" ]
[ "0.8934642", "0.8873957", "0.8873957", "0.8873957", "0.8873957", "0.8873957", "0.8873957", "0.8873957", "0.8873957", "0.86838657", "0.82860124", "0.82731354", "0.8143046", "0.8127991", "0.8127991", "0.8059965", "0.7559193", "0.7521075", "0.7516891", "0.7487018", "0.747933", "0.7462237", "0.74380755", "0.74380755", "0.74152714", "0.7394306", "0.7382047", "0.7358247", "0.73275733", "0.7308725", "0.7303588", "0.72968626", "0.72968626", "0.72968626", "0.72818154", "0.72588134", "0.7249555", "0.7190172", "0.71753913", "0.7166136", "0.7153217", "0.7119798", "0.7119798", "0.71033967", "0.7102482", "0.7101824", "0.7099516", "0.7094744", "0.70788735", "0.7061952", "0.7054276", "0.70536554", "0.70391315", "0.70247287", "0.70247287", "0.70247287", "0.70247287", "0.70247287", "0.70247287", "0.70247287", "0.70247287", "0.70247287", "0.70247287", "0.70247287", "0.70247287", "0.70247287", "0.70247287", "0.70247287", "0.70247287", "0.7022081", "0.69932276", "0.6992009", "0.69840974", "0.6975069", "0.6975069", "0.6975069", "0.6975069", "0.6975069", "0.6975069", "0.6975069", "0.6975069", "0.6975069", "0.6975069", "0.6975069", "0.6975069", "0.6975069", "0.6975069", "0.6975069", "0.6975069", "0.6975069", "0.6975069", "0.6975069", "0.6975069", "0.6975069", "0.6941099", "0.6927484", "0.6905493", "0.6878005", "0.6874822", "0.6873872", "0.6850487" ]
0.0
-1
Demonstrates using the Book model
public function practice2() { //dump(Str::plural('mouse')); dump(Book::find(3)); dump(Book::all()->toArray()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(Book $book)\n {\n $this->BookModel = $book;\n }", "public function __construct(){\n // make sure you do something like that in your index.php\n require_once('models/book.php');\n $this->book = new Book();\n }", "public function get_book();", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function run()\n {\n $book = new Book();\n $book->name = 'Tactical Thinking: 50 Brain-Training Puzzles to Change the Way You Think';\n $book->author = 'Charles Phillips';\n $book->price = 80000;\n $book->category_id = 1;\n $book->avatar = 'abc.jpg';\n $book->status = 'have book';\n $book->save();\n\n $book = new Book();\n $book->name = 'Tactical Thinking: 50 Brain-Training Puzzles to Change the Way You Think';\n $book->author = 'Charles Phillips';\n $book->price = 80.000;\n $book->category_id = 1;\n $book->avatar = 'abc.jpg';\n $book->status = 'out of book';\n $book->save();\n }", "public function practice4()\n {\n $book = new Book();\n\n # Set the properties\n # Note how each property corresponds to a field in the table\n $book->title = 'Harry Potter and the Sorcerer\\'s Stone';\n $book->author = 'J.K. Rowling';\n $book->published_year = 1997;\n $book->cover_url = 'http://prodimage.images-bn.com/pimages/9780590353427_p0_v1_s484x700.jpg';\n $book->purchase_url = 'http://www.barnesandnoble.com/w/harry-potter-and-the-sorcerers-stone-j-k-rowling/1100036321?ean=9780590353427';\n\n # Invoke the Eloquent `save` method to generate a new row in the\n # `books` table, with the above data\n $book->save();\n\n dump('Added: ' . $book->title);\n }", "public function __construct($book)\n {\n $this->book = $book;\n }", "public function __construct($book)\n {\n $this->book = $book;\n }", "public function run()\n {\n $book = new Book();\n $book->title = 'To kill a mockingbird';\n $book->synopsis = 'To Kill a Mockingbird is Harper Lee’s 1961 Pulitzer Prize-winning novel about a child’s view of race and justice in the Depression-era South. The book sells one million copies per year, and Scout remains one of the most beloved characters in American fiction.';\n $book->author = 'Harper Lee';\n $book->genre = 'Southern Gothic';\n $book->logo_path = '../assets/img/theme/mockingbird.jpg';\n $book->no_of_issues = 8;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'Robinson Crusoe';\n $book->synopsis = 'Robinson Crusoe was published in 1719 during the Enlightenment period of the 18th century. In the novel Crusoe sheds light on different aspects of Christianity and his beliefs. The book can be considered a spiritual autobiography as Crusoe\\'s views on religion drastically change from the start of his story and then the end.';\n $book->author = 'Daniel Defoe';\n $book->genre = 'Robinsonadec';\n $book->logo_path = '../assets/img/theme/crusoe.jpg';\n $book->no_of_issues = 5;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'Crime and punishment';\n $book->synopsis = 'Crime and Punishment was first published in the literary journal The Russian Messenger in twelve monthly installments during 1866. It was later published in a single volume. It is the second of Dostoevsky\\'s full-length novels following his return from ten years of exile in Siberia. Crime and Punishment is considered the first great novel of his \"mature\" period of writing. The novel is often cited as one of the supreme achievements in literature';\n $book->author = 'Fyodor Dostoevsky';\n $book->genre = 'Philosophical';\n $book->logo_path = '../assets/img/theme/punishment.jpg';\n $book->no_of_issues = 12;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'The Trial';\n $book->synopsis = 'The Trial tells the story of Josef K., a man arrested and prosecuted by a remote, inaccessible authority, with the nature of his crime revealed neither to him nor to the reader.';\n $book->author = 'Franz Kafka';\n $book->genre = 'Philosophical';\n $book->logo_path = '../assets/img/theme/trial.jpg';\n $book->no_of_issues = 4;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'Anna Karenina';\n $book->synopsis = 'A complex novel in eight parts, with more than a dozen major characters, it is spread over more than 800 pages (depending on the translation and publisher), typically contained in two volumes. It deals with themes of betrayal, faith, family, marriage, Imperial Russian society, desire, and rural vs. city life. The plot centers on an extramarital affair between Anna and dashing cavalry officer Count Alexei Kirillovich Vronsky that scandalizes the social circles of Saint Petersburg and forces the young lovers to flee to Italy in a search for happiness. After they return to Russia, their lives further unravel.';\n $book->author = 'Leo Tolstoy';\n $book->genre = 'Realist novel';\n $book->logo_path = '../assets/img/theme/karenina.jpg';\n $book->no_of_issues = 15;\n\n $book->save();\n }", "public function practice20()\n {\n # Get the first book as an example\n $book = Book::first();\n\n# Get the author from this book using the \"author\" dynamic property\n# \"author\" corresponds to the the relationship method defined in the Book model\n $author = $book->author;\n\n# Output\n dump($book->title.' was written by '.$author->first_name.' '.$author->last_name);\n dump($book->toArray());\n }", "function testAddBook()\n {\n //Arrange\n $first_name = \"John\";\n $last_name = \"Steinbeck\";\n $test_author = new Author($first_name, $last_name);\n $test_author->save();\n\n $title = \"Grapes of Wrath\";\n $test_book = new Book($title);\n $test_book->save();\n\n //Act\n $test_author->addBook($test_book);\n\n //Assert\n $this->assertEquals($test_author->getBook(), [$test_book]);\n\n }", "public function testCreateBook()\n {\n $this->post('/book', [\n 'title' => 'Aspernatur eum voluptas distinctio pariatur',\n 'author' => 'Vickie Muller'\n ]);\n\n $this->assertDatabaseHas('books', [\n 'title' => 'Aspernatur eum voluptas distinctio pariatur',\n 'author' => 'Vickie Muller'\n ]);\n\n // $resp->assertStatus(200);\n }", "public function show(Book $book)\n {\n echo \"show\";\n }", "public function show($book)\n {\n //dd($book);\n }", "public function book()\n {\n return $this->belongsTo(Book::class);\n }", "public function book()\n {\n return $this->belongsTo('App\\Book');\n }", "public function getBookList() \n {\n return array( \n \"Balagurusamy\" => new Book(\"Balagurusamy\", \"Balagurusamy\", \"C programming\"), \n \"CMM in Practice\" => new Book(\"CMM in Practice\", \"Pankaj Jalote\", \"\"), \n \"PHP for Dummies\" => new Book(\"PHP for Dummies\", \"Some Smart Guy\", \"\") \n ); \n }", "public function getEx4() {\n # Instantiate a new Book Model object\n $book = new \\Book();\n # Set the parameters\n # Note how each parameter corresponds to a field in the table\n $book->title = 'Harry Potter';\n $book->author = 'J.K. Rowling';\n $book->published = 1997;\n $book->cover = 'http://prodimage.images-bn.com/pimages/9780590353427_p0_v1_s484x700.jpg';\n $book->purchase_link = 'http://www.barnesandnoble.com/w/harry-potter-and-the-sorcerers-stone-j-k-rowling/1100036321?ean=9780590353427';\n # Invoke the Eloquent save() method\n # This will generate a new row in the `books` table, with the above data\n $book->save();\n return 'Added: '.$book->title;\n }", "public function run()\n {\n $book = new Book();\n $book->id = 1;\n $book->name = 'Tôi quyết định sống cho chính tôi';\n $book->image = 'image/sach1.jpg';\n $book->writerName = 'KimSuHyun';\n $book->category_id = 1;\n $book->price = 50000;\n $book->description = 'sách tâm lí học hay';\n $book->save();\n }", "public function practice17()\n {\n $books = Book::all();\n\n foreach ($books as $book) {\n dump($book->title);\n }\n }", "public function run()\n {\n $book = new \\App\\Book([\n 'name' => 'Neural Networks',\n 'author' => 'Thomas Muller',\n 'publication' => 'Pearson Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Neural Networks',\n 'author' => 'Thomas Muller',\n 'publication' => 'Pearson Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Neural Networks',\n 'author' => 'Thomas Muller',\n 'publication' => 'Pearson Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Operating System',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Operating System',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Operating System',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Operating System',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Object Oriented Analysis And Design',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Object Oriented Analysis And Design',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Object Oriented Analysis And Design',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Object Oriented Analysis And Design',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n }", "public function book(){\n return $this.belongsTo(Book::class);\n }", "public function book () \n { \n $book = Book::all();\n return view('books.show',compact('book'));\n }", "public function run()\n {\n $book = new \\App\\Book;\n $book->title = \"Herr der Ringe\";\n $book->isbn = \"123456789\";\n $book->subtitle = \"Die Rückkehr des Königs\";\n $book->rating = 10;\n $book->description = \"Letzter Teil der Trilogie\";\n $book->published = new DateTime();\n\n //get the first user\n $user = App\\User::all()->first();\n $book->user()->associate($user);\n $book->save();\n // test authors - load them and write them to the db using eloquent ORM\n $authors = App\\Author::all()->pluck(\"id\");\n $book->authors()->sync($authors);\n $book->save();\n\n // add images to book\n $image1 = new \\App\\Image;\n $image1->title = \"Cover 1\";\n $image1->url = \"https://images-na.ssl-images-amazon.com/images/I/61h%2BnIJyVFL._SX333_BO1,204,203,200_.jpg\";\n $image1->book()->associate($book);\n $image1->save();\n\n $image2 = new App\\Image;\n $image2->title = \"Cover 2\";\n $image2->url = \"https://images-eu.ssl-images-amazon.com/images/I/516KV5tjulL._AC_US327_FMwebp_QL65_.jpg\";\n $image2->book()->associate($book);\n $image2->save();\n }", "public function practice19()\n {\n $author = Author::where('first_name', '=', 'J.K.')->first();\n\n $book = new Book;\n $book->title = \"Fantastic Beasts and Where to Find Them\";\n $book->published_year = 2017;\n $book->cover_url = 'http://prodimage.images-bn.com/pimages/9781338132311_p0_v2_s192x300.jpg';\n $book->purchase_url = 'http://www.barnesandnoble.com/w/fantastic-beasts-and-where-to-find-them-j-k-rowling/1004478855';\n $book->author()->associate($author); # <--- Associate the author with this book\n #This is the same:\n #$book->author_id = $author->id;\n $book->save();\n dump($book->toArray());\n }", "public function add_book()\n\t{\n\t\t$data = array();\n\t\t$authors = $this->add_book_model->getAuthors();\n\t\t$genres = $this->add_book_model->getGenres();\n\t\t$types = $this->add_book_model->getTypes();\n\t\t$data['authorsList'] = $authors;\n\t\t$data['genresList'] = $genres;\n\t\t$data['typesList'] = $types;\n\t\t$this->load->view('add_book', $data);\n\t}", "public function actionCreate()\n {\n $modelBook = new Book;\n $modelBookForm = new BookForm($modelBook);\n $modelsAuthor = [new Author];\n $modelsKeyWords = [new KeyWord];\n\n if ($modelBook->load(Yii::$app->request->post())) {\n $modelsAuthor = Model::createMultiple(Author::className());\n Model::loadMultiple($modelsAuthor, Yii::$app->request->post());\n //process, separate book keyWords\n if ($wordsArray = $modelBookForm->prepareKeyWords(Yii::$app->request->post('KeyWord')['words'])) {\n $modelsKeyWords = Model::createMultiple(KeyWord::className(), [], $wordsArray);\n // KeyWord[0]['word' =>'php']\n Model::loadMultiple($modelsKeyWords, $wordsArray, '');\n }\n\n //before validation we need insert fake internal_id\n $modelBook->internal_id = '00000000000';\n // validate all models\n $valid = $modelBook->validate();\n $valid = Model::validateMultiple($modelsAuthor) && $valid;\n $valid = $wordsArray === false ? $valid : Model::validateMultiple($modelsKeyWords) && $valid;\n\n if ($valid && $modelBookForm->createBook($modelsAuthor, $modelsKeyWords)) {\n Yii::info($modelBook->id . '_create', 'book');\n $this->redirect(['view', 'id' => $modelBook->id]);\n }\n }\n\n return $this->render('create', [\n 'modelBook' => $modelBook,\n 'modelsAuthor' => (empty($modelsAuthor)) ? [new Author] : $modelsAuthor,\n ]);\n }", "public function book() {\n return $this->hasOne(Book::class);\n }", "public function books(): Collection;", "function testAddBook()\n {\n\n //Arrange\n $title = \"Harry Houdinis Magic\";\n $id = null;\n $test_book = new Book($title, $id);\n $test_book->save();\n\n $title2 = \"Harry and Maggies Adventures\";\n $test_book2 = new Book($title2, $id);\n $test_book2->save();\n\n $name = \"Harry Houdini\";\n $id = null;\n $test_author = new Author($name, $id);\n $test_author->save();\n\n $name2 = \"Maggie Pie\";\n $test_author2 = new Author($name2, $id);\n $test_author2->save();\n\n //Act\n $test_author->addBook($test_book);\n $test_author->addBook($test_book2);\n $test_author2->addBook($test_book2);\n\n //Assert\n $this->assertEquals($test_author->getBooks(), [$test_book, $test_book2]);\n $this->assertEquals($test_author2->getBooks(), [$test_book2]);\n }", "public function testBookControllerShow()\n {\n $this->visit('books/'.$this->saveBookId)\n ->see('I play drums')\n ->see('Ringo Star');\n $this->seeInDatabase('books', ['title' => 'I play drums']);\n }", "public function getName()\n {\n return 'book';\n }", "public function __construct(){\n parent::__construct();\n $this->authorHasBookModel = $this->model('AuthorHasBook'); \n }", "public function getBook()\n {\n return $this->hasOne(Book::className(), ['id' => 'book_id']);\n }", "public function getBook()\n {\n return $this->_book;\n }", "public function run()\n {\n //Buch anlegen\n $book = new \\App\\Book;\n $book -> isbn = \"123456789\" ;\n $book -> title = \"Harry Potter\" ;\n $book -> subtitle = \"Und der Stein der Weisen\" ;\n $book -> rating = 7 ;\n $book -> description = \"Bis zu seinem elften Geburtstag glaubt Harry, er sei ein ganz normaler Junge.\n Doch dann erfährt er, dass er sich an der Schule für Hexerei und Zauberei \n einfinden soll – denn er ist ein Zauberer! In Hogwarts stürzt Harry von \n einem Abenteuer ins nächste und muss gegen Bestien, Mitschüler und \n Fabelwesen kämpfen. Da ist es gut, dass er schon Freunde gefunden hat, \n die ihm im Kampf gegen die dunklen Mächte zur Seite stehen.\n Dies ist der erste Band der international erfolgreichen Harry-Potter-Serie,\n die Generationen geprägt hat.\" ;\n $book -> published = new DateTime();\n $book -> netAmount = 8.99;\n $book -> user_id = 1;\n $book->save(); //nötig! Obwohl später nochmal gespeichert wird, sonst hat er später keine ID\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Rowling')->pluck(\"id\");\n $book->authors()->sync($authors);\n $book->save();\n\n //Bestellung zuweisen\n $orders = App\\Order::all()->pluck(\"id\");\n $book->orders()->sync($orders);\n $book->save();\n\n\n //Buch2\n $book2 = new \\App\\Book;\n $book2 -> title = \"Harry Potter\" ;\n $book2 -> isbn = \"1234567810\" ;\n $book2 -> subtitle = \"Und die Kammer des Schreckens\" ;\n $book2-> rating = 7 ;\n $book2 -> description = \"Endlich wieder Schule! Einen solchen Seufzer kann nur der ausstoßen, dessen\n Ferien scheußlich waren: Harry Potter. Doch wie im vergangenen Schuljahr \n stehen nicht nur Zaubertrankunterricht und Verwandlung auf dem Programm. \n Ein grauenhaftes Etwas treibt sein Unwesen in der Schule. Wird Harry mit \n Hilfe seiner Freunde Ron und Hermine das Rätsel lösen und Hogwarts von den \n dunklen Mächten befreien können?\n Dies ist der zweite Band der international erfolgreichen Harry-Potter-Serie, \n die Generationen geprägt hat.\" ;\n $book2 -> published = new DateTime();\n $book2 -> netAmount = 8.99;\n $book2 -> user_id = 1;\n $book2->save();\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Rowling')->pluck(\"id\");\n $book2->authors()->sync($authors);\n $book2->save();\n\n\n //Buch3\n $book3 = new \\App\\Book;\n $book3 -> title = \"Harry Potter\" ;\n $book3 -> isbn = \"1234567811\" ;\n $book3 -> subtitle = \"Und der Gefangene von Askaban\" ;\n $book3 -> rating = 10 ;\n $book3 -> description = \"Natürlich weiß Harry, dass das Zaubern in den Ferien strengstens verboten \n ist, und trotzdem befördert er seine schreckliche Tante mit einem \n Schwebezauber an die Decke. Die Konsequenz ist normalerweise: Schulverweis!\n Doch Harry wird behandelt wie ein rohes Ei. Hat es etwa damit zu tun, \n dass ein gefürchteter Verbrecher es auf Harry abgesehen hat? Mit Ron und \n Hermine versucht Harry ein Geflecht aus Verrat und Rache aufzudröseln und \n stößt dabei auf Dinge, die ihn fast an seinem Verstand zweifeln lassen.\n Dies ist der dritte Band der Harry-Potter-Serie, \n die Generationen geprägt hat.\" ;\n $book3 -> published = new DateTime();\n $book3 -> netAmount = 18.99;\n $book3 -> user_id = 1;\n $book3->save();\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Rowling')->pluck(\"id\");\n $book3->authors()->sync($authors);\n $book3->save();\n\n\n //Buch4\n $book4 = new \\App\\Book;\n $book4 -> isbn = \"1234567812\" ;\n $book4 -> title = \"Harry Potter\" ;\n $book4 -> subtitle = \"Und der Feuerkelch\" ;\n $book4 -> rating = 8 ;\n $book4 -> description = \"Harrys viertes Schuljahr in Hogwarts beginnt und ein Wettkampf hält die \n Schüler in Atem: das Trimagische Turnier, in dem Harry eine Rolle übernimmt, \n die er sich im Traum nicht vorgestellt hätte. Natürlich steckt dahinter das \n Böse, das zurück an die Macht drängt: Lord Voldemort. Es wird eng für Harry. \n Doch auf seine Freunde und ihre Unterstützung kann er sich auch in \n verzweifelten Situationen verlassen.\n Dies ist der vierte Band der international erfolgreichen Harry-Potter-Serie,\n die Generationen geprägt hat.\" ;\n $book4 -> published = new DateTime();\n $book4 -> netAmount = 24.99;\n $book4 -> user_id = 1;\n $book4->save(); //nötig! Obwohl später nochmal gespeichert wird, sonst hat er später keine ID\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Rowling')->pluck(\"id\");\n $book4->authors()->sync($authors);\n $book4->save();\n\n\n //Buch5\n $book5 = new \\App\\Book;\n $book5 -> isbn = \"1234567813\" ;\n $book5 -> title = \"Harry Potter\" ;\n $book5 -> subtitle = \"Und der Orden des Phönix\" ;\n $book5 -> rating = 10 ;\n $book5 -> description = \"Es sind Sommerferien und wieder einmal sitzt Harry bei den unsäglichen \n Dursleys fest. Doch diesmal treibt ihn größere Unruhe denn je – warum \n erfährt er nichts über die dunklen Mächte, die inzwischen neu erstanden \n sind? Noch ahnt er nicht, was der geheimnisvolle Orden des Phönix gegen \n Voldemort ausrichten kann ... Doch dann schlägt der Dunkle Lord wieder zu. \n Harry muss seine Freunde um sich scharen, sonst gibt es kein Entrinnen.\n Dies ist der fünfte Band der international erfolgreichen Harry-Potter-Serie, \n die Generationen geprägt hat.\" ;\n $book5 -> published = new DateTime();\n $book5 -> netAmount = 29.99;\n $book5 -> user_id = 1;\n $book5->save();\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Rowling')->pluck(\"id\");\n $book5->authors()->sync($authors);\n $book5->save();\n\n //Buch6\n $book6 = new \\App\\Book;\n $book6 -> isbn = \"1234567814\" ;\n $book6 -> title = \"Harry Potter\" ;\n $book6 -> subtitle = \"Und der Halbblutprinz\" ;\n $book6 -> rating = 8 ;\n $book6 -> description = \"Seit Voldemort, der gefährlichste schwarze Magier aller Zeiten, \n zurückgekehrt ist, herrschen Aufruhr und Gewalt in der magischen Welt. \n Als Harry und seine Freunde Ron und Hermine zu ihrem sechsten Schuljahr \n nach Hogwarts kommen, gelten strengste Sicherheitsmaßnahmen in der\n Zauberschule. Um Harry gegen das Böse zu wappnen, erforscht Dumbledore mit \n ihm die Geschichte des Dunklen Lords. Ob auch Harrys Zaubertrankbuch, das \n früher einem »Halbblutprinzen« gehörte, ihm helfen kann?\n Dies ist der sechste Band der international erfolgreichen Harry-Potter-Serie,\n die Generationen geprägt hat.\" ;\n $book6 -> published = new DateTime();\n $book6 -> netAmount = 23.99;\n $book6 -> user_id = 1;\n $book6->save();\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Rowling')->pluck(\"id\");\n $book6->authors()->sync($authors);\n $book6->save();\n\n\n //Buch7\n $book7 = new \\App\\Book;\n $book7 -> isbn = \"1234567815\" ;\n $book7 -> title = \"Harry Potter\" ;\n $book7 -> subtitle = \"Und die Heiligtümer des Todes\" ;\n $book7 -> rating = 10 ;\n $book7 -> description = \"An eine Rückkehr nach Hogwarts ist für Harry nicht zu denken. Er muss alles \n daransetzen, die übrigen Horkruxe zu finden. Erst wenn sie zerstört sind, \n kann Voldemorts Schreckensherrschaft vergehen. Mit Ron und Hermine an \n seiner Seite begibt sich Harry auf eine gefährliche Reise durch das ganze \n Land. Als die drei auf die rätselhaften Heiligtümer des Todes stoßen, muss \n Harry sich entscheiden. Soll er dieser Spur folgen? Doch welche Wahl er auch \n trifft – am Ende des Weges wird der Dunkle Lord auf ihn warten …\n Dies ist der siebte und letzte Band der international erfolgreichen \n Harry-Potter-Serie, die Generationen geprägt hat.\" ;\n $book7 -> published = new DateTime();\n $book7 -> netAmount = 26.99;\n $book7 -> user_id = 1;\n $book7->save();\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Rowling')->pluck(\"id\");\n $book7->authors()->sync($authors);\n $book7->save();\n\n\n //Buch8\n $book8 = new \\App\\Book;\n $book8 -> isbn = \"1234567816\" ;\n $book8 -> title = \"Das Lied von Eis und Feuer\" ;\n $book8 -> subtitle = \"Die Herren von Winterfell\" ;\n $book8 -> rating = 8 ;\n $book8 -> description = \"Eddard Stark, der Herr von Winterfell, wird an den Hof seines Königs gerufen, \n um diesem als Berater und Vertrauter zur Seite zu stehen. Doch Intriganten, Meuchler \n und skrupellose Adlige scharen sich um den Thron, deren Einflüsterungen der schwache \n König nichts entgegenzusetzen hat. Während Eddard sich von mächtigen Feinden umringt \n sieht, steht sein Sohn, der zukünftige Herrscher des Nordens, einer uralten finsteren \n Macht gegenüber. Die Zukunft des Reiches hängt von den Herren von Winterfell ab!\" ;\n $book8 -> published = new DateTime();\n $book8 -> netAmount = 17.00;\n $book8 -> user_id = 1;\n $book8->save();\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Martin')->pluck(\"id\");\n $book8->authors()->sync($authors);\n $book8->save();\n\n\n //Buch9\n $book9 = new \\App\\Book;\n $book9 -> isbn = \"1234567817\" ;\n $book9 -> title = \"Das Lied von Eis und Feuer\" ;\n $book9 -> subtitle = \"Das Erbe von Winterfell\" ;\n $book9 -> rating = 9 ;\n $book9 -> description = \"Eddard Stark, der Lord von Winterfell, ist dem Ruf seines Königs und alten Freundes \n Robert Baratheon gefolgt und hat seine kalte Heimat im hohen Norden verlassen, \n um als Hand – als Roberts Berater und Stellvertreter – zu dienen. Eddard ist ein \n geradliniger, tapferer und aufrechter Mann, der sich jeder Gefahr mit dem Schwert \n entgegenstellen würde – doch die Ränke der Mächtigen bei Hof sind nichts, was man mit \n einem Schwert bekämpfen kann. Auch dann nicht, wenn man die Hand des Königs ist ...\" ;\n $book9 -> published = new DateTime();\n $book9 -> netAmount = 16.00;\n $book9 -> user_id = 1;\n $book9->save();\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Martin')->pluck(\"id\");\n $book9->authors()->sync($authors);\n $book9->save();\n\n //Buch10\n $book10 = new \\App\\Book;\n $book10 -> isbn = \"1234567818\" ;\n $book10 -> title = \"Das Lied von Eis und Feuer\" ;\n $book10 -> subtitle = \"Der Thron der Sieben Königreiche\" ;\n $book10 -> rating = 7 ;\n $book10 -> description = \"Nach dem Tod seines Vaters ist es an dem erst fünfzehnjährigen Robb Stark, die \n Herrschaft über Winterfell und damit über den ganzen Norden von Westeros anzutreten. \n Robb kämpft noch um die Anerkennung und den Respekt seiner Untertanen, da bricht im \n Reich ein Bürgerkrieg aus. Für Robb stellt sich allerdings kaum die Frage, auf welcher \n Seite er kämpfen wird, denn der junge König Joffrey Baratheon hält seine Schwestern als \n Geisel. Und während das Reich zerbricht, wächst im eisigen Norden eine viel größere \n Gefahr heran …\" ;\n $book10 -> published = new DateTime();\n $book10 -> netAmount = 16.00;\n $book10 -> user_id = 1;\n $book10 ->save();\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Martin')->pluck(\"id\");\n $book10->authors()->sync($authors);\n $book10->save();\n\n\n //Buch11\n $book11 = new \\App\\Book;\n $book11 -> isbn = \"1234567819\" ;\n $book11 -> title = \"Das Lied von Eis und Feuer\" ;\n $book11 -> subtitle = \"Die Saat des goldenen Löwen\" ;\n $book11 -> rating = 7 ;\n $book11 -> description = \"Bürgerkrieg zerreißt das Reich Westeros, und der junge grausame König Joffrey \n Baratheon hält die Schwestern Sansa und Arya Stark als Geiseln, um ihren Bruder zur \n Treue zu zwingen. Während die ältere Sansa versuchen will, das beste aus der Situation \n zu machen, entscheidet sich Arya zur Flucht. Doch der Weg zu ihrer sicheren Heimat in \n Winterfell ist lang, und die verschiedenen Parteien, die im Bürgerkrieg \n aufeinanderprallen, sind nicht die einzige Gefahr für das junge Mädchen …\" ;\n $book11 -> published = new DateTime();\n $book11 -> netAmount = 18.00;\n $book11 -> user_id = 1;\n $book11 ->save();\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Martin')->pluck(\"id\");\n $book11->authors()->sync($authors);\n $book11->save();\n\n }", "public function getBook()\n\t{\n\t\treturn $this->getKeyValue('book'); \n\n\t}", "public function books()\n {\n return $this->hasMany('App\\Book');\n }", "public function edit(book $book)\n {\n //\n }", "public function testExample()\n {\n $book = new Book(['name'=>'The 3 Little ninjas']);\n $this->assertEquals('The 3 Little ninjas', $book->name);\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function show(Book $book) {\n return \\App\\Http\\Resources\\Book::make($book->load('author'));\n }", "public function show(BookRecord $bookRecord)\n {\n //\n }", "public function model()\n {\n return Booking::class;\n }", "public function practice5()\n {\n $book = Book::where('slug', '=', 'the-martian')->first();\n\n dump($book);\n dump($book->toArray());\n }", "public function show(newbook $newbook)\n {\n //\n }", "public function testBookView()\n {\n $response = $this->get('api/book/getBooks');\n\n $response->assertStatus(200);\n }", "public function run()\n {\n Book::insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'title' => 'The Great Gatsby',\n 'author' => 'F. Scott Fitzgerald',\n 'published' => 1925,\n 'cover' => 'http://img2.imagesbn.com/p/9780743273565_p0_v4_s114x166.JPG',\n 'purchase_link' => 'http://www.barnesandnoble.com/w/the-great-gatsby-francis-scott-fitzgerald/1116668135?ean=9780743273565',\n ]);\n\n Book::insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'title' => 'The Bell Jar',\n 'author' => 'Sylvia Plath',\n 'published' => 1963,\n 'cover' => 'http://img1.imagesbn.com/p/9780061148514_p0_v2_s114x166.JPG',\n 'purchase_link' => 'http://www.barnesandnoble.com/w/bell-jar-sylvia-plath/1100550703?ean=9780061148514',\n ]);\n\n Book::insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'title' => 'I Know Why the Caged Bird Sings',\n 'author' => 'Maya Angelou',\n 'published' => 1969,\n 'cover' => 'http://img1.imagesbn.com/p/9780345514400_p0_v1_s114x166.JPG',\n 'purchase_link' => 'http://www.barnesandnoble.com/w/i-know-why-the-caged-bird-sings-maya-angelou/1100392955?ean=9780345514400',\n ]);\n\n Book::insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'title' => 'Harry Potter and the Sorcerer\\'s Stone',\n 'author' => 'J.K. Rowling',\n 'published' => 1997,\n 'cover' => 'http://prodimage.images-bn.com/pimages/9780590353427_p0_v1_s484x700.jpg',\n 'purchase_link' => 'http://www.barnesandnoble.com/w/harry-potter-and-the-sorcerers-stone-j-k-rowling/1100036321?ean=9780590353427',\n ]);\n\n Book::insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'title' => 'Harry Potter and the Chamber of Secrets',\n 'author' => 'J.K. Rowling',\n 'published' => 1998,\n 'cover' => 'http://prodimage.images-bn.com/pimages/9780439064873_p0_v1_s192x300.jpg',\n 'purchase_link' => 'http://www.barnesandnoble.com/w/harry-potter-and-the-chamber-of-secrets-j-k-rowling/1004338523?ean=9780439064873',\n ]);\n\n Book::insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'title' => 'Harry Potter and the The Prisoner of Azkaban',\n 'author' => 'J.K. Rowling',\n 'published' => 1999,\n 'cover' => 'http://prodimage.images-bn.com/pimages/9780439136365_p0_v1_s192x300.jpg',\n 'purchase_link' => 'http://www.barnesandnoble.com/w/harry-potter-and-the-prisoner-of-azkaban-j-k-rowling/1100178339?ean=9780439136365',\n ]);\n }", "public function actionCreate()\n {\n $publishers = self::getPublishers();\n $categories = self::getCategories();\n $authors = self::getAuthors();\n\t\t$pubarray = $catarray = $autharray = array(); \n\t\t$errorMsg = '';\n if (empty($publishers) || empty($categories) || empty($authors))\n \t$errorMsg = \"Couldn't add a Book now! Please add atleast one Author, Publisher, and Category first!!\"; \n \t\n\t\t$model = new Book();\n\n if ($model->load(Yii::$app->request->post()) && $model->save())\n {\n return $this->redirect(['index']);\n }\n else\n {\n return $this->render('create', [\n 'model' => $model, 'categoryModels' => $categories, 'authorModels' => $authors,\n 'publisherModels' => $publishers, 'errorMsg' => $errorMsg\n ]);\n }\n\n }", "public function testSpecificBookView()\n {\n $category = factory(\\App\\Category::class)->create(\n [\n 'id' => '1'\n ]\n );\n $publisher = factory(\\App\\Publisher::class)->create(\n [\n 'id' => '1'\n ]\n );\n $book = factory(\\App\\Book::class)->create(\n [\n 'id' => '1',\n 'category_id' => '1',\n 'publisher_id' => '1'\n ]\n );\n\n $response = $this->get('api/book/1');\n\n $response->assertStatus(200);\n }", "public function show(Book $book)\n {\n return new BookResource($book);\n }", "function __construct($bookTitle, $bookPrice) {\n\n $this->bookTitle = $bookTitle;\n $this->bookPrice = $bookPrice;\n}", "public function books()\n {\n\t \t return $this->belongsToMany(Book::class);\n }", "public function show(book $book)\n {\n return $this->showOne($book);\n }", "public function edit(Book $book)\n {\n //\n //\n }", "public function show(BookRating $bookRating)\n {\n //\n }", "public function get_books()\n {\n $this->load->database();\n // print_r($this->db->get(\"books\"));\n $query = $this->db->query(\"select * from books\");\n return $query->result();\n }", "public function BookDetail()\n {\n return $this -> hasOne('App\\Models\\BookDetail');\n }", "public function getBooks($id) {\n }", "public function run() {\n $b1 = Book::create([\n \t'title'\t=>\t'Lean on Startups',\n \t'author' => 'Prof. Jk Willems',\n \t'link'\t=> 'http://amazon.eu/books/jkw/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 1\n ]);\n $b2 = Book::create([\n \t'author'\t=>\t'Dr. Sulieman Bengal',\n \t'title' => 'Modern Islam',\n \t'link'\t=> 'http://amazon.ksa/books/prof_s_bengal/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 4\n ]);\n $b3 = Book::create([\n \t'author'\t=>\t'Prof. Ali Sheikh',\n \t'title' => 'Feminism in Islam',\n \t'link'\t=> 'http://amazon.ksa/books/Ali_s/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 5\n ]);\n $b4 = Book::create([\n \t'author'\t=>\t'Dietel & Dietel',\n \t'title' => 'How to C#',\n \t'link'\t=> 'http://amazon.com/books/d&d/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 6\n ]);\n $b5 = Book::create([\n \t'author'\t=>\t'Prof. Howard Antonio',\n \t'title' => 'How to overcome Depression',\n \t'link'\t=> 'http://amazon.uk/books/p_howard_antionio/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 2\n ]);\n $b6 = Book::create([\n \t'author'\t=>\t'Prof. Howard Antonio',\n \t'title' => 'How to overcome Anxiety',\n \t'link'\t=> 'http://amazon.uk/books/p_howard_antionio/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 3\n ]);\n $b6 = Book::create([\n \t'author'\t=>\t'Dr. Jack Daniel',\n \t'title' => 'New Start',\n \t'link'\t=> 'http://amazon.us/books/dr_jack_D/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 7\n ]);\n $b7 = Book::create([\n \t'author'\t=>\t'Prof. Marko D.',\n \t'title' => 'Easy English',\n \t'link'\t=> 'http://amazon.uk/books/mard_d/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 8\n ]);\n }", "public function testRead() {\n $this->loadFixtures('Books');\n\n // Single\n $this->assertEquals(new Book([\n 'series_id' => 1,\n 'name' => 'A Game of Thrones',\n 'isbn' => '0-553-10354-7',\n 'released' => '1996-08-02'\n ]), Book::select('series_id', 'name', 'isbn', 'released')->orderBy('_id', 'asc')->first());\n\n // Multiple\n $this->assertEquals(new ModelCollection([\n new Book([\n 'series_id' => 3,\n 'name' => 'The Fellowship of the Ring',\n 'isbn' => '',\n 'released' => '1954-07-24'\n ]),\n new Book([\n 'series_id' => 3,\n 'name' => 'The Two Towers',\n 'isbn' => '',\n 'released' => '1954-11-11'\n ]),\n new Book([\n 'series_id' => 3,\n 'name' => 'The Return of the King',\n 'isbn' => '',\n 'released' => '1955-10-25'\n ]),\n ]), Book::select('series_id', 'name', 'isbn', 'released')->where('series_id', 3)->orderBy('_id', 'asc')->all());\n }", "public static function index()\r\n\t{\r\n\t\t$title = 'Book List';\r\n\t\t$model = new Books();\r\n\t\t$books = $model->all();\r\n\t\t/*\r\n\t\t// compact do this (down):\r\n\t\t$data['title'] = 'Book List';\r\n\t\t$data['books'] = [];\r\n\t\t*/\r\n\t\tView::show('/books/index', compact('title','books'));\r\n\t}", "public function testCreateBook()\n {\n $this->browse(function (Browser $browser) {\n //Make a book to add \n $book = factory('App\\Book')->make();\n //Navigate to the create page and send the data\n $browser->visit('/api/books/create')\n ->type('title', $book->title)\n ->type('author', $book->author)\n ->press('Add');\n //Check we are redirected to home page with no errors.\n $browser->pause(500);\n $browser->assertPathIs('/api/books')->assertSee('Book was successfully saved');\n //Check the new book is displayed\n $browser \n ->assertSee($book->title)\n ->assertSee($book->author);\n\n });\n\n }", "public function show(Book $book)\n {\n\n $this->service->setInstance($book); //setting already fetched instance into repository, so Laravel didn`t do it without purpose\n\n return response()->json([\n 'data' => BookResource::make($this->service->find()),\n 'success' => true,\n 'message' => 'found',\n 'code' => Response::HTTP_OK,\n ], Response::HTTP_OK);\n }", "abstract function model();", "abstract function model();", "abstract function model();", "abstract function model();", "public function index()\n { //select all books\n return Book::all();\n }", "public function create()\n {\n $user_id = Auth::user()->id;\n $data = INPUT::all();\n $rules = $this->rules();\n $messages = $this->messages();\n $validator = Validator::make($data, $rules, $messages);\n if (!$validator->fails()) {\n $book = new Book;\n $book->id_user = $user_id;\n $book->title = $data['title'];\n $book->subtitle = $data['subtitle'];\n $book->publishedDate = $data['publishedDate'];\n $book->description = $data['description'];\n $book->pages = $data['pages'];\n $book->isbn10 = $data['isbn10'];\n $book->isbn13 = $data['isbn13'];\n $book->price_day = $data['price_day'];\n $book->price_bail = $data['price_bail'];\n $book->price_sale = $data['price_sale'];\n $book->language = $data['language'];\n if ($data['publisher'] != '0') {\n $book->id_publisher = $data['publisher'];\n } else {\n $publisher = new Publisher;\n $publisher->publisher = $data['newpublisher'];\n $publisher->save();\n $book->id_publisher = $publisher->id;\n }\n $book->cover = file_get_contents($data['cover']);\n $book->save();\n $book_id = $book->id;\n\n $book_collection = new Book_Collection;\n $book_collection->book_id = $book_id;\n $book_collection->collection_id = $data['collection'];\n\n $authors = explode(',', $data['authors']);\n foreach ($authors as $author) {\n $tmp = Author::where('name', 'like', $author)->limit(1)->get();\n if (count($tmp) > 0) {\n $author_book = new Author_Book;\n $author_book->book_id = $book_id;\n $author_book->author_id = $tmp[0]->id;\n $author_book->save();\n } else {\n $newAuthor = new Author;\n $newAuthor->name = $author;\n $newAuthor->save();\n $author_id = $newAuthor->id;\n $author_book = new Author_Book;\n $author_book->book_id = $book_id;\n $author_book->author_id = $author_id;\n $author_book->save();\n }\n }\n return redirect('book/show/' . $book_id . '');\n } else {\n return back()->withInput($data)->withErrors($validator);\n }\n\n }", "public function authors_book()\n {\n return $this->morphTo();\n }", "public function run()\n {\n Book::create([\n 'title' => 'HTML & CSS : design and build websites',\n 'author' => 'Duckett, Jon',\n 'publication_year' => 2011,\n 'publisher'=> 'Wiley,',\n 'edition' => 'N/A',\n 'isbn' => '9781118008188',\n 'call_no' => 'QA76.76 H94 D835H 2011',\n 'book_category_id' => 1,\n 'library_location' => 'Central Library, Gombak',\n 'book_level' => '4',\n 'book_shelf' => '52',\n ]);\n\n Book::create([\n 'title' => 'Systems Analysis and Design',\n 'author' => 'Kendall, Kenneth E.',\n 'publication_year' => 2014,\n 'publisher'=> 'Pearson Education Limited',\n 'edition' => '9',\n 'isbn' => '9780273787105',\n 'call_no' => 'QA76.9 S88 K33S 2014',\n 'book_category_id' => 2,\n 'library_location' => 'Central Library, Gombak',\n 'book_level' => '4',\n 'book_shelf' => '49',\n ]);\n\n Book::create([\n 'title' => 'The Capacitor',\n 'author' => 'Paeg, H.',\n 'publication_year' => 1990,\n 'publisher'=> 'Siemens Aktienges, Munich',\n 'edition' => 'N/A',\n 'isbn' => '3800915715',\n 'call_no' => 'TK 7872 C65 P126K4 1990',\n 'book_category_id' => 1,\n 'library_location' => 'Central Library, Gombak',\n 'book_level' => '4',\n 'book_shelf' => '26',\n ]);\n\n Book::create([\n // 'cover_page_url' => asset('9780521695244.jpg'),\n \n 'title' => 'Quantum Groups A Path to Current Algebra',\n 'author' => 'Street, R.',\n 'publication_year' => 2007,\n 'publisher'=> 'Cambridge Uniersity Press',\n 'edition' => 'N/A',\n 'isbn' => '9780521695244',\n 'call_no' => 'QC 20.7 G76 S915Q 2007',\n 'book_category_id' => 1,\n 'library_location' => 'Central Library, Gombak',\n 'book_level' => '4',\n 'book_shelf' => '49',\n ]);\n }", "public function index()\n {\n $data = BoookModel::get();\n return view('admin.book.index',['data'=>$data]);\n }", "public function run()\n {\n\n book::create([\n 'name' => 'libro de prueba',\n 'cant' => 100,\n 'fk_idAutor' => 1,\n 'price' => 150,\n\n ]);\n }", "public function getEx11() {\n $books = \\App\\Book::orderBy('title','asc')->get();\n $this->printBooks($books);\n # Underlying SQL: select * from `books` order by `title` asc\n }", "public function testBean()\n\t{\n\t\tR::nuke();\n\t\t$book = R::dispense( 'book' );\n\t\t$pages = R::dispense( 'page', 2 );\n\t\t$ads = R::dispense('ad', 3 );\n\t\t$tags = R::dispense( 'tag', 2 );\n\t\t$author = R::dispense( 'author' );\n\t\t$coauthor = R::dispense( 'author' );\n\t\t$book->alias( 'magazine' )->ownAd = $ads;\n\t\t$book->ownPage = $pages;\n\t\t$book->sharedTag = $tags;\n\t\t$book->via( 'connection' )->sharedUser = array( R::dispense( 'user' ) );\n\t\t$book->author = $author;\n\t\t$book->coauthor = $coauthor;\n\t\tR::store( $book );\n\t\t$book = $book->fresh();\n\t\tasrt( count($book->ownPage), 2 );\n\t\tasrt( count($book->alias('magazine')->ownAd), 3 );\n\t\t$book->ownAd = array();\n\t\tarray_pop( $book->ownPage );\n\t\tR::store( $book );\n\t\t$book = $book->fresh();\n\t\tasrt( count($book->ownPage), 1 );\n\t\tasrt( count($book->alias('magazine')->ownAd), 0 );\n\t}", "public function run()\n {\n $book = [\n [\n 'book_name' => 'Wikipedia',\n 'description' => 'Sint commodo veniam ad cillum occaecat aute consectetur Lorem. Occaecat adipisicing est ad do tempor ipsum. Eu eiusmod proident sit amet consectetur irure sunt consequat. Dolor anim nisi consequat nulla veniam magna duis ex aliquip veniam.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '2',\n ],\n [\n 'book_name' => 'Qui commodo',\n 'description' => 'Et occaecat in ut pariatur elit qui. Enim do consectetur velit sunt minim velit eu est. Laboris cillum eiusmod ex aliquip. Voluptate in reprehenderit est ea duis duis magna.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '1',\n ],\n [\n 'book_name' => 'Et occaecat in',\n 'description' => 'Excepteur dolore labore reprehenderit ex quis reprehenderit nulla deserunt ullamco ea exercitation aliqua aute. Fugiat esse pariatur fugiat exercitation incididunt adipisicing ex excepteur id aute labore ad fugiat nulla. Incididunt nulla nostrud in labore in pariatur irure ipsum ipsum exercitation.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '3',\n ],\n [\n 'book_name' => 'Excepteur dolore',\n 'description' => 'Adipisicing officia reprehenderit consequat labore excepteur culpa laborum occaecat. Adipisicing anim deserunt reprehenderit exercitation in deserunt. Lorem ad aliquip exercitation aliquip esse adipisicing ullamco in ullamco deserunt ipsum anim. Cillum esse fugiat proident elit aliquip. Magna reprehenderit aliquip laborum cillum in veniam in nostrud dolore irure proident veniam nulla est.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '4',\n ],\n [\n 'book_name' => 'Adipisicing officia',\n 'description' => 'Anim occaecat ad est nulla laboris laborum esse irure id ullamco adipisicing fugiat laborum nisi. Amet minim sit commodo proident adipisicing exercitation in elit laboris. Ex elit aliquip magna adipisicing veniam officia sit proident duis non. Eiusmod minim aute do ea sit veniam excepteur adipisicing quis exercitation commodo in laborum nulla. Commodo anim commodo et aliquip reprehenderit laboris aute ut cupidatat magna. Culpa veniam aliqua tempor adipisicing anim aliqua magna ipsum qui magna dolore elit dolor. Id exercitation quis esse laborum anim dolore ipsum reprehenderit do.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '5',\n ],\n ];\n\n foreach ($book as $data) {\n \\App\\Models\\Book::create($data);\n }\n }", "public function textbook()\n {\n return $this->belongsTo('App\\Models/\\Textbook', 'isbn', 'isbn');\n }", "public function visit(Book $book);", "public function actionCreate()\n {\n $model = new Book();\n $modelPicture = new PictureForm();\n\n if(!empty(Yii::$app->session['bookPicture'])) {\n $model->picture = Yii::$app->session['bookPicture'];\n }\n\n if(!empty(Yii::$app->session['bookPicture'])) {\n $model->picture = Yii::$app->session['bookPicture'];\n unset(Yii::$app->session['bookPicture']);\n }\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'modelPicture' => $modelPicture,\n ]);\n }", "public function findByBookId($bookId);", "public function show(BookController $bookController)\n {\n //\n }" ]
[ "0.7382289", "0.7353146", "0.7243296", "0.6995395", "0.6995395", "0.6995395", "0.6995395", "0.6995395", "0.6995395", "0.6995395", "0.6995395", "0.6995395", "0.6995395", "0.6995395", "0.6942407", "0.6873094", "0.6837899", "0.6837899", "0.68110245", "0.67990917", "0.65762043", "0.6560783", "0.653439", "0.646045", "0.64585394", "0.6455674", "0.6433295", "0.64047444", "0.6385346", "0.6374873", "0.63574", "0.63416713", "0.6333241", "0.63242376", "0.632395", "0.63085866", "0.6262765", "0.62592804", "0.6210104", "0.61963046", "0.61959344", "0.6170571", "0.6169655", "0.6167146", "0.6158488", "0.6153949", "0.61141753", "0.6111607", "0.61005664", "0.6088113", "0.6064298", "0.6064298", "0.6064298", "0.6064298", "0.6064298", "0.6064298", "0.6064298", "0.6064298", "0.6064298", "0.60283107", "0.6021608", "0.60186356", "0.60071623", "0.5998094", "0.59870696", "0.5981855", "0.59739304", "0.5968477", "0.59673333", "0.596604", "0.5962541", "0.5944758", "0.5937594", "0.591046", "0.5907011", "0.5896358", "0.58869916", "0.58822966", "0.58804727", "0.5879447", "0.58748347", "0.5872955", "0.58622086", "0.58622086", "0.58622086", "0.58622086", "0.5861548", "0.5851471", "0.5848886", "0.5845118", "0.58326465", "0.5831588", "0.5827847", "0.58242613", "0.5816438", "0.5807231", "0.5805152", "0.57962525", "0.5793234", "0.5789451" ]
0.61268765
46
funcion del helper validaciones que cargo automaticamente con autoload.php
public function registrar_usuario(){ //y sirve para confirmar que los campos ingresados sean correctos if (rules_regUsuario()){ //si falla guardo los errores individualmente con form_error('nombre del input') en un arreglo $resultado[]=array( 'res' => 'invalid', 'cedula' => form_error('cedula'), 'nombre' => form_error('nombre'), 'apellido' => form_error('apellido'), 'telefono' => form_error('telefono'), 'correo' => form_error('correo'), 'confirmar' => form_error('confirmar'), 'tipo_user' => form_error('tipo_user'), 'linea' => form_error('linea') ); }else{ //cargo la libreria de encriptacion para la contraseña $this->load->library('encryption'); //cargo helper generador de strign random(para genar la contraseña) $this->load->helper('string'); //obtengo los valores de los inputs llegados por post desde el archivo acceso.js $cedula=$this->input->post('cedula'); $nombre=$this->input->post('nombre'); $apellido=$this->input->post('apellido'); $telefono=$this->input->post('telefono'); $correo=$this->input->post('correo'); $confirmar=$this->input->post('confirmar'); $tipo_user=$this->input->post('tipo_user'); $linea=$this->input->post('linea'); /* genero una contraseña con php nativo(comentado) o con el helper string $pass=substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 10); */ $pass=random_string('alnum', 10); $recuperar=errorException_handlers('eliminar'); try { //creo un transaccion para evitar que se guarden los cambios en caso //de que algo falle $this->db->trans_begin(); //preparos los datos para hacer una inserccion a la tabla personas $datos = array( 'documento_persona' => $cedula, 'nombre_persona' => $nombre, 'apellido_persona' => $apellido, 'telefono_persona' => $telefono ); //inserto datos en la tabla personas $this->Personas->reg_persona($datos); //preparos los datos para hacer una inserccion a la tabla usuarios $datos = array( 'id_usuario' => $cedula, 'usuario' => $correo, 'password' => $this->encryption->encrypt($pass), 'tipo_usuario' => $tipo_user, 'linea' => $linea ); //inserto datos en la tabla usuarios $this->Usuarios->reg_usuario($datos); //consulto si hubo errores en la transaccion $men[]='Error al registrar. Vuelve a intentarlo en unos minutos, si el problema persiste recargar la pagina.'; $men[]='Se ha registrado la cuenta con exito. El usuario y la contraseña se han enviado al correo registrado.'; $resultado=$this->transStatus($men); if ($resultado[0]['res'] && $tipo_user=='1') { $datos = array( 'modificar' => array( 'tipo_usuario' => '2', ), $this->session->documento ); $this->Usuarios->editar_usuario($datos); $logout = array( 'logged_in', 'documento', 'nombre', 'apellido', 'telefono', 'usuario', 'tipo_usuario', 'linea', 'foto', 'estado' ); $this->session->unset_userdata($logout); } } catch (Error $e) { //cancelo los procesos generados desde que se hizo la transaccion. $this->db->trans_rollback(); $resultado[]=array( 'res' => false, 'mensaje' => 'Error: Proceso fallido. Intentelo mas tarde.' ); } catch (Exception $e) { //cancelo los procesos generados desde que se hizo la transaccion. $this->db->trans_rollback(); $resultado[]=array( 'res' => false, 'mensaje' => 'Error: Proceso fallido. Intentelo mas tarde.' ); } errorException_handlers('recuperar', $recuperar[0], $recuperar[1]); } //retorno los resultados echo json_encode($resultado); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadHelpers()\n {\n require_once __DIR__.'/helpers.php';\n }", "function _load_helpers()\r\n\t{\r\n\t\t// Load inflector helper for singular and plural functions\r\n\t\t$this->load->helper('inflector');\r\n\r\n\t\t// Load security helper for prepping functions\r\n\t\t$this->load->helper('security');\r\n\t}", "public function helper()\n\t{\n\t\n\t}", "public function loadHelpers(){\n $this->file->require('vendor/helpers.php');\n }", "function helper_autoloader($class)\n {\n\n }", "function helper(){\n // vde(Application::$helpers);\n foreach(func_get_args() as $helper)\n Application::$helpers->load($helper);\n // System::include_helper($helper);\n}", "function miAutoload($class_name) {\r\n\tif(file_exists('controllers/' . $class_name . '.php')){\r\n\t\trequire_once 'controllers/' . $class_name . '.php';\r\n\t}else if(file_exists('models/' . strtolower($class_name) . 'Model.php')){\t\t\t\r\n\t\trequire_once 'models/'. strtolower($class_name) .'Model.php';\r\n\t}else echo \"No se puede cargar la clase \".$class_name;\r\n}", "public static function validate() {}", "private function _addHelper()\n {\n require __DIR__.'/../Support/SsoHelper.php';\n }", "function agnosia_initialize_helpers() {\r\n\r\n\tinclude_once agnosia_get_path( '/inc/utils/agnosia-helpers.php' );\r\n\r\n}", "function __autoload($class){\n /* This method looks for all the PHP files that begins with '$class' class name. */\n $classname = strtolower($class);\n if (file_exists(BASE_DIR.DS.'models'.DS.$classname.'.php')){\n // include the file\n require_once(BASE_DIR.DS.'models'.DS.$classname.'.php');\n }\n if (file_exists(BASE_DIR.DS.'controllers'.DS.$classname.'.php')){\n // include the file\n require_once(BASE_DIR.DS.'controllers'.DS.$classname.'.php');\n }\n if (file_exists(BASE_DIR.DS.'utilities'.DS.$classname.'.php')){\n // include the file\n require_once(BASE_DIR.DS.'utilities'.DS.$classname.'.php');\n }\n\n\n\n}", "function autoloadFunction($class){\r\n\tif(preg_match('/Controller$/',$class))\r\n\t\trequire('controllers/'.$class.'.php');\r\n\telse\r\n\t\trequire('models/'.$class.'.php');\r\n}", "function user_call_func_validate()\r\n{\r\n\t$path = _ROOT.'modules/';\r\n\t$mods = user_modules();\r\n\t$args = func_get_args();\r\n\t$func = array_shift($args);\r\n\t$out = true;\r\n\tforeach ($mods as $mod)\r\n\t{\r\n\t\tif (function_exists($mod.'_'.$func))\r\n\t\t{\r\n\t\t\t$out = call_user_func_array($mod.'_'.$func, $args);\r\n\t\t\tif (!$out)\r\n\t\t\t{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $out;\r\n}", "protected function registerHelpers()\n {\n require __DIR__.'/Support/helpers.php';\n }", "function __autoload($cls){\n\t// automatically folderize underscore-separated words\n\t$fname = str_replace(\"_\", \"/\", $cls);\n\t$f = dirname(__FILE__).\"/services/{$fname}.php\";\n\tif(file_exists($f)){\n\t\tinclude_once($f);\n\t}\n}", "static function autoload()\r\n\t{\r\n\t\t\r\n\t}", "public static function validatePlugin()\n {\n if (!file_exists($glueJson = static::$basePath . 'glue.json')) {\n die('The [glue.json] file is missing from \"' . static::$basePath . '\" directory.');\n }\n\n static::$config = json_decode(file_get_contents($glueJson), true);\n\n $configPath = static::$basePath . 'config';\n\n if (!file_exists($file = $configPath . '/app.php')) {\n die('The [config.php] file is missing from \"' . $configPath . '\" directory.');\n }\n\n static::$config = array_merge(include $file, static::$config);\n\n if (!($autoload = @static::$config['autoload'])) {\n die('The [autoload] key is not specified or invalid in \"' . $glueJson . '\" file.');\n }\n\n if (!($namespace = @$autoload['namespace'])) {\n die('The [namespace] key is not specified or invalid in \"' . $glueJson . '\" file.');\n }\n\n $namespaceMapping = (array)@$autoload['mapping'];\n\n\n if (!$namespaceMapping) {\n die('The [mapping] key is not specified or invalid in \"' . $glueJson . '\" file.');\n }\n }", "public function registerHelpers()\n {\n parent::registerHelpers();\n require __DIR__.'/../src/helpers.php';\n }", "protected function _Load_Helpers() {\r\n $dir = untrailingslashit( plugin_dir_path(__FILE__ ) );\r\n // Recurssively load the directory\r\n $this->_Recusive_Load_Dir($dir.'/helpers');\r\n // Fire the shortcode init action\r\n do_action('vcff_supports_helper_init',$this);\r\n }", "private static function support()\n {\n require_once static::$root.'Support'.'/'.'FunctionArgs.php';\n }", "private function helpers()\n {\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR;\n $helper_directory = $this->args['location'] . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR;\n if (!empty($this->args['subdirectories']))\n {\n $relative_location .= $this->args['subdirectories'];\n $helper_directory .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n $relative_helper_location = $relative_location . DIRECTORY_SEPARATOR . strtolower($this->args['name']) . '_helper.php';\n $helper_file = $helper_directory . strtolower($this->args['name']) . '_helper.php';\n\n if (!is_dir($helper_directory))\n {\n $message = \"\\t\";\n if (mkdir($helper_directory, 0755, TRUE))\n {\n $message .= 'Created folder: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green') . $relative_location;\n }\n else\n {\n $message .= $relative_location;\n }\n fwrite(STDOUT, $message . PHP_EOL);\n unset($message);\n }\n else\n {\n $message .= 'Unable to create folder: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red') . $relative_location;\n }\n else\n {\n $message .= $relative_location;\n }\n fwrite(STDOUT, $message . PHP_EOL);\n return false;\n }\n }\n\n if (file_exists($helper_file))\n {\n $message = \"\\tHelper already exists: \";\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue') . $relative_helper_location;\n }\n else\n {\n $message .= $relative_helper_location;\n }\n fwrite(STDOUT, $message . PHP_EOL);\n unset($message);\n return true;\n }\n else\n {\n $content = \"<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');\" . PHP_EOL;\n $content .= PHP_EOL . PHP_EOL . PHP_EOL;\n $content .= '/* End of file ' . strtolower($this->args['name']) . '_helper.php */' . PHP_EOL;\n $content .= '/* Location: ./' . $relative_location . ' */';\n\n $message = \"\\t\";\n if (file_put_contents($helper_file, $content))\n {\n $message .= 'Created helper: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green') . $relative_helper_location;\n }\n else\n {\n $message .= $relative_helper_location;\n }\n }\n else\n {\n $message .= 'Unable to create helper: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red') . $relative_helper_location;\n }\n else\n {\n $message .= $relative_helper_location;\n }\n }\n\n fwrite(STDOUT, $message . PHP_EOL);\n unset($message);\n }\n\n return true;\n }", "public function __construct() {\n parent::__construct();\n \n $this->load->helper('funciones_custom_helper');\n\n\n }", "function __autoload($nome_classe){\n require_once '../libs/' . $nome_classe . '.php';\n}", "public function get_app_script_helpers()\n {\n }", "function pluginValidaciones(){\n \t$url_acutal = basename($_SERVER['PHP_SELF']);\n \tif (\n strcasecmp($url_acutal, \"nuevo_usuario.php\") == 0 ||\n strcasecmp($url_acutal, \"establecimientos.php\") == 0 ||\n strcasecmp($url_acutal, \"modificacion_usuario.php\") == 0 ||\n strcasecmp($url_acutal, \"login.php\") == 0\n ){\n\n \t\techo \"\\n\";\n \t\techo \"<!-- plugin de validacion de datos --> \\n\";\n \t\techo '<script type=\"text/javascript\" src=\"assets/js/plugins/validador/jquery.validate.js\"></script>' . \"\\n\";\n \t\techo '<script type=\"text/javascript\" src=\"assets/js/plugins/validador/additional-methods.js\"></script>' . \"\\n\";\n \t\techo '<link href=\"assets/css/validate.css\" rel=\"stylesheet\" type=\"text/css\">' . \"\\n\";\n\n\n \t}\n }", "public function __construct() {\n\t\tforeach(glob(CORE_BASE . 'helpers/*.php') as $file) {\n\t\t\trequire_once $file;\n\t\t}\n\t}", "protected function _validate() {\n\t}", "function loader($class){\n require_once \"routes/cats.php\";\n require_once \"models/CatsModel.php\";\n require_once \"models/Database.php\";\n require_once \"models/Mysqldb.php\";\n require_once \"views/CatsView.php\";\n require_once \"controllers/CatsController.php\";\n\n}", "public function _check()\n {\n }", "function __autoload($class_name){\n\n if (strripos($class_name, 'Base') !== false){\n require_once './library/Odd/'. $class_name . '.php';\n }else if (strripos($class_name, 'Controller')){\n //if (strripos($class_name, 'Base') !== false){\n // require_once './library/Odd/'. $class_name . '.php';\n //}else{\n require_once './controllers/'. $class_name . '.php';\n //}\n }else if (strripos($class_name, 'Model') !== false){\n\n $class_name = substr($class_name,\n 0,\n strripos($class_name, 'Model'));\n\n\n require_once './models/'. $class_name . '.php';\n\n }else{\n require_once './library/Odd/'. $class_name . '.php';\n }\n\n}", "function __autoload($class){\n\tif (file_exists(BASE_DIR.DS.'models'.DS.strtolower($class).'.php')){\n\t require_once(BASE_DIR.DS.'models'.DS.strtolower($class).'.php');\n\t} else if (file_exists(BASE_DIR.DS.'controllers'.DS.strtolower($class).'.php')){\n\t require_once(BASE_DIR.DS.'controllers'.DS.strtolower($class).'.php');\n\t} else if (file_exists(BASE_DIR.DS.'utilities'.DS.strtolower($class).'.php')){\n\t require_once(BASE_DIR.DS.'utilities'.DS.strtolower($class).'.php');\n\t}\n\n }", "function __autoload($className) {\n global $is_MANAGER;\n $controller_path = \"\";\n if( $is_MANAGER ) $controller_path = DS .\"manager\";\n\n if (file_exists(ROOT . DS . 'library' . DS . strtolower($className) . '.class.php')) {\n require_once(ROOT . DS . 'library' . DS . strtolower($className) . '.class.php');\n } else if (file_exists(ROOT . DS . 'application' . DS . 'controllers' . $controller_path . DS . strtolower($className) . '.php')) {\n require_once(ROOT . DS . 'application' . DS . 'controllers' . $controller_path . DS . strtolower($className) . '.php');\n } else if (file_exists(ROOT . DS . 'application' . DS . 'models' . DS . strtolower($className) . '.php')) {\n require_once(ROOT . DS . 'application' . DS . 'models' . DS . strtolower($className) . '.php');\n } else {\n /* Error Generation Code Here */\n }\n}", "public function helper($helper){\n\n include_once (HELPER_PATH . \"{$helper}_helper.php\");\n\n }", "function autoload($class_name)\n{\n $exp_arr = explode('_', $class_name);\n if (count($exp_arr) === 1) {\n $folder = 'core';\n } else {\n $n = array_pop($exp_arr);\n $folder = $n . ($n[strlen($n) - 1] == 's' ? 'es' : 's');\n }\n switch($folder) {\n case \"controllers\":\n $arr = explode('_', $class_name);\n $sub_folder = array_shift($arr);\n $class_file = PROTECTED_DIR . $folder . DS . PROJECT . DS . $sub_folder . DS . $class_name . '.php';\n break;\n case \"helpers\":\n case \"templates\":\n $class_file = PROTECTED_DIR . $folder . DS . PROJECT . DS . $class_name . '.php';\n break;\n default:\n $class_file = PROTECTED_DIR . $folder . DS . $class_name . '.php';\n break;\n }\n if (file_exists($class_file)) {\n require_once($class_file);\n }\n}", "private function loadHelpers()\n {\n foreach($this->helpers as $helper)\n {\n require app_path() . '/' . $helper;\n }\n }", "function load($clase, $metodo) {\n $load = \"../Modelo/$clase.php\";\n if (file_exists($load)) {\n include_once ($load);\n if (!method_exists($clase, $metodo)) {\n throw new Exception(\"No existe el metodo $metodo\");\n return false;\n }\n return true;\n } else {\n throw new Exception(\"No existe la clase $clase\");\n return false;\n }\n}", "function __autoload($className) {\n if (file_exists(ROOT . DS . 'library' . DS . strtolower($className) . '.class.php')) {\n require_once(ROOT . DS . 'library' . DS . strtolower($className) . '.class.php');\n } else if (file_exists(ROOT . DS . 'application' . DS . 'controllers' . DS . strtolower($className) . '.php')) {\n require_once(ROOT . DS . 'application' . DS . 'controllers' . DS . strtolower($className) . '.php');\n } else if (file_exists(ROOT . DS . 'application' . DS . 'models' . DS . strtolower($className) . '.php')) {\n require_once(ROOT . DS . 'application' . DS . 'models' . DS . strtolower($className) . '.php');\n } else {\n /* Error Generation Code Here */\n }\n}", "function autoloadFunction($class)\n{\n\t//Ends with the string \"Controller\" ?\n //echo $class . \"</br>\";\n if (preg_match('/Controller$/', $class))\t\n require(\"controllers/\" . $class . \".php\");\n else\n require(\"models/\" . $class . \".php\");\n}", "public function register()\n {\n //\n\n// include_once (\"app/Helper/HelperFunction.php\");\n// include_once (\"app/Helper/Constant.php\");\n\n $this->requireAll(\"app/Helper/\",0);\n// debug();\n }", "function __autoload($className) {\r\n if (file_exists(ROOT . DS . 'lib' . DS . strtolower($className) . '.class.php')) {\r\n require_once(ROOT . DS . 'lib' . DS . strtolower($className) . '.class.php');\r\n } else if (file_exists(ROOT . DS . 'apps' . DS . 'controllers' . DS . $className . '.php')) {\r\n require_once(ROOT . DS . 'apps' . DS . 'controllers' . DS . $className . '.php');\r\n } else if (file_exists(ROOT . DS . 'apps' . DS . 'models' . DS . strtolower($className) . '.php')) {\r\n require_once(ROOT . DS . 'apps' . DS . 'models' . DS . strtolower($className) . '.php');\r\n } else {\r\n /* Error Generation Code Here */\r\n }\r\n}", "public function getHelper()\n {\n }", "protected function setupValidation()\n {\n }", "public function helper($helperName){\r\n if(file_exists(\"../system/helpers/\" . $helperName . \".php\")){\r\n require_once \"../system/helpers/\" . $helperName . \".php\";\r\n }else{\r\n echo \"<div style='margin:0; padding:10px;background-color:silver;'>Désolé le fichier $helperName.php n'a pas été trouvé</div>\";\r\n } \r\n\r\n }", "protected function loadHelper()\n {\n foreach ($this->vendor_helpers_path as $vendor_helper) {\n LoaderSingleton::getInstance()->load_require_once($vendor_helper);\n }\n\n /**\n * @var HelperDefinition $helper\n */\n $helper = Container::getInstance()->get(HelperDefinition::class);\n $helpers = $helper->init();\n foreach ($helpers as $h) {\n if (is_string($h)) {\n LoaderSingleton::getInstance()->load_require_once($h);\n }\n }\n }", "function __autoload($pClassName) {\r\n if (file_exists($pClassName.'.php')) {\r\n require_once($pClassName.'.php');\r\n return true;\r\n } else if (file_exists('wrapper/'.$pClassName.'.php')) {\r\n require_once('wrapper/'.$pClassName.'.php');\r\n return true;\r\n }\r\n return false; \r\n}", "public function autoloadFilesAreBuildCorrectlyDataProvider() {}", "function supernova_autoloader($className){\r\n\t\t$root_path = ROOT . DS;\r\n\t\t$app_path=$root_path.'application' . DS;\r\n\t\t$library_path=$root_path.'library' . DS . 'extensions' . DS;\r\n\t\t$str = $className;\r\n\t\t$str[0] = strtolower($str[0]);\r\n\t\t$func = create_function('$c', 'return \"_\" . strtolower($c[1]);');\r\n\t\t$strName = preg_replace_callback('/([A-Z])/', $func, $str);\r\n\t\t$name = strtolower($strName);\r\n\t\t$file = $library_path.$name.'.class.php';\r\n\t\t$controllerFile = $app_path. 'controllers' . DS . $name . '.php';\r\n\t\t$modelFile = $app_path. 'models' . DS . $name . '.php';\r\n\t\t$appFile = $app_path.'app'.'.controller.php';\r\n\t\tif (file_exists($file)){\r\n\t\t\trequire_once($file);\r\n\t\t}else if (file_exists($controllerFile)){\r\n\t\t\trequire_once($controllerFile);\r\n\t\t}else if (file_exists($modelFile)){\r\n\t\t\trequire_once($modelFile);\r\n\t\t}else if (file_exists($appFile)){\r\n\t\t \trequire_once($appFile);\r\n\t\t}\r\n\t}", "function validate(){\n }", "public function loadHelpers($var = array())\n {\n $this->load->helper($var);\n }", "protected function loadHelpers(): void\n {\n $files = glob(__DIR__ . '/../Helpers/*.php');\n foreach ($files as $file) {\n require_once($file);\n }\n }", "public function validation();", "function validar() {\n leerClase('Formulario');\n Formulario::validar('login' , $this->login , 'texto', 'El Nombre de Usuario');\n Formulario::validar('clave', $this->clave, 'texto', 'Contraseña');\n \n }", "public function backendExtraValidate(){\n \n }", "protected function __init_func_loader()\n {\n require_once(INIT_FUNC_FILE);\n }", "public function register()\n {\n foreach (glob(__DIR__ . '/Helpers/*.php') as $filename) {\n require_once $filename;\n }\n }", "public function includeAppHelpers() {\n\t\tinclude_once( MWW_PATH . '/app/Support/helpers.php' );\n\t}", "public function check_validity($_classname);", "public function helper($name)\n {\n // Lowercase the name because it isnt a class file!\n $name = strtolower($name);\n \n // Check the application/helpers folder\n if(file_exists(APP_PATH . DS . 'helpers' . DS . $name . '.php')) \n {\n require_once(APP_PATH . DS . 'helpers' . DS . $name . '.php');\n }\n \n // Check the core/helpers folder\n if(file_exists(SYSTEM_PATH . DS . 'helpers' . DS . $name . '.php')) \n {\n require_once(SYSTEM_PATH . DS . 'helpers' . DS . $name . '.php');\n }\n }", "protected function validate()\n {\n }", "function autoload($className)\n{\n if (file_exists('views/'. $className . '.php'))\n {\n require_once 'views/'. $className . '.php';\n }\n\n if (file_exists('models/'. $className . '.php'))\n {\n require_once 'models/'. $className . '.php';\n }\n\n if (file_exists('core/'. $className . '.php'))\n {\n require_once 'core/'. $className . '.php';\n }\n\n if (file_exists('controllers/'. $className . '.php'))\n {\n require_once 'controllers/'. $className . '.php';\n }\n\n if (file_exists($className . '.php'))\n {\n require_once $className . '.php';\n }\n}", "function autoLoad($class)\n{\n if (preg_match('/Controller$/', $class)) {\n require(\"controllers/\" . $class . \".php\");\n }\n else {\n require(\"models/\" . $class . \".php\");\n }\n}", "function autoload($classe)\n{\n //echo dirname(__FILE__).\"\\\\Models\\\\\".$classe.\".php\";\n require dirname(__FILE__).\"\\\\model\\\\\".$classe.\".php\";\n}", "function inclusion_automatique($className)\n{\n require $className . '.class.php';\n\n echo 'On passe dans l\\'autolaod<br>';\n echo 'On fait un require ' . $className . '.class.php<br />';\n}", "static function _shfw_autoloader()\n {\n\t\tinclude_once(BASEPATH.'config'.DIRECTORY_SEPARATOR.'autoload.php');\n\n\t\tif ( ! isset($autoload))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Autoload helpers.\n\t\tforeach ($autoload['helper'] as $type)\n\t\t{\t\t\t\n\t\t\tself::loadHelper($type);\n\t\t}\n\n\t\t// Autoload core components.\n\t\tforeach ($autoload['core'] as $type)\n\t\t{\t\t\t\n\t\t\tself::initCoreComponent($type);\n\t\t}\n\n\t\t/*\n\t\tif(SHIN_Core::$_benchmark){\n\t\t\tSHIN_Core::$_benchmark->mark('code_start');\n\t\t}\n\t\t*/\n\t\t\n\t\t// Autoload libraries.\n\t\tforeach ($autoload['libraries'] as $type)\n\t\t{\n\t\t\tself::loadLibrary($type, TRUE);\n\t\t}\n\n\t\t// Autoload models.\n\t\tforeach ($autoload['models'] as $type)\n\t\t{\n\t\t\tself::loadModel($type, TRUE);\n\t\t}\n\t}", "protected function _loader(){\n\t\t/*\n\t\t* \n\t\t* Load all the Model to use database\n\t\t* Load all the library\n\t\t*\n\t\t*/\n\t\t$this->load->model('post');\n\t\t$this->load->model('user');\n\t\t$this->load->library('form_validation');\n\t}", "function is_valid() {\n $valid = True;\n foreach(get_object_vars($this) as $name => $obj) {\n if ($obj != NULL) {\n #validacion errores genericos de los campos\n $obj->required_validate();\n $flag = $obj->is_valid(); \n if (!$flag) \n { \n $valid = False;\n echo $obj->name.\" \";\n }\n #echo $obj->name;\n }\n }\n #busca metodos de validacion definido por usuario\n foreach(get_class_methods($this) as $fname) {\n $pos = strpos($fname, \"clean_\");\n if ($pos !== False) {\n $flag = $this->$fname();\n if (!$flag) \n { \n $valid = False;\n echo $fname.\" \";\n }\n }\n }\n echo $valid;\n return $valid;\n }", "function resolve(){\n $module = ucwords($_GET['module']);\n $controller = ucwords($_GET['controller']);//UsuarioController.php\n $function = ucwords($_GET['function']);\n // Modulo = carpeta\n // Controller = archivo\n // Funcion = metodo del controlador\n\n //La funcion is_dir valida si existe un determinado directorio en la ruta especificada\n if (is_dir(\"../controller/$module\")) {\n \n //La funcion file_exists valida si determinado archivo existe en la ruta especificada\n if (file_exists(\"../controller/$module/\".$controller.\"Controller.php\")) {\n\n //Importacion del controlador\n include_once \"../controller/$module/\".$controller.\"Controller.php\";\n //Asignacion al nombre de la clase\n $nameClass = $controller.\"Controller\";\n //Objeto que instacia la clase\n $object = new $nameClass;\n\n //Funcion que valida si existe una funcion\n if (method_exists( $object, $function )) {\n //Se invoca la funcion\n $object->$function();\n\n } else {\n\n echo \"La funcion especificada no Existe!\";\n \n }\n\n } else {\n \n echo \"El controlador especificado no Existe!\";\n \n }\n \n } else {\n\n echo \"El modulo especificado no Existe!\";\n \n }\n}", "public function validateMakeBlog(){\n\n }", "function loader($class){\n $class_file = DIR. DS . $class . '.php';\n\n if(file_exists($class_file)){\n require_once($class_file);\n }else{\n foreach (AUTOLOAD_CLASSES as $path){\n $class_file = $path . DS . $class . '.php';\n if(file_exists($class_file)) require_once($class_file);\n }\n }\n}", "function __autoload($className)\n{\n $current_url = $_SERVER[\"SERVER_NAME\"] . $_SERVER[\"REQUEST_URI\"];\n $estoyEnAdmin = (strrpos($current_url, \"admin\") === false) ? 0 : 1;\n\n if (file_exists(ROOT . DS . 'library' . DS . strtolower($className) . '.class.php'))\n {\n require_once(ROOT . DS . 'library' . DS . strtolower($className) . '.class.php');\n } else if (file_exists(ROOT . DS . 'application' . DS . 'controllers' . DS . 'admin' . DS . strtolower($className) . '.php') && $estoyEnAdmin)\n {\n require_once(ROOT . DS . 'application' . DS . 'controllers' . DS . 'admin' . DS . strtolower($className) . '.php');\n } else if (file_exists(ROOT . DS . 'application' . DS . 'controllers' . DS . 'front' . DS . strtolower($className) . '.php'))\n {\n require_once(ROOT . DS . 'application' . DS . 'controllers' . DS . 'front' . DS . strtolower($className) . '.php');\n } else if (file_exists(ROOT . DS . 'application' . DS . 'models' . DS . strtolower($className) . '.php'))\n {\n require_once(ROOT . DS . 'application' . DS . 'models' . DS . strtolower($className) . '.php');\n } else if (file_exists(ROOT . DS . 'library' . DS . 'errors' . DS . $className . '.class.php'))\n {\n require_once(ROOT . DS . 'library' . DS . 'errors' . DS . $className . '.class.php');\n } else if (file_exists(ROOT . DS . 'application' . DS . 'templates' . DS . 'admin' . DS . $className . '.php') && $estoyEnAdmin)\n {\n require_once(ROOT . DS . 'application' . DS . 'templates' . DS . 'admin' . DS . $className . '.php');\n } else if (file_exists(ROOT . DS . 'application' . DS . 'templates' . DS . 'front' . DS . $className . '.php'))\n {\n require_once(ROOT . DS . 'application' . DS . 'templates' . DS . 'front' . DS . $className . '.php');\n } else if ($className == \"AccessController\")\n {\n require_once(ROOT . DS . 'application' . DS . 'controllers' . DS . 'admin' . DS . strtolower($className) . '.php');\n }else\n {\n echo \"No existe la clase \" . $className;\n die();\n }\n}", "function resolve(){\n\n\t\t$modulo = ucwords($_GET['modulo']); //Ciudad\n\t\t$controlador = ucwords($_GET['controlador']); //Ciudad\n\t\t$funcion = $_GET['funcion']; //getCreate\n\n\n\t\tif(is_dir(\"../controller/$modulo\")){\n\t\t\tif(file_exists(\"../controller/$modulo/\".$controlador.\"Controller.php\")){\n\n\t\t\t\tinclude_once \"../controller/$modulo/\".$controlador.\"Controller.php\";\n\n\t\t\t\t$nombreClase = $controlador.\"Controller\";\n\n\t\t\t\t$objClase = new $nombreClase();\n\n\t\t\t\tif(method_exists($objClase, $funcion)){\n\t\t\t\t\t$objClase->$funcion();\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\techo \"la funcion especificada no existe\";\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\techo \"el archivo especificado no existe\";\n\t\t\t}\n\n\t\t}else{\n\t\t\techo \"el modulo especificada no existe\";\n\t\t}\n\n\t}", "public function boot()\r\n {\r\n Str::mixin(new StrMacros);\r\n\r\n foreach (scandir(__DIR__ . DIRECTORY_SEPARATOR . 'helpers') as $helperFile) {\r\n $path = sprintf(\r\n '%s%s%s%s%s',\r\n __DIR__,\r\n DIRECTORY_SEPARATOR,\r\n 'helpers',\r\n DIRECTORY_SEPARATOR,\r\n $helperFile\r\n );\r\n\r\n if (!is_file($path)) {\r\n continue;\r\n }\r\n\r\n $function = Str::before($helperFile, '.php');\r\n\r\n if (function_exists($function)) {\r\n continue;\r\n }\r\n\r\n require_once $path;\r\n }\r\n }", "function __autoload($classe) {\n\n $classe = strtolower($classe);\n\n if (file_exists(__DIR__.\"/{$classe}.php\"))\n include_once __DIR__.\"/{$classe}.php\";\n\n if (file_exists(__DIR__.\"/.././model/class.{$classe}.php\"))\n include_once __DIR__.\"/.././model/class.{$classe}.php\";\n\n if (file_exists(__DIR__.\"/.././controller/class.{$classe}.php\"))\n include_once __DIR__.\"/.././controller/class.{$classe}.php\";\n}", "function __autoload($class)\n{\n $baseDir = __DIR__ . '/../';\n $path = $baseDir . str_replace('_', '/', $class) . '.php';\n if (file_exists($path)) {\n require_once($path);\n return true;\n }\n \n return false;\n}", "private function helpers()\n {\n $HELPERS_FILE = [];\n // From base\n if (file_exists($pathHelpers = VENDOR_KNOB_BASE_DIR . '/src/config/' . static::HELPERS_FILE . '.php')) {\n $HELPERS_FILE += include $pathHelpers;\n }\n // From App\n if (file_exists($pathHelpers = APP_DIR . '/config/' . static::HELPERS_FILE . '.php')) {\n $HELPERS_FILE += include $pathHelpers;\n }\n\n return array_merge([\n 'case' => [\n 'lower' => function ($value) {\n return strtolower((string)$value);\n },\n 'upper' => function ($value) {\n return strtoupper((string)$value);\n },\n ],\n 'count' => function ($value = []) {\n return count($value);\n },\n 'moreThan1' => function ($value = []) {\n return count($value) > 1;\n },\n 'date' => [\n 'xmlschema' => function ($value) {\n return date('c', strtotime($value));\n },\n 'string' => function ($value) {\n return date('l, d F Y', strtotime($value));\n },\n 'format' => function ($value) {\n return date(get_option('date_format'), strtotime($value));\n },\n ],\n 'toArray' => function ($value) {\n return explode(',', $value);\n },\n 'ucfirst' => function ($value) {\n return ucfirst($value);\n },\n ], $HELPERS_FILE);\n }", "function autoloadClassesPerso($classe){\n $nomClasse = $classe;\n // On remplace les \\ du namespace par le caractère de séparation de dossier (windows : /, linux : \\), pour faire correspondre l'arborescence\n $classe = str_replace('\\\\', DIRECTORY_SEPARATOR, $classe).'.php';\n if(file_exists($classe)){ // Si le fichier existe\n require_once $classe; // On l'inclu\n if(!class_exists($nomClasse) && !trait_exists($nomClasse) && !interface_exists($nomClasse)){\n // Si le fichier ne contenait pas le/la class/trait/interface\n throw new ClasseException($nomClasse, ClasseException::CLASSE_ABSENTE);\n }\n return true;\n }\n elseif(file_exists(\"src/$classe\")){ // On regarde dans les fichiers du développeurs\n require_once \"src/$classe\"; // On l'inclu\n if(!class_exists($nomClasse) && !trait_exists($nomClasse) && !interface_exists($nomClasse)){\n // Si le fichier ne contenait pas le/la class/trait/interface\n throw new ClasseException($nomClasse, ClasseException::CLASSE_ABSENTE);\n }\n return true;\n }\n // Aucun fichier trouvé\n throw new ClasseException($classe, ClasseException::FICHIER_INTROUVABLE);\n}", "function load_my_classes($_cls)\n{\n //echo '<hr />' . $_cls . '<hr />';\n $PATH_SEPARATOR = DIRECTORY_SEPARATOR;\n //$ROOTPATH = $_SERVER[\"DOCUMENT_ROOT\"];\n\t$ROOTPATH = dirname($_SERVER[\"SCRIPT_FILENAME\"]);\n\t\n\t//print_r($_SERVER);\n \n\t\n\n\n if(class_exists($_cls))\n {\n //doe niks, het is een ingebouwde class zoals \\SplObjectStorage o.i.d.\n }\n elseif(strpos($_cls, 'Exception') !== false)\n {\n $candidate_class_file = $ROOTPATH . $PATH_SEPARATOR . 'common' . $PATH_SEPARATOR . 'classes' . $PATH_SEPARATOR . 'Exceptions.php';\n if(file_exists($candidate_class_file))\n {\n require_once($candidate_class_file);\n //echo($candidate_class_file . ' found in ' . $candidate_class_file . '<br />');\n }\n else\n {\n //echo($candidate_class_file . ' does not exist!<br />');\n }\n }\n elseif(strpos($_cls, 'Common') === false)\n {\n $dirsToLookIn = Array(\"controller\", \"core\", \"model\", \"view\");\n \n foreach($dirsToLookIn as $dir)\n {\n if(strpos($_cls, __NAMESPACE__) !== false)\n {\n //namespace eraf strippen anders komt die mee in de padverwijzingen\n $_cls = substr($_cls, strlen(__NAMESPACE__)+1); \n }\n \n \n $candidate_class_file = $ROOTPATH . $PATH_SEPARATOR . $dir . $PATH_SEPARATOR . $_cls . '.php';\n if(file_exists($candidate_class_file))\n {\n require_once($candidate_class_file);\n //echo($candidate_class_file . ' found in ' . $candidate_class_file . '<br />');\n }\n else\n {\n //echo($candidate_class_file . ' does not exist!<br />');\n }\n }\n }\n else\n {\n $_cls = substr($_cls, 7);\n $candidate_class_file = $ROOTPATH . $PATH_SEPARATOR . 'common' . $PATH_SEPARATOR . 'classes' . $PATH_SEPARATOR . $_cls . '.php';\n \n if(file_exists($candidate_class_file))\n {\n require_once($candidate_class_file);\n //echo($candidate_class_file . ' found in ' . $candidate_class_file . '<br />');\n }\n else\n {\n //echo($candidate_class_file . ' does not exist!<br />');\n }\n }\n //echo '<hr />';\n}", "function Topdeals_Autoloader ($className) {\n if (strpos($className, '\\\\')) {\n $className = substr($className, strpos($className, '\\\\') + 1);\n }\n\n $fileExtension = '.php';\n\n if (strpos($className, 'Controller') !== false && strpos($className, 'Controller') === (strlen($className) - 10)) {\n $pathToFile = PATH_CONTROLLER . $className . $fileExtension;\n if (file_exists($pathToFile)) {\n require_once $pathToFile;\n }\n }\n elseif (strpos($className, 'Model') !== false && strpos($className, 'Model') === (strlen($className) - 5)) {\n $pathToFile = PATH_MODEL . $className . $fileExtension;\n if (file_exists($pathToFile)) {\n require_once $pathToFile;\n }\n }\n elseif (strpos($className, 'Config') !== false && strpos($className, 'Config') === (strlen($className) - 6)) {\n $pathToFile = PATH_CONFIG . str_replace('_', '/', $className) . $fileExtension;\n if (file_exists($pathToFile)) {\n require_once $pathToFile;\n }\n }\n elseif (strpos($className, 'Bootstrap') !== false && strpos($className, 'Bootstrap') === (strlen($className) - 9)) {\n $pathToFile = PATH_APPLICATION . 'Bootstrap' . $fileExtension;\n if (file_exists($pathToFile)) {\n require_once $pathToFile;\n }\n }\n else {\n if ($className == 'Smarty') {\n $fileExtension = '.class.php';\n $pathToFile = PATH_LIBRARY . 'Smarty/' . str_replace('_', '/', $className) . $fileExtension;\n }\n else {\n $pathToFile = PATH_LIBRARY . str_replace('_', '/', $className) . $fileExtension;\n }\n\n if (file_exists($pathToFile)) {\n require_once $pathToFile;\n }\n }\n}", "function __autoload_data_types($classname) {\n\n $datatype = explode('_', $classname);\n if ($datatype[1]!='Data') return;\n $file = SebbleDMS::$dataTypeDir . strtolower($datatype[2]) . '.data.php';\n if (file_exists($file)){\n require_once($file);\n $config = SebbleDMS::$dataTypeConfDir . strtolower($datatype[2]) . '.config.php';\n if (file_exists($config)) {\n include_once($config);\n }\n }\n}", "function my_autoloader($class) {\r\n require 'libs/' . $class . '.php';\r\n}", "function incluirClasses($nomeClasse) {\n if(file_exists($nomeClasse.\".php\") == true) {\n require_once($nomeClasse.\".php\");\n }\n}", "public function __construct()\n {\n $this->helper = new Helpers;\n }", "public function __construct()\n {\n $this->helper = new Helpers;\n }", "public function __construct()\n {\n $this->helper = new Helpers;\n }", "public function __construct()\n {\n $this->helper = new Helpers;\n }", "public function __construct()\n {\n $this->helper = new Helpers;\n }", "function __mashineAutoload($class_name)\n{\n if (preg_match(\"/([a-zA-Z0-9]*)ApiController$/\", $class_name, $matches)) {\n $api_path = preg_replace(\"/plugins.*/\", \"controllers\".DS.\"api\", __FILE__);\n\n $file = $api_path.DS.strtolower($matches[1]).\".php\";\n if (is_file($file)) {\n include $file;\n }\n }\n}", "function __autoload( $arquivo ){\n if(file_exists(MODELS.$arquivo.\".php\")){\n require_once(MODELS.$arquivo.\".php\");\n } else {\n echo \"Erro: O Model '\".$arquivo.\"' não foi encontrado!\";\n exit;\n }\n}", "function __autoload($className) {\n\t\n if (file_exists('models/'.$className.'.php')) {\n \n require_once('models/'.$className.'.php');\n }\n else if (file_exists('classes/'.$className.'.php')) {\n\t \n require_once('classes/'.$className.'.php');\n }\n else if (file_exists('controllers/'.$className.'.php')) {\n\t \n require_once('controllers/'.$className.'.php');\n }\n else \n {\n\t \t// foutafhandeling toevoegen\n\t \texit('<hr><h1>Class <u>'.$className.'</u> not found!</h1><hr>'); \n }\n}", "public function valid(){ }", "private function includes()\n\t\t{\n\t\t\trequire_once dirname( __FILE__ ) . '/sf-class-sanitize.php';\n\t\t\trequire_once dirname( __FILE__ ) . '/sf-class-format-options.php';\n\t\t\tnew SF_Sanitize;\n\t\t}", "public function checkAPI()\n {\n // The constants are defined.\n $this->_define('T_NAMESPACE');\n $this->_define('T_NS_SEPARATOR');\n $this->_define('E_USER_DEPRECATED', E_USER_WARNING);\n\n /*\n * Every static public method with an @implement annotation defines\n * a function.\n */\n $reflectionObject = new ReflectionObject($this);\n $methods = $reflectionObject->getMethods(\n ReflectionMethod::IS_STATIC | ReflectionMethod::IS_PUBLIC\n );\n foreach ($methods as $method) {\n // The method comment is parsed for the @implement annotation\n $isAnnotated = preg_match(\n '/\\s*\\*\\s*@implement\\s+(\\S+)/',\n $method->getDocComment(),\n $matches\n );\n if (! $isAnnotated) {\n continue;\n\n }\n\n $function = $matches[1];\n\n // A function might already exist.\n if (function_exists($function)) {\n continue;\n\n }\n\n // The parameters are build.\n $parametersArray = array();\n for ($i = 0; $i < $method->getNumberOfParameters(); $i++) {\n $parametersArray[] = '$parameter' . $i;\n\n }\n $parameters = implode(', ', $parametersArray);\n\n // The function is defined.\n $apiClass = get_class($this);\n $definition = \"function $function($parameters)\n {\n \\$parameters = func_get_args();\n return call_user_func_array(\n array('$apiClass', '{$method->getName()}'),\n \\$parameters\n );\n }\n \";\n eval($definition);\n\n }\n }", "public function loadForm()\n {\n $this->load->library(array('form_validation'));\n $this->load->helper(array('form', \"url\"));\n }", "function resolve()\n {\n //controlador: Archivo dentro de la carpeta controlador.\n //funcion: Metodo o funcion que esta dentro del archivo controlador.\n\n $modulo=ucwords($_GET['modulo']);\n $controlador=ucwords($_GET['controlador']);\n $funcion=$_GET['funcion'];\n\n if (is_dir(\"../controller/$modulo\")) {\n\n if (file_exists(\"../controller/$modulo/\" . $controlador . \"Controller.php\")) {\n\n include_once \"../controller/$modulo/\" . $controlador . \"Controller.php\";\n $nombreClase=$controlador.\"Controller\";\n $objClase=new $nombreClase();\n\n if (method_exists($objClase, $funcion)) {\n $objClase->$funcion();\n } else {\n echo \"Oops, the specified method doesn't exist\";\n }\n\n } else {\n echo \"Oops, the specified driver doesn't exist\";\n }\n\n } else {\n echo \"Oops, the specified module does not exist\";\n }\n }", "protected function _before()\n {\n $dir = realpath(__DIR__ . '/../../../src/');\n\n Autoload::addNamespace('', $dir);\n require_once $dir . '/Pckg/Collection/Helper/functions.php';\n }", "public function registerAutoloaders()\n {\n }", "function autoloader($classname){\n $lastSlash = strpos($classname, '\\\\') + 1;\n $classname = substr($classname, $lastSlash);\n $directory = str_replace('\\\\' , '/' , $classname);\n $filename = __DIR__ . '/' . $directory . '.php';\n\n require_once $filename;\n }", "function onAutoload($cls) {\n $base = dirname(__FILE__);\n $lower = strtolower($cls);\n $files = array(\n \"$base/classes/$cls.php\",\n \"$base/lib/$lower.php\"\n );\n if (substr($lower, -6) == 'action') {\n $files[] = \"$base/actions/\" . substr($lower, 0, -6) . \".php\";\n }\n foreach ($files as $file) {\n if (file_exists($file)) {\n include_once $file;\n return false;\n }\n }\n return true;\n }", "function classAutoload($class_name) {\n if (file_exists( __DIR__ . '/includes/classes/' . $class_name . '.php')) {\n require_once __DIR__ . '/includes/classes/' . $class_name . '.php';\n }\n}", "function adminCommentsWaiteValidate()\n {\n $userLogged = Auth::check(['administrateur']);\n\n $commentManager = new CommentManager();\n $listCommentsWaiteValidate = $commentManager->listCommentsWaiteValidate();\n\n require'../app/Views/backViews/comment/backAdminCommentsWaiteValidateView.php';\n }", "public function autoloadDevFilesAreBuildCorrectlyDataProvider() {}" ]
[ "0.6692296", "0.65821534", "0.6329621", "0.63116217", "0.6296", "0.6079934", "0.60768557", "0.6059653", "0.6035517", "0.60074395", "0.59928846", "0.5983576", "0.5979646", "0.5979599", "0.594881", "0.5943658", "0.5927559", "0.59189403", "0.5890686", "0.58749366", "0.5864087", "0.58629453", "0.5855683", "0.5847305", "0.5804013", "0.5796149", "0.57534724", "0.57382077", "0.5704931", "0.5704491", "0.5704393", "0.5694663", "0.569173", "0.56801313", "0.56702435", "0.5668447", "0.5663094", "0.56625456", "0.56552565", "0.5639887", "0.56396073", "0.56355155", "0.5632606", "0.5624292", "0.56142074", "0.5611145", "0.5607284", "0.5600593", "0.55918", "0.5586996", "0.55732614", "0.55688906", "0.55579543", "0.55565023", "0.55546224", "0.5548553", "0.5546076", "0.55433124", "0.55222255", "0.55171037", "0.5511568", "0.5509889", "0.550943", "0.5493358", "0.5488545", "0.54877406", "0.54854906", "0.5485021", "0.54835683", "0.5474657", "0.5470795", "0.5468105", "0.54632676", "0.5456145", "0.5453353", "0.5452231", "0.5447791", "0.5443801", "0.5443641", "0.5442037", "0.54397297", "0.54358804", "0.54358804", "0.54358804", "0.54358804", "0.54358804", "0.5434416", "0.5432022", "0.54225725", "0.54211867", "0.540544", "0.54030496", "0.5394064", "0.53937775", "0.5391177", "0.53894085", "0.53845006", "0.5380856", "0.5371524", "0.53654784", "0.53630733" ]
0.0
-1
Call this function at the top of any page you wish to access a php session variable. This function makes your login script a whole lot more secure.
function sec_session_start() { $session_name = 'sec_session_id'; // Set a custom session name $secure = false; // Set to true if using https. $httponly = true; // This stops javascript being able to access the session id. ini_set('session.use_only_cookies', 1); // Forces sessions to only use cookies. $cookieParams = session_get_cookie_params(); // Gets current cookies params. session_set_cookie_params(ConfigFunctions::getSessionLength(true), $cookieParams["path"], $cookieParams["domain"], $secure, $httponly); session_name($session_name); // Sets the session name to the one set above. session_start(); // Start the php session session_regenerate_id(); // regenerated the session, delete the old one. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserSession(){\n\t\t\tChromePhp::log(\"inside retrieveCurrentUserInSession\");\n\t\t\tretrieveCurrentUserInSession();\n\t\t}", "public static function session_check(){\n if(!isset($_SESSION)){\n session_start();\n }\n if( !isset( $_SESSION[\"loggedIn\"])){\n\n header(\"Location: login.php\");\n }\n }", "public static function init()\n {\n if (session_id() == '') {\n session_start();\n }\n }", "public static function init()\n {\n if (session_id() == '') {\n session_start();\n }\n }", "private function sessionLogin() {\r\n $this->uid = $this->sess->getUid();\r\n $this->email = $this->sess->getEmail();\r\n $this->fname = $this->sess->getFname();\r\n $this->lname = $this->sess->getLname();\r\n $this->isadmin = $this->sess->isAdmin();\r\n }", "function kcsite_session_start() {\n\tif (!session_id()){\n\t\tsession_start();\n\t}\n}", "function get_login ()\r\n {\r\n return $_SESSION[\"login\"];\r\n }", "private static function init(){\n\t\t\tif (session_status() != PHP_SESSION_ACTIVE) {\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t}", "public function get_session() {\n return $_SESSION['login'];\n }", "public static function init() {\n\t\t\t\n\t\t\t/* Run session */\n\t\t\tsession_start();\n\t\t\t\n\t\t}", "public static function check_log_in ()\n {\n session_start();\n\n if (!$_SESSION['user_data']) {\n header('Location: ./../index.php');\n exit;\n }\n }", "function set_login ($login)\r\n {\r\n $_SESSION[\"login\"] = $login;\r\n }", "function LoggedIn() {\n if(session_status() == PHP_SESSION_NONE){\n return \"0\"; \n }\n }", "function Session () {\r\n session_start();\r\n }", "public function initSession() {\n\n\n\n if (session_id() == '') {\n\n // session isn't started\n\n session_start();\n }\n }", "function check_security()\n{\n $return_page = getenv(\"REQUEST_URI\");\n if($return_page === \"\") { $return_page = getenv(\"SCRIPT_NAME\") . \"?\" . getenv(\"QUERY_STRING\"); }\n if(!session_is_registered(\"UserQ1lm3sFidely\"))\n {\n header (\"Location: login.php?querystring=\" . urlencode(getenv(\"QUERY_STRING\")) . \"&ret_page=\" . urlencode($return_page));\n exit;\n }\n}", "function sec_session_start() {\r\n $session_name = 'sec_session_id'; // define name of session\r\n $secure = SECURE;\r\n // to avoid access to session id via JavaScript.\r\n $httponly = true;\r\n // Zwingt die Sessions nur Cookies zu benutzen.\r\n if (ini_set('session.use_only_cookies', 1) === FALSE) {\r\n header(\"Location: ../index.php?err=Could not initiate a safe session (ini_set)\");\r\n exit();\r\n }\r\n // Holt Cookie-Parameter.\r\n $cookieParams = session_get_cookie_params();\r\n session_set_cookie_params($cookieParams[\"lifetime\"], $cookieParams[\"path\"], $cookieParams[\"domain\"], $secure, $httponly);\r\n // Setzt den Session-Name zu oben angegebenem.\r\n session_name($session_name);\r\n session_start(); // Startet die PHP-Sitzung \r\n session_regenerate_id(); // Erneuert die Session, löscht die alte. \r\n }", "function check_pre_login() {\n\tif ($_SESSION['id']) {\n\t\theader(\"Location: home.php\");\n\t\texit;\t\n\t}\n}", "public static function session()\n {\n //Sjekker om en bruker er logget in\n if (isset($_SESSION['user'])) {\n //Hvis verifyUser() returnerer falskt er sessionene kapret\n if(!$_SESSION['user']->verifyUser()){\n unset($_SESSION['user']);\n $alert = new Alert(Alert::ERROR, \"Sessionen er kapret og du har blitt logget ut. Husk å bruke beskyttelse\");\n $alert->displayOnIndex();\n }\n }\n }", "public static function sessionStart()\n\t{\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "private function initSession() :void\n {\n if (session_status() === PHP_SESSION_NONE) {\n session_start();\n }\n }", "function check_session ()\n{\n session_start ();\n if (!session_is_registered (\"sessid\"))\n {\n header (\"Location: login.php\");\n exit;\n }\n $SESSID_USERNAME = $_SESSION['sessid']['username'];\n return $SESSID_USERNAME;\n}", "private function check_stored_login() {\n if(isset($_SESSION['admin_id'])) {\n $this->admin_id = $_SESSION['admin_id'];\n $this->username = $_SESSION['username'];\n $this->user_level = $_SESSION['user_level'];\n $this->last_login = $_SESSION['last_login'];\n }\n }", "function getUserFromSession() {\n\tsession_start();\n\treturn $_SESSION;\n}", "function checkSession(){\n\tif(!isset($_SESSION['admin']) || $_SESSION['admin'] == \"\") {\n\t\tif(!isset($_SESSION['username']) || $_SESSION['username'] == \"\"){\n\t\t\theader(\"Location: index.php\");\n\t\t}\n\t}\n\telse{\n\t\treturn $_SESSION['admin'];\t\n\t\t\n\t}\n\t\n\n}", "protected function init_session () {\n\t\t$Request = Request::instance();\n\t\t/**\n\t\t * If session exists\n\t\t */\n\t\tif ($Request->cookie('session')) {\n\t\t\t$this->user_id = $this->load();\n\t\t}\n\t\t$this->update_user_is();\n\t}", "function require_logged_in(){\n if ( isset( $_SERVER['HTTP_X_FORWARDED_SERVER' ] ) &&\n $_SERVER['HTTP_X_FORWARDED_SERVER' ] == 'localhost'\n ){\n $_SESSION['user_id'] = 10200;\t// FOR TESTING\n return; \n }\n\n if ( ! $_SESSION['is_logged_in']) {\n not_allowed(); \n }\n}", "function loadSession() {}", "function user_session()\n\t{\n\t\tif((empty($_SESSION['username'])))\n\t\t{\n\t\t\t//To set notice message\n\t\t\tframe_notices(\"Please Login in to Continue !!\",\"failure\");\n\t\t\t//To Redirect Page\n\t\t\tredirect(SITEPATH.\"/administrator/index.php\");\n\t\t}\n\t}", "public static function userLoggedIn()\n {\n //Hvis en bruker ikke er logget inn, vil han bli sent til login.php\n if (!isset($_SESSION['user'])) {\n //Lagrer siden brukeren er på nå slik at han kan bli redirigert hit etter han har logget inn\n $_SESSION['returnPage'] = $_SERVER['REQUEST_URI'];\n $alert = new Alert(Alert::ERROR, \"Du er nøtt til å være logget inn for å se den siden. Ikke prøv deg på noe.\");\n $alert->displayOnOtherPage('login.php');\n\n }\n }", "function wpdev_session_start() {\n session_start();\n }", "function check_login_main(){\n if(strlen($_SESSION['login'])==0)\n\t{\t\n\t\t$host=$_SERVER['HTTP_HOST'];\n\t\t$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\\\');\n\t\t$extra=\"./login.php\";\t\t\n\t\t$_SESSION[\"login\"]=\"\";\n\t\theader(\"Location: http://$host$uri/$extra\");\n\t}\n}", "function sec_session_start() {\r\n $session_name = 'sec_session_id'; // Set a custom session name\r\n $secure = false;\r\n // This stops JavaScript being able to access the session id.\r\n $httponly = true;\r\n // Forces sessions to only use cookies.\r\n if (ini_set('session.use_only_cookies', 1) === FALSE) {\r\n header(\"Location: session_error.php?err=Could not initiate a safe session (ini_set)\");\r\n exit();\r\n }\r\n // Gets current cookies params.\r\n $cookieParams = session_get_cookie_params();\r\n session_set_cookie_params($cookieParams[\"lifetime\"],\r\n $cookieParams[\"path\"], \r\n $cookieParams[\"domain\"], \r\n $secure,\r\n $httponly);\r\n // Sets the session name to the one set above.\r\n session_name($session_name);\r\n session_start(); // Start the PHP session \r\n session_regenerate_id(); // regenerated the session, delete the old one. \r\n}", "function startSession()\n{\n if ( !isset( $_SESSION ) ) { @session_start() ; }\n}", "function getUserId() {\n session_start();\n return $_SESSION['USER_ID'];\n}", "public function pcr_auth_session_start() {\r\n\r\n // # check session_status()\r\n if(session_status() === PHP_SESSION_NONE) {\r\n session_start();\r\n }\r\n\r\n $request_uri = $_SERVER['REQUEST_URI'];\r\n\r\n // # due to wp nonce in some request_uri's, lets partial match login and logout strings\r\n // # also look for onesignal references even though we match on entire troublsome URL's below.\r\n if(stripos('login', $request_uri) !== true && stripos('logout', $request_uri) !== true && stripos('onesignal', $request_uri) !== true) {\r\n\r\n // # build the array of known url's to skip\r\n $skip_urls = array('/',\r\n '/login/',\r\n '/wp-admin/admin-ajax.php',\r\n '/wp-cron.php?doing_wp_cron',\r\n '/login/?login=false',\r\n '/login/?login=failed',\r\n '/wp-login.php'\r\n );\r\n\r\n // # check if reuest uri is empty and does not match skip_urls array\r\n if(!empty($request_uri) && !in_array($request_uri, $skip_urls)) {\r\n\r\n // # all is good, set the session\r\n $_SESSION['request_uri'] = $request_uri;\r\n }\r\n }\r\n }", "function session()\n {\n if (!API_MODE) {\n session_name('SKELETON');\n session_start();\n } else {\n ini_set('session.use_cookies', '0');\n }\n }", "function checkLogin() {\n if (!isset($_SESSION['userid'])) {\n header(\"Location: ../index.php?message=nologin\");\n }\n }", "function getLogin()\n {\n if (isset($_SESSION[\"login\"])) {\n return $_SESSION[\"login\"];\n }\n }", "public function setup_session(){\n if(!(isset($_SESSION))){\n session_start();\n }\n\n $_SESSION['user_id'] = $this->user_id;\n $_SESSION['name'] = $this->firstname;\n\n //Remove anon flag\n if(isset($_SESSION['anon'])){\n unset($_SESSION['anon']);\n }\n\n }", "function comprobarSession(){\n\tif (!isset($_SESSION['admin'])) {\n \theader('Location:http://localhost/sesion/login.php');\n\t}\n}", "private function check()\n\t{\n\t\tif (!session_id())\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "function start_session() {\n if(!session_id()) {\n session_start();\n }\n}", "function is_user_authenticated () {\n // into the system and false otherwise.\n //\n // Given the session information is stored by the server, it is\n // considerably secure to check for a value stored on it.\n $is_authenticated = false;\n if (!isset($_SESSION)) {\n session_start();\n };\n\n if (array_key_exists('is_user_authenticated', $_SESSION)) {\n $is_authenticated = $_SESSION['is_user_authenticated'];\n };\n return $is_authenticated;\n}", "public function get_api_auth()\n {\n session_start();\n echo $_SESSION['api_auth'];\n }", "function geefSession() {\n echo '<pre>';\n print_r( $_SESSION );\n echo '</pre>';\n}", "function startup() {\n\tsession_start();\n\t\n\t// keep track of visits:\n\tif(!isset($_SESSION['visits']))\n\t\t$_SESSION['visits'] = 1;\n\telse\n\t\t++$_SESSION['visits'];\n\t\n\t$GLOBALS['authenticated'] = false;\n\t\n\tif(!isset($_POST['name']) || !isset($_POST['password']))\n\t\treturn;\n\t\t\n\tif(strtolower($_POST['name']) != 'tony' || $_POST['password'] != '123123')\n\t\treturn;\n\t\n\t// everything checks out:\n\t$GLOBALS['authenticated'] = true;\n\t$GLOBALS['name'] = $_POST['name'];\n}", "function check_login()\n{\n if(strlen($_SESSION['login'])==0)\n\t{\t\n\t\t$host=$_SERVER['HTTP_HOST'];\n\t\t$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\\\');\n\t\t$extra=\"../login.php\";\t\t\n\t\t$_SESSION[\"login\"]=\"\";\n\t\theader(\"Location: http://$host$uri/$extra\");\n\t}\n}", "public function doBeforeSystem() {\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n }", "private function check_the_login(){\n \n if(isset($_SESSION['login_user'])){\n \n $this->login_user = $_SESSION['login_user'];\n $this->signed_in = true;\n \n }else{\n unset($this->login_user);\n $this->signed_in = false;\n }\n \n }", "function requestSessionInfo()\n {\n //para pasarselo al aside;\n\n $sessionLevel = $this->loginController->GetSessionAuthLevel();\n $this->view->setSessionLevel($sessionLevel);\n\n $sessionName = $this->loginController->GetSessionUsername();\n $this->view->setSessionName($sessionName);\n }", "function checkUserLoggedIn() {\n if (!isset($_SESSION['name'])) {\n\t\tdie(\"ACCESS DENIED\");\n\t}\n}", "function admin_logged_in() \n{ \n\tsession_start();\n\treturn isset($_SESSION['username']) && isset($_SESSION['password']);\n}", "function SessionStart() {\n if (session_status() != PHP_SESSION_ACTIVE)\n session_start();\n if (empty($_SESSION['prenom']))\n echo $_SESSION['prenom'] = '';\n else\n echo $_SESSION['prenom'];\n}", "public static function checkLogin() {\n\t\t\n\t\tif(!isset($_SESSION[\"uid\"])) {\n ?>\n <script language=\"javascript\">\n window.location.href = \"login.php\"\n </script>\n <?php\n \t}\n\n\t}", "private static function configureSession()\n {\n if(!isset($_SESSION))\n {\n session_start();\n }\n }", "private function initializePHPSession(): void\n {\n session_name(Config::getInstance()->values['session']['cookie_name']);\n\n /**\n * In localhost mode, security session_set_cookie_params causing problems in the sessions, so we disable this if we are in localhost mode.\n * Otherwise, if we are in production mode, we activate it.\n */\n if (!Server::isLocalHost()) {\n $iTime = (int)Config::getInstance()->values['session']['expiration'];\n session_set_cookie_params(\n $iTime,\n Config::getInstance()->values['session']['path'],\n Config::getInstance()->values['session']['domain'],\n Server::isHttps(),\n true\n );\n }\n\n @session_start();\n }", "function user_login ($user_details) {\n //\n // For security reasons, the password is not stored as it is only required\n // during authentication and not for further identification.\n // Clear the session\n $_SESSION = array();\n $_SESSION['user'] = $user_details;\n $_SESSION['is_user_authenticated'] = true;\n}", "function lade_user_id(){\n //Session initiieren\n session_start();\n $UserSessionID = intval($_SESSION['user_id']);\n return $UserSessionID;\n}", "private function initSession()\n {\n // Start the session\n session_start();\n\n // Create session id constant\n define('SID', session_id());\n }", "function session_login($vars)\n {\n }", "public function init() {\n// $session->open();\n// if (empty($_SESSION['userid'])) {\n// return $this->redirect('index.php?r=login');\n// }\n }", "function check_login()\n // Make sure user is logged in. Redirect to login page if not.\n {\n if (!isset ($_SESSION['uid']) || !$_SESSION['uid'] || $_SESSION['ip']!=allIPs() || time()>=$_SESSION['expires_on'])\n {\n\t\t\theader(\"location: ../ressources/controleur/action/logout.php\");\n }\n $_SESSION['expires_on']=time()+INACTIVITY_TIMEOUT; // User accessed a page : Update his/her session expiration date.\n }", "public function check_login(){\n\t\t\tif( isset( $_SESSION['user_id'] ) ) {\n\t\t\t\t$this->user_id = $_SESSION['user_id'];\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset( $this->user_id );\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "function loginUser($username) {\r\n $_SESSION[\"currentUser\"] = $username;\r\n $_SESSION['authenticated'] = TRUE;\r\n}", "static function getUser(){\n return $_SESSION[\"APPWEB\"][\"USERNAME\"];\n }", "private static function startSession() {\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n }", "function sec_session_start(){\n $session_name = 'sec_session_id';\n $secure = false;\n // This stops Javascript being able to access the session id\n $httponly = true;\n // Forces sessions to only use cookies.\n if (ini_set('session.use_only_cookies',1) === FALSE){\n header(\"Location: ../error.php?err=Could not initiate a safe session (ini_set)\");\n exit();\n }\n //Gets current cookie params.\n $cookieParams = session_get_cookie_params();\n session_set_cookie_params($cookieParams[\"lifetime\"], $cookieParams[\"path\"], $cookieParams[\"domain\"], $secure, $httponly);\n //Sets the session name to the one set above\n session_name($session_name);\n session_start();\n session_regenerate_id(true);\n}", "function _read_user_session()\n {\t\t\n\t\tif($this->sh_Options['keeping_logic'] == 'db'){\n\t\t\t$this->is_present = $this->_read_user_session_db();\n\t\t} else {\n\t\t\t$this->is_present = $this->_read_user_session_ss();\n\t\t}\n\t}", "function session(){\n\t\t$t = strtolower($_SERVER['HTTP_USER_AGENT']);\n\t\tif(strpos($t,'esnc.net') !== FALSE || strpos($t,'search') !== FALSE || strpos($t,'bot') !== FALSE || strpos($t,'spider') !== FALSE || strpos($t,'crawler') !== FALSE) return;//exclude search engine and other browser\n\t\tsession_save_path(PATH_SESSION);\n\t\tsession_cache_limiter(SESSION_CACHE);\n\t\tsession_cache_expire(SESSION_TIMEOUT);\n\t\tsession_name(SESSION_NAME);\n\t\tsession_set_cookie_params(0,URL_ROOT);\n\t\tsession_start();\n\t\tif(!isset($_SESSION['ctrl'])){\n\t\t\t$_SESSION['USip'] = $t=$_SERVER['REMOTE_ADDR'];\n\t\t\t$_SESSION['UA'] = $_SERVER['HTTP_USER_AGENT'];\n\t\t\t$_SESSION['ctrl']=1;//guest session start\n\t\t\t$_SESSION['USid']=-1;\n\t\t\t$_SESSION['USname']='';\n\t\t\t$_SESSION['USemail']='';\n\t\t\t$_SESSION['USlastlogin']='';\n\t\t\t$_SESSION['priv']=0;\n\t\t\t$_SESSION['logontries'] = 0;\n\t\t\t/* implement hit counter\t\n\t\t\texclude ip from 192.168.0.x,10.x.x.x,\n\t\t\t*/\n\t\t\tif(strpos($t,'192.') !== 0 && strpos($t,'10.') !== 0 && ($visit=(int)@file_get_contents(PATH_GLOBAL.'visit.txt')))\n\t\t\t\tfile_put_contents(PATH_GLOBAL.'visit.txt',++$visit,LOCK_EX);\n\t\t};\n\t\t$this->load();\n\t}", "function login()\n{\n if (checkLogin()) {\n if (isset($_POST['Username'])) {\n $_SESSION['User'] = $_POST['Username'];\n $_SESSION['TF'] = 0;\n require \"view/home.php\";\n }\n } else {\n $_GET['action'] = \"login\";\n require \"view/login.php\";\n }\n}", "public function controlSession(){\n $session = $_SESSION['wifiGuardSharingEmail'];\n $sessionID = $_SESSION[\"wifiGuardSharingID\"];\n $uri = $_SERVER['REQUEST_URI'];\n \n if(!empty($session) && !empty($sessionID)){\n $result = dibi::query('SELECT sessionID\n FROM [user]\n WHERE [email] = %s', $session, 'LIMIT 1');\n $databaseSessionID = $result->fetchSingle();\n \n //if user is in index.php with valid session\n if (preg_match(\"/index.php/\",$uri) && $databaseSessionID===$sessionID){\n parent::redirection(\"app.php?page=showrecord\");\n }\n //if user try load app.php with invalid session\n elseif (preg_match(\"/app.php/\",$uri) && $databaseSessionID!==$sessionID){\n parent::redirection(\"index.php\");\n }\n } \n //if user try load app.php without session\n elseif(preg_match(\"/app.php/\",$uri)){\n parent::redirection(\"index.php\");\n }\n }", "public static function checkLogin()\n {\n if (!isset($_SESSION)) {\n session_start();\n }\n if (!isset($_SESSION['email'])) {\n header('Location: login.php');\n }\n }", "public function checsession() {\n // using the default layout 'protected/views/layouts/main.php'\n $session = Yii::app()->session['isLoggedIn'];\n if(empty($session)){\n $this->redirect(Yii::app()->baseUrl.'/index.php');\n }\n }", "private function loginWithSessionData()\n { \n $this->user_name = $_SESSION['user_name'];\n $this->user_email = $_SESSION['user_email'];\n\n // set logged in status to true, because we just checked for this:\n //if(!empty($_SESSION['user_name']) && ($_SESSION['user_logged_in'] == 1)\n // when we called this method (in the constructor)\n $this->user_is_logged_in = true;\n \n if($_SESSION['user_privileges'] == 1)\n $this->user_admin = true;\n }", "public static function check_session() {\n\t\t\t// get redirect_to_default\n\t\t\t$redirect_to_default = Cookie::get('redirect_to_default');\n\t\t\t\n\t\t\t// if empty redirect_to_default set from default settings\n\t\t\tif(empty($redirect_to_default)){$redirect_to_default = REDIRECT_TO_DEFAULT;}\n\t\t\t\t\t\t\n\t\t\t// check if auth token is submitted\n\t\t\tif(isset($_GET['authtoken']))\n\t\t\t{\n\t\t\t\t// check auth token\n\t\t\t\t$authtoken = Functions::encrypt_decrypt('decrypt', $_GET['authtoken'], \"\\x73\\x6f\\x6d\\x31\\x34\\x31\\x30\\x40\\x73\\x6f\\x6d\\x6e\\x65\\x74\\x69\\x63\\x73\");\n\t\t\t\t\t\n\t\t\t\t// get auth token\n\t\t\t\t$authtoken = json_decode($authtoken);\n\t\t\t\t\n\t\t\t\t// set active session\n\t\t\t\tif(!isset($authtoken->keep_session)){$authtoken->keep_session = true;}\n\t\t\t\t\n\t\t\t\t// unset login state\n\t\t\t\tif(!$authtoken->keep_session){self::set_state(false);}\n\t\t\t}\n\t\t\t\n\t\t\t// if session exists\n\t\t\tif(!self::get_state())\n\t\t\t{\t\n\t\t\t\t// check requested url\n\t\t\t\tif(trim(REQUEST_URI) != trim(APP_PATH.'/'.$redirect_to_default))\n\t\t\t\t{\t\n\t\t\t\t\t// get return url\t\t\t\t\t\n\t\t\t\t\t$returnUrl = urlencode(ltrim(str_replace(APP_PATH, '', REQUEST_URI), '/'));\n\t\t\t\t\t\n\t\t\t\t\t// check if auth token is submitted\n\t\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t\t{\n\t\t\t\t\t\t/*\n // get guest user info\n\t\t\t\t\t\t$guest_user = ORM::for_table('sys_user_login');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user pass is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_pass))\n\t\t\t\t\t\t$guest_user = $guest_user->where('user_pass', $authtoken->auth_pass);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user company is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_comp))\n\t\t\t\t\t\t$guest_user = $guest_user->where('sys_company_id', $authtoken->auth_comp);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user name is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_name))\n\t\t\t\t\t\t\t$guest_user = $guest_user->where('user_name', $authtoken->auth_name)->find_one();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$guest_user = $guest_user->find_one($authtoken->auth_user);\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// check if user exists\n\t\t\t\t\t\tif(is_object($guest_user))\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t// start session and set session values\n\t\t\t\t\t\t\tself::set_state(true);\n\t\t\t\t\t\t\tself::set('user_id', $guest_user->id);\n\t\t\t\t\t\t\tself::set('user_name', $guest_user->user_name);\n\t\t\t\t\t\t\tself::set('first_name', $guest_user->first_name);\n\t\t\t\t\t\t\tself::set('last_name', $guest_user->last_name);\n\t\t\t\t\t\t\tself::set('full_name', trim($guest_user->first_name.' '.$guest_user->last_name));\n\t\t\t\t\t\t\tself::set('email', $guest_user->email);\n\t\t\t\t\t\t\tself::set('mobile', $guest_user->mobile);\n\t\t\t\t\t\t\tself::set('company_id', (empty($guest_user->sys_company_id) ? $authtoken->company_id : $guest_user->sys_company_id));\n\t\t\t\t\t\t\tself::set('is_super_admin', $guest_user->is_super_admin);\t\n\t\t\t\t\t\t\tself::set('is_guest', ($authtoken->auth_user==GUEST_ID ? 1 : 0));\t\n\t\t\t\t\t\t\tself::set('last_login', $guest_user->last_login);\t\n\t\t\t\t\t\t\tself::set('logged_with_master_password', false);\n\t\t\t\t\t\t\tself::set('authtoken', $authtoken);\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// redirect to given path\n\t\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t\t}\n */\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// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.(empty($returnUrl) ? '' : '?returnUrl='.$returnUrl));\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else\n\t\t\t{\n\t\t\t\t// check if auth token is submitted\n\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t{\n\t\t\t\t\t// check for valid auth user\n\t\t\t\t\tif($authtoken->auth_user!=GUEST_ID)\n\t\t\t\t\t{\n\t\t\t\t\t\t// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}*/\n\t\t}", "protected function setupSessionVars()\n\t{\n\t\tif(!empty($_SESSION[SESSION_KEY]))\n\t\t{\n\t\t\tself::$session = $_SESSION[SESSION_KEY];\n\t\t}\n\t\telse \n\t\t{\n\t\t\tself::$session = $_SESSION[SESSION_KEY] = array();\n\t\t}\n\t\tif(!empty($_SESSION[SESSION_FLASH_KEY]))\n\t\t{\n\t\t\tself::$session_flash = $_SESSION[SESSION_FLASH_KEY];\n\t\t\t$_SESSION['session_flash_data'] = array();\n\t\t}\n\t\telse \n\t\t{\n\t\t\tself::$session_flash = $_SESSION[SESSION_FLASH_KEY] = array();\n\t\t}\n\t}", "public static function init()\n {\n if (self::$sessionStarted == false) {\n session_start();\n self::$sessionStarted = true;\n }\n }", "public static function protect(){\n\t\tif(!(isset($_SESSION[\"user\"]) && isset($_SESSION[\"user\"]['userId']))){\n\t\t\theader(\"location: \".$GLOBALS['web_root']);\n\t\t\texit();\n\t\t}\n\n\t}", "static function start()\n {\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n }", "function set_ini(){\n session_name(self::_SESSION_NAME_); \n //ini_set('session.name',self::_SESSION_NAME_);\n // **PREVENTING SESSION HIJACKING**\n // Prevents javascript XSS attacks aimed to steal the session ID (jscript cant access cookies now)\n ini_set('session.cookie_httponly', 1);\n // Adds entropy into the randomization of the session ID, as PHP's random number\n // generator has some known flaws\n ini_set('session.entropy_file', self::_SESSION_ENTROPY_);\n ini_set('session.entropy_length', self::_SESSION_ENTROPY_LENGTH); \n // Uses a strong hash\n ini_set('session.hash_function', self::_SESSION_HASH_);\n // **PREVENTING SESSION FIXATION**\n // Session ID cannot be passed through URLs\n ini_set('session.use_cookies', 'true'); \n ini_set('session.use_only_cookies', 1);\n // Uses a secure connection (HTTPS) if possible\n //if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') \n //ini_set('session.cookie_secure', 1); \n session_start();\n\n }", "public function startSession()\n\t{\n\t\t// Let's start the session\n\t\tif (session_id() == '')\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "public function Authentication(){\n if($_SESSION['account'] == NULL){\n // neu khong co nghia la chua dang nhap\n // t chuyen huong ve login\n header(\"location:login\");\n }\n }", "function loggedin() {\n // echo $_SESSION['userid'];\n return isset($_SESSION['userid']);\n}", "function startSession(){\r\n\r\n\t\tsession_name(\"phpBMS\".preg_replace('/\\W/',\"\",APPLICATION_NAME).\"v096ID\");\r\n\t\tsession_start();\r\n\r\n\t}", "function setSessionOn() {\n ini_set(\"session.cookie_lifetime\", 0);\n ini_set(\"session.use_cookies\", 1);\n ini_set(\"session.use_only_cookies\" , 1);\n ini_set(\"session.use_strict_mode\", 1);\n ini_set(\"session.cookie_httponly\", 1);\n ini_set(\"session.cookie_secure\", 1);\n ini_set(\"session.cookie_samesite\" , \"Strict\");\n ini_set(\"session.cache_limiter\" , \"nocache\");\n ini_set(\"session.sid_length\" , 48);\n ini_set(\"session.sid_bits_per_character\" , 6);\n ini_set(\"session.hash_function\" , \"sha256\");\n \n session_name(\"Authentification\");\n return session_start();\n}", "function getCurrentUser () {\n session_start();\n if(isset($_SESSION['userID'])) {\n\t\t$currentUser=$_SESSION['userID'];\n return $_SESSION['userID'];\n }\n else { //not logged in, give them the boot\n header(\"url=index.php\");\n }\n}", "function isLogged()\n{\n\tsession_start();\n\tif\n\t(isset($_SESSION[\"userId\"]))\n\t{\n\t\treturn 1;\n\t} else\n\t{\n\t\treturn 0;\n\t}\n}", "public function __construct() {\n session_start();\n $this->check_stored_login();\n }", "function login() {\n // Check is already a user is logged in or not.\n if (!isset ($_SESSION['user_id'])) {\n include('blog/site/VIEW/Login.php');\n }\n else {\n header(\"location: /index.php/User/home\");\n }\n }", "function StartSession()\n\t{\n\t\t// Check if application configuration require SSL and if connection uses it\n\t\tif(IS_SECURE && $_SERVER['HTTPS'] != 'on')\n\t\t{\n\t\t\t// Make a notice log about non-ssl connection attempt\n\t\t\terror_log('[NOTICE] Non-SSL connection attempt;');\n\t\t\t// Redirect to the same page using https \n\t\t\tRedirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n\t\t}\n\t\t\n\t\t// Set custom session id\n\t\t$sessionName = SESSION_NAME;\n\t\t// Get secure status\n\t\t$isSecure = IS_SECURE;\n\t\t// Stop JavaScript being able to access the session id\n\t\t$isHttpOnly = true;\n\t\t\n\t\t// Force cookies usage to store the session id on the client side; Check if setting was done\n\t\tif (ini_set('session.use_only_cookies', 1) === FALSE)\n\t\t{\n\t\t\t// Make an error log about impossibility of cookies usage to store the session id on the client side\n\t\t\terror_log('[ERROR] Cannot force cookies use to store the session id on the client side; Could not initiate a safe session;');\n\t\t\t// Redirect to the error page using \n\t\t\tRedirect('error.php?error=Could not initiate a safe session.');\n\t\t}\n\t\t\n\t\t// Get current session cookies parameters\n\t\t$cookieParams = session_get_cookie_params();\n\t\t// Set current session cookies parameters (last two)\n\t\tsession_set_cookie_params($cookieParams['lifetime'], $cookieParams['path'], $cookieParams['domain'], $isSecure, $isHttpOnly);\n\t\t\n\t\t// Set specified current session name\n\t\tsession_name($sessionName);\n\t\t// Start new or resume existing session\n\t\tsession_start();\n\t\t// Update the current session id with a newly generated one\n\t\tsession_regenerate_id(); \n\t}", "function logincheck() {\n\tglobal $db,$script;\n\tif (!$script) {\n\t$read_session=$_COOKIE[\"sbschedule\"];\n\tif ($read_session) {\n\t\t$check_db=mysql_query(\"select * from adminusers where username='$read_session'\");\n\t\tif (mysql_num_rows($check_db) <> 0) {\n\t\t\t$get_username=mysql_fetch_array($check_db);\n\t\t\t$load_username=$get_username[\"username\"];\n\t\t\t// $_SESSION[\"sbschedule\"]=$load_username;\n\t\t\tsetcookie(\"sbschedule\", $load_username);\n\t\t} else {\n\t\t\tlogin_page();\n\t\t};\n\t} else {\n\t\tlogin_page();\n\t};\n\t};\n}", "function check_logged() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies (check_logged): \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n if (isset($_SESSION)) {\n \tforeach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n }\n if (!isset($_SESSION[\"logged\"]) || !array_key_exists($_SESSION[\"logged\"],$USERS)) {\n \t$qs = $_SERVER['QUERY_STRING'];\n audit( \"check_logged\",\" failed, key logged does not exist\", \"\" );\n if ($qs != \"\")\n header(\"Location: /applications/User/login.php?\".$_SERVER['QUERY_STRING'].\"&url=\".$_SERVER['PHP_SELF']);\n else\n header(\"Location: /applications/User/login.php\".\"?url=\".$_SERVER['PHP_SELF']);\n // in some cases the redirect will not be fast enough... instead the calling script will see the -1 - test the output of check_logged for != -1 to prevent accidential access\n return -1; // not logged in\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return $_SESSION[\"logged\"];\n }", "function initSession($usuario, $tipo, $codigo_usuario) {\r\n //include 'credenciales.php';\r\n \r\n //Iniciando la sesión en el servidor\r\n session_start();\r\n \r\n if($_SESSION[\"logged\"] == null || $_SESSION[\"logged\"] == false) {\r\n //Seteando las variables que permitirán saber si ha sido logueado el usuario\r\n $_SESSION[\"logged\"] = true;\r\n $_SESSION[\"usuario\"] = $usuario;\r\n $_SESSION[\"tipo\"] = $tipo;\r\n $_SESSION[\"codigo\"] = $codigo_usuario;\r\n \r\n echo '<br> Sesión iniciada<br>';\r\n \r\n }\r\n else {\r\n echo '<br> Sesión existente<br>';\r\n }\r\n}", "function sec_session_start() {\n $session_name = 'msitadmissions'; // Set a custom session name\n $secure = false; // Set to true if using https.\n $httponly = true; // This stops javascript being able to access the session id. \n \n ini_set('session.use_only_cookies', 1); // Forces sessions to only use cookies. \n\t\t$cookieParams = session_get_cookie_params(); // Gets current cookies params.\n session_set_cookie_params($cookieParams[\"lifetime\"], $cookieParams[\"path\"], $cookieParams[\"domain\"], $secure, $httponly); \n session_name($session_name); // Sets the session name to the one set above.\n session_start(); // Start the php session\n session_regenerate_id(); // regenerated the session, delete the old one. \n}", "function CheckLogin(){\n\tif($_SESSION['userid']==''||!isset($_SESSION['userid'])){\n\t\tdie();\n\t}\n}", "function session_defaults() {\n\t$_SESSION['logged'] = false;\n\t$_SESSION['uid'] = 0;\n\t$_SESSION['username'] = '';\n\t$_SESSION['email'] = '';\n\t$_SESSION['cookie'] = 0;\n}", "public function doBeforeSystem()\n {\n session_start();\n // TODO: Implement doBeforeSystem() method.\n }", "function getPHPSessID(){\r\n return $this->phpsessid; \r\n }", "private function setSESSIONvariables() {\n $_SESSION['pqz_configuration'] = $this->configuration;\n $_SESSION['pqz_question'] = $this->question;\n }" ]
[ "0.672754", "0.6722894", "0.6679684", "0.6679684", "0.6677454", "0.6675996", "0.6637826", "0.6614509", "0.65809983", "0.65235126", "0.6490289", "0.6489063", "0.64788187", "0.64289784", "0.6426063", "0.6414544", "0.6409473", "0.6393316", "0.6384015", "0.63839126", "0.63651085", "0.6362055", "0.6346068", "0.63257617", "0.6316596", "0.6314396", "0.6304507", "0.63035744", "0.62924653", "0.6278626", "0.6277453", "0.62736934", "0.62718576", "0.62712574", "0.62663734", "0.62639385", "0.6260945", "0.62524635", "0.6220019", "0.6219453", "0.62146336", "0.6212056", "0.6203276", "0.6200789", "0.61912376", "0.6189055", "0.61886525", "0.6173425", "0.6162531", "0.6153598", "0.61500865", "0.6147568", "0.6142175", "0.613803", "0.613371", "0.61328095", "0.61312747", "0.6129237", "0.61281735", "0.61095184", "0.60949117", "0.6094217", "0.6092886", "0.609176", "0.6080043", "0.60794014", "0.60783607", "0.6077962", "0.60738635", "0.60689855", "0.60688573", "0.6068486", "0.6067064", "0.6066885", "0.60630393", "0.60579944", "0.60569394", "0.60562783", "0.60561115", "0.6055356", "0.6052637", "0.6050125", "0.60498315", "0.6049685", "0.60489", "0.6046891", "0.6041552", "0.6035462", "0.6029795", "0.60270065", "0.6023242", "0.602119", "0.6020964", "0.60207796", "0.6017496", "0.6016793", "0.6004676", "0.60024977", "0.5997929", "0.5985559" ]
0.6205753
42
This function will check the email and password against the database, it will return true if there is a match.
function login($email, $password, $dbcon) { global $max_tolerate_attempts, $delay_before_login; // Using prepared Statements means that SQL injection is not possible. if ($stmt = $dbcon->prepare("SELECT u_id, u_last_name, u_first_name, u_password, u_salt, u_profile_picture FROM app_user WHERE u_email = ? LIMIT 1")) { $stmt->bindParam(1, $email, PDO::PARAM_STR); // Bind "$email" to parameter. $stmt->execute(); // Execute the prepared query. $result = $stmt->fetch(PDO::FETCH_OBJ); $user_id = $result->u_id; $username = $result->u_last_name; $db_password = $result->u_password; $salt = $result->u_salt; $password = hash('sha512', $password.$salt); // hash the password with the unique salt. $now = time(); if($stmt->rowCount() == 1) { // If the user exists $statement = $dbcon->query("SELECT as_banned, as_delay_login FROM Account_State WHERE as_app_user_id = $user_id"); $result = $statement->fetch(PDO::FETCH_OBJ);; $isBanned = $result->as_banned; $loginDelay = $result->as_delay_login; if ($isBanned == true) //check if account banned { //write log $dbcon->query("INSERT INTO Login_Attempt (la_app_user_id, la_time, la_success, la_desc) VALUES ($user_id, $now, 'false', 'banned user trying to log')"); return false; } if($loginDelay > $now)//check if login delay is not respected { //write log $dbcon->query("INSERT INTO Login_Attempt (la_app_user_id, la_time, la_success, la_desc) VALUES ($user_id, $now, 'false', 'user must wait delay before login')"); header("Location: ./index.php?error=" . urlencode("User must wait $delay_before_login seconds before login.")); exit(); } // We check if this is a bruteforce attempt if(checkbrute($user_id, $dbcon) == true) { //add delay for the next attempt $delay = $now + ($delay_before_login); $dbcon->query("UPDATE Account_State SET as_delay_login = $delay WHERE as_app_user_id = $user_id"); //if brute force attempt was already tried, banned account $statement = $dbcon->query("SELECT as_brute_force FROM Account_State WHERE as_app_user_id = $user_id"); $result = $statement->fetch(PDO::FETCH_OBJ); $bruteforceCount = $result->as_brute_force; $dbcon->query("UPDATE Account_State SET as_brute_force = $bruteforceCount+1 WHERE as_app_user_id = $user_id"); //we ban the user at 2 brute force and change the password if ($bruteforceCount > 1) { $dbcon->query("UPDATE Account_State SET as_banned = 'true' WHERE as_app_user_id = $user_id"); //write log $dbcon->query("INSERT INTO Login_Attempt (la_app_user_id, la_time, la_success, la_desc) VALUES ($user_id, $now, 'false', '2 brute force : user is permanently banned')"); //change the password $newPass = hash('sha512', 'banned'); $newPass = hash('sha512', $newPass.$salt); $dbcon->query("UPDATE App_User SET u_password = '$newPass' WHERE u_id = $user_id"); //send email with new password $headers ='From: "GTI619"<[email protected]>'."\n"; $headers .='Content-Type: text/plain; charset="utf-8"'."\n"; $message = "Une tentative de brute force à été faite sur votre compte, nous avons changé temporairement votre mot de passe. Nous vous suggérons fortement de changer votre mot de passe temporaire le plus tôt possible. Mot de passe temporaire :"; mail('[email protected]', 'Changement de mot de passe', $message, $headers); header("Location: ./index.php?error=" . urlencode("Une tentative de brute force à été faite sur votre compte, nous avons changé temporairement votre mot de passe.")); exit(); } //write log $dbcon->query("INSERT INTO Login_Attempt (la_app_user_id, la_time, la_success, la_desc) VALUES ($user_id, $now, 'false', 'brute force attempt')"); return false; } else { if($db_password == $password) { // Check if the password in the database matches the password the user submitted. // Password is correct! $user_browser = $_SERVER['HTTP_USER_AGENT']; // Get the user-agent string of the user. $user_id = preg_replace("/[^0-9]+/", "", $user_id); // XSS protection as we might print this value $_SESSION['user_id'] = $user_id; $username = preg_replace("/[^a-zA-Z0-9_\-]+/", "", $username); // XSS protection as we might print this value $_SESSION['username'] = $username; $_SESSION['login_string'] = hash('sha512', $password.$user_browser); //write this in th Login Attemps $dbcon->query("INSERT INTO Login_Attempt (la_app_user_id, la_time, la_success) VALUES ($user_id, $now, 'true')"); // Login successful. return true; } else { // Password is not correct // We record this attempt in the database $dbcon->query("INSERT INTO Login_Attempt (la_app_user_id, la_time, la_success, la_desc) VALUES ($user_id, $now, 'false', 'incorect password')"); return false; } } } else { // No user exists. return false; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isEmailAndPasswordRegistered ($email,$password) {\n $connect = $GLOBALS['connect'];\n $password = md5 ($password);\n $queryCheck = \"SELECT * FROM user WHERE email = '$email' AND password = '$password'\";\n \n $mysqlQueryCheck = mysqli_query ($connect,$queryCheck);\n \n if (mysqli_affected_rows ($connect)){\n \n // Save to database\n \n return true;\n \n }\n else {\n \n echo false;\n \n }\n}", "function email_and_password_exists($db, $email, $password)\n{\n\t$password = md5($password);\n\t$sql = \"SELECT * FROM users where email=:email and password=:password\";\n\t$st = $db->prepare($sql);\n\t$st->execute(array(':email'=>$email, ':password'=>$password));\n\t$us = $st->fetchAll();\n\treturn (count($us) >= 1);\n}", "function validate_cred($email_local = null, $password_local = null){\n global $email;\n global $pwd;\n if ($email_local != null && $password_local != null){\n \n }\n else{\n $email_local = isset($_REQUEST[$email]) ? $_REQUEST[$email] : null;\n $password_local = isset($_REQUEST[$pwd]) ? $_REQUEST[$pwd] : null;\n \n }\n\n if ($email_local != null && $password_local != null){\n $conn = open_db_connection('localhost', ['new_user','Redbirdp1'], 'login');\n if ($conn ->connect_errno){\n echo('connection failed: ' . $conn->connect_error);\n }\n $statement = new Statement();\n // $statement->select([\"*\"])->from()->table(\"members\")->where(\"username\")->equals($email_local);\n $statement->select([\"*\"])->from()->table(\"members\");\n //echo $statement->get_statement();\n $result = query_db($conn, $statement);\n \n if ($result != null)\n {\n if ($result->num_rows > 0) {\n // output data of each row\n $flag = false;\n while($row = $result->fetch_row()) {\n //echo \"<br>\". $row;\n //echo \"<br>\" . $email_local . \" \" . $password_local;\n //echo \"<br>\" . $row[0];\n //echo \"<br>\" . $row[1];\n if ($row[0] == $email_local && $row[1] == $password_local){\n $flag = true;\n break;\n }\n }\n if ($flag){\n return true;\n }\n else{\n return false;\n }\n } else {\n echo \"0 results\";\n }\n return true;\n }\n echo '<br>Authentificaiton failed not a valid user';\n return true;\n }\n\n return false;\n\n}", "public function checkCredentials(string $email, string $password):bool;", "function checkLoginDetails($email, $password) {\r\n\t\t\t$sql = \"SELECT * FROM `users` WHERE UPPER(email)=UPPER('%s') AND password='%s'\";\r\n\t\t\t$result = $this->query($sql, $email, sha1($password));\r\n\t\t\tif (mysql_num_rows($result) == 0)\r\n\t\t\t\treturn false;\r\n\t\t\treturn true;\r\n\t\t}", "function valid_credentials($email, $password){\n\n\t$pass = sha1($password);\n\n\t$link = mysqli_connect(\"localhost\", \"root\", \"\", \"formstack1\");\n \n $sql = \"SELECT * from `users` where `email_address` = \n '{$email}' AND `pass_word` = '{$pass}' \";\n \n $result = mysqli_query($link, $sql);\n \n\treturn (mysqli_result($result, 0) == '1') ? true : false;\n\n}", "function check_password($email, $password)\n {\n // 1. Connect to the database.\n $link = connect();\n\n // 2. Protect variables to avoid any SQL injection\n $email = mysqli_real_escape_string($link, $email);\n\n // 3. Generate a query and return the result.\n $result = mysqli_query($link, \"\n SELECT id, password, salt\n FROM tbl_users\n WHERE email = '{$email}'\n \");\n\n // 4. Disconnect from the database.\n disconnect($link);\n\n // 5. If no record exists, we can stop here.\n if (!$record = mysqli_fetch_assoc($result))\n {\n return FALSE;\n }\n\n // 6. We can check that the password matches what is on record.\n $password = $record['salt'].$password;\n if (!password_verify($password, $record['password']))\n {\n return FALSE;\n }\n\n // 7. all is fine\n return $record['id'];\n }", "function validateLogin($email, $password)\n\t{\n\n\t\t$connection = new Connection;\n\t\t$query = \"select email,password from user where email = '$email' and password = '$password'\";\n\t\t$result = $connection->runQuery($query, $connection->connection());\n\t\treturn $result;\n\t}", "public function loginIsValid( $email, $password ) {\r\n \r\n $password = sha1($password);\r\n $db = $this->getDB();\r\n if ( NULL != $db ) {\r\n $stmt = $db->prepare('select * from users where email = :emailValue and password = :passwordValue limit 1');\r\n $stmt->bindParam(':emailValue', $email, PDO::PARAM_STR);\r\n $stmt->bindParam(':passwordValue', $password, PDO::PARAM_STR);\r\n $stmt->execute();\r\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\r\n \r\n if ( is_array($result) && count($result) ) return true;\r\n }\r\n return false;\r\n }", "public function isValidLogin($email, $password);", "public function canLogin()\n {\n $email = $this->getEmail();\n $password = $this->getPassword();\n $conn = Db::getInstance();\n $statement = $conn->prepare(\"SELECT * FROM users WHERE email = :email\");\n $statement->bindValue(\":email\", $email);\n $statement->execute();\n $user = $statement->fetch();\n $hash = $user[\"password\"];\n\n if (!$user) {\n return false;\n }\n\n // use password_verify() to verify your user\n // this function should return true or false and nothing else\n if (password_verify($password, $hash)) {\n return true;\n } else {\n return false;\n }\n }", "static function check_login_data($email, $password) {\n global $con;\n\n // generate password hash by password and salt stored in the user table\n $password_hash = sha1(self::get_salt_by_email($email) . $password);\n unset($password); // delete password variable after useage\n \n // check how many table entries fit the email and password\n // password hash comparison with \"LIKE BINARY\" to make sure both are exactly equal\n $sql = \"SELECT COUNT(`id`) AS 'count' FROM `user` WHERE `email` LIKE '\".$email.\"' AND `password` LIKE BINARY '\".$password_hash.\"' AND `active` = 1;\";\n $query = mysqli_query($con, $sql);\n $count = mysqli_fetch_object($query)->count;\n if ($count == 0) { \n $sql = \"SELECT COUNT(`id`) AS 'count' FROM `user` WHERE `email` LIKE '\".$email.\"' AND `active` = 1;\";\n $query = mysqli_query($con, $sql);\n $count = mysqli_fetch_object($query)->count;\n if ($count == 0) {\n return 3;\n }\n return 0;\n } else { // an entry which fits email and password exists\n // check if the user has already confirmed their email address\n $sql = \"SELECT COUNT(`id`) AS 'count' FROM `user` WHERE `email` LIKE '\".$email.\"' AND `password` LIKE BINARY '\".$password_hash.\"' AND `active` = 1 AND `email_confirmed` = 0;\";\n $query = mysqli_query($con, $sql);\n $count = mysqli_fetch_object($query)->count;\n if ($count == 1) { // email has not been confirmed\n return 2;\n } else { // email has been confirmed\n return 1;\n }\n }\n }", "function check($data)\n\t\t{\n\t\t\t$email = \"'\".$data['email'].\"'\";\n\t\t\t$password = \"'\".$data['password'].\"'\";\n\t\t\t$sql = $this->conn_id->query(\"select * from users where email = \".$email .\" and passwd = \".$password);\n\t\t\t\t$r = $sql->fetchALL(PDO::FETCH_ASSOC);\n\t\t\tif(!empty($r))\n\t\t\t\treturn TRUE;\n\t\t\telse\n\t\t\t\treturn FALSE;\n\t\t}", "function checkLogin($db, $email, $password){\n\n\t\t// Prepare a query.\n\t\t$salt_query = $db->prepare(\"SELECT salt FROM user WHERE Email = :email\");\n\t\t$params = array(\":email\" => htmlspecialchars($email));\n\t\t$salt_query->execute($params);\n\t\n\t\t// See if anything was returned. Display an error if anything is.\n\t\tif($salt = $salt_query->fetch()){\n\t\t\n\t\t\t// Generate a hash to compare to what's in the database.\n\t\t\t$hash = hash('sha256', $salt[0] . htmlspecialchars($_POST['password']));\n\t\t\t\n\t\t\t// Compare the generated hash to the one in the database.\n\t\t\t$login_query = $db->prepare(\"\n\t\t\t\tSELECT Username FROM user\n\t\t\t\tWHERE\n\t\t\t\t\tEmail = :email\n\t\t\t\tAND\n\t\t\t\t\thash = :hash\n\t\t\t\");\n\t\t\t\n\t\t\t$params = array(\":email\" => htmlspecialchars($email),\n\t\t\t\t\t\t\t\":hash\" => $hash);\n\t\t\t\n\t\t\t// Retrieve the username.\n\t\t\t$login_query->execute($params);\n\t\t\tif($username = $login_query->fetch()){\n\t\t\t\treturn $username;\n\t\t\t}\n\t\t\t// Incorrect password.\n\t\t\telse{\n\t\t\t\t$returnInfo[\":code\"] = 1;\n\t\t\t\t$returnInfo[\":data\"] = \"Password is incorrect.\";\n\t\t\t\tdie(json_encode($returnInfo));\n\t\t\t}\n\t\t}\n\t\t// User doesn't exist.\n\t\telse{\n\t\t\t$returnInfo[\":code\"] = 1;\n\t\t\t$returnInfo[\":data\"] = \"There is no user associated with that email.\";\n\t\t\tdie(json_encode($returnInfo));\n\t\t}\n\t}", "function DB_check_if_user_exist($usersPass, $usersEmail){\n\n $connection = DB_get_connection();\n $usersPass = md5($usersPass);\n $query = \"SELECT * FROM `users` WHERE Email='$usersEmail' AND password='$usersPass'\";\n $result = mysqli_query($connection, $query);\n if(mysqli_num_rows($result) === 1)\n return true;\n else return false;\n\n}", "public function login_check($email, $password) {\n\n $query = $this -> conn -> prepare('SELECT * FROM users WHERE email = :email');\n $query -> execute(array(':email' => $email));\n $data = $query -> fetchObject();\n $salt = $data -> salt;\n $db_user_password = $data -> user_password;\n\n if ($this -> verify_hash_pass($password.$salt,$db_user_password) ) {\n\n\n $user[\"name\"] = $data -> name;\n $user[\"email\"] = $data -> email;\n $user[\"unique_id\"] = $data -> unique_id;\n return $user;\n\n } else {\n\n return false;\n }\n\n }", "public static function validateUser($email, $password)\n {\n $conn = new MySqlConnect();\n $isValid = FALSE;\n $dbHash = null;\n $userId = null;\n $name = null;\n $userType = null;\n\n // hash the submitted password to to verify against the value in the db\n $hash = Users::encodePassword($password);\n\n //$email = $conn -> sqlCleanup($email);\n // query the db for the value comparison\n $result = $conn -> executeQueryResult(\"SELECT userId, password, fName, lName, userType FROM users WHERE emailAddress = '{$email}'\");\n\n // get a row count to verify only 1 row is returned\n $count = mysql_num_rows($result);\n if ($count == 1)\n {\n var_dump($result);\n // use mysql_fetch_array($result, MYSQL_ASSOC) to access the result object\n while ($row = mysql_fetch_array($result, MYSQL_ASSOC))\n {\n // access the password value in the db\n $userId = trim($row['userId']);\n $dbHash = trim($row['password']);\n $userType = trim($row['userType']);\n $name = \"{$row['fName']} {$row['lName']}\";\n }\n\n // compare the input password hash with the db hash, and set as valid if\n // they match\n if ($hash == $dbHash)\n {\n $isValid = TRUE;\n session_start();\n // register the userId, name, and userType in the $_SESSION\n $_SESSION['userId'] = $userId;\n $_SESSION['name'] = $name;\n $_SESSION['userType'] = $userType;\n $_SESSION['email'] = $email;\n $_SESSION['timeout'] = time();\n // clear any tempPassKey record that may or may not exist in the user\n // record that that has been validated\n Users::clearTempPassKey($userId);\n }\n }\n $conn -> freeConnection();\n return $isValid;\n }", "private function verifyAccount()\n {\n $check = $this->db->query('SELECT users.password, users.id FROM users WHERE username = ?', $this->username)->fetchArray();\n //Check of de user in de database staat.\n if (isset($check['password'])) {\n //Check of de password matched\n if (password_verify($this->password, $check['password'])) {\n echo \"AUTH verify complete\";\n $this->setLoggedinUser($check['id']);\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "function authenticate($sEmail, $sPwd)\r\n {\r\n // Create query\r\n $sSQL = \"SELECT 1 FROM \".users.\" WHERE \".email.\"=\".sFix($sEmail).\" AND \".pwd.\"=\".sFix($sPwd);\r\n $selection = mysql_query($sSQL);\r\n if($row = mysql_fetch_array($selection))\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }", "public function authenticate()\n {\n /* authenticate if the login credentials are correct */\n $db = Sweia::getInstance()->getDB();\n $args = array(\n \":email\" => $this->getEmail(),\n \":password\" => $this->password\n );\n $sql = \"SELECT email,uid FROM \" . SystemTables::DB_TBL_USER . \" WHERE email = ':email' AND password = ':password' AND status != 4 LIMIT 1\";\n $res = $db->query($sql, $args);\n if ($res && $db->resultNumRows($res) == 1)\n {\n $data = $db->fetchObject($res);\n $this->uid = 1;\n return true;\n }\n\n return false;\n }", "function login() {\n\n // Validate user input\n $this->s_email = testInput($this->s_email);\n $this->s_password = testInput($this->s_password);\n\n // Fetch data from db with given email\n $result = $this->conn->query(\"SELECT * FROM $this->tableName WHERE s_email LIKE '$this->s_email'\");\n\n // Check that student exists in database\n if ($result->rowCount() === 1) {\n\n // Fetch user record from result\n $user = $result->fetch();\n\n // Check password match\n if (password_verify($this->s_password, $user[\"s_password\"])) {\n return true;\n }\n // Passwords do not match\n else {\n return false;\n }\n }\n // User with given email not in database\n else {\n return false;\n }\n }", "public function loginValidate($email, $password)\n {\n\n $pdo = DB::connect();\n $stmt = $pdo->prepare(\"SELECT password FROM users WHERE email = :email\");\n $stmt->bindParam(':email', $email);\n $stmt->execute();\n $result = $stmt->fetch();\n if (password_verify($password, $result['password'])) {\n return true;\n } else {\n return false;\n }\n }", "function check_login() {\n $query = \"SELECT * FROM users WHERE username='$this->username'\";\n $result = mysqli_query($this->connect(), $query);\n $user = mysqli_fetch_assoc($result);\n if (password_verify($this->password, $user['password'])) {\n return true;\n }\n else {\n return false;\n }\n }", "function check_email_exist(){\n //TODO syntize the query\n $this->SQL = \"SELECT id,private_name,family_name ,email,password FROM users\"\n . \" WHERE email = '\" . $this->params['email'] . \"';\" ;\n \n \n $this->selecet_query();\n \n \n if ( !empty( $this->results[0]['email'] ) ){\n //found mail - check password\n \n if ($this->results[0]['password'] === $this->params['password']){\n \n $this->success_login();\n \n \n } else {\n // if password incorrect\n $this->results =array( 'results'=>'fail');\n \n }\n \n \n } else {\n //didnt found email \n $this->results =array( 'results'=>'fail');\n \n }\n return $this->results;\n \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 verify(string $email, string $password) : bool{\r\n\r\n\r\n\t\t$sth = $this->db->prepare('SELECT password FROM users WHERE email = :email');\r\n $sth->bindParam(':email', $email);\r\n\r\n if (false === $sth->execute()) {\r\n return false;\r\n }\r\n\r\n $result = $sth->fetch(PDO::FETCH_ASSOC);\r\n\r\n if (false === $result || empty($result)) {\r\n return false;\r\n }\r\n return password_verify($password, $result['password']);\r\n\t\t\t\t\r\n\t}", "function validateUserCredential($userEmail, $password){\n\n\t\tglobal $conn;\n\n\t\t$md5Password = md5($password);\n\n\t\t$query = \"SELECT COUNT(*) AS Valid FROM User WHERE email='\" . $userEmail . \"' AND password='\" . $md5Password . \"'\";\n\n\t\t$result = $conn->query($query);\n\n\t\tif($result->num_rows != 1){\n\t\t\techo \"Error selecting \" . $userEmail . \" details\";\n\t\t}else{\n\t\t\t$assocResult = $result->fetch_assoc();\n\t\t\treturn $assocResult['Valid'];\n\t\t}\n\n\t}", "function isEnteredCorrectPassword($email, $password, $db) {\r\n\t$customerResult = $db->findCustomer($email);\r\n\tif ($customerResult->getRowCount() < 1) {\r\n\t\tdie (\"Couldn't find customer when checking password.\");\r\n\t} else if ($customerResult->getRowCount() > 1) {\r\n\t\tdie(\"More than one customer when checking password\");\r\n\t} else {\r\n\t\t$customer = $customerResult->getFirstRow();\r\n\t\t$correctPassword=$customer['password'];\r\n\t\tif ($correctPassword === $password) {\r\n\t\t\t$factory = new CustomerFactory($db);\r\n\t\t\t$customerObject = $factory->getCustomer($email);\r\n\t\t\t$_SESSION['customer'] = $customerObject;\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tdie(\"Wrong password entered!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n}", "public function validateLogin() {\n $email = valOr($_REQUEST,'email','');\n $password = valOr($_REQUEST,'pwd','');\n\n $stmt = $this->hcatServer->dbh->prepare(\"select * from hcat.user where email=:email\");\n $stmt->bindValue(':email', $email, PDO::PARAM_STR);\n $stmt->execute();\n $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n $_SESSION['email']='';\n $_SESSION['uid']=0;\n\n $message = '';\n if (sizeof($rows)==1) {\n $hash = $rows[0]['pwdhash'];\n if ( password_verify ( $password , $hash )) {\n $_SESSION['email']=$email;\n $_SESSION['uid']=$rows[0]['uid'];\n $this->hcatServer->setLogin();\n\n } else {\n $message = 'Bad password';\n }\n\n } else {\n $message = 'Bad email';\n }\n\n\n $_SESSION['message']=$message;\n return ($_SESSION['email']!='');\n }", "function _isMatch()\n {\n if (isset($_POST['login'])) {\n if ($this->name_post == $this->name_db && password_verify($this->pass_post, $this->pass_db)) {\n return true;\n }\n $this->mismatch = true;\n }\n return false;\n }", "function checkPassword(): bool\n {\n $user = FPersistantManager::getInstance()->search(\"utente\", \"UserName\", $this->getUsername());\n if($this->getPassword() == $user[0]->getPassword())\n return true;\n else\n return false;\n }", "public function DB_checkLogin($data){\n\t\ttry {\n\t\t\t\n\t\t\tparent::__construct(DB_DRIVER.':dbname='.DB_NAME.';host='.DB_HOST, DB_USERNAME, DB_PASSWORD);\n\t\t\t$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); \n\n\t\t\t$query = $this->prepare('SELECT email,password,first_name,last_name,date_of_birth,time_stamp FROM '.DB_TABLE.' WHERE email = :email');\n\t\t\t$query->execute(array(\n\t\t\t':email' => $data['email']\n\t\t\t));\n\n\t\t\tif($query->rowCount() === 1){\n\t\t\t\twhile ($row = $query->fetch(PDO::FETCH_OBJ)){\n\t\t\t\t\tif (password_verify($data['password'], $row->password)) {\t\t\n\t\t\t\t\t\tsetcookie('user', $row->first_name.'|'.$row->last_name.'|'.$row->date_of_birth.'|'.$row->time_stamp, time()+3600, \"/reg_form/\");\t\t\t\t\t\t\n\t\t\t\t\t\treturn true;\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\theader('Refresh: 2; url='.BASEPATH.'user/');\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t} else {\n\t\t\t\tdie('Incorrect details.');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch(PDOException $e){\n\t\t\techo 'ERROR: '.$e->getMessage();\n\t\t}\n\t}", "public function userCheckMailLogin($email,$password)\n {\n $query=\"select user_id from bimp_user where email='\".$email.\"' and password='\".$password.\"'\";\n $user= Yii::app()->db->createCommand($query)->queryAll();\n $count=count($user);\n if($count==1){\n return true;\n }else{\n return false;\n }\n }", "function validateCredentialsAndLogin($dbConn, $mail, $pwd) {\r\n $sql = \"SELECT mail, pseudo, mdp_hash FROM User WHERE mail = ?\";\r\n $stmt = $dbConn->prepare($sql);\r\n if ($stmt) {\r\n $stmt->bind_param(\"s\", $param_mail);\r\n $param_mail = $mail;\r\n \r\n if($stmt->execute()){\r\n $stmt->store_result();\r\n if($stmt->num_rows == 1){\r\n $stmt->bind_result($mailFromDb, $pseudo, $hashed_password);\r\n if($stmt->fetch()){\r\n if(password_verify($pwd, $hashed_password)){\r\n // Store data in session variables\r\n setUpSession($mailFromDb, $pseudo);\r\n $stmt->close();\r\n return true;\r\n } else{\r\n //echo \"Debug: The password you entered was not valid.\";\r\n }\r\n }\r\n } else{\r\n //echo \"Debug: No account found with that username.\";\r\n }\r\n } else{\r\n //echo \"Debug: sql fail \".$sql;\r\n }\r\n $stmt->close();\r\n }\r\n return false;\r\n}", "function verify_login($email, $password)\n{\n\t// 1 => good to go\n\t// -1 => account not found or verification bad\n\t$pw_verify = db_query('SELECT AES_DECRYPT(password, \"%s\") AS secret FROM users WHERE email=\"%s\" AND verified=\"1\" LIMIT 1', $_POST['password'], $_POST['email']);\n\tif (count($pw_verify) == 0)\n\t\treturn -1;\n\telse if ($pw_verify[0]['secret'] !== BLOWFISH_SECRET)\n\t\treturn 0;\n\telse\n\t\treturn 1;\n}", "function isPassCorrect($request){\n $name = $request[\"name\"];\n $pass = $request[\"pass\"];\n global $dbName, $dbPass;\n $mysqli = mysqli_connect(\"localhost\", $dbName, $dbPass, \"[Redacted]\") \n or die(mysql_error());\n $query = mysqli_query($mysqli, \"SELECT hash FROM Users WHERE name='$name' \");\n \n if (mysqli_num_rows($query) > 0) {\n if(password_verify($pass,mysqli_fetch_assoc($query)[\"hash\"])){\n return [True, \"$name\"];\n }else {\n return [False, \"Doesn't match\"];\n }\n } else {\n return [False, \"No user\"];\n }\n}", "public function check_user($email,$password)\n\t{\n\t\t$query=\"SELECT * FROM users \n\t\t\t\tWHERE users.email=? \n\t\t\t\tAND users.password=?\";\n\t\t$values=array($email,md5($password));\n\t\t$check=$this->db->query($query,$values)->row_array();\n\t\tif(empty($check))\n\t\t{\n\t\t\t//*no user has been found. ok to create//\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function loginCheck() {\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n if (isset($_POST['submit'])) {\n global $name, $emailErr, $passwd, $pwdErr, $found, $verify_id;\n if (empty($_POST[\"email\"])) {\n $emailErr = \"email is required\";\n }\n else {\n $name = test_input($_POST[\"email\"]);\n // check if e-mail address syntax is valid or not\n if (!preg_match(\"/([\\w\\-]+\\@[\\w\\-]+\\.[\\w\\-]+)/\",$name)) {\n $emailErr = \"Invalid email\";\n return false;\n }\n }\n\n if (empty($_POST['pwd'])) {\n $pwdErr = \"password is required\";\n }\n else {\n $passwd = test_input($_POST[\"pwd\"]);\n $pass_md = md5($passwd);\n } \n if (empty($emailErr) && empty($pwdErr)) { \n require 'database_connection.php'; \n $sql = \"SELECT user_id,user_name, email_id, password FROM signup\";\n $result = $conn->query($sql);\n\n if ($result->num_rows > 0) { \n while($row = $result->fetch_assoc()) {\n $uname = $row[\"user_name\"];\n $email = $row[\"email_id\"];\n $pass = $row[\"password\"];\n $user_id = $row[\"user_id\"];\n if (($name == $uname || $name == $email) && $pass_md == $pass) {\n $_SESSION[\"user\"] = $uname;\n $_SESSION[\"uid\"] = $user_id;\n $found = 1;\n return true;\n break;\n }\n }\n }\n }\n }\n } \n}", "public function Check($email)\n {\n $db = new DB();\n //Check whether user data already exists in database\n $querySelect = \"SELECT \n * \n FROM \n \".$this->userTbl.\" \n WHERE\n email = '\".$email.\"'\";\n $result = $db->prepare($querySelect);\n $result->execute();\n if($result->rowCount() > 0)\n {\n return false;\n }\n else\n {\n return true;\n }\n\n }", "function login_test($email, $password) {\n $db = connectDB();\n $sql = <<<SQL\n \tSELECT userID, password\n \tFROM users\n \tWHERE email = ?\nSQL;\n\n $statement = $db->prepare($sql);\n $statement->bind_param(\"s\", $email);\n $statement->execute();\n $statement->store_result();\n $statement->bind_result($userID, $hashFromDB);\n\n if ($statement->num_rows === 0) { // Invalid email\n\t\t$statement->close();\n\t\t$db->close();\n \treturn false;\n }\n\n while ($statement->fetch()) {\n //echo \"userID: $userID - hash: $hashFromDB\"; // debug, prints userID and hash checked\n if (password_verify($password, $hashFromDB)) {\n\t\t\t$statement->close();\n\t\t\t$db->close();\n return $userID; // Success! both email & password is correct\n }\n }\n // Invalid password\n $statement->close();\n\t$db->close();\n return false;\n\n}", "function userLogin($email, $password) {\n\t\ttry {\n\t\t\t$result = $this->connection->prepare(\"SELECT * FROM admins WHERE email=? AND password=?\");\n\t\t\t$result->bindParam(1, $email);\n\t\t\t$result->bindParam(2, $password);\n\t\t\t$result->execute();\n\t\t\t$rows = $result->fetch(PDO::FETCH_NUM);\n\t\t\tif ($rows > 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\n\t\tcatch(Exception $e) {\n\t\t\treturn false;\n\t\t\texit();\n\t\t}\n\t}", "public function check() {\n\t\tglobal $config;\n\t\t\n\t\t$email = $this->data['email'];\n\t\t$password = hash('whirlpool',$this->SALT.$this->data['password']);\n\t\t\n\t\t$result = $config['database']->query(\"\n\t\t\tSELECT id\n\t\t\tFROM nuusers\n\t\t\tWHERE email = '$email'\n\t\t\t\tAND password = '$password'\n\t\t\tLIMIT 1\n\t\t\");\n\t\t\n\t\tif($result->num_rows){\n\t\t\t$row = $result->fetch_row();\n\t\t\treturn $row[0];\n\t\t}else{\n\t\t\treturn 0;\n\t\t}\n\t}", "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 }", "public function getUserByEmailAndPassword($email, $password) {\n\t\n\t\n $result = mysql_query(\"SELECT * FROM users2 WHERE email = '$email'\") or die(mysql_error());\n // check for result\n $no_of_rows = mysql_num_rows($result);\n if ($no_of_rows > 0) {\n $result = mysql_fetch_array($result);\n // check for password equality\n if ($password == $password) {\n // user authentication details are correct\n return $result;\n }\n } else {\n // user not found\n return false;\n }\n }", "public function checkUserPassword()\n\t{\n\t\tself::authenticate();\n\n\t\t$uname = FormUtil::getPassedValue('user', null);\n\t\t$pass = FormUtil::getPassedValue('up', null);\n\n\t\tif($uname == null) {\n\t\t\treturn self::retError('ERROR: No user name passed!');\n\t\t}\n\t\tif($pass == null) {\n\t\t\treturn self::retError('ERROR: No up passed!');\n\t\t}\n\n\t\t$users = self::getRawUsers('uname = \\'' . mysql_escape_string($uname) . '\\'');\n\n\t\tif(count($users) == 1) {\n\t\t\tforeach($users as $user) {\n\t\t\t\tif($user['uname'] == $uname) {\n\t\t\t\t\tif(FormUtil::getPassedValue('viaauthcode', null, 'POST') != null) {\n\t\t\t\t\t\t$authcode = unserialize(UserUtil::getVar('owncloud_authcode', $user['uid']));\n\t\t\t\t\t\tif($authcode['usebefore'] >= new DateTime('NOW') &&\n\t\t\t\t\t\t\t$authcode['authcode'] == $pass) {\n\t\t\t\t\t\t\t\t$return = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$return = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$authenticationMethod = array(\n\t\t\t\t\t\t\t'modname' => 'Users' ///TODO\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (ModUtil::getVar(Users_Constant::MODNAME, Users_Constant::MODVAR_LOGIN_METHOD, Users_Constant::DEFAULT_LOGIN_METHOD) == Users_Constant::LOGIN_METHOD_EMAIL) {\n\t\t\t\t\t\t\t$authenticationMethod['method'] = 'email';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$authenticationMethod['method'] = 'uname';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$authenticationInfo = array(\n\t\t\t\t\t\t\t'login_id' => $uname,\n\t\t\t\t\t\t\t'pass' => $pass\n\t\t\t\t\t\t);\n\t\t\t\t\t\t//try to login (also for the right output)\n\t\t\t\t\t\tif(UserUtil::loginUsing($authenticationMethod, $authenticationInfo, false, null, true) == true) {\n\t\t\t\t\t\t\t$return = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$return = false;\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} else {\n\t\t\t$return = false;\n\t\t}\n\t\treturn self::ret($return);\n\t}", "function userLogin($email, $pass)\n\t{\n\t\t$password = md5($pass);\n\t\t$stmt = $this->con->prepare(\"SELECT id FROM users WHERE email = ? AND password = ?\");\n\t\t$stmt->bind_param(\"ss\", $email, $password);\n\t\t$stmt->execute();\n\t\t$stmt->store_result();\n\t\treturn $stmt->num_rows > 0;\n\t}", "function is_password_valid ($password, $user_data) {\n // the one in the user records.\n $is_valid = $password == $user_data['password'];\n return $is_valid;\n}", "function CheckCreds($email, $password)\n{\n global $db;\n $query = \"SELECT email FROM users WHERE email=:email AND password=SHA2(:password, 256);\";\n $statement = $db->prepare($query);\n $statement->bindValue(':email', $email);\n\t$statement->bindValue(':password', $password);\n $statement->execute();\n $results = $statement->fetchColumn();\n $statement->closeCursor();\n\treturn $results;\n}", "public function verify() {\r\n $stmp = $this->_db->prepare(\"SELECT `id`,`email` FROM `anope_db_NickCore` WHERE `display`= ? AND `pass` = ?;\");\r\n $stmp->execute(array($this->_username,$this->_password));\r\n \r\n if ($stmp->rowCount() == \"1\") {\r\n $row = $stmp->fetch(PDO::FETCH_ASSOC);\r\n $this->_id = $row['id'];\r\n $this->_email = $row['email'];\r\n return $this->_id;\r\n }\r\n else {\r\n return false;\r\n }\r\n }", "function check_login() {\n //j'appelle la fonction pour se connecter à la database\n include(\"M/db_connect.php\");\n \n //je récupere ce qui est du formulaire et normalisation du form\n $email = htmlspecialchars($_GET['email']);\n $password = htmlspecialchars($_GET['password']);\n \n // la requete pour la database \n $req = $db->prepare(\"SELECT * FROM account WHERE email LIKE :email AND psw LIKE :psw\");\n $req->execute(array(\"email\"=>$email, \"psw\"=>$password));\n\n return $req;\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 login($email,$password){\n try{\n $stmt = $this->db->prepare(\"SELECT * FROM users WHERE user_email=:email LIMIT 1\");\n $stmt->execute(array(':email'=>$email));\n $userRow=$stmt->fetch(PDO::FETCH_ASSOC);\n \n if($stmt->rowCount() == 1){\n if(password_verify($password, $userRow['user_pass']))\n {\n $_SESSION['user_session'] = $userRow['user_id'];\n return true;\n }\n else\n {\n return false;\n }\n }\n }\n catch(PDOException $e){\n echo $e->getMessage();\n }\n }", "function verify_password($memberID, $current_password, $db) {\n \n $command = \"SELECT * FROM member_login WHERE memberID = '\".$db->real_escape_string($memberID).\"' \". \n \"AND password = password('\".$db->real_escape_string($current_password).\"');\";\n $result = $db->query($command);\n \n if ($data = $result->fetch_object()) {\n return true;\n\n }\n else {\n return false;\n }\n}", "public function verifyLogin($userEmail=NULL,$userPassword=NULL)\n\t{\n\t\t$where = array(\n\t\t\t'userEmail' => $userEmail,\n\t\t\t'userPassword' => md5($userPassword),\n\t\t);\n\t\t$this->db->where($where);\n\t\t$result = $this->db->get('users')->result();\n\t\t// echo '<pre>'; print_r($result); exit();\n\t\treturn $result;\n\t}", "public function login($email, $password) {\r\n // Bereite SQL-Statement vor\r\n $this->db->query('SELECT * FROM users WHERE email = :email');\r\n $this->db->bind(':email', $email);\r\n \r\n $row = $this->db->singleResult();\r\n \r\n $hashed_password = $row->password;\r\n\r\n if(password_verify($password, $hashed_password)) {\r\n return $row;\r\n } else {\r\n return false;\r\n }\r\n\r\n //schreibe SQL_Statement dank execute() aus der Database-Klasse\r\n if($this->db->execute()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public function getUserByEmailAndPassword($email, $password) {\n\t\t\n\t\t$query = \" \n SELECT * from users WHERE email = :email;\n \"; \n\t\t\n\t\ttry \n { \n $stmt = $this->_db->prepare($query); \n\t\t\t$stmt->bindValue(':email',$email);\n $stmt->execute(); \n\t\t\t$result = $stmt->fetch();\n } \n catch(PDOException $ex) \n { \n\t\t\t$h = $ex->getMessage ();\n die($h); \n }\n\t\t\n\t\tif(!(empty($result))){\n\t\t\t\n\t\t\t$salt = $result['salt'];\n\t\t\t$encrypted_password = $result['password'];\n\t\t $hash = $this->checkhashSSHA($salt, $password);\n\t\t\t\n\t\t if ($encrypted_password == $hash) {\n // user authentication details are correct\n return $result;\n }\n } else {\n // user not found\n return false;\n }\n\t\t\n }", "protected function _validateAccount() {\n\t\tif(!check($this->_username)) return;\n\t\tif(!check($this->_password)) return;\n\t\t$data = array(\n\t\t\t'username' => $this->_username,\n\t\t\t'password' => $this->_password\n\t\t);\n\t\tif($this->_md5Enabled) {\n\t\t\t$query = \"SELECT * FROM \"._TBL_MI_.\" WHERE \"._CLMN_USERNM_.\" = :username AND \"._CLMN_PASSWD_.\" = [dbo].[fn_md5](:password, :username)\";\n\t\t} else {\n\t\t\t$query = \"SELECT * FROM \"._TBL_MI_.\" WHERE \"._CLMN_USERNM_.\" = :username AND \"._CLMN_PASSWD_.\" = :password\";\n\t\t}\n\t\t\n\t\t$result = $this->db->queryFetchSingle($query, $data);\n\t\tif(!is_array($result)) return;\n\t\t\n\t\treturn true;\n\t}", "function check_database($password)\r\n\t{\r\n\t\t$email = $this->input->post('email');\r\n\t\r\n\t\t//query the database\r\n\t\t$result = $this->users_model->login($email, $password);\r\n\t\tif($result)\r\n\t\t{\r\n\t\t\t//session\r\n\t\t\t$sess_array = array();\r\n\t\t\tforeach($result as $row)\r\n\t\t\t{\r\n\t\t\t\t$sess_array = array(\r\n\t\t\t\t\t\t'users_id' => $row->users_id,\r\n\t\t\t\t\t\t'firstname' => $row->firstname\r\n\t\t\t\t\t\t\r\n\t\t\t\t);\r\n\t\t\t\t$this->session->set_userdata('logged_in', $sess_array);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->form_validation->set_message('check_database', 'Invalid email or password');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function auth_check_login($email, $password) {\n\t//database query\n\t$query = \"SELECT * \"\n\t\t\t\t. \"FROM users \"\n\t\t\t\t. \"WHERE email = '\".addslashes($email).\"' or ID = '\".addslashes($email).\"'\";\n\t$result = run_sql($query);\n\t$db_field = mysql_fetch_assoc($result);\n\n\t//if query returns a result\n\tif(mysql_num_rows($result)){\n\t\t$result_password = mysql_result($result, 0, \"password\");\n\t\t$result_user = mysql_result($result, 0, \"email\");\n\t\t$result_firstname = mysql_result($result, 0, \"first_name\");\n\t\t$result_location = mysql_result($result, 0, \"location\");\n\t\t$result_lastname = mysql_result($result, 0, \"last_name\");\n\t\t$userid = mysql_result($result, 0, \"ID\");\n\t\n\t\t//if email and corresponding password are valid\n\t\tif(($email == $result_user || $email == $userid) && ($password == $result_password)){\n\t\t\t//sets session variables\n\t\t\t$_SESSION['id'] = $userid;\n\t\t\t$_SESSION['email'] = $email;\n\t\t\t$_SESSION['firstname'] = $result_firstname;\n\t\t\t$_SESSION['location'] = $result_location;\n\t\t\t$_SESSION['lastname'] = $result_lastname;\n\t\t\t$_SESSION['username'] = $result_firstname . \" \" . $result_lastname;\n\t\t\t$_SESSION['active'] = true;\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "function memberEmailExists($email, $password)\r\n { \r\n $select = 'SELECT member_id, username, firstname, lastname, email, password, image FROM atlas_members WHERE email=:email && password=:password';\r\n \r\n $statement = $this->_pdo->prepare($select);\r\n $statement->bindValue(':email', $email, PDO::PARAM_STR);\r\n $statement->bindValue(':password', $password, PDO::PARAM_STR);\r\n $statement->execute();\r\n \r\n $row = $statement->fetch(PDO::FETCH_ASSOC);\r\n\n return !empty($row);\r\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 checkUser($userName, $password){\n\t\n\tglobal $usersTable;\n\tglobal $db;\n\t$selectQuery=\"select password from $usersTable where userName = '\" . $userName . \"'\";\n\t$resultSet = mysqli_query($db, $selectQuery) or die(mysqli_error($db));\n\t$row = mysqli_fetch_assoc($resultSet);\n\t\n\tif($password == $row[\"password\"]){\n\t\treturn true;\n\t}\n\t\t\t\n\treturn false;\n}", "public function hashed_password_verification() {\n\n $criteria = array(\"email\" => $this->ci->input->post(\"email\"));\n\n // retrieve user profile by username criteria.\n $user_profile = $this->ci->generic_model->retrieve_one(\"admin_user\", $criteria);\n\n if (!$user_profile) { // if user profile can't be retrieved by username.\n return FALSE;\n }\n\n // password stored inside db.\n $real_password = $user_profile['password'];\n $hashed_input_password = $this->ci->input->post(\"password\");\n\n\n // compare the input and user password.\n if ($hashed_input_password == $real_password) {\n $passed = TRUE;\n } else {\n $passed = FALSE;\n $this->ci->form_validation->set_message(\"hashed_password_verification\", \"Invalid email or password.\");\n }\n\n return $passed;\n }", "public function getUserByEmailAndPassword($email, $password) {\r\n $result = mysql_query(\"SELECT * FROM users WHERE email = '$email'\") 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 $salt = $result['salt'];\r\n $encrypted_password = $result['encrypted_password'];\r\n $hash = $this->checkhashSSHA($salt, $password);\r\n // check for password equality\r\n if ($encrypted_password == $hash) {\r\n // user authentication details are correct\r\n return $result;\r\n }\r\n } else {\r\n // user not found\r\n return false;\r\n }\r\n }", "function dbAuthenticateUser($email, $password) {\n\t$dbconn = dbConnect();\n\t$result = null;\n\t\n\t$prepare_ret = pg_prepare($dbconn, \"credential_check\", 'SELECT id, email, phone_number, join_date, validated, last_login FROM appuser, appuser_passwords WHERE appuser.email = $1 and appuser.id = appuser_passwords.user_id and appuser_passwords.password = $2');\n\tif ($prepare_ret) {\n\t\t$resultobj = pg_execute($dbconn, \"credential_check\", array($email, $password));\n\t\tif ($resultobj) {\n\t\t\t$result_as_array = pg_fetch_array($resultobj, null, PGSQL_ASSOC);\n\t\t\tif ($result_as_array) {\n\t\t\t\t// There was a result, so we are authenticated.\n\t\t\t\t$autheduserdata = $result_as_array;\n\n\t\t\t\t// Sanity check: confirm there was only one credential match.\n\t\t\t\tif ($result_as_array = pg_fetch_array($resultobj, null, PGSQL_ASSOC)) {\n\t\t\t\t\tdie(\"Multiple user credential matches\");\n\t\t\t\t}\n\t\n\t\t\t\t// Properly authenticated\n\t\t\t\t$result = $autheduserdata;\n\t\t\t}\n\t\t} else {\n\t\t\tdie(\"Query failed: \" . pg_last_error());\n\t\t}\n\t} else {\n\t\tdie(\"Prepared statement failed: \" . pg_last_error());\n\t}\n\n\tdbClose($dbconn);\n\treturn $result;\n}", "public function validateUser() {\n try {\n $st = $this->con->prepare('SELECT * FROM '.DB_USER_TBL.' WHERE user=?;');\n $st->bindParam(1, $this->username);\n $st->execute();\n \n if($st->rowCount() > 0) {\n $result = $st->fetch(PDO::FETCH_ASSOC);\n \n if( md5($this->password.$result['salt']) == ($result['hash']) ){\n $_SESSION['user_auth'] = true;\n return true;\n \n } else {\n //echo 'Password is incorrect';\n throw new Exception($this->alerts->PASSWORD_WRONG);\n } \n }else{\n //echo 'Username does not exist';\n throw new Exception($this->alerts->USER_DOESNT_EXIST);\n }\n } catch(PDOException $ex) {\n $this->logs->output($ex->getMessage(), $this->alerts->DB_USER_ERROR);\n }\n }", "public function testCheckCredentials(){\r\n $db = new database;\r\n $db->connectToDatabase();\r\n $result = $db->checkCredentials(\"[email protected]\",\"owner\");\r\n $this->assertEquals(\"[email protected]\",$result[\"emailId\"]);\r\n }", "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}", "function canLogin($user,$password){\n\t\tglobal $db;\n\n\t\t$sql =\"SELECT email, password from users where email='\".$user.\"'\";\n\t\t$result =$db->query($sql);\n\t\tif($user==\"\" || $password==\"\")\n\t\t\treturn 'Please enter a username and a password.';\n\t\tif($result->num_rows==0)\n\t\t\treturn \"The username or password are incorrect.\";\n\t\tforeach ($result as $row) {\n\t\t\t$row =$row;\n\t\t}\n\t\tif($result->num_rows==1){\n\t\t\tif(password_verify($password,$row['password']))\n\t\t\t\treturn \"\";\n\t\t\telse\n\t\t\t\treturn \"The username or password are incorrect.\";\n\t\t}\n\t}", "function dbCheckAuth($unm,$pwd)\n{\n\t$result = 0;\n\t$sql = \"SELECT username,password,salt FROM _account WHERE username = '$unm'\";\n\ttry {\n\t\t$stmt = Database :: prepare ( $sql );\n\t\t$stmt->execute();\n\t\tif ($stmt -> rowCount() > 0) \n\t\t{\n\t\t\t$data = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t$hash = $data[0]['salt'].$pwd.$data[0]['salt'];\n\t\t\t$md5pwd = MD5($hash);\n\t\t\t\n\t\t\t$sql = \"SELECT username FROM _account WHERE password = '$md5pwd'\";\n\t\t\t$stmt = Database :: prepare ( $sql );\n\t\t\t$stmt->execute();\n\t\t\t$result = $stmt -> rowCount();\n\t\t}\n\t\telse { $result = 0; }\n\t\t//echo \"$sql : $result record(s)\";\n\t\t$stmt->closeCursor ( ) ;\n\t\t\n\t}\n\tcatch(PDOException $e)\n\t{\n\t\techo $e->getMessage();\n\t}\n\treturn $result;\n}", "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 getCredentialsAreValid($username, $password) {\r\n global $db;\r\n\r\n //phpAlert(\"building query string\");\r\n // Query String\r\n $query = \"SELECT * FROM system_user WHERE system_user_name = '$username';\";\r\n\r\n //phpAlert(\"query string is: \" . $query);\r\n \r\n try {\r\n $statement = $db->prepare($query);\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 //phpAlert(\"Account exists, verifying password\");\r\n // Validate using password_verify()\r\n return (password_verify($password, $result['system_user_password']));\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 isEmailRegistered ($email) {\n $connect = $GLOBALS['connect'];\n \n $queryCheck = \"SELECT * FROM user WHERE email = '$email'\";\n \n $mysqlQueryCheck = mysqli_query ($connect,$queryCheck);\n \n if (!mysqli_affected_rows ($connect)){\n \n // Save to database\n \n return true;\n \n }\n else {\n \n echo false;\n \n }\n}", "public function passwordEntryIsValid() {\r\n \r\n //todo put logic here (same as email)\r\n // also check if it matches confirmpassword\r\n // set the var equal to function call of getpassword\r\n $password = $this->getPassword();\r\n // If the fields empty\r\n if ( empty($password) ) {\r\n // Will send it to errors as username and display the message to user\r\n $this->errors[\"password\"] = \"Password is missing.\";\r\n } \r\n // Calls the password function above and if its not equal to the orgincal password returns error\r\n else if ( $this->getConfirmpassword() !== $this->getPassword() ){\r\n // Message displayed to user\r\n $this->errors[\"password\"] = \"Password does not match confirmation password.\";\r\n }\r\n // Also goes test the password against the password is valid function in the validator class\r\n else if ( !Validator::passwordIsValid($this->getPassword()) ) {\r\n $this->errors[\"password\"] = \"Password is not valid.\"; \r\n }\r\n //Will return if its empty and whether any errors are contained\r\n return ( empty($this->errors[\"password\"]) ? true : false ) ;\r\n }", "function checkIfValidUserAndPasswordWithHttpBasicAuth()\n{\n $con = getMySqliConnection();\n\n $myusername = mysqli_real_escape_string($con,$_SERVER['PHP_AUTH_USER']);\n $mypassword = mysqli_real_escape_string($con,$_SERVER['PHP_AUTH_PW']);\n //encrypt password\n $mypassword = md5($mypassword);\n\n $sql = \"\";\n $sql .= \"SELECT * \";\n $sql .= \"FROM members \";\n $sql .= \"WHERE username = '$myusername' \";\n $sql .= \" AND PASSWORD = '$mypassword' \";\n $sql .= \" AND active = 1 \";\n\n $result = mysqli_query($con,$sql);\n\n if ($result != FALSE) {\n $count = mysqli_num_rows($result);\n }\n mysqli_close($con);\n // Mysql_num_row is counting table row\n\n\n // If result matched $myusername and $mypassword, table row must be 1 row\n\n if ($count == 1) {\n return true;\n }\n else\n {\n return false;\n }\n}", "function logincheck($u_mail,$u_pass)\n{\n\t$sql=\"select * from user_table where u_mail='$u_mail' and u_pass='$u_pass'\";\n\t$key=0; \n\tforeach($GLOBALS['db']->query($sql) as $row)\n\t\t$key++;\n\tif($key==1)\n\t\treturn $row['u_id'];\n\telse\n\t\techo \"<center>Username or Password is incorrect</center>\";\n}", "function validate_user($username,$password){\n global $connection;\n $safe_username=mysql_prep($username);\n $query=\"SELECT password FROM user_auth WHERE user_id = '{$username}' LIMIT 1\";\n\n $password_set=mysqli_query($connection,$query);\n $fetched_password=mysqli_fetch_assoc($password_set);\n\n if(isset($fetched_password))\n {\n\n if(password_check($password,$fetched_password['password']))\n return true;\n else {\n return false;\n }\n }\n else{\n return false;\n }\n }", "function testPasswordsAreEqual($password, $password_one) {\n if (empty($password_one)) {\n $passwordErr = 'Password required';\n } elseif (strlen($password) > 0 && strlen($password_one) > 0 && $password == $password_one) {\n //QUERY FOR DATABASE CONNECTION HERE\n if (!filter_var($password, FILTER_VALIDATE_REGEXP, array(\"options\" => array(\"regexp\" => \"((?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{4,10})\")))) {\n //da 4 a 10 caratteri, deve contenere maiuscole, minuscole e numeri\n $passwordErr = \"Invalid Password format\";\n } else\n $passwordErr = \"*\";\n }else {\n $passwordErr = 'Passwords do not match!';\n }\n return $passwordErr;\n }", "public function password_verification() {\n\n $criteria = array(\"email\" => $this->ci->input->post(\"email\"));\n\n $passed = $this->verify_password($criteria, $this->ci->input->post(\"password\")); // variable to mark the user is allowed to pass or not.\n\n if (!$passed) {\n $this->ci->form_validation->set_message(\"password_verification\", \"Invalid email or password.\");\n }\n\n return $passed;\n }", "function verifyLogin($user,$pass)\r\n\r\n{\r\n\r\n\t$salt = 's+(_a*';\r\n\r\n\t$pass = md5($pass.$salt);\r\n\r\n\r\n\r\n\t$sql = \"SELECT pass FROM users WHERE pass = '\" . $pass . \"' AND user = '\" . $user .\"'\";\r\n\r\n\t$res = sqlQuery($sql); if(sqlErrorReturn()) sqlDebug(__FILE__,__LINE__,sqlErrorReturn());\r\n\r\n\t$num = sqlNumRows($res);\r\n\r\n\r\n\r\n\tif ($num > 0)\r\n\r\n\t\treturn true;\r\n\r\n\treturn false;\t\r\n\r\n}", "function verifyemail() {\n\t$a = array(\n\t 'status' => 'system-error'\n\t);\n\n\t// raw inputs\n\t$taint_si = isset($_POST['si']) ? $_POST['si'] : 0;\n\t$taint_tic = isset($_POST['tic']) ? $_POST['tic'] : 0;\n\t$taint_pword = isset($_POST['pword']) ? $_POST['pword'] : 0;\n\n\t// validate inputs\n\t$si = validateToken($taint_si);\n\t$tic = validateTic($taint_tic);\n\t$pword = validatePword($taint_pword);\n\n\t// validate parameter set\n\tif (!$si || !$tic || !$pword) {\n\t\tLog::write(LOG_WARNING, 'attempt with invalid parameter set');\n\t\treturn $a;\n\t}\n\n\t// get db connection\n\t$conn = getConnection();\n\tif (!$conn) {\n\t\treturn $a;\n\t}\n\n\t// read token and user table\n\t$result = getUserByToken($conn, $si);\n\tif (!$result) {\n\t\treturn $a;\n\t}\n\n\t// get fields\n\t$row = pg_fetch_array($result, 0, PGSQL_ASSOC);\n\t$userid = $row['id'];\n\t$hashpassword = $row['hashpassword'];\n\t$auth = $row['auth'];\n\t$hashtic = $row['hashtic'];\n\t$oldemail = $row['email'];\n\n\t// verify user authentication state\n\tif (!isUserEmailPending($auth)) {\n\t \tLog::write(LOG_NOTICE, 'attempt to verify email on user not auth=email-pending');\n\t\treturn $a;\n\t}\n\n\t// verify the password\n\t$boo = verifyPassword($pword, $hashpassword);\n\tif (!$boo) {\n\t\tLog::write(LOG_NOTICE, 'attempt with invalid password');\n\t\treturn $a;\n\t}\n\n\t// verify the tic from the email\n\t$boo = verifyTic($tic, $hashtic);\n\tif (!$boo) {\n\t\tLog::write(LOG_NOTICE, 'attempt with invalid tic');\n\t\treturn $a;\n\t}\n\n\t// update user record\n\t$auth = DB::$auth_verified;\n\t$name = 'verify-email';\n\t$sql = \"update accounts.user set email=newemail, newemail='', auth=$1, hashtic=null, tmhashtic=null where id = $2\";\n\t$params = array($auth, $userid);\n\t$result = execSql($conn, $name, $sql, $params, true);\n\tif (!$result) {\n\t\treturn false;\n\t}\n\n\t// send security notice\n\t$boo = sendAuthenticationEmail($oldemail, 'changedemail', '');\n\tif (!$boo) {\n\t\t$a['status'] = 'send-email-failed';\n\t\treturn $a;\n\t}\n\n\t// success\n\t$a['status'] = 'ok';\n\t$a['auth'] = $auth;\n\treturn $a;\n}", "public function login($email, $password) {\n $this->db->query('SELECT * FROM users WHERE email = :email');\n // Bind the value.\n $this->db->bind(':email', $email);\n // Grab the row where the user is.\n $row = $this->db->single();\n\n // All passwords inputted to the database should be hashed.\n $hashed_password = $row->password;\n\n if(password_verify($password, $hashed_password)){\n return $row;\n } else {\n return false;\n }\n }", "private function check_email( $email, $password = '' ) {\n\t\t$email = addslashes( $email );\n\t\t$password = ( $password == '' ? '' : \"AND PASSWORD = '\".md5( addslashes( $password ) ).\"'\" );\n\t\t$query = collect( \\DB::select( \"\n\t\t\tSELECT \n\t\t\t\tCOUNT( 1 ) AS COUNT\n\t\t\tFROM \n\t\t\t\tTM_USER \n\t\t\tWHERE \n\t\t\t\tEMAIL = '{$email}'\n\t\t\t\t{$password}\n\t\t\" ) )->first();\n\t\treturn $query;\n\t}", "function verifyUser($email,$pwd){\r\n\t\t$conn = new mysqli('localhost','northoft_labtech','lab7007','northoft_petlabs') or die(\"This is an error connecting\".mysql_error());\r\n\t\t\r\n\t\t$sql = \"select salt,pwd,hospital_id, fname,lname,client_id,employee from client WHERE email = ? AND isActive = '1'\";\r\n\t\t\r\n\t\tif($stmt = $conn->prepare($sql)){\r\n\t\t\t\r\n\t\t\t$stmt->bind_param('s', $email);\r\n\t\t\t$stmt->bind_result($salt,$storedPwd,$hospital_id,$fname, $lname,$client_id,$employee);\r\n\t\t\t$stmt->execute();\r\n\t\t\t$stmt->fetch();\r\n\t\t\t\r\n\t\t\tif (sha1($pwd.$salt)==$storedPwd){\r\n\t\t\t\r\n\t\t\t\t$_SESSION['clientID'] = $client_id;\r\n\t\t\t\t$_SESSION['hospitalID'] =$hospital_id;\r\n\t\t\t\t$_SESSION['client_fn'] = $fname;\r\n\t\t\t\t$_SESSION['client_ln']=$lname;\r\n\t\t\t\t$_SESSION['employee']=$employee;\t\r\n\t\t\t\t$_SESSION['email'] = $email;\r\n\t\t\t\t$_SESSION['start']=time();\t\r\n\t\t\t\treturn true;\r\n\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t}", "public function checkEmail($data){\n $this->stmt = $this->query('SELECT * FROM users WHERE email = :email');\n $this->stmt->bindValue(':email', $data['email']);\n $row = $this->single();\n // Check row\n if($this->stmt->rowCount() > 0){\n return true;\n } else {\n return false;\n }\n\n }", "function check_login($email, $password){\n $sql = \"SELECT * from mbf_user WHERE email='$email' and password='$password'\";\n $query = $query = $this->db->query($sql);\n if ($query->num_rows() > 0){\n $row = $query->row();\n return $row;\n }else{\n return -1;\n }\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}", "public function checkCredentials( $username, $password ){\n $mysqli = $this->connect();\n\n //real_escape_string to prevent sql injection\n $username = $mysqli->real_escape_string( $username );\n $password = $mysqli->real_escape_string( $password );\n\n //hashing the 'password' value\n $password = hash( 'sha512', $password );\n\n $query = 'SELECT * FROM tbl_users \n\t\t\t\t\t WHERE email = \"'. $username .'\" \n\t\t\t\t\t\tAND password = \"'. $password .'\"';\n $result = $mysqli->query($query);\n\n //if I get a result it means the credentials are right.\n if( $result->num_rows === 1 ){\n $this->message = $result;\n $this->username = $username;\n $this->status = True;\n }else{\n $this->status = False;\n }\n }", "function authenticate($username, $pwd) {\n global $mysqli;\n return userExists($username) && passwordMatch($username, $pwd);\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 }", "function verifyUser($email, $hash){\n\t$conn = connectViaMysql();\n\t$email = mysqli_real_escape_string($conn,$email);\n\t$loginInfo = mysqli_real_escape_string($conn,$hash);\n\n\t$temp = $loginInfo;\n\techo \" <br><br><p>temp = : \". $temp . \"</p>\";\n\t$success = false;\n\ttry{\n\n\t\t$checkQuery = \"SELECT hash FROM users WHERE email='\".$email.\"' AND hash='\".$loginInfo.\"' AND active='0'\";\n\t\t$search = mysqli_query($conn, $checkQuery) or die(mysqli_error($conn)); \n\t\t$match = mysqli_num_rows($search);\n\n\t\tif($match > 0){\n\t\t\t// We have a match, activate the account\n\t\t\t$success = true;\t\n\t\t}else{\n\t\t\t$success = \"Invalid approach, please use the link that has been send to your email.\";// No match -> invalid url or account has already been activated.\n\t\t}\n\t}\n catch(PDOException $e){\n echo 'Error: ' . $e->getMessage();\n }\n\tmysqli_close($conn);\n\treturn $success;\n}", "public static function userExists($email, $pass){\n $md5pass = md5($pass);\n \n //unir los datos con las variables temporales\n $query = 'SELECT * FROM users WHERE email = :email AND password = :pass';\n\n self::getConexion();\n\n $resultado = self::$cnx->prepare($query);\n\n $resultado->bindParam(\":email\", $email);\n $resultado->bindParam(\":pass\", $pass);\n\n $resultado->execute();\n\n //si hay filas regresa true si no false\n if($resultado->rowCount()){\n return true;\n }else{\n return false;\n }\n }", "function valid_credentials($user, $pass){\n\n $user = mysqli_real_escape_string($user, $_POST['username']);\n $pass = sha1($pass);\n\n $total = mysql_query(\"SELECT COUNT('user_id') FROM 'users' WHERE 'user_name' = '{$user}' AND 'user_password' = '{$pass}'\");\n\n return (mysql_result($total, 0) == '1') ? true : false;\n\n}", "function auth($email, $password) {\n\t\t\t// connect to db\n\t\t\t$DBConnect = @mysqli_connect(\"feenix-mariadb.swin.edu.au\", \"s101664795\",\"250394\", \"s101664795_db\")\n\t\t\tOr die (\"<p>Unable to connect to the database server.</p>\". \"<p>Error code \". mysqli_connect_errno().\": \". mysqli_connect_error()). \"</p>\";\n\t\t\t\n\t\t\t// Query to fetch email from customer table\n\t\t\t$SQLstring = \"SELECT * FROM customer WHERE email_address = '\".$email.\"' and password = '\".$password.\"' \";\n\t\t\t\n\t\t\t// Execute the query, store the result set\n\t\t\t$queryResult = @mysqli_query($DBConnect, $SQLstring)\n\t\t\tOr die (\"<p>Unable to query the customer table.</p>\".\"<p>Error code \". mysqli_errno($DBConnect). \": \".mysqli_error($DBConnect)). \"</p>\";\n\n\t\t\t// if number of rows > 0, pw matches the email\n\t\t\tif (mysqli_num_rows($queryResult)>0) {\n\t\t\t\tmysqli_free_result($queryResult);\n\t\t\t\t\n\t\t\t\t// store the email in session variable\n\t\t\t\t$_SESSION['email'] = $email;\n\t\t\t\t// redirect user to booking.php, carry info\n\t\t\t\theader('Location: booking.php'); \n\t\t\t\texit();\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function DB_email_existing_check($email){\n $connection = DB_get_connection();\n $queryCheck = \"SELECT * FROM `users` WHERE Email='$email'\";\n $result = mysqli_query($connection, $queryCheck);\n if(mysqli_num_rows($result) > 0){\n \n return true;\n \n }else{\n\n return false;\n\n }\n\n}", "function emailExists(){\r\n \r\n // query to check if email exists\r\n $query = \"SELECT id, fname, lname, password,role\r\n FROM user\r\n WHERE email = ?\r\n LIMIT 0,1\";\r\n \r\n // prepare the query\r\n $stmt = $this->conn->prepare( $query );\r\n \r\n // sanitize\r\n $this->email=htmlspecialchars(strip_tags($this->email));\r\n $this->password =htmlspecialchars(strip_tags($this->password));\r\n // bind given email value\r\n $stmt->bindParam(1, $this->email);\r\n \r\n // execute the query\r\n $stmt->execute();\r\n \r\n // get number of rows\r\n $num = $stmt->rowCount();\r\n \r\n // if email exists, assign values to object properties for easy access and use for php sessions\r\n if($num>0){\r\n \r\n // get record details / values\r\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\r\n \r\n // assign values to object properties\r\n $this->id = $row['id'];\r\n $this->fname = $row['fname'];\r\n $this->lname = $row['lname'];\r\n $this->password = $row['password'];\r\n $this->user_type = $row['user_type'];\r\n \r\n // return true because email exists in the database\r\n return true;\r\n }\r\n \r\n // return false if email does not exist in the database\r\n return false;\r\n }", "function checkUser()\n\t{\n\t\t$uid = mysql_real_escape_string($_POST[\"uid\"]);\n\t\t\n\t\t$query = \"\n\t\t\tSELECT *\n\t\t\tFROM user\n\t\t\tWHERE uid='$uid';\";\n\t\t\t\n\t\t$result = mysql_query($query) or die(\"db access error\" . mysql_error());\n\t\t\n\t\t$salt = mysql_result($result, 0, \"salt\");\n\t\t$pwd = $_POST[\"pwd\"];\n\t\t$salt = (string) $salt;\n\n\t\t$pwd = md5(md5($pwd) . $salt);\n\t\t\n\t\t$query = \"\n\t\t\tSELECT *\n\t\t\tFROM user\n\t\t\tWHERE uid='$uid' and pwd='$pwd';\";\n\t\t\t\n\t\t$result = mysql_query($query) or die(\"db access error\" . mysql_error());\n\t\t\n\t\t$exists = (mysql_numrows($result) == 1) ? true : false;\n\n\t\treturn $exists;\n\t}", "function checkForAccount($email, $db) {\n $sql = 'SELECT email FROM users WHERE email = :email';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':email', $email, PDO::PARAM_STR);\n $stmt->execute();\n $matchEmail = $stmt->fetch(PDO::FETCH_NUM);\n $stmt->closeCursor();\n if(empty($matchEmail)){\n return 0;\n } else {\n return 1;\n \n }\n }", "public function DB_checkEmail($email){\n\t\ttry {\n\t\t\tparent::__construct(DB_DRIVER.':dbname='.DB_NAME.';host='.DB_HOST, DB_USERNAME, DB_PASSWORD);\n\t\t\t$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); \n\n\t\t\t$query = $this->prepare('SELECT email from '.DB_TABLE.' WHERE email = :email');\n\t\t\t$query->execute(array(\n\t\t\t':email' => $email\t\t\t\t\n\t\t\t));\n\n\t\t\tif($query->rowCount() === 1){\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch(PDOException $e){\n\t\t\techo 'ERROR: '.$e->getMessage();\n\t\t}\n\t}", "public function email_exists(){\n $email = $this->input->post('email');\n $query = $this->db->query(\"SELECT email, password FROM user WHERE email='$email'\"); \n if($row = $query->row()){\n return TRUE;\n }else{\n return FALSE;\n }\n}" ]
[ "0.7861309", "0.7700402", "0.7622779", "0.75971526", "0.758206", "0.7558894", "0.75190085", "0.74777883", "0.7432001", "0.74100816", "0.73722434", "0.7351054", "0.7350896", "0.73275816", "0.7322498", "0.7306699", "0.7291782", "0.729178", "0.7283442", "0.72537166", "0.71858233", "0.7122872", "0.70817566", "0.70518607", "0.7045084", "0.70421934", "0.7033744", "0.7026848", "0.70092845", "0.69841886", "0.6933119", "0.6924846", "0.69151974", "0.6902173", "0.68887216", "0.68819046", "0.688176", "0.68798137", "0.6869806", "0.686667", "0.6865512", "0.6859746", "0.685623", "0.6848219", "0.68328136", "0.68301946", "0.6825108", "0.6804744", "0.6784402", "0.67831534", "0.67829806", "0.67680824", "0.6767351", "0.6761669", "0.67606694", "0.6757975", "0.6751187", "0.67463344", "0.67363775", "0.67270195", "0.671896", "0.6709833", "0.67085785", "0.6707307", "0.6703976", "0.6693159", "0.66908425", "0.6683253", "0.6677344", "0.66691595", "0.6659635", "0.6658843", "0.6643898", "0.6639391", "0.66347945", "0.6629488", "0.6618239", "0.6617874", "0.6614519", "0.66113013", "0.66093534", "0.6599511", "0.6596899", "0.65962744", "0.6590149", "0.6577287", "0.6567309", "0.6560365", "0.65519243", "0.65442264", "0.654211", "0.65288126", "0.6528026", "0.651851", "0.65136594", "0.651264", "0.6510173", "0.6508904", "0.6508762", "0.650524", "0.65028167" ]
0.0
-1
If a user account has a failed login more than 5 times their account is locked. Prevent brute force attempt.
function checkbrute($user_id, $pdo) { global $delay_before_login; // Get timestamp of current time $now = time(); // All login attempts are counted from the past 15 minutes. $valid_attempts = $now - ($delay_before_login); $max_tolerate_attempts = 5000; //count = total of brute force $statement = $pdo->query("SELECT count(*) from login_attempt where la_desc = 'brute force attempt'"); $result = $statement->fetch(PDO::FETCH_OBJ); $count = $result->count; if ($count >= 1) { $max_tolerate_attempts = $count * $max_tolerate_attempts; } if ($stmt = $pdo->prepare("SELECT la_time FROM Login_Attempt WHERE la_app_user_id = ? AND la_time > $valid_attempts AND la_success = false AND la_desc = 'incorect password'")) { $stmt->bindParam(1, $user_id, PDO::PARAM_INT); // Execute the prepared query. $stmt->execute(); // If there has been more than 5 failed logins if($stmt->rowCount() >= $max_tolerate_attempts) { return true; } else { return false; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function verifyAttempts(){\n //if($sql->rowCount > 5){\n //echo 'Limite de tentativas de login excedido!';\n //exit;\n }", "public function checkTooManyFailedAttempts()\n {\n if (! RateLimiter::tooManyAttempts($this->throttleKey(), 10)) {\n return;\n }\n\n throw new Exception(__('controller.auth.login_attempts'), 401);\n }", "public function checkTooManyFailedAttempts()\n {\n \n if (! RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {\n return;\n }\n\n throw new \\Exception('IP address banned. Too many login attempts, please waite for 3 minutes and Try again!');\n }", "function errorlog_login_failed($username) {\n global $limit_login_just_lockedout;\n if ($limit_login_just_lockedout) errorlog_do_action(ERRORLOG_METHOD, 'ban');\n}", "private function checkbrute() {\n $now = time();\n\n // All login attempts are counted from the past 2 hours.\n $valid_attempts = $now - (2 * 60 * 60);\n\n if ($query = $this->db->prepare(\"SELECT COUNT(*) FROM authLogins WHERE userId = ? AND time > ?\")\n ) {\n // Execute the prepared query.\n $query->execute([$this->userId, $valid_attempts]);\n\n // If there have been more than 5 failed logins\n if ($query->fetch()[0] > 5) {\n $this->isLogin = true;\n } else {\n $this->isLogin = false;\n }\n }\n\n return $this->isLogin;\n }", "function is_max_login_attempts_exceeded()\n\t{\n\t\t$this->ci->load->model('dx_auth/login_attempts', 'login_attempts');\n\t\t\n\t\treturn ($this->ci->login_attempts->check_attempts($this->ci->input->ip_address())->num_rows() >= $this->ci->config->item('DX_max_login_attempts'));\n\t}", "function check_attempted_login( $user, $username, $password ) {\n if ( get_transient( 'attempted_login' ) ) {\n $datas = get_transient( 'attempted_login' );\n if ( $datas['tried'] >= 3 ) {\n $until = get_option( '_transient_timeout_' . 'attempted_login' );\n $time = time_to_go( $until );\n return new WP_Error( 'too_many_tried', sprintf( __( '<strong>ERRO</strong>: o limite de tentativas de login foi atingido, tente novamente novamente em %1$s.' ) , $time ) );\n }\n }\n return $user;\n }", "public function tooManyFailedLogins()\n\t{\n\t\treturn $this->FailedLoginAttempts >\n\t\t\tYii::app()->params['authentication']['accountLocking']['failedLogins'];\n\t}", "function checkBrute($user_id, $mysqli) {\n\t\t// Get timestamp of current time \n\t\t$now \t= time();\n\t\t// All login attempts are counted from the past 2 hours. \n\t\t$valid_attempts = $now - (2 * 60 * 60);\n\t\t\n\t\t$ini \t= strtoupper($user_id);\n\t\t$stmt \t= $mysqli->prepare(\"SELECT * from app_users_login_attempts where user_id = '$ini' AND time > '$valid_attempts'\");\n\t\t$stmt->execute();\n\t\t\n\t\t$count \t= $stmt->rowCount(); \n\t\t// If there have been more than 5 failed logins \n\t\tif ($count >= 5) {\t\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function ip_login_attempts_exceeded()\n {\n // Compare users IP address against any failed login IP addresses.\n $sql_where = array(\n $this->auth->tbl_col_user_account['failed_login_ip'] => $this->input->ip_address(),\n $this->auth->tbl_col_user_account['failed_logins'].' >= ' => $this->auth->auth_security['login_attempt_limit']\n );\n\n $query = $this->db->where($sql_where)\n ->get($this->auth->tbl_user_account);\n\n return $query->num_rows() > 0;\n }", "function ban_loginFailed($args) {\n $ip = $_SERVER['REMOTE_ADDR']; \n if ( $this->isWhitelisted($ip) ) {\n rcube::write_log('bruteforcebreaker', sprintf(\"Whitelist login for %s.\", $ip));\n return $args;\n }\n \n $this->load_ipban();\n \n if (!isset($this->data_ban['FAILURES'][$ip])) \n $this->data_ban['FAILURES'][$ip] = 0;\n $this->data_ban['FAILURES'][$ip]++;\n if ($this->rc->config->get('bruteforcebreaker_keep_trace', true)) \n rcube::write_log('bruteforcebreaker', sprintf(\"Login failed for %s. Number of attemps: %d.\", $ip, $this->data_ban['FAILURES'][$ip]));\n \n if ($this->data_ban['FAILURES'][$ip] > ($this->rc->config->get('bruteforcebreaker_nb_attemps', 5) -1 )) {\n $this->data_ban['BANS'][$ip] = time() + $this->rc->config->get('bruteforcebreaker_duration', 1800);\n if ($this->rc->config->get('bruteforcebreaker_keep_trace', true)) \n rcube::write_log('bruteforcebreaker', sprintf(\"IP address banned from login - too many attemps (%s).\", $ip));\n }\n\n $this->write_ipban();\n return $args;\n }", "public function loginUserConditionDoesNotMatchSingleLoggedInUser() {}", "public function isExceededAttempts()\n { \n $attempts = $this->con->prepare(\"SELECT attempts, last_attempts FROM login_attempts WHERE user_id = ? AND ip = ? \");\n $attempts->bind_param('is', $this->user_id, $this->ip);\n $attempts->execute();\n $attempts->store_result();\n $attempts->bind_result( $number_attempts, $last_attempts);\n $attempts->fetch();\n $rows_attempts = $attempts->num_rows;\n $attempts->free_result();\n $attempts->close();\n \n if( $attempts and $rows_attempts > 0)\n {\n $last_attempts = $this->calcIntervalAttempts($last_attempts);\n if($number_attempts >= self::$max_attempts and $last_attempts <= self::$time_bloq)\n {\n return self::$time_bloq - $last_attempts;\n } \n else\n {\n return false;\n }\n }\n else\n {\n return false;\n }\n }", "public function check_login_attempts($ip_address) {\n\t\t$max_login_attempts = 3;\n\t\t$max_locked_time = 600; // locked at 30 minutes\n\t\t$login_attempts = $this->CI->m_users->check_login_attempts($ip_address);\n\t\tif ($login_attempts) {\n\t\t\tif ($login_attempts->counter >= $max_login_attempts) {\n\t\t\t\t$datetime = strtotime($login_attempts->updated_at);\n\t\t\t\t$difference = time() - $datetime;\n\t\t\t\tif ($difference >= $max_locked_time) {\n\t\t\t\t\t$this->clear_login_attempts($ip_address);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn true;\n\t}", "public function max_login_attempts(){\n\t\t\t\n\t\t\t$username = strtolower($this->input->post('username'));\n\t\t\t\n\t\t\t$date = date(\"Y-m-d H:i:s\",time());\n\t\t\t$date = strtotime($date);\n\t\t\t$min_date = strtotime(\"-1 day\", $date);\n\t\t\t\n\t\t\t$max_date = date('Y-m-d H:i:s', time());\n\t\t\t$min_date = date('Y-m-d H:i:s', $min_date);\n\t\t\t\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('failed_logins');\n\t\t\t$this->db->where('username', $username);\n\t\t\t\n\t\t\t$this->db->where(\"attempt_time BETWEEN '$min_date' AND '$max_date'\", NULL, FALSE);\n\n\t\t\t$query = $this->db->get();\n\t\t\t\n\t\t\tif ($query->num_rows() < 3){\t\n\t\t\t\treturn TRUE;\t\n\t\t\t}else {\t\n\t\t\t\t$this->form_validation->set_message('max_login_attempts', 'You have surpassed the allowed number of login attempts in 24 hours! Please contact Customer Service!');\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}", "public function block()\n {\n $blocker = Yii::$app->cache->get('login_blocker_' . $this->getIp());\n \n if ($blocker === false) {\n $blocker = [1, time(), 0];\n } else { \n $blocker[0]++;\n \n if ($blocker[0] == $this->wrong_login_number) {\n $blocker[1] = time() + $this->time; \n }\n }\n \n Yii::$app->cache->set('login_blocker_' . $this->getIp(), $blocker, $this->time);\n\n return true;\n }", "function NewFailedLoginAttempt($ip,$user) {\r\n global $dbUser;\r\n global $dbPass;\r\n global $dbName;\r\n global $connection;\r\n $nip=strip_tags($ip);\r\n $nuser=strip_tags($user);\r\n $anyFail=$connection->query(\"select * from accessres where username='$nuser'\") or die(json_encode(array(\"err\"=>mysqli_error($connection))));\r\n //if ($anyFail->num_rows>0) {\r\n $failrow=$anyFail->fetch_assoc();\r\n $failtime=date(\"Y-m-d H:i:s\");\r\n if($failrow[\"attempt\"]==0 || $anyFail->num_rows==0) {\r\n SetAccessRestriction($nip,$nuser,$failtime,1);\r\n return true; // First time fail\r\n }\r\n elseif ($failrow[\"attempt\"]==1) { //You must change this number with fail attempt limit you'd like to \r\n SetAccessRestriction($nip,$nuser,$failtime,2);\r\n return false; //Access restricted\r\n }\r\n //}\r\n }", "function login_attempts()\n {\n // delete older attempts\n $older_time = date('Y-m-d H:i:s', strtotime('-' . $this->config->item('login_max_time') . ' seconds'));\n\n $sql = \"\n DELETE FROM login_attempts\n WHERE attempt < '{$older_time}'\n \";\n\n $query = $this->db->query($sql);\n\n // insert the new attempt\n $sql = \"\n INSERT INTO login_attempts (\n ip,\n attempt\n ) VALUES (\n \" . $this->db->escape($_SERVER['REMOTE_ADDR']) . \",\n '\" . date(\"Y-m-d H:i:s\") . \"'\n )\n \";\n\n $query = $this->db->query($sql);\n\n // get count of attempts from this IP\n $sql = \"\n SELECT\n COUNT(*) AS attempts\n FROM login_attempts\n WHERE ip = \" . $this->db->escape($_SERVER['REMOTE_ADDR'])\n ;\n\n $query = $this->db->query($sql);\n\n if ($query->num_rows())\n {\n $results = $query->row_array();\n $login_attempts = $results['attempts'];\n if ($login_attempts > $this->config->item('login_max_attempts'))\n {\n // too many attempts\n return FALSE;\n }\n }\n\n return TRUE;\n }", "function isUserAllowedToAcess2ndLoginForm() {\n\t\t\t\tglobal $loginAttempts;\n\t\t\t\tglobal $loginForm;\n\t\t\t\t$loginAttempts = array_slice($loginAttempts, -5);\n\t\t\t\tif (count($loginAttempts) > 4) {\n\t\t\t\t\tif ($loginAttempts[0][0] === 'fail' && $loginAttempts[1][0] === 'fail' && $loginAttempts[2][0] === 'fail'&& $loginAttempts[3][0] === 'fail'&& $loginAttempts[4][0] === 'fail') {\n\n\t\t\t\t\t\t$failedLoginTime = new DateTime($loginAttempts[4][1]);\n\t\t\t\t\t\t$failedLoginTime->modify(\"+12 hours\");\n\n\t\t\t\t\t\t//https://stackoverflow.com/questions/5906686/php-time-remaining-until-specific-time-from-current-time-of-page-load\n\t\t\t\t\t\t$now = new DateTime();\n\t\t\t\t\t\t$future_date = new DateTime($loginAttempts[4][1]);\n\t\t\t\t\t\t$interval = $failedLoginTime->diff($now);\n\t\t\t\t\t\t$remainingTime = $interval->format(\"%h hours %i minutes %s seconds\");\n\n\n\t\t\t\t\t\t$failedDateTime = new DateTime($loginAttempts[4][1]);\n\t\t\t\t\t\t$failedDateTime->modify(\"+12 hours\");\n\t\t\t\t\t\t$failedDateTimePlus12Hours = $failedDateTime->format(\"Y-m-d H:i:s\");\n\n\t\t\t\t\t\tif (date(\"Y-m-d H:i:s\") < $failedDateTimePlus12Hours) {\n\t\t\t\t\t\t\techo \"You've had too many failed attempts to log in. You have <strong>\" . $remainingTime . \"</strong> till you can try again.\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo $loginForm;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo $loginForm;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\techo $loginForm;\n\t\t\t\t}\n\t\t\t}", "function checkbrute($user_id, $db) {\n $now = time();\n \n // All login attempts are counted from the past 2 hours. \n $valid_attempts = $now - (2 * 60 * 60);\n \n if ($stmt = $db->prepare(\"SELECT time \n FROM login_attempts \n WHERE user_id = ? \n AND time > '\".$valid_attempts.\"'\")) {\n $stmt->bind_param('i', $user_id);\n \n // Execute the prepared query. \n $stmt->execute();\n $stmt->store_result();\n \n // If there have been more than 5 failed logins \n if ($stmt->num_rows > 5) {\n return true;\n } else {\n return false;\n }\n }\n}", "function checkbrute($email, $mysqli) {\n $now = time();\n // All login attempts are counted from the past 2 hours. \n $valid_attempts = $now - (2 * 60 * 60); \n \n if ($stmt = $mysqli->prepare(\"SELECT time FROM login_attempts WHERE email = ? AND time > '$valid_attempts'\")) { \n $stmt->bind_param('i', $email); \n // Execute the prepared query.\n $stmt->execute();\n $stmt->store_result();\n // If there has been more than 5 failed logins\n if($stmt->num_rows > 5) {\n return true;\n } else {\n return false;\n }\n }\n}", "public function checkAccountAccess()\n\t{\n\t\tif (!$this->isActive())\n\t\t\tthrow new Exception(Yii::t('user', 'account_no_longer_active'));\n\n\t\tif ($this->tooManyFailedLogins())\n\t\t\tthrow new Exception(Yii::t('user', 'account_locked_failed_logins'));\n\t}", "public function loginAttempts($userName, $option=FALSE){\n\n $blockTime = \\Phalcon\\DI::getDefault()->getShared('config')->brute->block_time * 60;\n\n $user = Users::findFirst(array('username=:username:', 'bind' => array(':username' => $userName)));\n if($user){\n $userId = $user->id;\n }else{\n // user didn't even get the user name right\n $userId = NULL;\n }\n\n $footprint = md5(\\Phalcon\\DI::getDefault()->getShared('request')->getClientAddress() . \\Phalcon\\DI::getDefault()->getShared('request')->getUserAgent());\n // if clearing attempts after successful login\n if($option == 'clear'){\n $toDelete = FailedLogins::find(array('conditions' => 'user_id=:user_id: OR time <' . (time() - 60 * 60 * 24* 365), 'bind' => array(':user_id' => $userId)));\n if(count($toDelete) > 0){\n $toDelete->delete();\n return TRUE;\n }\n }\n $captcha = FALSE;\n $block = FALSE;\n // get attempts so far\n if(is_numeric($userId)) {\n // if username was correct\n $attemptsDb = FailedLogins::find(array('conditions' => '(user_id=:user_id: OR footprint=:footprint:) AND time >' . (time() - $blockTime), 'bind' => array(':user_id' => $userId, ':footprint' => $footprint)));\n $attempts = count($attemptsDb);\n }else{\n // if username was not correct - we search on footprint only\n $attemptsDb = FailedLogins::find(array('conditions' => 'footprint=:footprint: AND time >' . (time() - $blockTime), 'bind' => array(':footprint' => $footprint)));\n $attempts = count($attemptsDb);\n }\n\n\n if($option != 'state') {\n // increment the number of attempts\n $attempts++;\n // generate record in DB\n $fail = new FailedLogins();\n $fail->user_id = $userId;\n $fail->time = time();\n $fail->ip = \\Phalcon\\DI::getDefault()->getShared('request')->getClientAddress();\n $fail->useragent = \\Phalcon\\DI::getDefault()->getShared('request')->getUserAgent();\n $fail->footprint = $footprint;\n $fail->save();\n }\n\n // carry out blocks\n if($attempts >= 1 && $attempts <= 3){\n if($option != 'state') {\n sleep($attempts * 2); // throttle speed to slow them down\n }\n }else if($attempts > 3 && $attempts < 10){\n if($option != 'state') {\n sleep($attempts); // throttle attempts for longer and longer\n }\n $captcha = TRUE; // now we start using captcha\n }else if($attempts >= 10){\n if($option != 'state') {\n sleep($attempts); // throttle attempts for longer and longer\n }\n $captcha = TRUE; // now we start using captcha\n $block = TRUE; // block the login form\n }\n return array('attempts' => $attempts, 'attempts_left' => (10 - $attempts), 'captcha' => $captcha, 'block' => $block);\n }", "public function isAccountNonLocked()\r\n {\r\n return true;\r\n }", "public function isAccountNonLocked(){\n return true;\n }", "function checkbrute($user_id, $mysqli)\n{\n // Get timestamp of current time\n $now = time();\n // All login attempts are counted from the past 2 hours.\n $valid_attempts = $now - (2 * 60 * 60);\n\n if ($stmt = $mysqli->prepare(\"SELECT time FROM login_attempts WHERE usr_id = ? AND time > '$valid_attempts'\")) {\n $stmt->bind_param('i', $usr_id);\n // Execute the prepared query.\n $stmt->execute();\n $stmt->store_result();\n // If there has been more than 5 failed logins\n if ($stmt->num_rows > 5) {\n return true;\n } else {\n return false;\n }\n }\n}", "public function setLoginTries($email){\n \n $this->con->query(\"UPDATE user SET lock_count=lock_count+1 WHERE email='\".$email.\"';\");\n }", "private function failedAuthentication(Player $player)\n {\n $counter = $player->getFailedLoginAttempts();\n $player->setFailedLoginAttempts(++$counter);\n $limit = $this->messages->get('app.acc.attempts');\n /**\n * If counter's value equals (or exceeds) number 3 –\n * ban player and send him message by email and/or browser,\n * that he has just been banned.\n * \n * Exceeding number 3 is possible,\n * if counting procedure failed previous time(s). \n * Adding \"greater than\" character to comparision operator prevents\n * further mistakes by adding this possibility to blocking procedure.\n */\n if ($counter >= $limit) {\n /**\n * Ban player\n */\n $player->setEnabled(false);\n $player->setBlockedToken(Uuid::uuid4()->toString());\n /**\n * Send email with link to unblock account.\n * If message delivering fails, prepare message to player,\n * that he should send email to administrator about disabling,\n * if he want to enable account.\n * Else prepare message to player, that his account is disabled\n */\n $email = $player->getEmail();\n $title = $this->messages->get('app.acc.banned.msg.title');\n $part = $this->messages->get('app.acc.banned.msg');\n $url = $this->router->generate(\n 'enable',\n ['blocked_token' => $player->getBlockedToken()],\n UrlGeneratorInterface::ABSOLUTE_URL\n );\n $content = $part.$url;\n $name = $this->emailer->sendEmail($email, $title, $content) ?\n 'app.acc.banned.email' : 'app.mail.fail';\n $this->flasher->add($name);\n }\n /**\n * Change entry updating date\n */\n $player->setEntryUpdatingDate(new \\DateTime());\n $this->entityManager->persist($player);\n $this->entityManager->flush();\n }", "private function loginFailed()\n {\n //Login failed...\n }", "public function isAccountNonLocked() : bool\n {\n return true;\n }", "public function isAccountNonLocked()\n {\n return true;\n }", "protected function maxLoginAttempts()\n {\n return Arr::get(static::$config, 'attempts', 5);\n }", "function checkbrute($user_id, $mysqli) {\n $now = time();\n $valid_attempts = $now-(2*60*60);\n\n if ($stmt = $mysqli->prepare(\"SELECT time FROM login_attempts WHERE user_id = ? AND time > ?\")) {\n $stmt->bind_param('ii', $user_id, $valid_attempts);\n $stmt->execute();\n $stmt->store_result();\n if ($stmt->num_rows > 5) {\n //means that it has previous error login attempts in the past X minutes\n return true;\n }\n else {\n //clear to go\n return false;\n } \n } \n }", "public function authenticate() {\r\n $db = db_connect();\r\n $statement = $db->prepare(\"select Username, Password from users WHERE Username = :name;\");\r\n $statement->bindValue(':name', $this->username);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n $hash_pwd = $rows[0]['Password'];\r\n $password = $this->password;\r\n\r\n if (!password_verify($password, $hash_pwd)) {\r\n $attempt = 1;\r\n $statement = $db->prepare(\"select * from logfail WHERE Username = :name;\");\r\n $statement->bindValue(':name', $this->username);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n $attempt_number = $rows[0]['Attempt'];\r\n\r\n if ($attempt_number >= 3) {\r\n sleep(60);\r\n $statement = $db->prepare(\"UPDATE logfail SET Attempt = :attempt WHERE Username = :user\");\r\n $statement->bindValue(':user', $this->username);\r\n $statement->bindValue(':attempt', 0);\r\n $statement->execute();\r\n $this->auth = false;\r\n } else if ($rows) {\r\n $attempt = $attempt_number + 1;\r\n $statement = $db->prepare(\"UPDATE logfail SET Attempt = :attempt WHERE Username = :user\");\r\n $statement->bindValue(':user', $this->username);\r\n $statement->bindValue(':attempt', $attempt);\r\n $statement->execute();\r\n } else {\r\n\r\n $statement1 = $db->prepare(\"INSERT INTO logfail (Username, Attempt)\"\r\n . \"VALUES (:username, :attempt); \");\r\n $statement1->bindValue(':username', $this->username);\r\n $statement1->bindValue(':attempts', $attempt);\r\n $statement1->execute();\r\n }\r\n $this->auth = false;\r\n } else {\r\n $this->auth = true;\r\n $_SESSION['username'] = $rows[0]['Username'];\r\n $_SESSION['password'] = $rows[0]['Password'];\r\n }\r\n }", "public function maxAttempts(): int\n {\n return 5;\n }", "public function isAccountNonLocked()\n {\n return true;\n }", "public function isAccountNonLocked()\n {\n return true;\n }", "public function isAccountNonLocked()\n {\n return true;\n }", "public function isAccountNonLocked()\n {\n return true;\n }", "public function isAccountNonLocked()\n {\n return true;\n }", "public function isAccountNonLocked()\n {\n return true;\n }", "protected function hasTooManyLoginAttempts ($request) {\n $maxLoginAttempts = 10;\n $lockoutTime = 1; // 1 minutes\n return $this->limiter()->tooManyAttempts(\n $this->throttleKey($request), $maxLoginAttempts, $lockoutTime\n );\n }", "function checkbrute($user_id, $mysqli)\n{\n $now = time();\n\n // All login attempts are counted from the past 2 hours. \n $valid_attempts = $now - (2 * 60 * 60);\n\n if ($stmt = $mysqli->prepare(\"SELECT time FROM login_attempts WHERE user_id = ? AND time > '$valid_attempts'\")) {\n $stmt->bind_param('i', $user_id);\n\n // Execute the prepared query. \n $stmt->execute();\n $stmt->store_result();\n\n // If there have been more than 5 failed logins \n if ($stmt->num_rows > 5) {\n return true;\n } else {\n return false;\n }\n }\n}", "private function sessionBruteForceLock($userId)\n {\n if (empty($userId)) {\n // block all request from this IP\n $userId = 0;\n }\n $userIP = Yii::$app->request->userIP;\n\n $model = UserLoginLockout::find()->where(['ip' => $userIP, 'user_id' => $userId])->one();\n\n if (!$model) {\n $model = new UserLoginLockout();\n $model->user_id = $userId;\n $model->ip = $userIP;\n $model->attempt_count = 0;\n\n if (!$model->save()) {\n throw new InvalidConfigException(\"error while storing the model.\" . var_export($model->getErrors(), true));\n }\n } else {\n // reset the attempt count if lockout time has been passed\n if ((time() - $model->updated_at) > $this->module->loginSessionAttemptLockoutTime) {\n $model->updateAttributes(['attempt_count' => 0]);\n }\n }\n\n $model->updateCounters(['attempt_count' => 1]);\n\n\n if ($model->attempt_count >= $this->module->loginSessionAttemptCount) {\n return $model->updated_at + $this->module->loginSessionAttemptLockoutTime;\n }\n\n $model->touch('updated_at');\n\n\n return false;\n }", "protected function authorizeBlock()\n {\n try {\n $select = $this->db->select();\n $select->from('gems__user_login_attempts', array('UNIX_TIMESTAMP(gula_block_until) - UNIX_TIMESTAMP() AS wait'))\n ->where('gula_block_until is not null')\n ->where('gula_login = ?', $this->getLoginName())\n ->where('gula_id_organization = ?', $this->getCurrentOrganizationId())\n ->limit(1);\n\n // Not the first login\n if ($block = $this->db->fetchOne($select)) {\n if ($block > 0) {\n $minutes = intval($block / 60) + 1;\n\n // Report all is not well\n return sprintf($this->plural('Your account is temporarily blocked, please wait a minute.', 'Your account is temporarily blocked, please wait %d minutes.', $minutes), $minutes);\n\n } else {\n // Clean the block once it's past\n $values['gula_failed_logins'] = 0;\n $values['gula_last_failed'] = null;\n $values['gula_block_until'] = null;\n $where = $this->db->quoteInto('gula_login = ? AND ', $this->getLoginName());\n $where .= $this->db->quoteInto('gula_id_organization = ?', $this->getCurrentOrganizationId());\n\n $this->db->update('gems__user_login_attempts', $values, $where);\n }\n }\n\n } catch (\\Zend_Db_Exception $e) {\n // Fall through as this does not work if the database upgrade did not run\n // \\MUtil_Echo::r($e);\n }\n\n return true;\n }", "public function resetFailedLoginAttempts()\n {\n $this->data['failed_login_attempts'] = 0;\n }", "private function checkFailure() : void\n {\n $failure = (int) $this->session->get('failure', 0);\n $time = (int) $this->session->get('failure_time', time());\n if ($failure >= static::FAILURE) {\n if ($time >= time()) {\n throw new \\DomainException($this->i18n->t(\n 'setrun/user',\n 'Form is blocked for {min} minutes',\n ['min' => static::FAILURE_TIME / 60])\n );\n }\n $this->removeFailure();\n }\n }", "function checkbrute($user_id) {\r\n $now = time();\r\n\r\n // Alle Login-Versuche der letzten zwei Stunden werden gezählt.\r\n $valid_attempts = $now - (2 * 60 * 60);\r\n\r\n if ($stmt = $this->mysqli->prepare(\"SELECT time FROM login_attempts\r\n WHERE id_cb_user = ? AND time > '$valid_attempts'\")) {\r\n $stmt->bind_param('i', $user_id);\r\n\r\n // Führe die vorbereitet Abfrage aus. \r\n $stmt->execute();\r\n $stmt->store_result();\r\n\r\n // Wenn es mehr als 5 fehlgeschlagene Versuche gab \r\n if ($stmt->num_rows > 5) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }", "public function update_failed_logins(){\n\n\t}", "public function retryAttempted()\n {\n $this->attempts++;\n }", "function ForceLogin($UserIDorUsername)\n\t{\n\t\t$UserID=$this->GetUserID($UserIDorUsername);\n\t\tj::$Session->Login($this->Username($UserID),\"\",true);\n\t\tj::SQL(\"UPDATE jfp_xuser SET FailedLoginAttempts=0 , LockTimeout=? , LastLoginTimestamp=? , TemporaryResetPasswordTimeout=? WHERE ID=? LIMIT 1\",time(),time(),time(),$UserID);\n\t\treturn true;\n\t}", "function failed_access_blocker_adminGate($allow, $page) {\n\t//\tclean out expired attempts\n\t$sql = 'DELETE FROM '.prefix('plugin_storage').' WHERE `type`=\"failed_access\" AND `aux` < \"'.(time()-getOption('failed_access_blocker_timeout')*60).'\"';\n\tquery($sql);\n\t//\tadd this attempt\n\t$sql = 'INSERT INTO '.prefix('plugin_storage').' (`type`, `aux`,`data`) VALUES (\"failed_access\", \"'.time().'\",\"'.getUserIP().'\")';\n\tquery($sql);\n\t//\tcheck how many times this has happened recently\n\t$sql = 'SELECT COUNT(*) FROM '.prefix('plugin_storage'). 'WHERE `type`=\"failed_access\" AND `data`=\"'.getUserIP().'\"';\n\t$result = query($sql);\n\t$count = db_result($result, 0);\n\tif ($count >= getOption('failed_access_blocker_attempt_threshold')) {\n\t\t$block = getOption('failed_access_blocker_forbidden');\n\t\tif ($block) {\n\t\t\t$block = unserialize($block);\n\t\t} else {\n\t\t\t$block = array();\n\t\t}\n\t\t$block[getUserIP()] = time();\n\t\tsetOption('failed_access_blocker_forbidden',serialize($block));\n\t}\n\treturn $allow;\n}", "public function setLoginAdminTries($username){\n \n $this->con->query(\"UPDATE admin SET lock_count=lock_count+1 WHERE username='\".$username.\"';\");\n }", "public function isAccountNonLocked() {\n return true;\n }", "function Lock($UserID)\n\t{\n\t\tj::SQL(\"UPDATE jfp_xuser SET LockTimeout=? , FailedLoginAttempts=0 WHERE ID=? LIMIT 1\",time()+$this->LockInterval,$UserID);\n\t}", "function is_max_login_attempts_exceeded($login)\n\t{\n\t\tif ($this->ci->config->item('login_count_attempts', 'syndicates')) {\n\t\t\t$this->ci->load->model('login_attempts');\n\t\t\treturn $this->ci->login_attempts->get_attempts_num($this->ci->input->ip_address(), $login)\n\t\t\t\t\t>= $this->ci->config->item('login_max_attempts', 'syndicates');\n\t\t}\n\t\treturn FALSE;\n\t}", "function checkbrute($user_id, $mysqli) {\r\n $now = time();\r\n\r\n // All login attempts are counted from the past 2 hours. \r\n $valid_attempts = $now - (2 * 60 * 60);\r\n\r\n if($stmt = $mysqli->prepare(\"SELECT time \r\n FROM cmoss_login_attempts \r\n WHERE user_id = ? AND time > '$valid_attempts'\")) {\r\n $stmt->bind_param('i', $user_id);\r\n\r\n // Execute the prepared query. \r\n $stmt->execute();\r\n $stmt->store_result();\r\n\r\n // If there have been more than 5 failed logins \r\n if($stmt->num_rows > 5) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n } else {\r\n // Could not create a prepared statement\r\n header(\"Location: ../error.php?err=Database error: cannot prepare statement\");\r\n exit();\r\n }\r\n}", "public function isLocked()\n {\n $cache = \\System::getContainer()->get('contao.cache');\n\n if ($cache->contains('login-count')) {\n return intval($cache->fetch('login-count')) >= 3;\n }\n\n return false;\n }", "public function attempts();", "public function countAuthAttempts()\n {\n $previous = Mage::getSingleton('core/session')->getCCAttempts();\n\n if(!$previous)\n {\n $previous = 1;\n } else {\n $previous++;\n }\n\n Mage::getSingleton('core/session')->setCCAttempts($previous);\n }", "function errorlog_is_limitlogin() {\n return defined(LIMIT_LOGIN_LOCKOUT_NOTIFY_ALLOWED);\n}", "public function checkLimitedInvalidPassword(Step_05 $I)\n {\n $I->LoginFuntion_05('leanhanh','leanh','leanh', 'lean','leanh','leanh');\n $I->waitForElementVisible(Login_Page::$limitedPassword,10);\n }", "public function resetAttempts()\n {\n $reset_attempts = $this->con->query(\"DELETE FROM login_attempts WHERE user_id = '$this->user_id' AND ip = '$this->ip' \");\n return ($reset_attempts) ? true : false ; \n }", "public function addLoginAttempt($value, $username) {\r\n // set last login attempt time if required\r\n \t $q = \"SELECT * FROM \".TBL_ATTEMPTS.\" WHERE ip = '$value' and username = '$username'\";\r\n \t $result = $this->conn->query($q);\r\n \t $data = mysqli_fetch_array($result); //$result->fetch_assoc(); // mysql_fetch_array($result);\r\n\r\n\r\n \t if($data)\r\n {\r\n $attempts = $data[\"attempts\"]+1;\r\n $locked = 1;\r\n\r\n if($attempts == 3) {\r\n \t\t $q = \"UPDATE \".TBL_ATTEMPTS.\" SET attempts=\".$attempts.\", lastlogin=NOW() WHERE ip = '$value' and username = '$username'\";\r\n \t\t $result = $this->conn->query($q);\r\n\r\n $q1 = \"UPDATE \".TBL_USERS.\" SET locked=\".$locked.\" WHERE username = '$username'\";\r\n \t\t $result1 = $this->conn->query($q1);\r\n\r\n $subject = \"Access denied for \".TIME_PERIOD.\" minutes\";\r\n $message = 'Login failed. You have entered the incorrect credentials multiple times and your account is now locked' ;\r\n sendEmail($subject, $message);\r\n \t\t}\r\n else {\r\n \t\t $q = \"UPDATE \".TBL_ATTEMPTS.\" SET attempts=\".$attempts.\" WHERE ip = '$value' and username = '$username'\";\r\n \t\t $result = $this->conn->query($q);\r\n \t\t}\r\n }\r\n else {\r\n \t $q = \"INSERT INTO \".TBL_ATTEMPTS.\" (attempts,IP,lastlogin,username) values (1, '$value', NOW(), '$username')\";\r\n \t $result = $this->conn->query($q);\r\n \t }\r\n }", "public function getFailedLoginsCount()\n {\n return (int) $this->getConfigValue('lockoutexpirationlogin', 0);\n }", "public function lockAccount(&$user)\r\n {\r\n $failedLoginCount = $user->getFailedLoginCount();\r\n if($failedLoginCount == $this->initialLockAttempt)\r\n {\r\n $user->setLockDuration(Carbon::now()->addSeconds($this->initialLockDuration));\r\n }\r\n elseif($failedLoginCount > $this->initialLockAttempt)\r\n {\r\n $failedLoginCount -= $this->initialLockAttempt;\r\n if($failedLoginCount%$this->intervalLockAttempt == 0)\r\n {\r\n $lockDuration = $failedLoginCount/$this->intervalLockAttempt * $this->intervalLockDuration;\r\n $lockDuration += $this->initialLockDuration;\r\n $user->setLockDuration(Carbon::now()->addSeconds($lockDuration));\r\n }\r\n }\r\n }", "protected function _handle_count_fail()\n\t{\n\t\t$count_max = mod('deposit_card')->setting('fail_count_max');\n\t\t$block_timeout = mod('deposit_card')->setting('fail_block_timeout') * 60;\n\n\t\tif (!$count_max) return;\n\n\t\t$count = model('ip')->action_count_change('deposit_card_fail', 1);\n\n\t\tif ($count >= $count_max) {\n\t\t\t$ip = t('input')->ip_address();\n\n\t\t\tmodel('ip_block')->set($ip, $block_timeout);\n\t\t\tmodel('ip')->action_count_set('deposit_card_fail', 0);\n\t\t}\n\t}", "public static function userLoginFailed(){\n self::$IntelligenceService->addToIntelligenceStack(self::USER_INTELLIGENCE_LOGIN_KEY, self::USER_INTELLIGENCE_FAILED);\n }", "private function checkLoginAttempts(Request $request)\n {\n // the login attempts for this application. We'll key this by the username and\n // the IP address of the client making these requests into this application.\n if (\n method_exists($this, 'hasTooManyLoginAttempts') &&\n $this->hasTooManyLoginAttempts($request)\n ) {\n $this->fireLockoutEvent($request);\n\n return $this->sendLockoutResponse($request);\n }\n }", "protected function isLoginInProgress() {}", "public static function attempts($user)\n {\n return self::totalAttempts($user) < 5 ? true : false;\n }", "private static function brute_force($userID, \\mysqli $dbc)\r\n {\r\n $now = time();\r\n\r\n //Set the time for two hours (7200 seconds) in the past\r\n $checkTime = $now - 7200;\r\n\r\n if ($result = $dbc->prepare('select * from login_attemps where ID = ? and \\'time\\' > ' . $checkTime)) {\r\n $result->bind_param('i', $userID);\r\n $result->execute();\r\n $result->store_result();\r\n\r\n //If there was more than 5 attempts return true\r\n if ($result->num_rows > 5) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n //There was something that went wrong don't let the login attempt to go further\r\n return true;\r\n }", "private function increase_login_attempt($username)\n\t{\n\t\tif ($this->ci->config->item('login_count_attempts', 'syndicates')) {\n\t\t\tif (!$this->is_max_login_attempts_exceeded($username)) {\n\t\t\t\t$this->ci->load->model('login_attempts');\n\t\t\t\t$this->ci->login_attempts->increase_attempt($this->ci->input->ip_address(), $username);\n\t\t\t}\n\t\t}\n\t}", "function loginFail($user){ \n\t\t$con=conexion();\n\t\t$sql=\"SELECT * FROM log_login WHERE usuario='$user'\";\n\t\t$registro=mysqli_query($con, $sql) or die (mysqli_error($con));\n\t\tif(mysqli_num_rows($registro)==0){\n\t\t\t$time=time();\n\t\t\t$sql=\"INSERT INTO log_login (fecha, usuario) VALUES ('$time', '$user')\";\n\t\t\t$insert=mysqli_query($con, $sql) or die (mysqli_error($con));\n\t\t}\n\t\telse{\n\t\t\t$sql=\"SELECT * FROM log_login WHERE usuario='$user'\";\n\t\t\t$registro=mysqli_query($con, $sql) or die (mysqli_error($con));\n\t\t\twhile($reg=mysqli_fetch_array($registro)){\n\t\t\t\t$id=$reg['id'];\n\t\t\t\t$intentos=$reg['intentos'];\n\t\t\t\tif($intentos<2){\n\t\t\t\t\tif(checkTime($reg['fecha'])){\n\t\t\t\t\t\tborrarLog($id);\n\t\t\t\t\t\tloginFail($user);\n\t\t\t\t\t}\n\t\t\t\t\telse{ \n\t\t\t\t\t\t$mas= $intentos+1; \n\t\t\t\t\t\t$sql=\"UPDATE log_login SET intentos='$mas' WHERE id='$id'\";\n\t\t\t\t\t\t$set=mysqli_query($con, $sql) or die (mysqli_error($con));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tbloquear($user);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tmysqli_close($con);\n\t}", "function Unlock($UserID)\n\t{\n\t\tj::SQL(\"UPDATE jfp_xuser SET LockTimeout=? , FailedLoginAttempts=0 WHERE ID=? LIMIT 1\",time(),$UserID);\n\t}", "public function is_user_disabled() \n {\n $conn = $this->conn;\n $login = $this->login;\n \n $clogin = $conn->GetOne(\"SELECT login FROM users WHERE login = '\".$login.\"' AND expires > '\".gmdate('Y-m-d H:i:s').\"'\");\n \n if ($clogin == '') \n {\n $this->conn->Execute(\"UPDATE users SET enabled=0 WHERE login= '\".$login.\"'\");\n }\n \n $conf = $GLOBALS['CONF'];\n $lockout_duration = intval($conf->get_conf(\"unlock_user_interval\")) * 60; \n \n \n $params = array($login);\n $query = \"SELECT * FROM users WHERE login = ? AND enabled <= 0\";\n \n $rs = $conn->Execute($query, $params); \n \n if (!$rs) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n \n return FALSE;\n }\n \n if (!$rs->EOF) \n {\n // User must be unlocked by admin\n if ($lockout_duration == 0 || $rs->fields['enabled'] == 0) \n { \n return TRUE; \n }\n \n //Auto-enable if account lockout duration expires\n if (time() - strtotime($rs->fields['last_logon_try']) >= $lockout_duration) \n {\n $conn->Execute('UPDATE users SET enabled = 1 WHERE login=?', $params);\n \n return FALSE;\n }\n \n return TRUE;\n }\n \n return FALSE;\n }", "protected function isFailedLastLoginAttempt()\n {\n $select = sprintf(\"\n SELECT\n session_timestamp,\n ip,\n success\n FROM\n %sfaquser\n WHERE\n user_id = %d\n AND\n ('%d' - session_timestamp) <= %d\n AND\n ip = '%s'\n AND\n success = 0\",\n PMF_Db::getTablePrefix(),\n $this->getUserId(),\n $_SERVER['REQUEST_TIME'],\n $this->lockoutTime,\n $_SERVER['REMOTE_ADDR']\n );\n\n $result = $this->config->getDb()->query($select);\n if ($this->config->getDb()->numRows($result) !== 0) {\n return true;\n } else {\n return false;\n }\n }", "protected function checkLoginAttempts($email)\n\t{\n\t\t/**\n\t\t* Get attempts from DB and check with predefined field\n\t\t* All login attempts are counted from the past 1 hours. \n\t\t**/\n\t\t$login_attempts = $this->loginModel->checkAttempts($email);\n\t\tif ($login_attempts && ($login_attempts['count'] >= 4) && strtotime('-1 hour') < strtotime($login_attempts['date_modified'])) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}", "public function loginUserConditionDoesNotMatchIfNotUserIsLoggedId() {}", "function enforce_temporary_passwords($member)\n{\n if ((get_forum_type() == 'cns') && (running_script('index')) && ($member != db_get_first_id()) && (!$GLOBALS['IS_ACTUALLY_ADMIN']) && ($GLOBALS['FORUM_DRIVER']->get_member_row_field($member, 'm_password_compat_scheme') == 'temporary') && (get_page_name() != 'lost_password') && ((get_page_name() != 'members') || (get_param_string('type', 'browse') != 'view'))) {\n require_code('users_active_actions');\n _enforce_temporary_passwords($member);\n }\n}", "function addFailedAttempt($UserName,$FailedCount,$UserId){\n\t\t$this->db->sql('update users set failed_logins=failed_logins+1 where username=:username');\n\t\t$this->db->addParam(\":username\",$UserName);\n\t\t$this->db->execute();\n\t\t\n\t\t//let log the entry\n\t\t$this->db->sql('insert into user_audit_login_fail (user_id,user_name,date_time,ip_address)values(:user_id,:user_name,:date_time,:ip_address)');\n\t\t$this->db->addParam(\":user_id\",$UserId);\n\t\t$this->db->addParam(\":user_name\",$UserName);\n\t\t$this->db->addParam(\":date_time\",date(\"Y-m-d H:i:s\") );\n\t\t$this->db->addParam(\":ip_address\",$_SERVER['REMOTE_ADDR']);\n\t\t$this->db->execute();\n\t\t\n\t\t//if the login failure gets to big lets lock the account and give the user a locked message\n\t\tif( $FailedCount > $this->security_max_fails_before_lock ){\n\t\t\t$this->db->sql('update users set is_locked=1,locked_message=:locked_message where username=:username');\n\t\t\t$this->db->addParam(\":username\",$UserName);\n\t\t\t$this->db->addParam(\":locked_message\",$this->security_max_fails_lock_message);\n\t\t\t$this->db->execute();\n\t\t}\n\t}", "private function IncreaseFailedLoginAttempts($UserID)\n\t{\n\t\tj::SQL(\"UPDATE jfp_xuser SET FailedLoginAttempts=FailedLoginAttempts+1 WHERE ID=? LIMIT 1\",$UserID);\n\t}", "function try_login() {\n $error = '';\n $sid = '';\n $uid = null;\n \n if (!isset($_REQUEST[\"user\"]) && !isset($_REQUEST[\"password\"])) {\n return array(\n 'sid' => '',\n 'error' => NULL,\n );\n }\n \n $dbh = DB::connect();\n $uid = uid_from_username($_REQUEST[\"user\"]);\n \n if (user_suspended($uid)) {\n $error = \"Account suspended\";\n return array(\n 'SID' => '',\n 'error' => $error,\n );\n } elseif (passwd_is_empty($uid)) {\n $error = \"Password is either reset, or new account was created and email confirmation link was not clicked!\";\n return array(\n 'SID' => '',\n 'error' => $error,\n );\n } elseif (!valid_passwd($uid, $_REQUEST[\"password\"])) {\n $error = \"Bad username or password\";\n return array(\n 'SID' => '',\n 'error' => $error,\n );\n }\n\n $logged_in = 0;\n $num_tries = 0;\n\n while (!$logged_in && $num_tries < 5) {\n $session_limit = config_get_int('options', 'max_sessions_per_user');\n if ($session_limit) {\n $q = \"DELETE s.* \";\n $q.= \"FROM Sessions s \";\n $q.= \"LEFT JOIN (SELECT sid FROM Sessions \";\n $q.= \"WHERE uid = \" . $uid . \" \";\n $q.= \"ORDER BY ts DESC \";\n $q.= \"LIMIT \" . ($session_limit - 1) . \") q \";\n $q.= \"ON s.sid = q.sid \";\n $q.= \"WHERE s.uid = \" . $uid . \" \";\n $q.= \"AND q.sid IS NULL\";\n $dbh->query($q);\n }\n\n $sid = new_sid();\n $q = \"INSERT INTO Sessions (uid, sid, ts) \";\n $q.= \"VALUES (\" . $uid . \", '\" . $sid . \"', UNIX_TIMESTAMP())'\";\n $result = $dbh->exec($q);\n\n if (!$result) {\n $logged_in = 1;\n break;\n }\n\n $num_tries += 1;\n }\n\n if (!$logged_in) {\n $error = \"An error occurred trying to create a user session.\";\n return array(\n 'SID' => $sid,\n 'error' => $error,\n );\n }\n\n $q = \"UPDATE Users \";\n $q.= \"SET last_login_ts = UNIX_TIMESTAMP(), last_ip = \" . $dbh->quote($_SERVER['REMOTE_ADDR'] . \" \");\n $q.= \"WHERE uid = \" . $uid;\n $dbh->exec($q);\n\n if (isset($_POST['remember']) && $_POST['remember'] == \"yes\") {\n $timeout = config_get_int('options', 'cookie_timeout');\n $cookie_time = time() + $timeout;\n\n $q = \"UPDATE Sessions SET ts = $cookie_time \";\n $q.= \"WHERE sid = '$sid'\";\n $dbh->exec($q);\n } else {\n $cookie_time = 0;\n }\n\n setcookie('PSID', $sid, $cookie_time, \"/\", NULL, !empty($_SERVER['HTTPS']), true);\n\n $referrer = in_request('referrer');\n if (strpos($referrer, pw_location()) !== 0) {\n $referrer = \"/\";\n }\n header(\"Location: \" . get_uri($referrer));\n $error = \"\";\n}", "public function failedLoginAttempts() : int\n {\n return (isset($this->data['failed_login_attempts'])) ? (int)$this->data['failed_login_attempts'] : 0;\n }", "private function reset_login_attempts($identity) {\n if (empty($identity)) {\n return FALSE;\n }\n\n $login_data = array(\n $this->auth->tbl_col_user_account['failed_login_ip'] => '',\n $this->auth->tbl_col_user_account['failed_logins'] => 0,\n $this->auth->tbl_col_user_account['failed_login_ban_date'] => 0\n );\n\n $this->db->update($this->auth->tbl_user_account, $login_data, array($this->auth->primary_identity_col => $identity));\n\n return $this->db->affected_rows() == 1;\n }", "private function clear_login_attempts($username)\n\t{\n\t\tif ($this->ci->config->item('login_count_attempts', 'syndicates')) {\n\t\t\t$this->ci->load->model('login_attempts');\n\t\t\t$this->ci->login_attempts->clear_attempts($this->ci->input->ip_address(),$username,\n\t\t\t$this->ci->config->item('login_attempt_expire', 'syndicates'));\n\t\t}\n\t}", "function lock() {\n if (!authenticated()) {\n header('Location: ' . R . 'auth/?referer=' . $_SERVER['REQUEST_URI']);\n exit();\n }\n}", "public function isLocked() {}", "function login($email, $password, $dbcon) {\n\t\tglobal $max_tolerate_attempts, $delay_before_login;\n\t // Using prepared Statements means that SQL injection is not possible.\n\t \n\t if ($stmt = $dbcon->prepare(\"SELECT u_id, u_last_name, u_first_name, u_password, u_salt, u_profile_picture FROM app_user WHERE u_email = ? LIMIT 1\")) { \n\t $stmt->bindParam(1, $email, PDO::PARAM_STR); // Bind \"$email\" to parameter.\n\t $stmt->execute(); // Execute the prepared query.\n\t $result = $stmt->fetch(PDO::FETCH_OBJ);\n\t $user_id = $result->u_id;\n\t $username = $result->u_last_name;\n\t $db_password = $result->u_password;\n\t $salt = $result->u_salt;\n\t $password = hash('sha512', $password.$salt); // hash the password with the unique salt.\n\t $now = time();\n\t \n\t if($stmt->rowCount() == 1) \n\t { // If the user exists\n\t \n\t \n\t $statement = $dbcon->query(\"SELECT as_banned, as_delay_login FROM Account_State WHERE as_app_user_id = $user_id\");\n\t\t\t$result = $statement->fetch(PDO::FETCH_OBJ);;\n\t\t\t$isBanned = $result->as_banned;\n\t\t\t$loginDelay = $result->as_delay_login;\n\n\t\t\tif ($isBanned == true) //check if account banned\n\t\t\t{\n\t\t\t\t\n\t\t\t\t//write log\t\n\t\t\t\t$dbcon->query(\"INSERT INTO Login_Attempt (la_app_user_id, la_time, la_success, la_desc) VALUES ($user_id, $now, 'false', 'banned user trying to log')\");\n\t \t\n\t \treturn false;\n\t\t\t}\n\t\t\t\n\t\t\tif($loginDelay > $now)//check if login delay is not respected\n\t\t\t{\n\t\t\t\t//write log\t\n\t \t$dbcon->query(\"INSERT INTO Login_Attempt (la_app_user_id, la_time, la_success, la_desc) VALUES ($user_id, $now, 'false', 'user must wait delay before login')\");\n\t \theader(\"Location: ./index.php?error=\" . urlencode(\"User must wait $delay_before_login seconds before login.\"));\n\t \texit();\n\t\t\t}\n\t \n\n\t // We check if this is a bruteforce attempt\n\t if(checkbrute($user_id, $dbcon) == true) \n\t { \n\t \n\t //add delay for the next attempt\n\t $delay = $now + ($delay_before_login);\n\t $dbcon->query(\"UPDATE Account_State SET as_delay_login = $delay WHERE as_app_user_id = $user_id\");\n\t \n\t //if brute force attempt was already tried, banned account\n\t $statement = $dbcon->query(\"SELECT as_brute_force FROM Account_State WHERE as_app_user_id = $user_id\");\n\t\t\t\t$result = $statement->fetch(PDO::FETCH_OBJ);\n\t\t\t\t$bruteforceCount = $result->as_brute_force;\n\t\t\t\t$dbcon->query(\"UPDATE Account_State SET as_brute_force = $bruteforceCount+1 WHERE as_app_user_id = $user_id\");\n\n\t\t\t\t//we ban the user at 2 brute force and change the password\n\t if ($bruteforceCount > 1) {\n\t \t$dbcon->query(\"UPDATE Account_State SET as_banned = 'true' WHERE as_app_user_id = $user_id\");\n\t \t//write log\n\t \t\t$dbcon->query(\"INSERT INTO Login_Attempt (la_app_user_id, la_time, la_success, la_desc) VALUES ($user_id, $now, 'false', '2 brute force : user is permanently banned')\");\n\n\n\t \t\t//change the password\n\t \t\t$newPass = hash('sha512', 'banned');\n\t \t\t$newPass = hash('sha512', $newPass.$salt);\n\t \t\t\t$dbcon->query(\"UPDATE App_User SET u_password = '$newPass' WHERE u_id = $user_id\");\n\t \t\t\t\n\t \t\t\t//send email with new password\n\t \t\t\t$headers ='From: \"GTI619\"<[email protected]>'.\"\\n\";\n\t\t\t\t $headers .='Content-Type: text/plain; charset=\"utf-8\"'.\"\\n\"; \n\t\t\t\t $message = \"Une tentative de brute force à été faite sur votre compte, nous avons changé temporairement votre mot de passe. Nous vous suggérons fortement de changer votre mot de passe temporaire le plus tôt possible. Mot de passe temporaire :\";\n\t \t\t\tmail('[email protected]', 'Changement de mot de passe', $message, $headers);\n\t \t\theader(\"Location: ./index.php?error=\" . urlencode(\"Une tentative de brute force à été faite sur votre compte, nous avons changé temporairement votre mot de passe.\"));\n\t \t\texit();\n\t }\n\t \n\n\t //write log\n\t \t$dbcon->query(\"INSERT INTO Login_Attempt (la_app_user_id, la_time, la_success, la_desc) VALUES ($user_id, $now, 'false', 'brute force attempt')\");\n\n\t return false;\n\t } \n\t else \n\t {\n\t \tif($db_password == $password) \n\t \t{ // Check if the password in the database matches the password the user submitted. \n\t\t\t\t// Password is correct!\n\n\t\t\t\t$user_browser = $_SERVER['HTTP_USER_AGENT']; // Get the user-agent string of the user.\n\n\t\t\t\t$user_id = preg_replace(\"/[^0-9]+/\", \"\", $user_id); // XSS protection as we might print this value\n\t\t\t\t$_SESSION['user_id'] = $user_id; \n\t\t\t\t$username = preg_replace(\"/[^a-zA-Z0-9_\\-]+/\", \"\", $username); // XSS protection as we might print this value\n\t\t\t\t$_SESSION['username'] = $username;\n\t\t\t\t$_SESSION['login_string'] = hash('sha512', $password.$user_browser);\n\t\t\t\t//write this in th Login Attemps\n\t\t\t\t$dbcon->query(\"INSERT INTO Login_Attempt (la_app_user_id, la_time, la_success) VALUES ($user_id, $now, 'true')\");\n\t\t\t\t// Login successful.\n\t\t\t\treturn true; \n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t// Password is not correct\n\t\t\t\t// We record this attempt in the database\n\t\t\t\t\n\t\t\t\t$dbcon->query(\"INSERT INTO Login_Attempt (la_app_user_id, la_time, la_success, la_desc) VALUES ($user_id, $now, 'false', 'incorect password')\");\n\t\t\t\treturn false;\n\t\t\t\t}\n\n\t \t}\n\t } \n\t else \n\t {\n\t // No user exists.\n\t \n\t return false;\n\t }\n\t }\n\t}", "function m_checkLogin()\n\t{\n\t\t$this->libFunc->obDb = $this->obDb;\n\t\t$myreturn = $this->libFunc->m_checkAttempts(trim($this->request['email']));\n\t\tif($myreturn[0] == 0)\n\t\t{\n\t\t\t$this->obDb->query= \"select vFirstName,iCustmerid_PK FROM \".CUSTOMERS.\" WHERE vEmail = '\".$this->request['email'].\"' AND vPassword=PASSWORD('\".$this->request['password'].\"') AND iRegistered=1 \";\n\t\t\t$qryRs = $this->obDb->fetchQuery();\n\t\t\t$rCount=$this->obDb->record_count;\n\n\t\t\tif($rCount==1) \n\t\t\t{\n\t\t\t\t$_SESSION['username']=$qryRs[0]->vFirstName;\n\t\t\t\t$_SESSION['userid']=$qryRs[0]->iCustmerid_PK;\n\t\t\t\t$this->m_generateToken();\n\t\t\t\tif(isset($this->request['save_info']))\n\t\t\t\t{\n\t\t\t\t\tsetcookie(\"email\",$this->request['email']);\n\t\t\t\t\tsetcookie(\"password\",$this->request['password']);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsetcookie(\"email\",\"\");\n\t\t\t\t\tsetcookie(\"password\",\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\t$this->libFunc->m_addLoginAttempt($myreturn[0],$myreturn[1],$myreturn[2],trim($this->request['email']));\n\t\t\t\t$this->err=1;\n\t\t\t\t$this->errMsg=MSG_INVALID_USER;\n\t\t\t}\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->libFunc->m_addLoginAttempt($myreturn[0],$myreturn[1],$myreturn[2],trim($this->request['email']));\n\t\t\tswitch($myreturn[0])\n\t\t\t{\n\t\t\t\tcase 1:\n\t\t\t\t\t$this->err=1;\n\t\t\t\t\t$this->errMsg=\"You have been temporarily blocked. Please try again in 15 minutes.\";\n\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t$this->err=1;\n\t\t\t\t\t$this->errMsg=\"You have been temporarily blocked. Please try again in 1 hour. You can unblock your account by resetting your password.\";\n\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t$this->err=1;\n\t\t\t\t\t$this->errMsg=\"You have been temporarily blocked. Please try again in 24 hours. You can unblock your account by resetting your password.\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $this->err;\n\t}", "public function disableAccountForAuthFailures($user_id){\r\n\tglobal $pdo;\r\n\ttry{\r\n\t$update = $pdo->prepare(\"UPDATE users \r\n\tSET `status_reason` = ?, `status` = 0\r\n\tWHERE id = ?\");\r\n\t$update->execute(array('auth_failure', $user_id));\r\n\t}\r\n\tcatch(PDOException $e){\r\n\t\t$this->setError($e->getMessage());\r\n\t\treturn false;\r\n\t}\r\n\t// Also remove failed login attempts\r\n\t// from the log table\r\n\t$this->user_id = $user_id;\r\n $this->removeFailedLoginAttempts();\r\n\t$this->user_id = null;\r\n\treturn true;\r\n}", "protected function increase_attemps()\r\n {\r\n $_SESSION['ATTEMPS'] = (isset($_SESSION['ATTEMPS']) ? $_SESSION['ATTEMPS']++ : 0);\r\n $this->display_login();\r\n }", "private function increment_login_attempts($identity, $attempts) {\n if (empty($identity) || !is_numeric($attempts)) {\n return FALSE;\n }\n\n $attempts++;\n $time_ban = 0;\n\n // Length of time ban in seconds.\n if ($attempts >= $this->auth->auth_security['login_attempt_limit']) {\n // Set time ban message.\n $this->set_error_message('login_attempts_exceeded', 'config');\n\n $time_ban = $this->auth->auth_security['login_attempt_time_ban'];\n\n // If failed attempts continue for more than 3 times the limit, increase the time ban by a factor of 2.\n if ($attempts >= ($this->auth->auth_security['login_attempt_limit'] * 3)) {\n $time_ban = ($time_ban * 2);\n }\n\n // Set time ban as a date.\n $time_ban = $this->database_date_time($time_ban);\n }\n\n // Record users ip address to compare future login attempts.\n $login_data = array(\n $this->auth->tbl_col_user_account['failed_login_ip'] => $this->input->ip_address(),\n $this->auth->tbl_col_user_account['failed_logins'] => $attempts,\n $this->auth->tbl_col_user_account['failed_login_ban_date'] => $time_ban\n );\n\n $this->db->update($this->auth->tbl_user_account, $login_data, array($this->auth->primary_identity_col => $identity));\n\n return $this->db->affected_rows() == 1;\n }", "public function isAccountNonLocked()\r\n {\r\n return !($this->locked);\r\n }", "function login($username, $password, $mysqli) {\n\tif ($stmt = $mysqli->prepare ( \"SELECT id, password, salt FROM users WHERE user_name = ? LIMIT 1\" )) {\n\t\t$stmt->bind_param ( 's', $username );\n\t\t$stmt->execute ();\n\t\t$stmt->store_result ();\n\t\t$stmt->bind_result ( $user_id, $db_password, $salt );\n\t\t$stmt->fetch ();\n\t\t$password = hash ( 'sha512', $password . $salt );\n\t\t\n\t\tif ($stmt->num_rows == 1) {\n\t\t\tif (checkbrute ( $user_id, $mysqli ) == true) {\n\t\t\t\techo \"<script>alert('You have entered the incorrect password too many times. Your account is locked for 10 minutes.');window.location.href = \\\"../login.php\\\";</script>\";\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tif ($db_password == $password) {\n\t\t\t\t\t$user_browser = $_SERVER ['HTTP_USER_AGENT'];\n\t\t\t\t\t$user_id = preg_replace ( \"/[^0-9]+/\", \"\", $user_id );\n\t\t\t\t\t$_SESSION ['user_id'] = $user_id;\n\t\t\t\t\t$username = preg_replace ( \"/[^a-zA-Z0-9_\\-]+/\", \"\", $username );\n\t\t\t\t\t$_SESSION ['username'] = $username;\n\t\t\t\t\t$_SESSION ['login_string'] = hash ( 'sha512', $password . $user_browser );\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\t$now = time ();\n\t\t\t\t\t$mysqli->query ( \"INSERT INTO login_attempts(user_id, time) VALUES ('$user_id', '$now')\" );\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n}", "function check_if_ban_is_in_order($id, $max = 3)\r\n\t{\r\n\t\tglobal $dbCon;\r\n\r\n\t\t$sql = \"SELECT COUNT(id) AS bad_logins FROM login_attempts WHERE student_id = ? AND time > SUBDATE(NOW(), INTERVAL 5 MINUTE) AND login_success = 0;\";\r\n\t\t$stmt = $dbCon->prepare($sql); //Prepare Statement\r\n\t\tif ($stmt === false)\r\n\t\t{\r\n\t\t\ttrigger_error('SQL Error: ' . $dbCon->error, E_USER_ERROR);\r\n\t\t}\r\n\t\t$stmt->bind_param('i', $id);\r\n\t\t$stmt->execute(); //Execute\r\n\t\t$stmt->bind_result($bad_logins); //Get ResultSet\r\n\t\t$stmt->fetch();\r\n\t\t$stmt->close();\r\n\r\n\t\tif ($bad_logins >= $max)\r\n\t\t{\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t\treturn FALSE;\r\n\t}", "protected function setLoginAttempt()\n {\n $update = sprintf(\"\n UPDATE\n %sfaquser\n SET\n session_timestamp ='%s',\n ip = '%s',\n success = 0\n WHERE\n user_id = %d\",\n PMF_Db::getTablePrefix(),\n $_SERVER['REQUEST_TIME'] + $this->lockoutTime,\n $_SERVER['REMOTE_ADDR'],\n $this->getUserId()\n );\n\n return $this->config->getDb()->query($update);\n }", "public function verifySuspiciousLogin()\n {\n return $this->getBoolean('verify_login_attempt_on_suspicious_login');\n }", "public function isConcurrentUsersExceeded()\n {\n $concurrent_user_count = $this->concurrentUserCount();\n $users_allowed_count = $this->usersAllowedCount();\n $user_waiting_count = 1;\n if (($concurrent_user_count + $user_waiting_count) > $users_allowed_count)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function isAccountNonLocked()\n {\n return ! $this->locked;\n }" ]
[ "0.7288667", "0.70762527", "0.694726", "0.6795861", "0.670402", "0.6606038", "0.65549165", "0.6520058", "0.64543784", "0.64356726", "0.64217144", "0.62567234", "0.61860263", "0.61748785", "0.61559784", "0.61532897", "0.6142553", "0.6139284", "0.6136165", "0.6125477", "0.61220706", "0.6115507", "0.6104634", "0.60985076", "0.60896295", "0.6086014", "0.60852385", "0.6076691", "0.607535", "0.6071203", "0.605501", "0.60514003", "0.60498124", "0.6031808", "0.60098624", "0.60078436", "0.60078436", "0.60078436", "0.60078436", "0.60078436", "0.60078436", "0.59953743", "0.5991939", "0.59767103", "0.59691507", "0.5968523", "0.5958499", "0.59442633", "0.5931167", "0.5894152", "0.5891836", "0.588845", "0.5877148", "0.58766764", "0.5854698", "0.5832305", "0.58138114", "0.5800708", "0.5785986", "0.5774484", "0.5761806", "0.57499814", "0.57425827", "0.57365", "0.5734117", "0.57051075", "0.5696425", "0.5691203", "0.5687595", "0.56856835", "0.56843156", "0.56750184", "0.566382", "0.56624544", "0.56600356", "0.5656532", "0.56562984", "0.56448156", "0.563378", "0.56282157", "0.56232953", "0.5608386", "0.56045055", "0.5584548", "0.5569543", "0.55643666", "0.5561153", "0.5559229", "0.555445", "0.552652", "0.5518358", "0.5495449", "0.5491319", "0.54714704", "0.54670036", "0.5466756", "0.546469", "0.54591995", "0.5458876", "0.545316" ]
0.63968563
11
Check logged in status. Prevent session hijacking.
function login_check($pdo) { // Check if all session variables are set if(isset($_SESSION['user_id'], $_SESSION['username'], $_SESSION['login_string'])) { $user_id = $_SESSION['user_id']; $login_string = $_SESSION['login_string']; $username = $_SESSION['username']; $user_browser = $_SERVER['HTTP_USER_AGENT']; // Get the user-agent string of the user. if ($stmt = $pdo->prepare("SELECT u_password FROM App_User WHERE u_id = ? LIMIT 1")) { $stmt->bindParam(1, $user_id, PDO::PARAM_INT); // Bind "$user_id" to parameter. $stmt->execute(); // Execute the prepared query. //$stmt->store_result(); if($stmt->rowCount() == 1) { // If the user exists $result = $stmt->fetch(PDO::FETCH_OBJ); $password = $result->u_password; // $stmt->bind_result($password); // get variables from result. // $stmt->fetch(); $login_check = hash('sha512', $password.$user_browser); if($login_check == $login_string) { // Logged In!!!! return true; } else { // Not logged in return false; } } else { // Not logged in return false; } } else { // Not logged in return false; } } else { // Not logged in return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkLoginStatus()\n\t{\n\t\tif (isset($_SESSION[$this->sess_auth]) || isset($_SESSION[$this->sess_cookie_auth])) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function GetUserLoggedInStatus()\n {\n \n $this->User_Logged_In = isset($_SESSION['USER_LOGIN']['LOGIN_RECORD']) ? true : false;\n }", "function loggedin() {return $this->login_state!=0;}", "protected function isUserLoggedIn() {}", "protected function isUserLoggedIn() {}", "public function check_login()\n\t{\n\t\tif(isset($_SESSION[\"user_id\"]))\n\t\t{\n\t\t $this->_user_id = $_SESSION[\"user_id\"];\n\t\t\t$this->_client = $_SESSION[\"client\"];\n\t\t\t$this->_loged_in = true;\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_loged_in = false;\n\t\t\t$this->_client = false;\n\t\t\tunset($this->_user_id);\n\t\t}\n\t}", "private function checkIfLoggedIn()\n {\n if (!session()->has('user')) {\n abort(403, 'You are not logged in.');\n }\n }", "static public function isLoggedIn(){\n \treturn (self::getInstance()->getId()>1);\n }", "function checkloginStatus()\n {\n if (isset($_SESSION['loggedIn']))\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "private function _logged_in()\n {\n /*if(someone is logged in)\n RETURN TRUE;*/\n }", "public static function check_log_in ()\n {\n session_start();\n\n if (!$_SESSION['user_data']) {\n header('Location: ./../index.php');\n exit;\n }\n }", "function checkLoginStatus() // Check if user is logged in.\n\t{\n\t\tif(!$_SESSION['loggedIn'])\n\t\t{\n\t\t\theader(\"Location: login.html\");\n\t\t\texit();\n\t\t}\n\t}", "public function check_login(){\n\t\t\tif( isset( $_SESSION['user_id'] ) ) {\n\t\t\t\t$this->user_id = $_SESSION['user_id'];\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset( $this->user_id );\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "public function is_logged_in() {\n\n\t}", "public function isCurrentlyLoggedIn() {}", "public static function isLoggedIn(){\n if(!self::exists('is_logged_in')&& self::get('is_logged_in')!==true){\n \n header('location:' . URL . 'user/login.php');\n exit;\n }\n }", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "private function isLoggedin()\n\t{\n\t\t$this->idletime = 18000;\n\n\t\tif ((time()-$_SESSION['timestamp'])>$this->idletime)\n\t\t{\n\t\t\t$message = \"You are signed out from the previous session ! Please try sign in again!\";\n\t\t\t$this->logout($message);\n\t\t}\n\t\telseif($this->logged_in() == false)\n\t\t{\n\t\t\t$message = \"Invalid session !! Please try sign in again.\";\n\t\t\t$this->logout($message);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_SESSION['timestamp'] = time();\n\t\t}\n\t}", "public function isloggedin()\n {\n return Session::userIsLoggedIn();\n }", "function checkSession()\n {\n if( !$this->session->userdata( 'logged_in' ) )\n redirect( 'login' );\n\n if ( $this->session->userdata( 'level' ) != 'guidance' )\n redirect( 'standard/unauthorized' );\n }", "function LoggedIn() {\n if(session_status() == PHP_SESSION_NONE){\n return \"0\"; \n }\n }", "public function login_status()\n {\n if (isset($_SESSION['user_login_status']) AND $_SESSION['user_login_status'] == 1) {\n return true;\n }\n // default return\n return false;\n }", "public function checkLoggedIn() {\r\n\t\t$bLoggedIn = Mage::getSingleton('customer/session')->isLoggedIn();\r\n\t\tif (!$this->checkAllowed()) {\r\n\t\t\t$bLoggedIn = false;\r\n\t\t}\r\n\t\treturn $bLoggedIn;\r\n\t}", "function checkLogin() { //Determine status of the user in current session\n\n\t//If a user is currently logged in\n\tif(isset($_SESSION['userID'])) {\n\n\t\tlogout(); //Display components to allow user to logout\n\n\t} else {\n\n\t\tlogin(); //Otherwise display components to allow a guest to login\n\n\t}\n\n}", "public function checkUserLogin()\n {\n if (isset($_SESSION[\"user_id\"])) {\n $status = true;\n } else {\n $status = false;\n }\n return $status;\n }", "function check_logged_only() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies: \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n foreach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n if (!array_key_exists($_SESSION[\"logged\"],$USERS)) {\n return FALSE;\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return TRUE;\n }", "public function isLoggedIn() {\n $auth_cookie = Cookie::get(\"auth_cookie\"); //get hash from browser\n //check if cookie is valid\n if ($auth_cookie != '' && $this->cookieIsValid($auth_cookie)) {\n return true;\n } else {\n return false;\n }\n }", "public function isLoggedIn()\n {\n return true;\n }", "function logged_in() {\r\n\t\treturn isset($_SESSION[\"admin_id\"]);\r\n\t}", "private function check_the_login(){\n \n if(isset($_SESSION['login_user'])){\n \n $this->login_user = $_SESSION['login_user'];\n $this->signed_in = true;\n \n }else{\n unset($this->login_user);\n $this->signed_in = false;\n }\n \n }", "protected function isLoggedIn()\n\t{\n\t\treturn is_user_logged_in();\n\t}", "public static function isLoggedIn(): bool {\n return Session::instance()->has(AccessControl::SESSION_AUTH_KEY);\n }", "public function loggedIn(){\r\n if (isset($_SESSION['user_session']))\r\n return true;\r\n else\r\n return false;\r\n }", "function is_logged_in()\n\t{\n\t\treturn require_login();\n\t}", "public function isLoggedIn() {\n $cookie = $this->login();\n return $cookie != NULL;\n }", "public function checkLoggedIn()\n\t\t{\n\t\t\t\n\t\t\ttry {\n\t\t\t \n\t\t\t\t$query = $this->_db->prepare( \"SELECT username FROM login WHERE username=:username\" );\n \n \n\t\t\t\t$query->bindParam( \":username\", $_SESSION[ 'username' ], PDO::PARAM_STR );\n\n\t\t\t\t$query->execute();\n\t\t\t\n\t\t\t} catch ( PDOException $e ) {\n\n\t\t\t\techo $e->getMessage();\n\n\t\t\t}\n\n\t\t\t$row = $query->fetch();\n\t\t\t\n \n\t\t\t$loggedInUser = $row[ 'username' ];\n \n //if the user is not logged in\n\t\t\tif( !isset( $loggedInUser ) )\n\t\t\t{\n //head to the log in page\n\t\t\t\theader( 'Location: login.php' );\n\n\t\t\t}\n\t\t\t\n\t\t}", "public static function isLoggedIn(){\r\n\t\treturn isset($_SESSION[\"id\"]);\r\n\t}", "protected function check_logged_in(){\n\n\t\t$this->load->model('patoauth/patoauth_model', 'patoauth');\n\n\t/*\n\t\tTRY TO AUTOLOGIN */\n\n\t\tif(! $this->patoauth->is_logged_in())\n\t\t\t$this->patoauth->autologin();\n\n\t/*\n\t\tIF STILLS NO LOGGED IN GET OUT OF HERE */\n\n\t\tif(! $this->patoauth->is_logged_in())\n\t\t\tredirect(site_url('auth/login'));\n\t}", "public function ingelogd() {\n\t\t\treturn $this->bLoggedIn;\n\t\t}", "function checkLoggedIn(){\n if (session_status()!==PHP_SESSION_ACTIVE) {\n session_start();\n }\n if(!isset($_SESSION['EMAIL'])){\n return false;\n }else return true;\n }", "public function isLoggedIn();", "public function isLoggedIn();", "public function isLoggedIn(){\n\t\tif(!$this->connected){\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->apiCall('checklogin');\n\t}", "private function check_login()\n {\n if (self::exists('user_id')) {\n $this->user_id = self::get('user_id');\n $this->logged_in = true;\n } else {\n unset($this->user_id);\n $this->logged_in = false;\n }\n }", "public function loggedIn() {\r\n //if userID is not proper then return False.\r\n if (intval($this->id) <= 0) {\r\n return False;\r\n }\r\n // if we last checked for login under a second ago then return true.\r\n if (($this->id == $_SESSION['id']) && $_SESSION['lastLoginCheckTime'] > microtime(true) - 1) {\r\n return True;\r\n } elseif (isset($_SESSION['switched_user'])) {\r\n $checkID = $_SESSION['switched_user'];\r\n } else {\r\n $checkID = $this->id;\r\n }\r\n $thisUserInfo = $this->dbConn->queryFirstRow(\"SELECT `ip` FROM `usermap` WHERE `user_id` = \".intval($checkID).\" ORDER BY `last_date` DESC LIMIT 1\");\r\n if (!$thisUserInfo || $thisUserInfo['ip'] != $_SERVER['REMOTE_ADDR']) {\r\n return False;\r\n }\r\n $_SESSION['lastLoginCheckTime'] = microtime(true);\r\n return True;\r\n }", "function getUserIsLoggedIn() {\r\n\r\n // For now, just return false\r\n return false;\r\n}", "private function checkLogged() {\r\n if (isset($_SESSION['user'])) {\r\n return $_SESSION['user'];\r\n }\r\n header('Location: /login');\r\n }", "public function isLoggedIn()\n {\n return isset($_SESSION['user']);\n }", "protected function _logged_in()\n\t{\n\t\t$authentic = Auth::instance();\n\t\t\n\t\tif ($authentic->logged_in())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\t\n\t\t}\n\t}", "function checkLoginStatus($controller)\r\n{\r\n $result = FALSE;\r\n \r\n //cookie set and visit pages directly without login\r\n if(isset($_COOKIE[\"loginName\"]) && isset($_COOKIE[\"secret\"]) && !isset($_SESSION[\"loginUser\"])) {\r\n //check cookie validity\r\n $loginName = $_COOKIE[\"loginName\"];\r\n $secret = $_COOKIE[\"secret\"];\r\n $handler = new UserHandler();\r\n $currentUser = $handler->findLoginUserBySecret($loginName, $secret);\r\n \r\n //pass checking, recreate session\r\n if($currentUser){\r\n $_SESSION[\"loginUser\"] = $currentUser;\r\n $result = True;\r\n }\r\n \r\n }\r\n \r\n if ($controller != \"LogIn\" && $controller != \"Join\" && $controller != \"Default\"\r\n && !isset($_SESSION[\"loginUser\"])) {\r\n //no login & visit protected pages\r\n $result = FALSE;\r\n }\r\n else {\r\n $result = True;\r\n }\r\n return $result;\r\n}", "private function isSingIn()\n {\n if ($this->session->isLoggon && $this->session->isAdmin) {\n return true;\n }\n redirect('logout', 'refresh');\n }", "public function isAuthenticated()\r\n {\r\n if (!isset($_SESSION[\"ed\"])) {\r\n echo '<meta http-equiv=\"refresh\" content=\"0; url=' . (new CodeFlirt\\Handlers)->path(\"login\") . '\">';\r\n exit(0);\r\n }\r\n }", "public function getIsLoggedIn()\n {\n return !$this->getIsGuest();\n }", "public function is_logged_in(){\n\t\treturn $this->_state_is_logged_in;\n\t}", "public function checkAccess() {\n $this->maybeStartSession();\n\n //If user is not logged in, redirect to login page\n if(!isset($_SESSION['userID'])) {\n header('Location: login.php');\n die();\n }\n\n //if user doesn't exist in database, redirect to logout page to clear session\n $repo = $this->getRepository();\n if($repo && !$repo->getUser($_SESSION['userID'])) {\n header('Location: logout.php');\n die();\n }\n }", "private function checkSession()\n\t\t{\n\t\t\tif(!empty($_SESSION['auth_username']) && !empty($_SESSION['auth_password']))\n\t\t\t\treturn $this->check($_SESSION['auth_username'], $_SESSION['auth_password']);\n\t\t}", "public static function isLoggedIn()\n {\n if($_SESSION['loggedIn'] == false){\n return false;\n }else{\n return true;\n }\n }", "public static function isLoggedIn()\n {\n return !is_null(SessionService::getCurrent());\n }", "function logged_in() {\n\t\treturn isset($_SESSION['USERID']);\n \n\t}", "private function checkLoggedIn()\n {\n $loggedin = false;\n $user = Account::checkLogin($this->getDb());\n\n if ($user) {\n $loggedin = true;\n }\n\n return $loggedin;\n }", "function loggedIn() {\n\t\treturn isset($_SESSION['username']);\n\t}", "function auth_isLoggedIn()\n{\n return ! auth_isAnonymous();\n}", "public function isLogined()\n {\n return isset($_SESSION['userLogin']);\n }", "public function isLoggedIn()\n {\n return $this->customerSession->getCustomerGroupId() != \\Magento\\Customer\\Model\\Group::NOT_LOGGED_IN_ID;\n }", "private function is_logged_in()\n\t{\n\t\treturn null !== $this->session->userdata('logged_in');\n\t}", "public function is_loggedin(){\n if(isset($_SESSION['user_session'])){\n return true;\n }\n return false;\n }", "function is_logged_in()\n {\n //check session\n //return logged in user_id or false\n }", "function loggedIn(){\r\n\tif(Session::exists('loggedIn') && Session::get('loggedIn')==1){\r\n\t\treturn TRUE;\r\n\t}\r\n\telse\r\n\t\treturn FALSE;\r\n}", "function user_login_status() {\n $g = get_session('user_data');\n if (!empty($g)) {\n return true;\n }\n return false;\n}", "public function is_logged_in()\n\t{\n\t\treturn ($this->session->userdata('iduser') != FALSE);\n\t}", "private function checkUserLoggedIn(): bool\n {\n $user = JFactory::getUser();\n if ($user->id > 0) {\n return true;\n } else {\n return false;\n }\n }", "public static function isLoggedIn()\n {\n return (bool)Users::getCurrentUser();\n }", "function auth_check()\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->auth_model->is_logged_in();\n\t}", "function auth_check()\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->auth_model->is_logged_in();\n\t}", "public function logged_in()\n\t{\n\t\t$status = FALSE;\n\n\t\t// Get the user from the session\n\t\t$user = $this->_session->get($this->_config['session_key']);\n\n\t\tif ( ! is_object($user))\n\t\t{\n\t\t\t// Attempt auto login\n\t\t\tif ($this->auto_login())\n\t\t\t{\n\t\t\t\t// Success, get the user back out of the session\n\t\t\t\t$user = $this->_session->get($this->_config['session_key']);\n\t\t\t}\n\t\t}\n\n\t\t// check from DB if set in config\n\t\tif ($this->_config['strong_check'])\n\t\t{\n\t\t\t$user = $this->_get_object($user, TRUE);\n\t\t}\n\n\t\tif (is_object($user)\n\t\t\tAND is_subclass_of($user, 'Model_MangoRauth_User')\n\t\t\tAND $user->loaded()\n\t\t\tAND $user->is_active\n\t\t)\n\t\t{\n\t\t\t// Everything is okay so far\n\t\t\t$status = TRUE;\n\t\t}\n\n\t\treturn $status;\n\t}", "public function isLoggedIn()\n {\n if(Session::get('user_id') != '') {\n $this->user_id=Session::get('user_id');\n $this->role_id=Session::get('role_id');\n return true;\n }else {\n return false;\n }\n }", "public function loggedIn()\n {\n if($this->di->session->get('user'))\n {\n return true;\n }\n return false;\n }", "public function isLoggedIn()\n {\n return $this->session->has('user');\n }", "protected function is_logged_in( )\n\t{\n\t\t$this->user = $this->php_session->get('user');\n\t\tif( is_null($this->user))\n\t\t\treturn False;\n\t\tif( ! $this->is_timed_out() )\n\t\t\treturn False;\n\t\t$this->user['last_active'] = time();\n\t\t$this->php_session->set('user' , $this->user );\n\n\t\t//apply user permissions globally\n\t\t//@see user_helper\n\t\tapply_global_perms( $this->user );\n\n\n\t\t\n\t\treturn True;\n\t}", "function cover_session_logged_in() {\n return get_cover_session() !== null;\n}", "static function verifyLogin(){\r\n\r\n // check if there's a session\r\n if(session_id() == '' && !isset($_SESSION)){\r\n session_start();\r\n }\r\n\r\n // if session is started, check if a user is login or not\r\n if(isset($_SESSION[\"loggedin\"])){\r\n \r\n return true;\r\n }\r\n else{\r\n session_destroy();\r\n \r\n return false;\r\n }\r\n }", "function checkLogin() {\n return isset($_SESSION['status']) && $_SESSION['status'] == \"login\";\n}", "public function isLoggedIn()\n {\n return $this->session->isLoggedIn();\n }", "function isLoggedIn() {\n\treturn isset($_SESSION['user_id']);\n}", "public static function check()\n {\n if (!empty($_SESSION['LOGGED_IN_USER'])){\n return true;\n } else{\n return false;\n }\n }", "public function is_loggedin()\n {\n if (isset($_SESSION['user_session'])) {\n return true;\n }\n }", "function is_already_authenticated()\n {\n /**\n * Checks is user already authenticated\n * If it's true, sends to main page\n */\n $session = Session::getInstance();\n $username = $session->username;\n $logged = $session->logged;\n if (self::check($username,$logged))\n {\n header(\"Location: /admin\");\n }\n }", "public function isLoggedIn(){\n // Apakah user_session sudah ada di session\n if(isset($_SESSION['user_session']))\n {\n return true;\n }\n }", "function check_login()\r\n {\r\n if ($this->user != null) {\r\n return true;\r\n }\r\n if (!isset($_COOKIE[$this->manifest['session_token']])) {\r\n return false;\r\n }\r\n $session = $this->load_controller('Session');\r\n $this->user = $session->recover_session_by_token($_COOKIE[$this->manifest['session_token']]);\r\n if ($this->user == false) {\r\n $session->remove_session_recover_cookie();\r\n return false;\r\n }\r\n return true;\r\n }", "function is_logged_in(){\n\t\t$is_logged_in = $this->session->userdata('is_logged_in');\n $this->session->sess_expire_on_close = TRUE;\n $this->session->sess_expiration = 1800;\n if(!$this->session->userdata('is_logged_in') && !strstr(current_url(),'login/')){\n redirect('login/index');\n }\n\n\t\tif(!isset($is_logged_in) || $is_logged_in !=true ){\n redirect('login/index');\n die();\n\t\t}\n\t}", "public function isLoggedIn() {\n\t\treturn $this->isLoggedin;\n\t}", "public function isLoggedIn()\n {\n $userId = $this->session->offsetGet('sUserId');\n\n return !empty($userId);\n }", "public function isLoggedIn()\n {\n $userId = $this->session->offsetGet('sUserId');\n\n return !empty($userId);\n }", "public function logged_in()\n {\n if (isset($_SESSION['user_data'])) {\n return true;\n } else {\n return false;\n }\n }", "public static function isLoggedIn() \n {\n // Check whether the session index with the SESSION_KEY\n // has been set\n if (Session::keyExists(self::SESSION_KEY)) {\n return true; \n }\n else {\n return false;\n }\n }", "public function logged_in ()\n\t\t{\n\t\t\tif(!isset($_SESSION))\n\t\t\t{\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t\treturn isset($_SESSION['id']);\n\t\t}", "function check_login()\n // Make sure user is logged in. Redirect to login page if not.\n {\n if (!isset ($_SESSION['uid']) || !$_SESSION['uid'] || $_SESSION['ip']!=allIPs() || time()>=$_SESSION['expires_on'])\n {\n\t\t\theader(\"location: ../ressources/controleur/action/logout.php\");\n }\n $_SESSION['expires_on']=time()+INACTIVITY_TIMEOUT; // User accessed a page : Update his/her session expiration date.\n }", "public function session_check(){\n if(isset($_SESSION['login_user_id'])){\n return true;\n } else {\n return false;\n }\n }", "public function isLoggedIn() {\r\n\t\treturn $this->isLoggedIn;\r\n\t}", "public function is_logged_in(){\r\n\t\t\treturn $this->logged_in;\r\n\t\t}" ]
[ "0.7731657", "0.76753765", "0.76366633", "0.7622615", "0.7622615", "0.7598838", "0.7594346", "0.75304955", "0.7528792", "0.7524296", "0.75009876", "0.7497757", "0.7483669", "0.74669844", "0.7423289", "0.74013054", "0.7400563", "0.7394545", "0.7387937", "0.738301", "0.73828125", "0.7327051", "0.73263645", "0.732455", "0.7308957", "0.7304196", "0.7303583", "0.7283285", "0.7278149", "0.72760236", "0.72713464", "0.7256898", "0.7255533", "0.72437674", "0.7230344", "0.7229291", "0.7209672", "0.72029084", "0.7197258", "0.71933806", "0.71932817", "0.7190972", "0.7190972", "0.7188759", "0.71793747", "0.7176876", "0.71750844", "0.71728164", "0.71722007", "0.71715504", "0.71676", "0.71654314", "0.7163882", "0.716359", "0.7157812", "0.71561706", "0.7152144", "0.7146347", "0.7141148", "0.71385235", "0.71375906", "0.71365684", "0.712998", "0.7129608", "0.7123842", "0.7121385", "0.7120524", "0.71118367", "0.7108894", "0.7108564", "0.71069634", "0.70976627", "0.70966417", "0.70951605", "0.70951605", "0.7094658", "0.7093153", "0.7092314", "0.70907885", "0.7090495", "0.7090076", "0.709004", "0.70896345", "0.7086239", "0.70799726", "0.7076507", "0.70756376", "0.7073299", "0.7068766", "0.70679796", "0.7065151", "0.70623016", "0.7059352", "0.7059352", "0.7056252", "0.70554084", "0.7052034", "0.7051793", "0.7048243", "0.70466363", "0.7046125" ]
0.0
-1
regeneate coords by adding ?coord_debug to URL
function rec_regenerate_coordinates() { if( ! isset( $_GET['coord_debug'] ) ) { return; } $posts = new WP_Query( array( 'post_type' => epl_get_core_post_types(), 'post_status' => 'any', 'posts_per_page' => -1, 'meta_query' => array( array( 'key' => 'property_address_coordinates', 'value' => array( '', ',' ), 'compare' => 'IN' ) ) ) ); while( $posts->have_posts() ) { $posts->the_post(); $coord = get_property_meta( 'property_address_coordinates' ); $query_address = epl_property_get_the_full_address(); $query_address = trim( $query_address ); if( $query_address != ',' ) { $googleapiurl = "https://maps.google.com/maps/api/geocode/json?address=$query_address&sensor=false"; if( epl_get_option('epl_google_api_key') != '' ) { $googleapiurl = $googleapiurl.'&key='.epl_get_option('epl_google_api_key'); } $geo_response = wp_remote_get( $googleapiurl ); $geocode = $geo_response['body']; $output = json_decode($geocode); /** if address is validated & google returned response **/ if( !empty($output->results) && $output->status == 'OK' ) { $lat = $output->results[0]->geometry->location->lat; $long = $output->results[0]->geometry->location->lng; $coord = $lat.','.$long; update_post_meta( get_the_ID(), 'property_address_coordinates', $coord); update_post_meta( get_the_ID(), 'property_address_display', 'yes'); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function build_pixel_url() {\n\t\tif ( $this->error ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$args = get_object_vars( $this );\n\n\t\t// Request Timestamp and URL Terminator must be added just before the HTTP request or not at all.\n\t\tunset( $args['_rt'] );\n\t\tunset( $args['_'] );\n\n\t\t$validated = self::validate_and_sanitize( $args );\n\n\t\tif ( is_wp_error( $validated ) )\n\t\t\treturn '';\n\n\t\treturn Jetpack_Tracks_Client::PIXEL . '?' . http_build_query( $validated );\n\t}", "function location($gps){\n\tglobal $api;\n\t$lat = $gps['lat'];\n\t$lon = $gps['lon'];\n\t$endpoint = \"https://us1.locationiq.com/v1/reverse.php?key=$api&lat=$lat&lon=$lon&format=json\";\n\techo \"https://www.google.com/maps/search/?q=$lat,$lon\\n\";\n\treturn file_get_contents($endpoint);\n}", "public function build_pixel_url() {\n\t\tif ( $this->error ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$args = get_object_vars( $this );\n\n\t\t// Request Timestamp and URL Terminator must be added just before the HTTP request or not at all.\n\t\tunset( $args['_rt'], $args['_'] );\n\n\t\t$validated = self::validate_and_sanitize( $args );\n\n\t\tif ( is_wp_error( $validated ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn esc_url_raw( WC_Tracks_Client::PIXEL . '?' . http_build_query( $validated ) );\n\t}", "function getLocation();", "function piece_http_request($origin_location, $destination_location){\r\n $bing_secret = file_get_contents(BING_SECRET_FILE);\r\n $request_url = \"http://dev.virtualearth.net/REST/V1/Routes/Driving?\". //Base url\r\n \"wp.0=\".urlencode($origin_location). //Filter address to match url-formatting\r\n \"&wp.1=\".urlencode($destination_location).\r\n \"&routeAttributes=routeSummariesOnly&output=xml\". //Setup XML and only route summaries\r\n \"&key=\".$bing_secret;\r\n return $request_url;\r\n}", "public function itCreatesUriBasedOnCoordinates(): void\n {\n $coordinates = Lambert72::fromXYPosition(100, 1000);\n\n $request = new LezRequest($coordinates);\n\n self::assertEquals(\n 'pbuffer?wkid=31370&pointx=100&pointy=1000&bufferdistance=1',\n $request->getRequestTarget()\n );\n }", "public function getPostalCodeFromCoords() {\r\n\t\t$this->autoRender = false;\r\n\r\n\t\t$this->layout = 'ajax';\r\n\r\n\t\t$this->response->type('json');\r\n\r\n\t\t$response = $this->StreetAddress->getPostalCodeFromCoords(\r\n\t\t\t$this->request->data('latitude'),\r\n\t\t\t$this->request->data('longitude')\r\n\t\t);\r\n\r\n\t\tif ($response) {\r\n\t\t\t$this->response->body(json_encode($response));\r\n\t\t} else {\r\n\t\t\t$this->response->body(false);\r\n\t\t}\r\n\r\n\r\n\t}", "function showlocation() {\r\n drupal_add_js(array('gojira' => array('page' => 'showlocation')), 'setting');\r\n drupal_add_js(array('gojira' => array('loc' => $_GET['loc'])), 'setting');\r\n return theme('showlocation');\r\n}", "function getGeoViewUrl($ar){\n $p = new XParam($ar, array());\n $table = $p->get('table');\n $fieldname = $p->get('fieldname');\n $moid = $this->_moid;\n $templates = 'googlesearch.html';\n return $GLOBALS['TZR_SESSION_MANAGER']::complete_self(true, true).\"skip=1&moid={$moid}&class=XModMap&table={$table}&field={$fieldname}&provider=google&function=geoSearch&template=xmodmap/geosearch.html&readonly=readonly&tplentry=br\";\n }", "function visitedCoords($accurate, $nongraphic = false) {\n\t\t$coords = array();\n\t\tif ($nongraphic) $sql = \"SELECT `x`, `y` FROM `loc_log` WHERE `charFK`=$this->uid AND `building`=0 AND `event_type`<3 ORDER BY `dateTime` DESC, `minute` DESC, `uid` DESC LIMIT 55\";\n\t\telse $sql = \"SELECT `x`*90, (`y`+5000)*90 FROM `loc_log` WHERE `charFK`=$this->uid AND `building`=0 AND `event_type`<3 ORDER BY `dateTime` DESC, `minute` DESC, `uid` DESC LIMIT 55\";\n\t\t$res = $this->mysqli->query($sql);\n\t\t$xv = 0;\n\t\t$yv = 0;\n\t\tif (mysqli_num_rows($res)) {\n\t\t\twhile ($row = mysqli_fetch_row($res)) {\n\t\t\t\tif ($nongraphic) $coords[] = array(\n\t\t\t\t\t\t\"x\" => $row[0],\n\t\t\t\t\t\t\"y\" => $row[1]\n\t\t\t\t\t\t);\n\t\t\t\telse if (!$accurate) {\n\t\t\t\t\t$xv += $this->biasRand();\n\t\t\t\t\t$x = $row[0] + $xv;\n\t\t\t\t\t$yv += $this->biasRand();\n\t\t\t\t\t$y = $row[1] + $yv;\n\t\t\t\t\t\n\t\t\t\t\t$coords[] = array(\n\t\t\t\t\t\t\"x\" => round($x/20),\n\t\t\t\t\t\t\"y\" => round($y/20)\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse $coords[] = array(\n\t\t\t\t\t\t\"x\" => round($row[0]/20),\n\t\t\t\t\t\t\"y\" => round($row[1]/20)\n\t\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn $coords;\n\t}", "function update_map($id, $coords) {\n\t\t$str = \"UPDATE company SET gmap_coords = '$coords' WHERE Comany_ID = $id\";\n\t\tif($req = mysqli_query($link,$str)) return true;\n\t\telse return false;\t\n\t}", "public function test_clean_coord()\n {\n $coord = \"-45d.4dt5;0dds\";\n $clean = \\SimpleMappr\\Mappr::cleanCoord($coord);\n $this->assertEquals($clean, -45.450);\n }", "static public function location(string $url)\n {\n echo json_encode(['url' => $url]);\n exit;\n }", "function geoRequest($url, $parameters){\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url . \"?\" . http_build_query($parameters));\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\t\t$result = curl_exec($ch);\n\t\treturn $result;\n\t}", "function parse_gis_location() {\n $output = $this->latitude . ';' . $this->longitude;\n if (!empty($this->radius)) {\n $output .= '!' . $this->radius;\n }\n return $output;\n }", "private function updateGeoCoords()\n\t{\n\t\t// $this->attributes contains payload of the session\n\t\t// $this->handler->get_table_row() contains extended Row's field like IP and Platform\n\t\t$row = $this->handler->get_table_row();\n\t\t$current_ip = PlatformDetector::getClientIp();\n\n\t\t// define the flag for new re-detection\n\t\t// if no coordinates is set\n\t\t$should_recheck_coords = !isset($this->attributes['geo_coords']);\n\t\t// or if IP address was changed\n\t\t$should_recheck_coords |= $row && $row['ip_address'] != $current_ip;\n\n\t\tif ($should_recheck_coords) {\n\t\t\t//Log::info('Recheck GEO coords for session');\n\t\t\t// we need to update geo coordinates\n\t\t\t$coords = GeoIPLib::get_lat_lon($current_ip);\n\t\t\t$this->attributes['geo_coords'] = [\n\t\t\t\t'latitude' => $coords[0],\n\t\t\t\t'longitude' => $coords[1],\n\t\t\t];\n\t\t}\n\n\t}", "public function testIndexActionPostLatLong()\n {\n // Setup the controller\n $controller = new LocWeatherController();\n $controller->setDI($this->di);\n\n unset($_GET[\"ip\"]);\n unset($_POST[\"ip\"]);\n\n $_POST[\"lat\"] = \"15\";\n $_POST[\"long\"] = \"42\";\n\n // Test the controller action\n $res = $controller->indexActionPost();\n $this->assertEquals(\"15\", $res[0][\"location\"][\"lat\"]);\n $this->assertEquals(\"42\", $res[0][\"location\"][\"long\"]);\n }", "public function getLocation();", "public function getLocation();", "function ajax_render_location_rule()\n {\n }", "function map_large_link($location,$latitude,$longitude)\n {\n return \"https://maps.google.com/maps?ll={$latitude},{$longitude}&amp;z=16&amp;t=m&amp;hl=en-US&amp;gl=PT&amp;mapclient=embed&amp;\";\n }", "public function testIndexActionGetLatLong()\n {\n // Setup the controller\n $controller = new LocWeatherController();\n $controller->setDI($this->di);\n\n unset($_POST[\"ip\"]);\n unset($_GET[\"ip\"]);\n $_GET[\"lat\"] = 33.4;\n $_GET[\"long\"] = 55.2;\n\n // Test the controller action\n $res = $controller->indexActionGet();\n $body = $res->getBody();\n $this->assertStringContainsString(\"Vädret vid koordinaterna (33.4, 55.2)\", $body);\n }", "private function getLocation() {\n $location = false;\n \t$result = new StdClass();\n \t// $result->location = 'http://www.geoplugin.net/extras/location.gp?lat=' . $this->coordinates->latitude . '&long=' . $this->coordinates->longitude . '&format=php';\n \t$result->nearest = 'http://www.geoplugin.net/extras/location.gp?lat=' . $this->coordinates->latitude . '&long=' . $this->coordinates->longitude . '&format=php';\n \t$result->location = 'http://maps.googleapis.com/maps/api/geocode/json?latlng=' . $this->coordinates->latitude . ',' . $this->coordinates->longitude . '&sensor=false';\n\n \t$result = json_decode($this->getUrlContents($result->location));\n \t// $result->nearest = unserialize($this->getUrlContents($result->nearest));\n\n $location = $this->validateLocation($result);\n\n if(is_array($location))\n \t $location = $this->filterLocation($location);\n }", "function guifi_get_map_info($node) {\n $map_info = array();\n \n // Obtenim les variables de retall del mapa. \n // - (X,Y) ó (UTMx, UTMy) ó (Lon,Lat)\n $map_info['datum'] = 5;\n $map_info['zone'] = 31;\n $map_info['nord'] = 1;\n $map_info['xPixel'] = isset($_GET[\"xPixel\"]) ? $_GET[\"xPixel\"] : $_POST[\"xPixel\"];\n $map_info['yPixel'] = isset($_GET[\"yPixel\"]) ? $_GET[\"yPixel\"] : $_POST[\"yPixel\"];\n $map_info['xUTM'] = isset($_GET[\"xUTM\"]) ? $_GET[\"xUTM\"] : $_POST[\"xUTM\"];\n $map_info['yUTM'] = isset($_GET[\"yUTM\"]) ? $_GET[\"yUTM\"] : $_POST[\"yUTM\"];\n $map_info['londec'] = isset($_GET[\"londec\"]) ? $_GET[\"londec\"] : $_POST[\"londec\"];\n $map_info['latdec'] = isset($_GET[\"latdec\"]) ? $_GET[\"latdec\"] : $_POST[\"latdec\"];\n $map_info['lon'] = isset($_GET[\"lon\"]) ? $_GET[\"lon\"] : $_POST[\"lon\"];\n $map_info['lat'] = isset($_GET[\"lat\"]) ? $_GET[\"lat\"] : $_POST[\"lat\"];\n // - Zoom ó Dist\n $map_info['zoom'] = isset($_GET[\"zoom\"]) ? $_GET[\"zoom\"] : $_POST[\"zoom\"];\n $map_info['dist'] = isset($_GET[\"dist\"]) ? $_GET[\"dist\"] : $_POST[\"dist\"];\n if ( !isset($map_info['xPixel']) || !isset($map_info['yPixel'])) {\n $map_info['xPixel'] = 0;\n $map_info['yPixel'] = 0;\n }\n if ( !isset($map_info['zoom']) )\n $map_info['zoom'] = 0;\n\n \n // Comprovem les dades i les transformem en X, Y, S\n $map_info['width'] = $map_info['height'] = 500; // This variables will are in drupal\n $map_info['quadrants'] = 3; // This variables will are in drupal\n $image_info = guifi_get_image_info ( guifi_get_file_map_zone($node) );\n \n // Find max scale of de map to draw from zoom of this view\n $map_info['maxRel'] = $image_info['width'] / $map_info['width'];\n if ( $map_info['maxRel'] < $image_info['height'] / $map_info['height'] )\n $map_info['maxRel'] = $image_info['height'] / $map_info['height'];\n $map_info['maxScale'] = guifi_get_scale_relation ( $map_info['maxRel'] );\n if ( $node->valid ) {\n // Calcule dist of original map and his relation\n $point_zero = guifi_pixel2UTM ($node->coord, 0, 0);\n $point_right = guifi_pixel2UTM ($node->coord, $image_info['width']-1, 0);\n $point_bottom = guifi_pixel2UTM ($node->coord, 0, $image_info['height']-1);\n \n $map_info['distX'] = guifi_get_dist_UTM($point_zero[0], $point_zero[1], $point_right[0], $point_right[1]);\n $map_info['distY'] = guifi_get_dist_UTM($point_zero[0], $point_zero[1], $point_bottom[0], $point_bottom[1]);\n }\n\n // Find de scale to draw the map\n if ( $node->valid && isset($map_info['dist']) && is_numeric($map_info['dist']) ) {\n // Find scale of de map to draw from dist of this view\n $map_info['maxRel'] = ( $image_info['width'] * $map_info['dist'] ) / ( $map_info['distX'] * $map_info['width'] );\n if ( $map_info['maxRel'] < ( $image_info['height'] * $map_info['dist'] ) / ( $map_info['distY'] * $map_info['height'] ) )\n $map_info['maxRel'] = ( $image_info['height'] * $map_info['dist'] ) / ( $map_info['distY'] * $map_info['height'] );\n \n $map_info['scale'] = guifi_get_scale_relation ( $map_info['maxRel'] );\n if ( $map_info['scale'] > $map_info['maxScale'] ) \n $map_info['scale'] = $map_info['maxScale'];\n $map_info['zoom'] = $map_info['maxScale'] - $map_info['scale'];\n }\n if ( isset($map_info['zoom']) ) {\n // Recalcule de zoom to a correct zoom\n if ( $map_info['zoom'] > $map_info['maxScale'] )\n $map_info['zoom'] = $map_info['maxScale'];\n $map_info['scale'] = $map_info['maxScale'] - $map_info['zoom'];\n }\n \n if ( $node->valid ) {\n if ( isset($map_info['lon']) && isset($map_info['lat']) ) {\n // Transform Geo's corrdinates to UTM Coordinates\n $map_info['londec'] = text2Coord($map_info['lon']);\n $map_info['latdec'] = text2Coord($map_info['lat']);\n }\n if ( isset($map_info['londec']) && isset($map_info['latdec']) ) {\n // Transform Geo's corrdinates to UTM Coordinates\n $point = guifi_WG842UTM ($map_info['londec'], $map_info['latdec'], $map_info['datum'], $map_info['zone'], $map_info['nord']);\n $map_info['xUTM'] = $point[0];\n $map_info['yUTM'] = $point[1];\n }\n if ( isset($map_info['xUTM']) && isset($map_info['yUTM']) ) {\n // Transform UTM's corrdinates to Pixel Coordinates\n $point = guifi_UTM2pixel ($node->coord, $map_info['xUTM'], $map_info['yUTM']);\n $map_info['xPixel'] = $point[0];\n $map_info['yPixel'] = $point[1];\n }\n }\n\n // Find quadrants of de map scaled.\n $map_info['width_quadrant'] = $map_info['width'] / $map_info['quadrants'] ;\n $map_info['height_quadrant'] = $map_info['height'] / $map_info['quadrants'] ;\n $quadrantsX = ceil (( $image_info['width'] / guifi_get_rel_scale( $map_info['scale'] ) ) / $map_info['width_quadrant'] );\n $quadrantsY = ceil (( $image_info['height'] / guifi_get_rel_scale( $map_info['scale'] ) ) / $map_info['height_quadrant'] );\n\n // Find de quadrant center of de map scaled from pixel x,y in center.\n $quadCentX = floor (( $map_info['xPixel'] / guifi_get_rel_scale( $map_info['scale'] ) ) / $map_info['width_quadrant'] );\n $quadCentY = floor (( $map_info['yPixel'] / guifi_get_rel_scale( $map_info['scale'] ) ) / $map_info['height_quadrant'] );\n \n // Find de quadrant top-left of de map scaled from pixel x,y in center.\n $map_info['quadX'] = $quadCentX - floor( $map_info['quadrants'] / 2 );\n $map_info['quadY'] = $quadCentY - floor( $map_info['quadrants'] / 2 );\n if ( $map_info['quadX'] > $quadrantsX - $map_info['quadrants'] )\n $map_info['quadX'] = $quadrantsX - $map_info['quadrants'];\n if ( $map_info['quadY'] > $quadrantsY - $map_info['quadrants'] )\n $map_info['quadY'] = $quadrantsY - $map_info['quadrants'];\n if ( $map_info['quadX'] < 0 ) $map_info['quadX'] = 0;\n if ( $map_info['quadY'] < 0 ) $map_info['quadY'] = 0;\n\n // Recalcule the width and heigth of scaled image\n if ( $map_info['quadX'] >= $quadrantsX - $map_info['quadrants'] ) \n $map_info['width'] = floor( ($image_info['width'] / guifi_get_rel_scale( $map_info['scale'] )) - ( $map_info['quadX'] * $map_info['width_quadrant'] ));\n if ( $map_info['quadY'] >= $quadrantsY - $map_info['quadrants'] ) \n $map_info['height'] = floor( ($image_info['height'] / guifi_get_rel_scale( $map_info['scale'] )) - ( $map_info['quadY'] * $map_info['height_quadrant'] ));\n\n // Calculem la distància de la màxima de la imatge\n if ( $node->valid ) {\n if ( $map_info['width'] < $map_info['height'] )\n $map_info['dist'] = floor($map_info['distX'] * ( $map_info['width'] * guifi_get_rel_scale( $map_info['scale'] ) ) / $image_info['width']);\n else\n $map_info['dist'] = floor($map_info['distY'] * ( $map_info['height'] * guifi_get_rel_scale( $map_info['scale'] ) ) / $image_info['height']);\n }\n \n/*\n echo \"<br />quadrantsX: \".$quadrantsX;\n echo \"<br />quadrantsY: \".$quadrantsY;\n echo \"<br />map_width: \".$image_info['width'];\n echo \"<br />map_height: \".$image_info['height'];\n*/ \n/*\n echo \"<br />datum: \".$map_info['datum'];\n echo \"<br />zone: \".$map_info['zone'];\n echo \"<br />nord: \".$map_info['nord'];\n echo \"<br />zoom: \".$map_info['zoom'];\n echo \"<br />dist: \".$map_info['dist'];\n echo \"<br />scale: \".$map_info['scale'];\n echo \"<br />xPixel: \".$map_info['xPixel'];\n echo \"<br />yPixel: \".$map_info['yPixel'];\n echo \"<br />xUTM: \".$map_info['xUTM'];\n echo \"<br />yUTM: \".$map_info['yUTM'];\n echo \"<br />lon: \".$map_info['londec'];\n echo \"<br />lan: \".$map_info['latdec'];\n\n echo \"<br />quadX: \".$map_info['quadX'];\n echo \"<br />quadY: \".$map_info['quadY'];\n echo \"<br />width: \".$map_info['width'];\n echo \"<br />height: \".$map_info['height'];\n*/ \n\n return $map_info;\n}", "function geo_param( $param )\n\t{\n\t\t$this->pieces = explode(\" \", str_replace ( ' O' , ' E' , str_replace( '_', ' ', $param )));\n\t\t$this->get_coor( );\n\t\t\n\t\t$this->latdeg_min = $this->latdeg_max = $this->latdeg;\n\t\t$this->londeg_min = $this->londeg_max = $this->londeg;\n\t\tif ( isset( $this->pieces[0] ) && $this->pieces[0] == \"to\") {\n\t\t\tarray_shift($this->pieces);\n\t\t\t$this->get_coor();\n\t\t\tif ($this->latdeg < $this->latdeg_max) {\n\t\t\t\t$this->latdeg_min = $this->latdeg;\n\t\t\t} else {\n\t\t\t\t$this->latdeg_max = $this->latdeg;\n\t\t\t}\n\t\t\tif ($this->londeg < $this->londeg_max) {\n\t\t\t\t$this->londeg_min = $this->londeg;\n\t\t\t} else {\n\t\t\t\t$this->londeg_max = $this->londeg;\n\t\t\t}\n\t\t\t$this->latdeg = ($this->latdeg_max+$this->latdeg_min) / 2;\n\t\t\t$this->londeg = ($this->londeg_max+$this->londeg_min) / 2;\n\t\t\t$this->coor = array();\n\t\t}\n\t}", "function tsuiseki_tracking_view($data) {\n if (!empty($data)) {\n $t_data = (string)(trim($data));\n // We need to cut the first \"ref=\" as it comes from the javascript part\n // and may overlay the partner field.\n if (preg_match('/^ref=.*/', $t_data)) {\n $t_data = mb_substr($t_data, mb_strpos($t_data, '=') + 1);\n }\n $t_parts = preg_split('/;;/', $t_data);\n $src_url = (string)(trim($t_parts[0]));\n $width = (string)(trim($t_parts[1]));\n $height = (string)(trim($t_parts[2]));\n $browser = (string)(trim($t_parts[3]));\n $browser_version = (string)(trim($t_parts[4]));\n $referer = (string)(trim($t_parts[5]));\n if (!empty($referer)) {\n // Wir extrahieren nur die Domain!\n $r_parts = array();\n preg_match('/[a-z]{3,5}:\\/\\/(.+?)[\\/?:]/', $referer, $r_parts);\n if (!empty($r_parts[1])) {\n $referer = 'referer='. (string)trim($r_parts[1]);\n }\n }\n }\n $key = (string)trim($_SESSION['TSUISEKI_TRACKER_KEY']);\n if (!empty($src_url) && !empty($key)) {\n $ref = urldecode($src_url);\n $data = (string)(trim(tsuiseki_tracking_get_data($ref)));\n $data .= '&'. $width .'&'. $height .'&'. $browser .'&'. $browser_version .'&'. $referer;\n $data = urlencode($data);\n $ip = ip2long($_SERVER['REMOTE_ADDR']);\n $url = \"http://tracker.tsuiseki.com/tsuiseki.php?q=$key;0;$ip;$data&ajax=1\";\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_USERAGENT, (string)trim($_SERVER['HTTP_USER_AGENT']));\n curl_setopt($ch, CURLOPT_REFERER, $src_url);\n $result = curl_exec($ch);\n if (curl_errno($ch) > 0) {\n trigger_error(curl_error($ch), curl_errno($ch));\n }\n curl_close($ch);\n }\n\n // generate the response\n $response = json_encode( array( 'success' => true ) );\n // response output\n header( \"Content-Type: application/json\" );\n echo $response;\n exit;\n //return 0;\n}", "private function getLocation() {\n }", "function get_coordinates($object, $field_name, $request) {\n\tglobal $wpdb;\n\t$location = $wpdb->get_row('SELECT wp_geo_mashup_locations.lat, wp_geo_mashup_locations.lng FROM wp_geo_mashup_locations INNER JOIN wp_geo_mashup_location_relationships ON wp_geo_mashup_locations.id = wp_geo_mashup_location_relationships.location_id\nWHERE wp_geo_mashup_location_relationships.object_id = ' . $object[\"id\"]);\n\tif ($location) {\n\t\treturn $location->lat . \",\" . $location->lng;\n\t} else {\n\t\treturn null;\n\t}\n}", "function get_snapped_point ($lat, $lng)\n{\n $options = array(\n 'http' => array(\n 'header' => \"Content-type: application/json\",\n 'method' => 'GET' \n )\n );\n \n //ATTENTION :Replace your own api_key\n $api_key=\"key\";\n $url_arr = array(\"https://roads.googleapis.com/v1/nearestRoads?points=$lat,$lng&key=\".$api_key,\n \"https://roads.googleapis.com/v1/snapToRoads?path=$lat,$lng&key=\".$api_key);\n\n $url= $url_arr[array_rand($url_arr)];\n $context = stream_context_create($options);\n\n $result = file_get_contents($url, false, $context);\n $result_arr=json_decode($result,true);\n\n \n return ($result_arr[\"snappedPoints\"][0][\"location\"]);\n}", "function location_cmn($lat, $long, $usegeolocation, $customerno = null) {\n $address = NULL;\n $customerno = (!isset($customerno)) ? $_SESSION['customerno'] : $customerno;\n if (isset($lat) && isset($long)) {\n $GeoCoder_Obj = new GeoCoder($customerno);\n $address = $GeoCoder_Obj->get_location_bylatlong($lat, $long);\n }\n return $address;\n}", "function index_latlng( $params, $class ) {\n\n $facet = FWP()->helper->get_facet_by_name( $params['facet_name'] );\n\n if ( false !== $facet && 'proximity' == $facet['type'] ) {\n $latlng = $params['facet_value'];\n\n // Only handle \"lat, lng\" strings\n if ( is_string( $latlng ) ) {\n $latlng = preg_replace( '/[^0-9.,-]/', '', $latlng );\n\n if ( ! empty( $facet['source_other'] ) ) {\n $other_params = $params;\n $other_params['facet_source'] = $facet['source_other'];\n $rows = $class->get_row_data( $other_params );\n\n if ( false === strpos( $latlng, ',' ) ) {\n $lng = $rows[0]['facet_display_value'];\n $lng = preg_replace( '/[^0-9.,-]/', '', $lng );\n $latlng .= ',' . $lng;\n }\n }\n\n if ( preg_match( \"/^([\\d.-]+),([\\d.-]+)$/\", $latlng ) ) {\n $latlng = explode( ',', $latlng );\n $params['facet_value'] = $latlng[0];\n $params['facet_display_value'] = $latlng[1];\n }\n }\n }\n\n return $params;\n }", "function plg_ipData($pro) {\r\n global $lib;\r\n $re = \"\";\r\n\r\n\r\n$lib = new Libs;\r\n\r\n\r\n\r\n\r\n\r\n if (isset($_GET['site'])) {\r\n $re = '';\r\n } else {\r\n\r\n\r\n $IP = $_SERVER['REMOTE_ADDR'];\r\n // $tt = file_get_contents('http://geoip.maxmind.com/a?l=hVWzBFybLR8f&i=' . $IP);\r\n\r\n $tt = \"EG\";\r\n // echo $lib->util->cities->urlConvert($tt);\r\n\r\n \r\n\r\n if (!isset($_GET['alias'])) {\r\n $re = ' <script>window.location = \\'/site/' . $lib->util->cities->urlConvert($tt) . '/\\'</script>';\r\n } else {\r\n $url = curPageURL();\r\n $u = explode($_GET['alias'], $url);\r\n\r\n $re = ' <script>window.location = \\'/site/' . $lib->util->cities->urlConvert($tt) . \"/\" . $_GET['alias'] . $u[1] . '\\'</script>';\r\n }\r\n }\r\n return $re;\r\n}", "public function getUserLocation() {\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip_note = 'HTTP_CLIENT_IP='.$_SERVER['HTTP_CLIENT_IP'];\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip_note = 'HTTP_X_FORWARDED_FOR='.$_SERVER['HTTP_X_FORWARDED_FOR'];\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else {\n $ip_note = 'REMOTE_ADDR='.$_SERVER['REMOTE_ADDR'];\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n $ip = '117.20.119.245';\n $loc = file_get_contents(\"http://ipinfo.io/\".$ip.\"/loc\");\n\n if($loc) {\n $array_loc = explode(',', $loc);\n return ['lat'=> ((isset($array_loc[0]))? $array_loc[0]:'') ,'lon'=> ((isset($array_loc[1]))? $array_loc[1]:'')];\n }\n\n return ['lat'=>'','lon'=>''];\n\n }", "function addPointToPath($newLatLong, $trip) {\n $jsonRouteFilePath = \"cricketTraveledPath.json\";\n $error_msg = \"\";\n $result = false;\n \n //read the old $lat and $long from the $jsonTravelFilePath\n $tripPaths = json_decode(file_get_contents($jsonRouteFilePath)); \n $lastLeg = end($tripPaths->{$trip});\n $lastLatLong = $lastLeg->{\"endLatLong\"};\n $lastid = $lastLeg->{\"id\"};\n \n //get a new encoded path from MapQuestAPI\n $mqString = getMQroute($lastLatLong, $newLatLong);\n if($mqString){\n $mqResult = json_decode($mqString);\n \n //create a new Leg php object\n /* looks like this in json format\n { \n \"id\": 40,\n \"startLatLong\": [ lat ,long]\n \"endLatLong\": [31.9494000, -104.6993000],\n \"distance\": 600.433,\n \"MQencodedPath\": \"}yvwEh_prQFwB??NoK??\\\\iELiDBy@???G?y@@sEAa@??G?kA?E???A`@CrG??BbABlGEnCIjCKnBGnBYjF?xBFvB`@~DRpBNpAFt@H`BDrA@d@C`GAdBGbCAtDAfA?jA?dG?jB?~@?T?xC?`CAbE?~D?pK?`H?~C?vA?`@?L?b@?fA?`D?lC?lC?vA?dB?`H@~K?rHA~B@hH?^?zE?|E?`FBzEH~E@jF?`B?lABnW?|A?fI?|A?nD?|A?zB@jT?xA?h@?xEAjC?rB@bFCxCGdBUvCUhBs@~FWpBa@|CS~AkAhI{@lGS~AGx@[fCeBlM{@nGOpAWxBg@zDoA|JSbCS|BUpFGtCC|D@vD?pBBtLBdI?pBDxL@pKBjHBdBLjI@vEDdQCff@?~A]xb@G|P?tPBd]Gx\\\\E~LA~L?xAArTFfFRhF\\\\`Fb@|EpAtHfB|HhAvDzCzJtIbYjFtPdFhPVz@x@fDj@rDf@fFJ|E?hD?nOBfTAzN@|L?V?tI?rCExBMlCGpEDhBArQ?bA?pHAbI@bICzFAfA@lDClC@vH?jI@`@CvC?rCElBG~G?fTAdRBtL?zJ@t\\\\AlQ?pQ?v_@?|B@|C?jB?`HBrRAvc@@xQ@zPAfd@??^?~a@@??DrALn@tApEVhAPjAFpCJtBBre@lC``CB|B?R|@ds@LtOArS_@lSqAhf@mB`v@YlOSdVD~JP|N|Bfx@Rv`@i@dc@_Ap\\\\IjKGpS@pnA@pc@AtCBte@@|d@?zBKfNq@xJMdAmAdJ}ExR{HpX}HhYsHfXqBtHqEdPwCdLqCnNmA|IkAdKsAhQsBbVoClVqD~VkElVqExTuD`PuO`l@qFfTeGxTgGpU{\\\\ppAeBtIcAhHm@lHYrHGhSF~PApV@|_AHb{BJdZd@j\\\\n@pZZpWBzTObR}@p^[hUIx[D`UA|i@QlQy@db@wAhd@cAv`@UpULtU`@hQd@zODjAzA`h@~@p_@\\\\jT?j\\\\F~N@z`ABrJ?vBFd^Dzi@E~L[|Oq@`LsAbMsJpv@mMjbAoI~m@eAxIeEd\\\\yC~Ts@vJUlJPdIp@tIpA~HnBtItCxHx]rs@lXdj@~GfNrC`G|AvDz@~B|@tCnBdIrArHdAxJ^vGNtHEfFOxGk@zIUpBy@`GsBdMiXndBu@jFgAjKc@rG]bHO`HG|NCt|@AtV?hAAv_@C`NEzwA@nGIdgA?fAAzXQtNOdISlIWvHI~GE`I@pFLdL`@|NPhLD~CHhLGv}CQpY]pVCtM?dIXhWPd[Adu@AdSMvrHOvN[zM_@tIo@zKg@|Fu@hIo@zFuAlKgB~KO`A_Hba@{BfN}CxQqAzIe@tDiAtKaA|M]vGc@pMMpJErHBhVBpe@@lA@~p@?~A@xUCbKB~^ApO@zn@G~lCBfgBA~M@lEAnYBtGCdDBb]BfE?|d@CvDBdFC`HDvT@b`@B~DTdERfBh@rDh@`Cz@pCtB`FzAnCxHrMjM|SvDlFtBdCjAlA\\\\TtE|D|CrCzF~E~@r@rBrBpBhCdAbBfBfD~@fCp@vB\\\\nAZbBj@dEPxBJhCHpHBtSA|V@~A?`PDzHN|JDlBl@zKR~C|@jK~@`L^nGH`EB~FK|GGtAUjEqC`[mA|Nw@hNOjEOzIK|z@?dr@EpMMjdC?xAc@t{D?hSGn]DlIJ`HXbINvCf@tGVlC`A`JtAfJnDxSt@rEvGp_@hEbWv@jE|@bHt@fHb@`Gb@vJTbIHzK@fSAfk@Exo@C~CBzNMdsDRpLXjHj@rIV`Cx@hHb@~CnArHRl@l@dCn@rC|@zCt@dCnBdGnCvHpAdD~@rCfAtC`E~KrGdQnArDbF`NhArCxU|o@lDnJzDdLfAbEp@rCj@vC`@dCd@rD\\\\xDRpCVvFDfD@|EItEeAx\\\\QdFMdFGnECrEBdHLxH^rJZxE`@tFvAvMbAbJl@fF^fDdD`ZrBpQjD`[TxB\\\\fD~AbNbBdLhCjLt@|CtBdHxAlEhDvIjDrHHPfD`GrBdDvGfJvFrH|EfHzEbIpC~FhC|F|@~BvD~KzBrIpAvFx@rEHVz@dFhA|In@zHNbCLpARdETtHF|FE~_B?pU?bB?rUCb]?npAE`KAfj@Cv~A@|IClM@rXA~ZBjENjFN`DRjCp@lG~@bGXpAZzA|@tDfD|KbA|ChEhMhXvy@fAtCzEjLhB|DlEfIvCvExEbHxApBnG|HtI~J`HlIpAxAp@n@fDfEhFfGvBfCfAjAhAxA~DtEp@|@vCfD|InKdAhArAbBdF~FdFfGtAxAnHdJlCrDjEpG~@zApDtGf@hAj@`AzCvGrB~Er@hBzCdJxAzEjCvJ|@~DdAlFbBlKjEp]^pEf@rEdBfMb@vDrBhLhAlFbC~JlAtEdEvLxBvFfDvHzBtElU~c@xCbGzPn\\\\vGzMdBfEv@jBfCnHh@jBx@rChBhHrAhG`AdGdAbId@~D`@nE`@dGZhHNnG@tI@vnB@nTAlo@KbHQfDc@lF_@rDc@zCcApFy@jDwBnI{B`Ie@lBuBrI}@dEm@hDeAfHe@`Ey@~IWtFGnBMdJ@nIFdEBx@FdCNhCl@jIZ`DZlCbAnHx@|DR~@jAnFx@|C|EnOfAxDrBdJ|@dGVnBd@|FPhDLjEDh_@NzqBDvgACtILvlBDbEPbFLdB\\\\`ED`@~@~G\\\\fBl@jCh@rBbCnIrArDxAjDpDnG|A~BjA`B|DtEj@p@pMpMj@h@rD~DtHtHpCvCrJxJb@d@~TtUlMtMz@~@jd@ne@jKnKrDxD`DlDzD|DzAbBrBhCdCnDdAbBzBfEdA~B~@|Bz@`C`AvClAxE^dB`AzEXdBl@rFb@xFNpCFfBDnC?|PAlHBdz@CvK@hKAfb@KfJChJIdFEdHu@dWGtDOjDO|EUvKCzAG~ECrECxE@tIFdHL|G\\\\tKh@hSLrDR~LVjTBrG@xIBxGArODv\\\\?rkB?nSAjAB~GC|GDpFn@xI^`CnAxE`AzC`D|HbBxDpFnLtBlErQpa@bBfEbBxDxLdXz@vBrHjPrQva@pFvLbDjGfCjEzSp\\\\tWha@lDvFzEnHnIdMhBdDnEvIpGhNrBzEfCnFtGdOdChFtCzGrClGnHtPdDfHtg@jiAfAdC|CtF|CnFfHvKhB`CpD`Fn@t@dC~BxNzL`OrLdDfCpYpU|PbNfG`EvChBvC`BtIfEbGlCbA^xAl@zCfAjElAxBp@`Dx@`Dr@jI`BpEv@zGtAtH`Bf]fHvFlArPbD~KbClAVdF~@|RhErBd@tQnDdIjBlGjA~PlDlHdBfFbBxD|A`EhBvDlBjAr@vCjB~EvDhGfF`CdClBtBvClDxCdElDtFxCtFlBbE~ArDlCnHXz@x@jCbBfGfBhIf@pCn@vEp@pEv@lINvBVdEJpDJlF@fHGloBEfJO~rDDzI^bRb@xMj@hLjApPj@xGn@rG~@hI~@rHjAdIfAjHzAdIbBhIlCfLxEnR`ChIzCjJrBvFrB|FlCjHbDtHjL|Vz@rBvJvSpCrG~BzExIzRj@pApHnOxApDrHxOvHnPr@hBhAzBnIxQpDdIpB~EtAhDzBhG~BjH~BbI`BtGdBrH|@vEzA~I~@|FjApJr@rH|@~Kb@bI\\\\jIH|FFbHBpEElJF~bAFvPPtQPxKNfGv@tVd@xMJpAdAzTnArTdAzTPrDtB``@~Ah\\\\x@bXh@nWLjJNxX?bZEzZEh[?hC?vSAnBQveD@zKE|UApV?dACbQK|CS|JSzG_@fJgAbR]hDq@dIgArKyPpxA]xDkA|Og@|J]dIOxEQpNErRN`MRhGx@lRbSfrCr@~Jv@bMJjBnAbVBzBl@rQNjGJnMJvpAA`IBrlABf]Aj\\\\FpcC?fxACjJ?|BCjzGEf}@Bjm@EfrBEft@Bxg@CjqBPr}CIpGMdGItBSzCWzC[xC_@vC[xAo@jF}Mr_AoDbWO`BYzEQbFExCAtCBlDRtGhA`QbBtYz@tMPfDr@tKXhFp@jKjBzXz@`Lb@vGV~DzCda@^zFz@fL^hHJ`EDjJ@dYCve@IxOCv[?buAGzTAhfABdMCfFBj^@`JDvb@Ilc@O~EUnBg@rDgBfLUfDiEzjAgAf[E~B?tBD|BPvD\\\\dFXrBh@rC`AdEfCzJvA|GTxATjCN`DB`A@xGC~cAOfh@GpH?tDCvHBvHAxh@F`UHxHJxQ?jQAzX?l^?pZDnf@Ad}@Uxm@EnYJ~j@LbRBtU?jqACva@BdXC`WAd_@Sh^?z]F|LNnHR~Nb@lVDnNE`IAnn@A`r@N|tBFtYDhy@@bE?tGMlM]fSOhHClCEl_@@xICby@GhF[|G[`EoBvYSzCiD|d@s@zKI|E?~F\\\\fJp@dG^zBh@xCf}@bgEnAlH\\\\xCXzCRzCN|CxKdoCnBvf@|A`_@lAj\\\\|Ab^HdD?dDMvFUdDI|@cBtM_DvSa@bEGbAKxCGrD@hw@@nBNtCR~CPbBp@|EbCvOvCpRt@hFd@~Ej@lHJfKA`DIvFItBOvB[tD{@fHoF|ZgA|GY|CSzDC|ADfEFbCj@xF|@rE`@bBnApDr@dBx@`BxB`Dt@bAvDtD|ErEfFnErFhGlA`BlBtC~DnHxAdDjBfFt@pCxF`Qh@`BbFdPb@rAhCbGfA`CjBhDtAzB~DrFxBpCfL~NtNrR`AlAbNxPdB~BxD`GrBjEz@jBhOd^zNv]hLhXvCfJd@lB~AjIf@rDr@zHXdEPnGClJIrCcAbNaBzOeAbK_Fdd@k@`GqBfYqDbf@a@|FYlGKtEA~ADlGP`Fp@zJd@xDNbAp@xDl@xCz@tDx@pCxBtI~Hf[XpAjAlJl@xFZbN@rNGl[[`G_A|Jg@rDwBtLeBnHw@jDoFpW[tBSdBe@nEMzAMlBSlGIpYD`LGfVEtwDH||@Sv{@?dSRxIf@vJRfChChYdCnWPdCL|BF~BB~B?`CA~BI~B{Czr@u@~OGl@EvAWnEo@hOyCvq@O|BSzBaHdp@sJn_AgS`nBqFli@_UrwBe@|Dw@dFSbAkAjFgA~D{AxEwBlFwDtGu@dAkFrHsOnRkAvAeLdOqAnBoBvCeEdHaDhGuHzO}@nBcL`V{AxDiB`Gc@jBc@rBe@rCc@zD]fDE`AQlEChE?xDJvD\\\\hFjA~KXhChFhf@~@~HxGpm@tGnl@XxBv@xHn@fI^|F`@bLF|DJjJCt}ACdr@Alt@Cx{@@lUEdy@Aje@EzPGpB]fHM|EEdEBjGH~Df@vLDvC?ru@A~{A@lVArS?tkBCva@CrmB@p]GhmBErsFOfH_@lGk@xFIf@}@xFw@|DwAjFuJ`\\\\qPdk@cBnFoEnOkDhLqOxh@qEjOuAfFy@pD]dBy@rFc@rDOfBOlBObDG~AGjD@jx@RhcD@ff@C|g@L~eBJvzBAfh@@bh@FpSHlFHp\\\\FfLJv`@~@||CFnb@?nLFjp@\\\\zvCOvm@Q|jA^lHr@|Er@|Cx@jChAnCbDxFry@zmA~DrGxBpF~AjGn@nFVnF@nEGfyCAd\\\\AlB?fNDfDF~BFfAXbDLtBJrB~Dji@xBfZNrB|B|Zp@tJf@fDd@pBh@nBbApCx@pBnAvBxA|B|AjBp^rd@~IvKxA`Cn@lAnAbDnAzEt@|EVrCL`DFnCB~P?fD@f`@AfB@fPOjNI|FAlD@jTApWLjsA@bHBzPA~K@tCCdL?`JD|i@H`g@?jBCj_@Bvr@@`QFfJBbCDnK@dN@bR?dCCfRArDGrBOnCi@lGmA|REhA?vB?zJ?bC?r\\\\?xBP|RBjAn@xS~@jXFbCR~FJrDD~T?dC?`O@pCBvMAdR??i@rD_@~@[h@??iDfEuBvCc@fAETM`AA^@n@H|@Jd@L\\\\\\\\l@jB`C\\\\XZNXH^FX@ZCTE\\\\Kh@YNQT]z@}A^e@TORKn@Q`@CjABpI~@~Fr@tAJrGBdEAnEAfCRNBjAP|Ad@z@ZhB`ArAz@rO~Jz@t@h@f@`@f@x@lAn@pA^`AV~@XlATzAHbAFtC?zO@bE?vNHhCJrAZtBd@vBlArDx@bClBfF|DtK`EhLbFfNr@dB|BpEfCpErBjC~ApB|AbBlBfBzAnAzFzEbNbLtC~B|JhIvBdBvDfDjH|Ff[fW|InHfIrG`CjBhA~@rPhNxAnAtPdNp\\\\vXlO`M`JrHd]~X|BhBbGrEdGdD|EjCdEtBdStKrHbEdBx@jDxAfEzAhBh@hEdAdFbAlGr@fFp@ho@fIhh@tGziBpUpZvD|SlCx@Fr@BlGAbb@BvU@zQ?dVBzp@D|g@?jO?dg@BzLFhC?|H[lOs@pBW~Bc@rBm@jBw@nDqBhB{AhHwGbA}@pLiLf[aZ|[mZzTgTbD{CfT}RbF_FpDgDxG}Fl@e@xEqDvBgBxB_B|MgKjLwIbLyItQmNnC{BzL_JfEeDrB{AlWgSpFcE`W{RdDoCfBgBna@i`@xeAycAlQqPnBgBtByApCiBxEcC~CoApDkAhEgAdCe@vBYpDYhCMlAEr\\\\IzMCvr@?jMB~fA?baCJhc@B|DFfh@FfBB`v@TvhAVbKCfTo@t`@?zJ?~gABl`A?vb@Cj}ABf~A?~_@?bC@dMAz]B`LG`J[hE]dTkBhGa@~LKzNB|GAjSAr[Fz^BzC?t`@Clp@?hQDxC@`IChEMzBQrCYbBYxXaFjjIm{AdlAmTfGqA|C}@r[cLhc@qOjVsIra@uNhnBoq@dHeCdNyEt_Ak\\\\di@aRjAe@nGuCbDsBnDgCxPmNlDmC`BaAfAk@lCkAdBk@~Bo@jDo@tBS`BIrBEzC@x@BrALbD\\\\tM`BxCX|I`AdBLjDJlRDxp@?p}@FvIBrZ?pLDlJDzCPxK~@hDPz`@DpGArh@@lC@nCC`ACjBOxC_@r@M`EgAxAc@hDwAnEoBzVaLvt@e\\\\jr@e[`j@iV`CcAfBk@|C}@rBc@hDi@dC]nCUjBI~CEvJ@jVCvfAFzOElHF|m@BbSEzP@tJAlQDzS?xl@@`NC~K@pR?t]HtG?`\\\\Hjd@Ifq@C~_A?xBBvDGnCKtAIzDa@rASzAYzA]~DeAfBm@~@_@~DeBlDmBv@e@re@_^fe@w]|JwH|m@wd@pi@ka@fKsH|MgKfSgOfAu@|A}@bB}@fBy@bCeAdDkA`HyBlGmBtHiC|L{DjNsE|g@kPzQeGbJqCtNwE`MgEnxB_s@t|@gYbMaEpr@{TdwAwd@lEkAvDg@vc@[zg@g@|ZWrJGtJDtG\\\\lARrE`AlExAdLtGlCxBnDzEfFdG`GbHz^hd@nKzM`F|FpHrJdTvWbClClEpF`L|LpB|BjHjIxFxFlGlHzHtI~RvU`IxJzAdB`BxAnAz@hAn@`An@zAp@fBn@zBn@lCZ`BJjBDbF@bUSbJAlB@pMMpDBpIb@pRr@nDVnI`@dG@hDItDUpKu@nGk@nKu@nKw@l]uAdO]jk@mA``@Sph@Q`LKvAAlO?vH`@|HdBbIlDfAr@jB~A~DdDjOtTvAnBlS|XxE~GbOhTtE|GnAtBhDpGjD`HlKnOrMjRrIrLfUp\\\\jHtKzChFtd@feA~_@l}@fSle@ls@haBhHzP|FrMbJvOzEbH~D|FzJhNxDlEtBxAdAf@`GfBtEn@p@@lIJpa@?vERpCf@bChAvDlBfCnCdAfAtCdDpGnH`EjFrGlHhExC|AfAdHvCvDlAjBZ`F`@pZNbdA?pWD|e@E`nCLbt@@pGBrZAt_@Qj^@hfAFtsBQbZKxU?fLBbKFne@@xU?|]Frk@Fp_ACvtAAx^AtKCxBCxAAdEEnTDbHFnO?xkAGpLKvFe@vHkBzEwBvFuDvDoDhJaL|HmJlOyRfByBl@u@tBgCdBsApDsAhCUxKB~RDdYGfDCpM?xCAnEB|JEnEOfCWtBY|Cq@pA_@bBm@dIiDnBu@tDkAvBe@`B]`Fq@~DYbAE|ACp{AQvz@?t]?v^Ely@Gh`BCtP?vA@fBDbADfAN~Bd@dB`@jCr@bFlB~B`AbNtFlCbAfA^vDbAlCl@fBVzCXvCTbBHfBDjP@~H?zR?xAGhBMvAQlAQfAWjA[zAg@jAe@dEuBrAq@v@a@nBu@jCs@~Bc@nFa@bMAxLAbCHvCPbKlA~BRnFTlA@~BBzDFvF@|JJfDEzCGvAQnBYfASdAW~Ai@zJwBnEeApD}@tLqC|Bi@hDy@t@QzCe@zD_@rAItEKlB?|C@fOG~a@GzB?hSGpYCpSIbB?xBD|BNxBXjCb@dDZlCLvC@j]GbD?z^IpBIjBSf@IvAMvEw@`AKnBIp\\\\MpDA`ME`GIxJCjBBrGCxGIpX]bEC|B@bE^fBR|B^tCz@v@T`Bn@hAh@vC~A~@n@`CjBjFpEv\\\\xXnCvB`DzCnBtAbB~@rAh@zA\\\\vC^t@Dj@@xBAnBQ`MuAnEe@d[iD~AOlCYxCi@rCm@vBk@t@WlG_C??dAU~Am@`A]xBeAzIyEl@YvB}@t@U`AO|AI??l@RNRLXAvADzA??FrB@|@Cv@UzCIrB??u@pHc@rFIlECvB@fE@p`@?zD@\\\\BzJBnbAAl^DvCFdBLdBr@tEd@lBl@jBt@fB|@`B|ElI|JlQvPd[tIjPrWvg@zDdJjD~HtCjHjDxGbE~G~BpDfB~ChA~AbOdVlCbFvHrNhKbRdDzGfBhE`FbMlBxEdDxHrAnCz@~Ab@x@nB~CbBrCdF`IzEtHbJnMrGfKxEdJhEbIbElIzAnDzE~NnBnF~DdIpEhIbFhI??|\\\\dm@fEfIxBtDbHzMvQv]nAfC`DzFpBxDpDdHzJnRtCtFjBzD|BlE~J`Rt\\\\no@jA~B^~@Xj@fPrVjDhF~BrDbDtDxBzB`CpB~CtBfE`CvFvB~RtGrMlEtDjBlDdCrCdCfCtCdCrDxBzD`CxGrAjEt@xBzC~IjAbFz@vG^vE\\\\pQZxZFz@DhAt@tGvBlLjArG^hBj@|Bf@fBpBjFl@lAnYfj@~IzPrEhJbBxChHhNdc@zy@|Ttb@`GlLtKvS~BrExOzYhGpLbGtLbCdEp@rAtAlCdu@fwAdN`X~h@hdAxPv[~Sr`@|g@vaArF~Jh\\\\xn@vIlPjUlc@`BlCbArAt@|@~@`AhAbAjOjLzWfSfOfLvBpAZNXCtCvAlAr@|AfApDrCtDtC`FpDfCjBnCzBlCpCJ`@j@n@nArAnBbBda@xZxc@x\\\\zi@`b@r[`VvDzBdD|A`NtFnHpCfHtC`KbE|X~KzFxBbm@bVvj@xTxd@zQd^tNjH~CnBv@lBb@`EdBfQ`HdFrBbJnDjChA~ZbMvTvIrb@tPzu@nZryAjl@nyAbl@dzAll@vIlDh^tNdp@rWlTvIfS|HbFrBfO`G`LrEdK`ElVtJnW`KvJbEfK~Df|@t]~n@zVrTtItb@|PdA\\\\bBj@|@XnB`@t@LpCT~DHjIJvCFpEBvAA`DGl@Eb@KdGClE@tEB|BCpA@rBOxANhB?bB?tD@V?f@?L?b@?D?X?t@?`C?rBAjA?b@AZ?T@R@ZFFB^J\\\\`@VD~AfAf@P^Fb@BnC?|ECvEAhE?nE?v@Fj@Jz@Xj@ZXTVV`BvBb@D??\\\\p@`BlBbAdAzUbXdBfBrFdGnArB~CnF|CrF`DlFlAlBrAxAnDtGDd@~EfIhC`E|AxBtAxAvAlAfC~AjCxAnAv@`@\\\\|B|BfArAzRfWtCzDpE|Fn@|@fAlBf@bAl@xA`ExK\\\\x@n@rAvAhCxFxHxJfMvEjGvn@by@fVd[jMtPhQbUnLrOrDpEzElGdRnVjG`IxBrChs@x~@dc@|j@v{@~hAvI`LbLjNjA|Aja@rh@~q@~|@hRlV`q@b|@jF`Hp[pa@jb@hj@hQxTtG|HxE~E~AdBXH~ApBV\\\\hDbEV\\\\X\\\\vCtDdKxMxBtCNb@tBvCxG`KlAlBlHjKn{@lhArUrZjaBhvBzOrSdg@ro@jCpDdm@`w@|NhR~AjBjVj[|G`JnHfJj]~c@dP|StHrJt~@dlAbC|CXXnAhAbBhAxBfArAh@T@zAr@zAx@`Ax@Z^l@x@V^j@nAZbA^|APfBFfB?nHBrBFtAHt@RnAVdA\\\\dAj@hAT\\\\fArAZXhAv@rAp@xFdCvBbAjAx@x@t@j@n@~@lAva@bi@fBhC~C|Et@jAbCvDzF`J~EtGxEfGvCrDtCpDjA|AfAvApCrDvEfGz@fAfCbD`LxNnEzFjGbInPdTrIzKnJzLHXhBdCbEtGvBxC`ItJpDjEdRlUfS`Vzy@rbAbNnPfPlRrp@|w@|Yx]rMjOzVvZ`j@dp@fDpC|CpBfEbBrFrApBd@vCPjCJrmAI~OH`[@bm@IhMBrp@CpKGrAApJBxg@GvRGn]Lrc@Kju@A`VEhUDrl@CZAvTL`V@xd@KvF?bSDfBBvbAGn@?jE?`E?fj@Cx`@AfB?xCLpAPpA\\\\`Bh@`GhBfCp@`Ch@t@Pf@CvJpClEtApEvA`EnAPFnDhA`@LnEtAfAZzAXl@FfAHfA@zIChGAdGAhGGpEA??ArF@xHAzD?~CCxACbAKxBCn@e@xFq@vFcAlFiAxFy@~DuEpTcBtHoGt[If@_FtVe@jBg@|D}@bE_A`IKfDEbFFv`AHxb@A~^FjaAStw@?tJHlf@DhjBChkBE~iB?djB@~X?hjCAhN?f`@Hnw@Czr@GjpAFvL?fg@B~HCvPYhLYjOU|IA~EBbyBBrnBBnLIjJ[jK_Ax]oAve@_F||AgBlp@VtXz@fv@v@ru@r@vd@n@xn@JhO?~_ACrp@Fvu@Fp\\\\Bv~AAdc@AlU@fEDd[BvMJ~G`@~SR|I`@dSj@~YRzTNhQJfLRlUHdJRnUH`IJnJDdBJpBH|@ZjCPbAf@`Cx@rCdAlCbAtBfAjBv@dAnAzA`A`A`T~Q~FbFjHrGrJnItFxE|EjEfDrCdA~@f@b@nAfAtN~LjEvDjPrNfB|AVPR?\\\\XpAhAfHjGlC|BzFbF|DhD|BnB`Ax@f@d@Z`@n@~@r@~A`@lANt@ATJ~@H`B?vB@xF?z@D\\\\@xCAvF?rF?xF?vFAxF?vF?vF?vF?tFA`F?RAdA@~K@vFAjF?nF@j^?pCAjBAjEBd\\\\AvH?hN?rU?rT?rF?|Q?f@?zGKl@?pG?pA?dBCjR?LPlAE~nA@bECfc@?nC?fLA|r@?^?V?|D??K\\\\E^A~^E~{@M~xC?rFEti@?jICxb@???p@Cbe@?lb@Era@AnM@hSIna@Xn}EA`KB`vARv}BAdZFxEPdFVzCZdDd@dDz@dFx@xDhA|DzAnEdBbFpEjMhFtO`Kn[nDlKlNda@la@fkAfSpk@`dAtwCzm@jfBdn@dgBlKnZpg@rxA|Wtu@dCjHfDvJtNda@dA~CpJjXb]xaA`_@bfA|]rbAz_@vgAlDnJjD`Kn@vBrIzZbc@t}Ad@dBbb@d{A`C`Jdo@b}Bxj@tqBjn@|zBfMfd@r\\\\nlAfB`HxBrJbiA|xFdc@|xBvN|s@hAbFpBtHdB`Gb@dBjQho@jJz[rHbXnAzElAfEhg@lhBt@dE~@dGf@jETvDRhF^~PdAtb@f@zT`DbtAb@fQfDpwAnAlf@hClfAd@lTvDv~Ar@jZVtFp@pM|HbyAbPt|CvDxr@nAhVlB|]^jHHnCFtDCdDOpGYlFwTzbC_BjRsMjxAcHpv@{OpfBuJffAg@pGQxFC|FFtETjG^vEd@lEt@rEj@tChAtEhArDbAnC|qAx~CxKpWzQdc@t@fBnB`EpBpDhT`\\\\x{BbiDlRjYhF~H|s@~fAdQxWb\\\\rf@pOtUfSnZjF~H`Ynb@lMnRtJbOlEtG~I~M~AdCh[be@fDrFhAjBbC`FjCfHd@xAxBlGtDvKnGfRdBdF`K~YbGbQrDrKlFtOvI`WpCdIlRlj@tGlRtM|_@zIfWlBxFxAdEdA|Cr@xBZfARx@RnARhBDx@FvABrA?`BAlC?j@?\\\\CnG?D?J@fC@`C?bCA|BAdC?rBFR??P?vC@b@@h@?lA@~@?\\\\?~@?jFB`JQ`GMpBK|AQbAOjB]`B_@zAc@fAc@dAc@h@[bAk@P[\\\\Uf@[lAeA~BcChHqIn@k@pA{@vAo@x@WvPuDdYgGjGuAnCk@pAY~Bg@JCVDxEu@dD]tAGjAB`AFx@LNBxAd@xAt@ZRh@XPJP?zCfB~HxEpGvDxJ~FnC~AfAp@lDtBjAp@h@ZxHnE`DlB~D`Cr@b@JFj@\\\\d@VdBdAh@ZdJpF~BvAbB`AhHjEz@f@B@lAt@hAp@xIhFhWlO~@h@HDLJh@ZJFjYzPlBjA`DlBtGxDfL~G`CtAjp@n`@`@TlVzNfAn@HPrBnAdJfGj^jTt@d@fCpAzEtB~s@nYrEhBf_Ad_@~\\\\`Ntn@zVhEbBxB|@dJpDnKpDpBv@bNjFxEnBpVtJlTzIzw@f[nIhDnIfDrd@vQzIpDzYhLfUdJpLzErLrEnOfG|KrEnBz@pNpF`ZpLfE~Aht@vYtKlEhVlJdI~CjElBzBz@zOxG~Bt@`DpA|CvAzDxBbDzBjA|@pAfAlAjAnArAlArAjAzAvPhUbClDlJ`MdA~A`FtG|P|UjOnSbB`ChDjEn^`g@nFjHlL~OhB`ClAhBvGvIxC`EtB`Dp[tb@pC~Dz@pA~BbErAxCp@hB~@pCj@nBbArE^pB^hCNjAr@lIbAhMHbAv@tIRhCLhA`@xB\\\\xAt@fCDJn@dBTf@hAzBt@jAv@bArA~An@l@rBfBnFjDZTjBhAbFbDvAx@hKxGjAr@rLlH`C~A~PvKdOhJfLlHtBnA|BzAfCxArCfBrQfLjJ`GxBxApIdF`HlEdFdDlDtBzB|AhAn@`_@nUvEzC~MpItBnAlCdBtD`CfNxIvSlMlJbGzCnBpC`B`BjAtBnAnFlDvCbBnHtExE`DxAv@~EbDtEnC|GhExCnB~MpIvKzGxCpBhBdAtAbAP?zK`HrK`HlM`IhCdBfCxApBrAtSlMdM`IvNzIdC`Bj\\\\tS|@l@lN~ItN|I^VjCbBfNrIlAz@lBnAjNtIrEzCrHvEx@l@nS~L`JzFD@hMdIlC~AhG|D`W|OpRxL~GdEfIlF|IlFvClBdIbFhIdF`ElCdKpGpLhH`HnEhDrBlInF`DnBpm@p_@nInFvFrDbV`O`NpIvRvLdAv@~AtAhAhA~@jAjA`BfAnBjAfCl@`Bj@pBt@lDfIzc@zAdJ~F|[|^vqBnHva@L^DXrAnH`ArF~Fp[bs@f|D~DrOxa@hpAl_@fiAlGnUlDtO`[vhCrE|b@pFxd@hp@x}FHl@h@tDh@tC^fB^vAv@nCl@dBl@xAlBrE|P|[tTnb@`J~PzB~DxA|B~ArBf@p@\" \n }\n */\n $distance = $mqResult->{\"route\"}->{\"distance\"};\n if($distance > 0){\n $newLeg = new TripLeg();\n $newLeg->id =$lastid+10;\n $newLeg->distance = $distance;\n $newLeg->startLatLong = $lastLatLong;\n $newLeg->endLatLong = $newLatLong;\n $newLeg->MQencodedPath = $mqResult->{\"route\"}->{\"shape\"}->{\"shapePoints\"};\n\n //echo json_encode($newLeg);\n\n //Push the leg to the end of the $tripPaths->{$trip}\n array_push($tripPaths->{$trip},$newLeg);\n //var_dump($tripPaths);\n\n if($newTripsRoute = fopen($jsonRouteFilePath,\"w\")){\n fwrite($newTripsRoute, json_encode($tripPaths));\n fclose($newTripsRoute);\n $result = TRUE;\n }else{\n //error using fopen.\n $error_msg = \"Could not open file.\";\n $result = FALSE;\n }\n }else{\n //No distance between provided point and last point. Likely the same point was provided.\n $error_msg = \"No distance travelled\";\n $result = FALSE;\n }\n }else{\n $error_msg = \"No MapQuest result given. Could not add Leg to trip.\";\n $result = FALSE;\n }\n if(!empty($error_msg)){echo $error_msg;}\n return $result;\n}", "function setCoords($a_coords)\n\t{\n\t\t$this->coords = $a_coords;\n\t}", "public function gen_coords($city_only = true) {\r\n if (!$this->city) {\r\n return false;\r\n }\r\n $place = \"\";\r\n if (!$city_only) {\r\n $name = str_replace(str_split(\"_ -/\\\\&?\"), \"+\", $this->name);\r\n $address = str_replace(str_split(\"_ -/\\\\&?\"), \"+\", $this->address);\r\n $place = \"$name+$address+\";\r\n }\r\n $address = \"$place$this->city+$this->state\";\r\n $google_api_key = \\Nefuzz\\Php\\Auth::google_maps_key;\r\n $url = \"https://maps.googleapis.com/maps/api/geocode/json?address=$address&key=$google_api_key\";$curl_handle = curl_init();\r\n curl_setopt( $curl_handle, CURLOPT_URL, $url );\r\n curl_setopt( $curl_handle, CURLOPT_RETURNTRANSFER, true );\r\n $choord_info = json_decode(curl_exec( $curl_handle ), true);\r\n curl_close( $curl_handle );\r\n if ($choord_info[\"status\"] === \"OK\") {\r\n $result = $choord_info['results'][0]['geometry']['location'];\r\n $this->lat = $result[\"lat\"];\r\n $this->lng = $result[\"lng\"];\r\n return $result;\r\n } elseif ($choord_info[\"status\"] === \"OVER_QUERY_LIMIT\") {\r\n // This is thrown if too many addresses are querried at once\r\n throw new Exception(\"OVER_QUERY_LIMIT\");\r\n } else {\r\n return false;\r\n }\r\n }", "function oneclick_google_map_plugin_geolocationpage()\r\r\n{\r\r\n if (!current_user_can('manage_options')) {\r\r\n wp_die('We hereby declarating :You are not authorised to access this plugin');\r\r\n }\r\r\n global $plugin_url;\r\r\n global $options;\r\r\n if (isset($_POST['geolocation_settings_form_submitted'])) {\r\r\n $hidden_field = esc_html($_POST['geolocation_settings_form_submitted']);\r\r\n if ($hidden_field == \"Y\") {\r\r\n $gmap_iconizer_latitude = esc_html($_POST['gmap_iconizer_latitude']);\r\r\n $options_geolocation_page['gmap_iconizer_latitude'] = $gmap_iconizer_latitude;\r\r\n $gmap_iconizer_longitude = esc_html($_POST['gmap_iconizer_longitude']);\r\r\n $options_geolocation_page['gmap_iconizer_longitude'] = $gmap_iconizer_longitude;\r\r\n $gmap_iconizer_zoom_level = esc_html($_POST['gmap_iconizer_zoom_level']);\r\r\n $options_geolocation_page['gmap_iconizer_zoom_level'] = $gmap_iconizer_zoom_level;\r\r\n update_option('oneclick_geolocation', $options_geolocation_page);\r\r\n $url = admin_url('admin.php?page=oneclick-google-map', 'http');\r\r\n echo '<script> window.location=\"';\r\r\n echo $url . '\"; </script> ';\r\r\n }\r\r\n }\r\r\n $options = get_option('oneclick_geolocation');\r\r\n $gmap_iconizer_zoom_level = $options['gmap_iconizer_zoom_level'];\r\r\n $gmap_iconizer_latitude = $options['gmap_iconizer_latitude'];\r\r\n $gmap_iconizer_longitude = $options['gmap_iconizer_longitude'];\r\r\n require ('includes/plugin_geolocation_wrapper.php');\r\r\n}", "public function updatelocationAction()\n {\n $userInfo = new UserInfo($_POST);\n if ($userInfo->hasIPUpdated())\n {\n $userInfo->saveIP();\n $userInfo->findLocationFromIP();\n $userInfo->saveLocation();\n }\n }", "function getGeoSearchUrl($ar){\n $p = new XParam($ar, array());\n $table = $p->get('table');\n $fieldname = $p->get('fieldname');\n $moid = $this->_moid;\n $templates = 'googlesearch.html';\n return $GLOBALS['TZR_SESSION_MANAGER']::complete_self(true, true).\"skip=1&&moid={$moid}&class=XModMap&table={$table}&field={$fieldname}&provider=google&function=geoSearch&template=xmodmap/geosearch.html&tplentry=br\";\n }", "public function actionAjaxRecollectGeo($location, $prepend_location, $node_id)\n {\n try {\n\n $model = new Geolocation();\n\n /** Save node location */\n $prepend_location = (!empty($prepend_location)) ? $prepend_location : null;\n $save_location = $model->saveNodeLocation($location, $prepend_location, $node_id);\n\n if ($save_location) {\n $response = ['status' => 'success', 'msg' => Yii::t('app', 'Action successfully finished')];\n }\n else if (is_null($save_location)) {\n $response = [\n 'status' => 'warning',\n 'msg' => $this->module::t('general', 'Google API cannot find given address {0}', $model->prepareNodeLocation($location, $prepend_location))\n ];\n }\n else {\n $response = ['status' => 'error', 'msg' => Yii::t('app', 'An error occurred while processing your request')];\n }\n\n } catch (\\Exception $e) {\n $response = ['status' => 'error', 'msg' => $e->getMessage()];\n }\n\n return Json::encode($response);\n }", "private function getLocation() {\n $ch = curl_init();\n $timeout = 5;\n curl_setopt($ch, CURLOPT_URL, 'http://widgets.wia.io/embed/wgt_ca2Yvooa/dev_faldy1tg');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n $data = curl_exec($ch);\n curl_close($ch);\n $arr = array('See our Terms and Conditions!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error(\"Segment snippet included twice.\");else{analytics.invoked=!0;analytics.methods=[\"trackSubmit\",\"trackClick\",\"trackLink\",\"trackForm\",\"pageview\",\"identify\",\"reset\",\"group\",\"track\",\"ready\",\"alias\",\"debug\",\"page\",\"once\",\"off\",\"on\"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t',\n 'DeviceTrackerUpdated','Widget'\n );\n $data = strip_tags($data);\n $data = str_replace($arr, '', $data);\n\n $arr2 = array('~var wia = \\'.*\\';~','~var wiaDevice = \\'.*\\';~','~var wiaWidget = \\'.*\\';~','~var wiaEvents = \\'.*\\';~','~var wiaEvent = \\'.*\\';~','~.* .* ago~');\n $data = preg_replace($arr2, '', $data);\n $data = str_replace(array('var wiaLocation = ',';','\\''),'',$data);\n echo trim($data);\n }", "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 provideInvalidCoordinates() {\n/******************************************************************************\n ** **\n ** I actually FAIL the fifth test. I've got a bug in the method. **\n ** **\n ******************************************************************************/\n return [\n ['Way up north'],\n ['39.7392° N'],\n ['104.9903° W'],\n ['39.7392 N, 104.9903 W'],\n ['39° 44\\' 31.3548\" N, 104° 59\\' 29.5116\" W'],\n ['99.7392° N, 104.9903° W'],\n ['39.7392° N, 184.9903° W']\n ];\n }", "public function testPointStoreRouteInvalidFields()\n {\n $response = $this\n ->actingAs($this->user)\n ->from('/city/' . $this->city->id . '/point/create')\n ->post('/city/' . $this->city->id . '/point/store', [\n 'desc' => null,\n 'latitude' => -1000,\n 'longitude' => 'Laravel is awesome'\n ]);\n\n $response\n ->assertRedirect('/city/' . $this->city->id . '/point/create')\n ->assertStatus(302)\n ->assertSessionHasErrors(['desc', 'latitude', 'longitude']);\n\n $this->assertDatabaseMissing('points', ['lon' => 'Laravel is awesome']);\n }", "public function getLocationByCoordinates($latlng);", "public static function updateUserLocation() {\r\n $debug = \\Drupal::config('smart_ip.settings')->get('debug_mode');\r\n if (!$debug) {\r\n $ip = \\Drupal::request()->getClientIp();\r\n $smartIpSession = self::getSession('smart_ip');\r\n if (!isset($smartIpSession['location']['ipAddress']) || $smartIpSession['location']['ipAddress'] != $ip) {\r\n $result = self::query();\r\n self::userLocationFallback($result);\r\n /** @var \\Drupal\\smart_ip\\SmartIpLocation $location */\r\n $location = \\Drupal::service('smart_ip.smart_ip_location');\r\n $location->setData($result);\r\n $location->save();\r\n }\r\n }\r\n }", "function frame_location($params = null)\n{\n global $post, $pagenow, $typenow, $current_screen, $template;\n\n // Handle function arguments\n $num_args = func_num_args();\n\n // If there is more than one argument, they are set as key => val\n // Example: frame_location('admin', true, 'post_type', 'page');\n if ($num_args > 1)\n {\n $args = array();\n\n // Passing in keys as args this time so we don't need to access global scope\n for ($i = 0; $i < $num_args; $i++)\n {\n // Run following code on even args\n // (the even args are numbered as odd since it counts from zero)\n // `% 2` is a modulus operation (calculating remainder when dividing by 2)\n if ($i % 2 != 0)\n {\n $key = func_get_arg($i - 1);\n $val = func_get_arg($i);\n // Join odd and even args together as key/value pairs\n $args[$key] = $val;\n }\n }\n\n // Set the arguments to the $params in order to continue as normal\n if (!empty($args)) $params = $args;\n }\n // Allow for a single argument as a query string: arg1=something&arg2=somethingElse&multiArg=one|two|three\n else if ($num_args === 1 && is_string($params) && strpos($params, '=') !== false)\n {\n parse_str($params, $params);\n\n // Checks and split multiple values\n foreach ($params as &$param)\n if (strpos($param, '|') !== false)\n $param = explode('|', $param);\n }\n\n\n // d($_SERVER, '_SERVER');\n // d($_SERVER['PHP_SELF'], 'PHP_SELF');\n // d($_SERVER['REQUEST_URI'], 'REQUEST_URI');\n // d($_SERVER['SCRIPT_NAME'], 'SCRIPT_NAME');\n\n\n //////////////////////\n\n\n // Gather current location values\n\n $admin = is_admin(); // Are we in the admin area?\n $frontend = !$admin; // Are we in the frontend area?\n $logged_in = is_user_logged_in(); // Is the current user logged in?\n $url = frame_url(); // The current URL\n $segments = (!empty($params['segments']) && frame_segments() != $params['segments']) ? false : frame_segments(); // The URI segments to match\n $file = ($admin) ? basename($_SERVER['SCRIPT_NAME']) : basename($template); // The current filename (in the frontend it's 'index.php', 'archive.php' etc... it doesn't work with get_template_part: use __FILE__ instead)\n $post_type = null; // The current post type\n $post_id = (isset($post->ID)) ? $post->ID : null; // The current post id\n $slug = (isset($post->post_name)) ? $post->post_name : null; // The current post slug\n $page = isset($_REQUEST['page']) ? sanitize_key($_REQUEST['page']) : null; // The current page number (used when paginating results)\n $action = isset($_GET['action']) ? sanitize_key($_GET['action']) : null; // Used in the admin\n $ajax = ( !defined('DOING_AJAX') || (defined('DOING_AJAX') && DOING_AJAX === false) ) ? false : true; // Are doing an ajax request?\n $saving = (!empty($_POST)) ? true : false; // Are we sending post data? (maybe change this...)\n $customizer = is_customize_preview();\n\n\n // $post_type specific optimization\n\n // Get post type from post object\n if ($post && $post->post_type)\n $post_type = $post->post_type;\n\n // Check $typenow object\n else if ($typenow)\n $post_type = $typenow;\n\n // Check $current_screen object\n else if ($current_screen && $current_screen->post_type)\n $post_type = $current_screen->post_type;\n\n // Pages and custom post types\n else if (isset($_REQUEST['post_type']) && $admin)\n $post_type = sanitize_key($_REQUEST['post_type']);\n\n // Standard posts\n else if ($file == 'edit.php' && !isset($_REQUEST['post_type']) && $admin)\n $post_type = 'post';\n\n // Attachments\n else if ($file == 'upload.php' && !isset($_REQUEST['post_type']) && $admin)\n $post_type = 'attachment';\n\n // When inside edit screens, get the post type from the post ID\n else if ($file == 'post.php' && isset($_REQUEST['post']) && !isset($_REQUEST['post_type']) && $admin)\n $post_type = get_post_type(sanitize_key($_REQUEST['post']));\n\n // End of $post_type specific optimization\n\n\n // Put the values together\n $location = array(\n 'admin' => $admin,\n 'frontend' => $frontend,\n 'logged_in' => $logged_in,\n 'url' => $url,\n 'segments' => $segments,\n 'file' => $file,\n 'post_type' => $post_type,\n 'post_id' => $post_id,\n 'slug' => $slug,\n 'page' => $page,\n 'action' => $action,\n 'ajax' => $ajax,\n 'saving' => $saving,\n 'customizer' => $customizer,\n );\n\n // d($current_screen, 'current_screen', true);\n // d($admin, 'admin', true);\n // d($file, 'file', true);\n // d($page, 'page', true);\n // d($post_type, 'post_type', true);\n // d($action, 'action', true);\n // d('==========================================================');\n\n // d($location, 'Current location');\n\n // parse_str($params, $params);\n // d($params, 'params');\n\n\n //////////////////////\n\n\n // Compare the $location array with the given $params\n // Example: frame_location(array('param' => 'value')); // Return bool\n if (is_array($params))\n {\n foreach ($params as $key => $val)\n {\n // d($val, $key);\n // if (array_key_exists($key, $location) && $location[$key] !== $val)\n // return false;\n\n // TODO: Maybe change to...\n // $location = frame_location_item($key, $val);\n // if ( (is_array($val) && !in_array($location, $val)) || $location != $val )\n // return false;\n\n // if (!frame_location_check($key, $val))\n // return false;\n\n\n if (array_key_exists($key, $location))\n {\n if (is_array($val))\n {\n // d($val, 'is_array');\n if (!in_array($location[$key], $val))\n return false;\n }\n else\n {\n // d($val, 'normal');\n if ($location[$key] != $val)\n return false;\n }\n }\n }\n\n return true;\n }\n // Return one element from the $location array\n // Example: frame_location('param'); // Returns 'param' from $location\n else if (is_string($params) || is_numeric($params))\n {\n return (isset($location[$params])) ? $location[$params] : null;\n }\n // Return the whole location array\n // Example: frame_location(); // Return array\n else\n {\n return $location;\n }\n\n // global $current_screen;\n // d($current_screen, 'current_screen');\n}", "public function map()\n\t{\n\t\t$map = 'http://maps.googleapis.com/maps/api/staticmap?zoom=12&format=png&maptype=roadmap&style=element:geometry|color:0xf5f5f5&style=element:labels.icon|visibility:off&style=element:labels.text.fill|color:0x616161&style=element:labels.text.stroke|color:0xf5f5f5&style=feature:administrative.land_parcel|element:labels.text.fill|color:0xbdbdbd&style=feature:poi|element:geometry|color:0xeeeeee&style=feature:poi|element:labels.text.fill|color:0x757575&style=feature:poi.business|visibility:off&style=feature:poi.park|element:geometry|color:0xe5e5e5&style=feature:poi.park|element:labels.text|visibility:off&style=feature:poi.park|element:labels.text.fill|color:0x9e9e9e&style=feature:road|element:geometry|color:0xffffff&style=feature:road.arterial|element:labels|visibility:off&style=feature:road.arterial|element:labels.text.fill|color:0x757575&style=feature:road.highway|element:geometry|color:0xdadada&style=feature:road.highway|element:labels|visibility:off&style=feature:road.highway|element:labels.text.fill|color:0x616161&style=feature:road.local|visibility:off&style=feature:road.local|element:labels.text.fill|color:0x9e9e9e&style=feature:transit.line|element:geometry|color:0xe5e5e5&style=feature:transit.station|element:geometry|color:0xeeeeee&style=feature:water|element:geometry|color:0xc9c9c9&style=feature:water|element:labels.text.fill|color:0x9e9e9e&size=640x250&scale=4&center='.urlencode(trim(preg_replace('/\\s\\s+/', ' ', $this->cfg->address)));\n\t\t$con = curl_init($map);\n\t\tcurl_setopt($con, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt($con, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($con, CURLOPT_RETURNTRANSFER, 1);\n\t\treturn response(curl_exec($con))->header('Content-Type', 'image/png');\n\t}", "public function test_make_coordinates_2()\n {\n $coord = \"-120,\";\n $dd = \\SimpleMappr\\Mappr::makeCoordinates($coord);\n $this->assertEquals($dd[0], null);\n $this->assertEquals($dd[1], null);\n }", "function locations_search($lat, $lon, $connection, $start = 0)\n{\n\t$db_selected = mysql_select_db(Secure::DB_DATABASE, $connection);\n\t$sql = \"select organization_location.address , organization_location.city , organization_location.state , organization_location.zip , organization_location.latitude , organization_location.longitude from organization_location where latitude <= {$lat} + 0.1 and latitude >= {$lat} - 0.1 and longitude <= {$lon} + 0.1 and longitude >= {$lon} - 0.1 and remove_approved = 0\";\n\t$sql = $sql.\" limit {$start},\".LIMIT;\n\tif(!($resource = @ mysql_query($sql, $connection)))\n\t\tshowerror();\n\t\t//echo $sql;\n\telse\n\t\treturn $resource;\n}", "function fumseck_display_exif_geocoord($featured_image_exif) {\n\t\n\t$exif_latitude = $featured_image_exif['image_meta']['latitude_DegDec'];\n\t$exif_longitude = $featured_image_exif['image_meta']['longitude_DegDec'];\n\t\n\tif ( $exif_latitude && $exif_longitude ) {\n\t\t\n\t\t$output = sprintf(\n\t\t\t\t'%d° %d′ %d″ %s, %d° %d′ %d″ %s', \n\t\t\t\t$featured_image_exif['image_meta']['latitude_DMS']['degrees'],\n\t\t\t\t$featured_image_exif['image_meta']['latitude_DMS']['minutes'],\n\t\t\t\t$featured_image_exif['image_meta']['latitude_DMS']['seconds'],\n\t\t\t\t$featured_image_exif['image_meta']['latitude_DMS']['direction'],\n\t\t\t\t$featured_image_exif['image_meta']['longitude_DMS']['degrees'],\n\t\t\t\t$featured_image_exif['image_meta']['longitude_DMS']['minutes'],\n\t\t\t\t$featured_image_exif['image_meta']['longitude_DMS']['seconds'],\n\t\t\t\t$featured_image_exif['image_meta']['longitude_DMS']['direction']\n\t\t\t\t);\n\t\t\n\t\t$output = '(<a '\n\t\t\t\t. 'href=\"http://www.openstreetmap.org/?mlat=' . $exif_latitude . '&mlon=' . $exif_longitude . '\" '\n\t\t\t\t. 'title=\"' . __('View this location on OpenStreetMap (opens in another window)', 'fumseck') . '\" '\n\t\t\t\t. 'target=\"_blank\"'\n\t\t\t\t. '>' . $output . '</a>)';\n\t\t\n\t\techo $output;\n\t}\n}", "function get_pose(){\n header('Content-Type: application/json');\n $posx=$_SESSION['world'][$_SESSION[\"room\"]][\"points\"][0][0];\n $posy=$_SESSION['world'][$_SESSION[\"room\"]][\"points\"][0][1];\n $dimx = $_SESSION['world'][$_SESSION[\"room\"]][\"points\"][1][0]-$_SESSION['world'][$_SESSION[\"room\"]][\"points\"][0][0];\n $dimy = $_SESSION['world'][$_SESSION[\"room\"]][\"points\"][2][1]-$_SESSION['world'][$_SESSION[\"room\"]][\"points\"][0][1];\n echo json_encode([$posx+$dimx/2,$posy+$dimy/2,[$_SESSION[\"room\"]]]);\n}", "function getdirections_location_latlon_path($direction, $latlon, $locs='') {\n if (($direction == 'to' || $direction == 'from') && preg_match(\"/[0-9.\\-],[0-9.\\-]/\", $latlon)) {\n $out = \"getdirections/latlon/$direction/$latlon\";\n if ($locs) {\n $out .= \"/$locs\";\n }\n return $out;\n }\n}", "function trebi_getUrlLoc($idloc)\n{\n$trebi_url_locs = array (1 => \"/meteo/Abano+terme\",2 => \"/meteo/Abbadia+cerreto\",3 => \"/meteo/Abbadia+lariana\",4 => \"/meteo/Abbadia+San+Salvatore\",5 => \"/meteo/Abbasanta\",6 => \"/meteo/Abbateggio\",7 => \"/meteo/Abbiategrasso\",8 => \"/meteo/Abetone\",8399 => \"/meteo/Abriola\",10 => \"/meteo/Acate\",11 => \"/meteo/Accadia\",12 => \"/meteo/Acceglio\",8369 => \"/meteo/Accettura\",14 => \"/meteo/Acciano\",15 => \"/meteo/Accumoli\",16 => \"/meteo/Acerenza\",17 => \"/meteo/Acerno\",18 => \"/meteo/Acerra\",19 => \"/meteo/Aci+bonaccorsi\",20 => \"/meteo/Aci+castello\",21 => \"/meteo/Aci+Catena\",22 => \"/meteo/Aci+Sant'Antonio\",23 => \"/meteo/Acireale\",24 => \"/meteo/Acquacanina\",25 => \"/meteo/Acquafondata\",26 => \"/meteo/Acquaformosa\",27 => \"/meteo/Acquafredda\",8750 => \"/meteo/Acquafredda\",28 => \"/meteo/Acqualagna\",29 => \"/meteo/Acquanegra+cremonese\",30 => \"/meteo/Acquanegra+sul+chiese\",31 => \"/meteo/Acquapendente\",32 => \"/meteo/Acquappesa\",33 => \"/meteo/Acquarica+del+capo\",34 => \"/meteo/Acquaro\",35 => \"/meteo/Acquasanta+terme\",36 => \"/meteo/Acquasparta\",37 => \"/meteo/Acquaviva+collecroce\",38 => \"/meteo/Acquaviva+d'Isernia\",39 => \"/meteo/Acquaviva+delle+fonti\",40 => \"/meteo/Acquaviva+picena\",41 => \"/meteo/Acquaviva+platani\",42 => \"/meteo/Acquedolci\",43 => \"/meteo/Acqui+terme\",44 => \"/meteo/Acri\",45 => \"/meteo/Acuto\",46 => \"/meteo/Adelfia\",47 => \"/meteo/Adrano\",48 => \"/meteo/Adrara+San+Martino\",49 => \"/meteo/Adrara+San+Rocco\",50 => \"/meteo/Adria\",51 => \"/meteo/Adro\",52 => \"/meteo/Affi\",53 => \"/meteo/Affile\",54 => \"/meteo/Afragola\",55 => \"/meteo/Africo\",56 => \"/meteo/Agazzano\",57 => \"/meteo/Agerola\",58 => \"/meteo/Aggius\",59 => \"/meteo/Agira\",60 => \"/meteo/Agliana\",61 => \"/meteo/Agliano\",62 => \"/meteo/Aglie'\",63 => \"/meteo/Aglientu\",64 => \"/meteo/Agna\",65 => \"/meteo/Agnadello\",66 => \"/meteo/Agnana+calabra\",8598 => \"/meteo/Agnano\",67 => \"/meteo/Agnone\",68 => \"/meteo/Agnosine\",69 => \"/meteo/Agordo\",70 => \"/meteo/Agosta\",71 => \"/meteo/Agra\",72 => \"/meteo/Agrate+brianza\",73 => \"/meteo/Agrate+conturbia\",74 => \"/meteo/Agrigento\",75 => \"/meteo/Agropoli\",76 => \"/meteo/Agugliano\",77 => \"/meteo/Agugliaro\",78 => \"/meteo/Aicurzio\",79 => \"/meteo/Aidomaggiore\",80 => \"/meteo/Aidone\",81 => \"/meteo/Aielli\",82 => \"/meteo/Aiello+calabro\",83 => \"/meteo/Aiello+del+Friuli\",84 => \"/meteo/Aiello+del+Sabato\",85 => \"/meteo/Aieta\",86 => \"/meteo/Ailano\",87 => \"/meteo/Ailoche\",88 => \"/meteo/Airasca\",89 => \"/meteo/Airola\",90 => \"/meteo/Airole\",91 => \"/meteo/Airuno\",92 => \"/meteo/Aisone\",93 => \"/meteo/Ala\",94 => \"/meteo/Ala+di+Stura\",95 => \"/meteo/Ala'+dei+Sardi\",96 => \"/meteo/Alagna\",97 => \"/meteo/Alagna+Valsesia\",98 => \"/meteo/Alanno\",99 => \"/meteo/Alano+di+Piave\",100 => \"/meteo/Alassio\",101 => \"/meteo/Alatri\",102 => \"/meteo/Alba\",103 => \"/meteo/Alba+adriatica\",104 => \"/meteo/Albagiara\",105 => \"/meteo/Albairate\",106 => \"/meteo/Albanella\",8386 => \"/meteo/Albano+di+lucania\",108 => \"/meteo/Albano+laziale\",109 => \"/meteo/Albano+Sant'Alessandro\",110 => \"/meteo/Albano+vercellese\",111 => \"/meteo/Albaredo+arnaboldi\",112 => \"/meteo/Albaredo+d'Adige\",113 => \"/meteo/Albaredo+per+San+Marco\",114 => \"/meteo/Albareto\",115 => \"/meteo/Albaretto+della+torre\",116 => \"/meteo/Albavilla\",117 => \"/meteo/Albenga\",118 => \"/meteo/Albera+ligure\",119 => \"/meteo/Alberobello\",120 => \"/meteo/Alberona\",121 => \"/meteo/Albese+con+Cassano\",122 => \"/meteo/Albettone\",123 => \"/meteo/Albi\",124 => \"/meteo/Albiano\",125 => \"/meteo/Albiano+d'ivrea\",126 => \"/meteo/Albiate\",127 => \"/meteo/Albidona\",128 => \"/meteo/Albignasego\",129 => \"/meteo/Albinea\",130 => \"/meteo/Albino\",131 => \"/meteo/Albiolo\",132 => \"/meteo/Albisola+marina\",133 => \"/meteo/Albisola+superiore\",134 => \"/meteo/Albizzate\",135 => \"/meteo/Albonese\",136 => \"/meteo/Albosaggia\",137 => \"/meteo/Albugnano\",138 => \"/meteo/Albuzzano\",139 => \"/meteo/Alcamo\",140 => \"/meteo/Alcara+li+Fusi\",141 => \"/meteo/Aldeno\",142 => \"/meteo/Aldino\",143 => \"/meteo/Ales\",144 => \"/meteo/Alessandria\",145 => \"/meteo/Alessandria+del+Carretto\",146 => \"/meteo/Alessandria+della+Rocca\",147 => \"/meteo/Alessano\",148 => \"/meteo/Alezio\",149 => \"/meteo/Alfano\",150 => \"/meteo/Alfedena\",151 => \"/meteo/Alfianello\",152 => \"/meteo/Alfiano+natta\",153 => \"/meteo/Alfonsine\",154 => \"/meteo/Alghero\",8532 => \"/meteo/Alghero+Fertilia\",155 => \"/meteo/Algua\",156 => \"/meteo/Ali'\",157 => \"/meteo/Ali'+terme\",158 => \"/meteo/Alia\",159 => \"/meteo/Aliano\",160 => \"/meteo/Alice+bel+colle\",161 => \"/meteo/Alice+castello\",162 => \"/meteo/Alice+superiore\",163 => \"/meteo/Alife\",164 => \"/meteo/Alimena\",165 => \"/meteo/Aliminusa\",166 => \"/meteo/Allai\",167 => \"/meteo/Alleghe\",168 => \"/meteo/Allein\",169 => \"/meteo/Allerona\",170 => \"/meteo/Alliste\",171 => \"/meteo/Allumiere\",172 => \"/meteo/Alluvioni+cambio'\",173 => \"/meteo/Alme'\",174 => \"/meteo/Almenno+San+Bartolomeo\",175 => \"/meteo/Almenno+San+Salvatore\",176 => \"/meteo/Almese\",177 => \"/meteo/Alonte\",8259 => \"/meteo/Alpe+Cermis\",8557 => \"/meteo/Alpe+Devero\",8162 => \"/meteo/Alpe+di+Mera\",8565 => \"/meteo/Alpe+di+Siusi\",8755 => \"/meteo/Alpe+Giumello\",8264 => \"/meteo/Alpe+Lusia\",8559 => \"/meteo/Alpe+Nevegal\",8239 => \"/meteo/Alpe+Tre+Potenze\",8558 => \"/meteo/Alpe+Veglia\",8482 => \"/meteo/Alpet\",178 => \"/meteo/Alpette\",179 => \"/meteo/Alpignano\",180 => \"/meteo/Alseno\",181 => \"/meteo/Alserio\",182 => \"/meteo/Altamura\",8474 => \"/meteo/Altare\",184 => \"/meteo/Altavilla+irpina\",185 => \"/meteo/Altavilla+milicia\",186 => \"/meteo/Altavilla+monferrato\",187 => \"/meteo/Altavilla+silentina\",188 => \"/meteo/Altavilla+vicentina\",189 => \"/meteo/Altidona\",190 => \"/meteo/Altilia\",191 => \"/meteo/Altino\",192 => \"/meteo/Altissimo\",193 => \"/meteo/Altivole\",194 => \"/meteo/Alto\",195 => \"/meteo/Altofonte\",196 => \"/meteo/Altomonte\",197 => \"/meteo/Altopascio\",8536 => \"/meteo/Altopiano+dei+Fiorentini\",8662 => \"/meteo/Altopiano+della+Sila\",8640 => \"/meteo/Altopiano+di+Renon\",198 => \"/meteo/Alviano\",199 => \"/meteo/Alvignano\",200 => \"/meteo/Alvito\",201 => \"/meteo/Alzano+lombardo\",202 => \"/meteo/Alzano+scrivia\",203 => \"/meteo/Alzate+brianza\",204 => \"/meteo/Amalfi\",205 => \"/meteo/Amandola\",206 => \"/meteo/Amantea\",207 => \"/meteo/Amaro\",208 => \"/meteo/Amaroni\",209 => \"/meteo/Amaseno\",210 => \"/meteo/Amato\",211 => \"/meteo/Amatrice\",212 => \"/meteo/Ambivere\",213 => \"/meteo/Amblar\",214 => \"/meteo/Ameglia\",215 => \"/meteo/Amelia\",216 => \"/meteo/Amendolara\",217 => \"/meteo/Ameno\",218 => \"/meteo/Amorosi\",219 => \"/meteo/Ampezzo\",220 => \"/meteo/Anacapri\",221 => \"/meteo/Anagni\",8463 => \"/meteo/Anagni+casello\",222 => \"/meteo/Ancarano\",223 => \"/meteo/Ancona\",8267 => \"/meteo/Ancona+Falconara\",224 => \"/meteo/Andali\",225 => \"/meteo/Andalo\",226 => \"/meteo/Andalo+valtellino\",227 => \"/meteo/Andezeno\",228 => \"/meteo/Andora\",229 => \"/meteo/Andorno+micca\",230 => \"/meteo/Andrano\",231 => \"/meteo/Andrate\",232 => \"/meteo/Andreis\",233 => \"/meteo/Andretta\",234 => \"/meteo/Andria\",235 => \"/meteo/Andriano\",236 => \"/meteo/Anela\",237 => \"/meteo/Anfo\",238 => \"/meteo/Angera\",239 => \"/meteo/Anghiari\",240 => \"/meteo/Angiari\",241 => \"/meteo/Angolo+terme\",242 => \"/meteo/Angri\",243 => \"/meteo/Angrogna\",244 => \"/meteo/Anguillara+sabazia\",245 => \"/meteo/Anguillara+veneta\",246 => \"/meteo/Annicco\",247 => \"/meteo/Annone+di+brianza\",248 => \"/meteo/Annone+veneto\",249 => \"/meteo/Anoia\",8302 => \"/meteo/Antagnod\",250 => \"/meteo/Antegnate\",251 => \"/meteo/Anterivo\",8211 => \"/meteo/Anterselva+di+Sopra\",252 => \"/meteo/Antey+saint+andre'\",253 => \"/meteo/Anticoli+Corrado\",254 => \"/meteo/Antignano\",255 => \"/meteo/Antillo\",256 => \"/meteo/Antonimina\",257 => \"/meteo/Antrodoco\",258 => \"/meteo/Antrona+Schieranco\",259 => \"/meteo/Anversa+degli+Abruzzi\",260 => \"/meteo/Anzano+del+Parco\",261 => \"/meteo/Anzano+di+Puglia\",8400 => \"/meteo/Anzi\",263 => \"/meteo/Anzio\",264 => \"/meteo/Anzola+d'Ossola\",265 => \"/meteo/Anzola+dell'Emilia\",266 => \"/meteo/Aosta\",8548 => \"/meteo/Aosta+Saint+Christophe\",267 => \"/meteo/Apecchio\",268 => \"/meteo/Apice\",269 => \"/meteo/Apiro\",270 => \"/meteo/Apollosa\",271 => \"/meteo/Appiano+Gentile\",272 => \"/meteo/Appiano+sulla+strada+del+vino\",273 => \"/meteo/Appignano\",274 => \"/meteo/Appignano+del+Tronto\",275 => \"/meteo/Aprica\",276 => \"/meteo/Apricale\",277 => \"/meteo/Apricena\",278 => \"/meteo/Aprigliano\",279 => \"/meteo/Aprilia\",280 => \"/meteo/Aquara\",281 => \"/meteo/Aquila+di+Arroscia\",282 => \"/meteo/Aquileia\",283 => \"/meteo/Aquilonia\",284 => \"/meteo/Aquino\",8228 => \"/meteo/Arabba\",285 => \"/meteo/Aradeo\",286 => \"/meteo/Aragona\",287 => \"/meteo/Aramengo\",288 => \"/meteo/Arba\",8487 => \"/meteo/Arbatax\",289 => \"/meteo/Arborea\",290 => \"/meteo/Arborio\",291 => \"/meteo/Arbus\",292 => \"/meteo/Arcade\",293 => \"/meteo/Arce\",294 => \"/meteo/Arcene\",295 => \"/meteo/Arcevia\",296 => \"/meteo/Archi\",297 => \"/meteo/Arcidosso\",298 => \"/meteo/Arcinazzo+romano\",299 => \"/meteo/Arcisate\",300 => \"/meteo/Arco\",301 => \"/meteo/Arcola\",302 => \"/meteo/Arcole\",303 => \"/meteo/Arconate\",304 => \"/meteo/Arcore\",305 => \"/meteo/Arcugnano\",306 => \"/meteo/Ardara\",307 => \"/meteo/Ardauli\",308 => \"/meteo/Ardea\",309 => \"/meteo/Ardenno\",310 => \"/meteo/Ardesio\",311 => \"/meteo/Ardore\",8675 => \"/meteo/Ardore+Marina\",8321 => \"/meteo/Aremogna\",312 => \"/meteo/Arena\",313 => \"/meteo/Arena+po\",314 => \"/meteo/Arenzano\",315 => \"/meteo/Arese\",316 => \"/meteo/Arezzo\",317 => \"/meteo/Argegno\",318 => \"/meteo/Argelato\",319 => \"/meteo/Argenta\",320 => \"/meteo/Argentera\",321 => \"/meteo/Arguello\",322 => \"/meteo/Argusto\",323 => \"/meteo/Ari\",324 => \"/meteo/Ariano+irpino\",325 => \"/meteo/Ariano+nel+polesine\",326 => \"/meteo/Ariccia\",327 => \"/meteo/Arielli\",328 => \"/meteo/Arienzo\",329 => \"/meteo/Arignano\",330 => \"/meteo/Aritzo\",331 => \"/meteo/Arizzano\",332 => \"/meteo/Arlena+di+castro\",333 => \"/meteo/Arluno\",8677 => \"/meteo/Arma+di+Taggia\",334 => \"/meteo/Armeno\",8405 => \"/meteo/Armento\",336 => \"/meteo/Armo\",337 => \"/meteo/Armungia\",338 => \"/meteo/Arnad\",339 => \"/meteo/Arnara\",340 => \"/meteo/Arnasco\",341 => \"/meteo/Arnesano\",342 => \"/meteo/Arola\",343 => \"/meteo/Arona\",344 => \"/meteo/Arosio\",345 => \"/meteo/Arpaia\",346 => \"/meteo/Arpaise\",347 => \"/meteo/Arpino\",348 => \"/meteo/Arqua'+Petrarca\",349 => \"/meteo/Arqua'+polesine\",350 => \"/meteo/Arquata+del+tronto\",351 => \"/meteo/Arquata+scrivia\",352 => \"/meteo/Arre\",353 => \"/meteo/Arrone\",354 => \"/meteo/Arsago+Seprio\",355 => \"/meteo/Arsie'\",356 => \"/meteo/Arsiero\",357 => \"/meteo/Arsita\",358 => \"/meteo/Arsoli\",359 => \"/meteo/Arta+terme\",360 => \"/meteo/Artegna\",361 => \"/meteo/Artena\",8338 => \"/meteo/Artesina\",362 => \"/meteo/Artogne\",363 => \"/meteo/Arvier\",364 => \"/meteo/Arzachena\",365 => \"/meteo/Arzago+d'Adda\",366 => \"/meteo/Arzana\",367 => \"/meteo/Arzano\",368 => \"/meteo/Arzene\",369 => \"/meteo/Arzergrande\",370 => \"/meteo/Arzignano\",371 => \"/meteo/Ascea\",8513 => \"/meteo/Asciano\",8198 => \"/meteo/Asciano+Pisano\",373 => \"/meteo/Ascoli+piceno\",374 => \"/meteo/Ascoli+satriano\",375 => \"/meteo/Ascrea\",376 => \"/meteo/Asiago\",377 => \"/meteo/Asigliano+Veneto\",378 => \"/meteo/Asigliano+vercellese\",379 => \"/meteo/Asola\",380 => \"/meteo/Asolo\",8438 => \"/meteo/Aspio+terme\",381 => \"/meteo/Assago\",382 => \"/meteo/Assemini\",8488 => \"/meteo/Assergi\",8448 => \"/meteo/Assergi+casello\",383 => \"/meteo/Assisi\",384 => \"/meteo/Asso\",385 => \"/meteo/Assolo\",386 => \"/meteo/Assoro\",387 => \"/meteo/Asti\",388 => \"/meteo/Asuni\",389 => \"/meteo/Ateleta\",8383 => \"/meteo/Atella\",391 => \"/meteo/Atena+lucana\",392 => \"/meteo/Atessa\",393 => \"/meteo/Atina\",394 => \"/meteo/Atrani\",395 => \"/meteo/Atri\",396 => \"/meteo/Atripalda\",397 => \"/meteo/Attigliano\",398 => \"/meteo/Attimis\",399 => \"/meteo/Atzara\",400 => \"/meteo/Auditore\",401 => \"/meteo/Augusta\",402 => \"/meteo/Auletta\",403 => \"/meteo/Aulla\",404 => \"/meteo/Aurano\",405 => \"/meteo/Aurigo\",406 => \"/meteo/Auronzo+di+cadore\",407 => \"/meteo/Ausonia\",408 => \"/meteo/Austis\",409 => \"/meteo/Avegno\",410 => \"/meteo/Avelengo\",411 => \"/meteo/Avella\",412 => \"/meteo/Avellino\",413 => \"/meteo/Averara\",414 => \"/meteo/Aversa\",415 => \"/meteo/Avetrana\",416 => \"/meteo/Avezzano\",417 => \"/meteo/Aviano\",418 => \"/meteo/Aviatico\",419 => \"/meteo/Avigliana\",420 => \"/meteo/Avigliano\",421 => \"/meteo/Avigliano+umbro\",422 => \"/meteo/Avio\",423 => \"/meteo/Avise\",424 => \"/meteo/Avola\",425 => \"/meteo/Avolasca\",426 => \"/meteo/Ayas\",427 => \"/meteo/Aymavilles\",428 => \"/meteo/Azeglio\",429 => \"/meteo/Azzanello\",430 => \"/meteo/Azzano+d'Asti\",431 => \"/meteo/Azzano+decimo\",432 => \"/meteo/Azzano+mella\",433 => \"/meteo/Azzano+San+Paolo\",434 => \"/meteo/Azzate\",435 => \"/meteo/Azzio\",436 => \"/meteo/Azzone\",437 => \"/meteo/Baceno\",438 => \"/meteo/Bacoli\",439 => \"/meteo/Badalucco\",440 => \"/meteo/Badesi\",441 => \"/meteo/Badia\",442 => \"/meteo/Badia+calavena\",443 => \"/meteo/Badia+pavese\",444 => \"/meteo/Badia+polesine\",445 => \"/meteo/Badia+tedalda\",446 => \"/meteo/Badolato\",447 => \"/meteo/Bagaladi\",448 => \"/meteo/Bagheria\",449 => \"/meteo/Bagnacavallo\",450 => \"/meteo/Bagnara+calabra\",451 => \"/meteo/Bagnara+di+romagna\",452 => \"/meteo/Bagnaria\",453 => \"/meteo/Bagnaria+arsa\",454 => \"/meteo/Bagnasco\",455 => \"/meteo/Bagnatica\",456 => \"/meteo/Bagni+di+Lucca\",8699 => \"/meteo/Bagni+di+Vinadio\",457 => \"/meteo/Bagno+a+Ripoli\",458 => \"/meteo/Bagno+di+Romagna\",459 => \"/meteo/Bagnoli+del+Trigno\",460 => \"/meteo/Bagnoli+di+sopra\",461 => \"/meteo/Bagnoli+irpino\",462 => \"/meteo/Bagnolo+cremasco\",463 => \"/meteo/Bagnolo+del+salento\",464 => \"/meteo/Bagnolo+di+po\",465 => \"/meteo/Bagnolo+in+piano\",466 => \"/meteo/Bagnolo+Mella\",467 => \"/meteo/Bagnolo+Piemonte\",468 => \"/meteo/Bagnolo+San+Vito\",469 => \"/meteo/Bagnone\",470 => \"/meteo/Bagnoregio\",471 => \"/meteo/Bagolino\",8123 => \"/meteo/Baia+Domizia\",472 => \"/meteo/Baia+e+Latina\",473 => \"/meteo/Baiano\",474 => \"/meteo/Baiardo\",475 => \"/meteo/Bairo\",476 => \"/meteo/Baiso\",477 => \"/meteo/Balangero\",478 => \"/meteo/Baldichieri+d'Asti\",479 => \"/meteo/Baldissero+canavese\",480 => \"/meteo/Baldissero+d'Alba\",481 => \"/meteo/Baldissero+torinese\",482 => \"/meteo/Balestrate\",483 => \"/meteo/Balestrino\",484 => \"/meteo/Ballabio\",485 => \"/meteo/Ballao\",486 => \"/meteo/Balme\",487 => \"/meteo/Balmuccia\",488 => \"/meteo/Balocco\",489 => \"/meteo/Balsorano\",490 => \"/meteo/Balvano\",491 => \"/meteo/Balzola\",492 => \"/meteo/Banari\",493 => \"/meteo/Banchette\",494 => \"/meteo/Bannio+anzino\",8368 => \"/meteo/Banzi\",496 => \"/meteo/Baone\",497 => \"/meteo/Baradili\",8415 => \"/meteo/Baragiano\",499 => \"/meteo/Baranello\",500 => \"/meteo/Barano+d'Ischia\",501 => \"/meteo/Barasso\",502 => \"/meteo/Baratili+San+Pietro\",503 => \"/meteo/Barbania\",504 => \"/meteo/Barbara\",505 => \"/meteo/Barbarano+romano\",506 => \"/meteo/Barbarano+vicentino\",507 => \"/meteo/Barbaresco\",508 => \"/meteo/Barbariga\",509 => \"/meteo/Barbata\",510 => \"/meteo/Barberino+di+mugello\",511 => \"/meteo/Barberino+val+d'elsa\",512 => \"/meteo/Barbianello\",513 => \"/meteo/Barbiano\",514 => \"/meteo/Barbona\",515 => \"/meteo/Barcellona+pozzo+di+Gotto\",516 => \"/meteo/Barchi\",517 => \"/meteo/Barcis\",518 => \"/meteo/Bard\",519 => \"/meteo/Bardello\",520 => \"/meteo/Bardi\",521 => \"/meteo/Bardineto\",522 => \"/meteo/Bardolino\",523 => \"/meteo/Bardonecchia\",524 => \"/meteo/Bareggio\",525 => \"/meteo/Barengo\",526 => \"/meteo/Baressa\",527 => \"/meteo/Barete\",528 => \"/meteo/Barga\",529 => \"/meteo/Bargagli\",530 => \"/meteo/Barge\",531 => \"/meteo/Barghe\",532 => \"/meteo/Bari\",8274 => \"/meteo/Bari+Palese\",533 => \"/meteo/Bari+sardo\",534 => \"/meteo/Bariano\",535 => \"/meteo/Baricella\",8402 => \"/meteo/Barile\",537 => \"/meteo/Barisciano\",538 => \"/meteo/Barlassina\",539 => \"/meteo/Barletta\",540 => \"/meteo/Barni\",541 => \"/meteo/Barolo\",542 => \"/meteo/Barone+canavese\",543 => \"/meteo/Baronissi\",544 => \"/meteo/Barrafranca\",545 => \"/meteo/Barrali\",546 => \"/meteo/Barrea\",8745 => \"/meteo/Barricata\",547 => \"/meteo/Barumini\",548 => \"/meteo/Barzago\",549 => \"/meteo/Barzana\",550 => \"/meteo/Barzano'\",551 => \"/meteo/Barzio\",552 => \"/meteo/Basaluzzo\",553 => \"/meteo/Bascape'\",554 => \"/meteo/Baschi\",555 => \"/meteo/Basciano\",556 => \"/meteo/Baselga+di+Pine'\",557 => \"/meteo/Baselice\",558 => \"/meteo/Basiano\",559 => \"/meteo/Basico'\",560 => \"/meteo/Basiglio\",561 => \"/meteo/Basiliano\",562 => \"/meteo/Bassano+bresciano\",563 => \"/meteo/Bassano+del+grappa\",564 => \"/meteo/Bassano+in+teverina\",565 => \"/meteo/Bassano+romano\",566 => \"/meteo/Bassiano\",567 => \"/meteo/Bassignana\",568 => \"/meteo/Bastia\",569 => \"/meteo/Bastia+mondovi'\",570 => \"/meteo/Bastida+de'+Dossi\",571 => \"/meteo/Bastida+pancarana\",572 => \"/meteo/Bastiglia\",573 => \"/meteo/Battaglia+terme\",574 => \"/meteo/Battifollo\",575 => \"/meteo/Battipaglia\",576 => \"/meteo/Battuda\",577 => \"/meteo/Baucina\",578 => \"/meteo/Bauladu\",579 => \"/meteo/Baunei\",580 => \"/meteo/Baveno\",581 => \"/meteo/Bazzano\",582 => \"/meteo/Bedero+valcuvia\",583 => \"/meteo/Bedizzole\",584 => \"/meteo/Bedollo\",585 => \"/meteo/Bedonia\",586 => \"/meteo/Bedulita\",587 => \"/meteo/Bee\",588 => \"/meteo/Beinasco\",589 => \"/meteo/Beinette\",590 => \"/meteo/Belcastro\",591 => \"/meteo/Belfiore\",592 => \"/meteo/Belforte+all'Isauro\",593 => \"/meteo/Belforte+del+chienti\",594 => \"/meteo/Belforte+monferrato\",595 => \"/meteo/Belgioioso\",596 => \"/meteo/Belgirate\",597 => \"/meteo/Bella\",598 => \"/meteo/Bellagio\",8263 => \"/meteo/Bellamonte\",599 => \"/meteo/Bellano\",600 => \"/meteo/Bellante\",601 => \"/meteo/Bellaria+Igea+marina\",602 => \"/meteo/Bellegra\",603 => \"/meteo/Bellino\",604 => \"/meteo/Bellinzago+lombardo\",605 => \"/meteo/Bellinzago+novarese\",606 => \"/meteo/Bellizzi\",607 => \"/meteo/Bellona\",608 => \"/meteo/Bellosguardo\",609 => \"/meteo/Belluno\",610 => \"/meteo/Bellusco\",611 => \"/meteo/Belmonte+calabro\",612 => \"/meteo/Belmonte+castello\",613 => \"/meteo/Belmonte+del+sannio\",614 => \"/meteo/Belmonte+in+sabina\",615 => \"/meteo/Belmonte+mezzagno\",616 => \"/meteo/Belmonte+piceno\",617 => \"/meteo/Belpasso\",8573 => \"/meteo/Belpiano+Schoeneben\",618 => \"/meteo/Belsito\",8265 => \"/meteo/Belvedere\",619 => \"/meteo/Belvedere+di+Spinello\",620 => \"/meteo/Belvedere+langhe\",621 => \"/meteo/Belvedere+marittimo\",622 => \"/meteo/Belvedere+ostrense\",623 => \"/meteo/Belveglio\",624 => \"/meteo/Belvi\",625 => \"/meteo/Bema\",626 => \"/meteo/Bene+lario\",627 => \"/meteo/Bene+vagienna\",628 => \"/meteo/Benestare\",629 => \"/meteo/Benetutti\",630 => \"/meteo/Benevello\",631 => \"/meteo/Benevento\",632 => \"/meteo/Benna\",633 => \"/meteo/Bentivoglio\",634 => \"/meteo/Berbenno\",635 => \"/meteo/Berbenno+di+valtellina\",636 => \"/meteo/Berceto\",637 => \"/meteo/Berchidda\",638 => \"/meteo/Beregazzo+con+Figliaro\",639 => \"/meteo/Bereguardo\",640 => \"/meteo/Bergamasco\",641 => \"/meteo/Bergamo\",8519 => \"/meteo/Bergamo+città+alta\",8497 => \"/meteo/Bergamo+Orio+al+Serio\",642 => \"/meteo/Bergantino\",643 => \"/meteo/Bergeggi\",644 => \"/meteo/Bergolo\",645 => \"/meteo/Berlingo\",646 => \"/meteo/Bernalda\",647 => \"/meteo/Bernareggio\",648 => \"/meteo/Bernate+ticino\",649 => \"/meteo/Bernezzo\",650 => \"/meteo/Berra\",651 => \"/meteo/Bersone\",652 => \"/meteo/Bertinoro\",653 => \"/meteo/Bertiolo\",654 => \"/meteo/Bertonico\",655 => \"/meteo/Berzano+di+San+Pietro\",656 => \"/meteo/Berzano+di+Tortona\",657 => \"/meteo/Berzo+Demo\",658 => \"/meteo/Berzo+inferiore\",659 => \"/meteo/Berzo+San+Fermo\",660 => \"/meteo/Besana+in+brianza\",661 => \"/meteo/Besano\",662 => \"/meteo/Besate\",663 => \"/meteo/Besenello\",664 => \"/meteo/Besenzone\",665 => \"/meteo/Besnate\",666 => \"/meteo/Besozzo\",667 => \"/meteo/Bessude\",668 => \"/meteo/Bettola\",669 => \"/meteo/Bettona\",670 => \"/meteo/Beura+Cardezza\",671 => \"/meteo/Bevagna\",672 => \"/meteo/Beverino\",673 => \"/meteo/Bevilacqua\",674 => \"/meteo/Bezzecca\",675 => \"/meteo/Biancavilla\",676 => \"/meteo/Bianchi\",677 => \"/meteo/Bianco\",678 => \"/meteo/Biandrate\",679 => \"/meteo/Biandronno\",680 => \"/meteo/Bianzano\",681 => \"/meteo/Bianze'\",682 => \"/meteo/Bianzone\",683 => \"/meteo/Biassono\",684 => \"/meteo/Bibbiano\",685 => \"/meteo/Bibbiena\",686 => \"/meteo/Bibbona\",687 => \"/meteo/Bibiana\",8230 => \"/meteo/Bibione\",688 => \"/meteo/Biccari\",689 => \"/meteo/Bicinicco\",690 => \"/meteo/Bidoni'\",691 => \"/meteo/Biella\",8163 => \"/meteo/Bielmonte\",692 => \"/meteo/Bienno\",693 => \"/meteo/Bieno\",694 => \"/meteo/Bientina\",695 => \"/meteo/Bigarello\",696 => \"/meteo/Binago\",697 => \"/meteo/Binasco\",698 => \"/meteo/Binetto\",699 => \"/meteo/Bioglio\",700 => \"/meteo/Bionaz\",701 => \"/meteo/Bione\",702 => \"/meteo/Birori\",703 => \"/meteo/Bisaccia\",704 => \"/meteo/Bisacquino\",705 => \"/meteo/Bisceglie\",706 => \"/meteo/Bisegna\",707 => \"/meteo/Bisenti\",708 => \"/meteo/Bisignano\",709 => \"/meteo/Bistagno\",710 => \"/meteo/Bisuschio\",711 => \"/meteo/Bitetto\",712 => \"/meteo/Bitonto\",713 => \"/meteo/Bitritto\",714 => \"/meteo/Bitti\",715 => \"/meteo/Bivona\",716 => \"/meteo/Bivongi\",717 => \"/meteo/Bizzarone\",718 => \"/meteo/Bleggio+inferiore\",719 => \"/meteo/Bleggio+superiore\",720 => \"/meteo/Blello\",721 => \"/meteo/Blera\",722 => \"/meteo/Blessagno\",723 => \"/meteo/Blevio\",724 => \"/meteo/Blufi\",725 => \"/meteo/Boara+Pisani\",726 => \"/meteo/Bobbio\",727 => \"/meteo/Bobbio+Pellice\",728 => \"/meteo/Boca\",8501 => \"/meteo/Bocca+di+Magra\",729 => \"/meteo/Bocchigliero\",730 => \"/meteo/Boccioleto\",731 => \"/meteo/Bocenago\",732 => \"/meteo/Bodio+Lomnago\",733 => \"/meteo/Boffalora+d'Adda\",734 => \"/meteo/Boffalora+sopra+Ticino\",735 => \"/meteo/Bogliasco\",736 => \"/meteo/Bognanco\",8287 => \"/meteo/Bognanco+fonti\",737 => \"/meteo/Bogogno\",738 => \"/meteo/Boissano\",739 => \"/meteo/Bojano\",740 => \"/meteo/Bolano\",741 => \"/meteo/Bolbeno\",742 => \"/meteo/Bolgare\",743 => \"/meteo/Bollate\",744 => \"/meteo/Bollengo\",745 => \"/meteo/Bologna\",8476 => \"/meteo/Bologna+Borgo+Panigale\",746 => \"/meteo/Bolognano\",747 => \"/meteo/Bolognetta\",748 => \"/meteo/Bolognola\",749 => \"/meteo/Bolotana\",750 => \"/meteo/Bolsena\",751 => \"/meteo/Boltiere\",8505 => \"/meteo/Bolzaneto\",752 => \"/meteo/Bolzano\",753 => \"/meteo/Bolzano+novarese\",754 => \"/meteo/Bolzano+vicentino\",755 => \"/meteo/Bomarzo\",756 => \"/meteo/Bomba\",757 => \"/meteo/Bompensiere\",758 => \"/meteo/Bompietro\",759 => \"/meteo/Bomporto\",760 => \"/meteo/Bonarcado\",761 => \"/meteo/Bonassola\",762 => \"/meteo/Bonate+sopra\",763 => \"/meteo/Bonate+sotto\",764 => \"/meteo/Bonavigo\",765 => \"/meteo/Bondeno\",766 => \"/meteo/Bondo\",767 => \"/meteo/Bondone\",768 => \"/meteo/Bonea\",769 => \"/meteo/Bonefro\",770 => \"/meteo/Bonemerse\",771 => \"/meteo/Bonifati\",772 => \"/meteo/Bonito\",773 => \"/meteo/Bonnanaro\",774 => \"/meteo/Bono\",775 => \"/meteo/Bonorva\",776 => \"/meteo/Bonvicino\",777 => \"/meteo/Borbona\",778 => \"/meteo/Borca+di+cadore\",779 => \"/meteo/Bordano\",780 => \"/meteo/Bordighera\",781 => \"/meteo/Bordolano\",782 => \"/meteo/Bore\",783 => \"/meteo/Boretto\",784 => \"/meteo/Borgarello\",785 => \"/meteo/Borgaro+torinese\",786 => \"/meteo/Borgetto\",787 => \"/meteo/Borghetto+d'arroscia\",788 => \"/meteo/Borghetto+di+borbera\",789 => \"/meteo/Borghetto+di+vara\",790 => \"/meteo/Borghetto+lodigiano\",791 => \"/meteo/Borghetto+Santo+Spirito\",792 => \"/meteo/Borghi\",793 => \"/meteo/Borgia\",794 => \"/meteo/Borgiallo\",795 => \"/meteo/Borgio+Verezzi\",796 => \"/meteo/Borgo+a+Mozzano\",797 => \"/meteo/Borgo+d'Ale\",798 => \"/meteo/Borgo+di+Terzo\",8159 => \"/meteo/Borgo+d`Ale\",799 => \"/meteo/Borgo+Pace\",800 => \"/meteo/Borgo+Priolo\",801 => \"/meteo/Borgo+San+Dalmazzo\",802 => \"/meteo/Borgo+San+Giacomo\",803 => \"/meteo/Borgo+San+Giovanni\",804 => \"/meteo/Borgo+San+Lorenzo\",805 => \"/meteo/Borgo+San+Martino\",806 => \"/meteo/Borgo+San+Siro\",807 => \"/meteo/Borgo+Ticino\",808 => \"/meteo/Borgo+Tossignano\",809 => \"/meteo/Borgo+Val+di+Taro\",810 => \"/meteo/Borgo+Valsugana\",811 => \"/meteo/Borgo+Velino\",812 => \"/meteo/Borgo+Vercelli\",813 => \"/meteo/Borgoforte\",814 => \"/meteo/Borgofranco+d'Ivrea\",815 => \"/meteo/Borgofranco+sul+Po\",816 => \"/meteo/Borgolavezzaro\",817 => \"/meteo/Borgomale\",818 => \"/meteo/Borgomanero\",819 => \"/meteo/Borgomaro\",820 => \"/meteo/Borgomasino\",821 => \"/meteo/Borgone+susa\",822 => \"/meteo/Borgonovo+val+tidone\",823 => \"/meteo/Borgoratto+alessandrino\",824 => \"/meteo/Borgoratto+mormorolo\",825 => \"/meteo/Borgoricco\",826 => \"/meteo/Borgorose\",827 => \"/meteo/Borgosatollo\",828 => \"/meteo/Borgosesia\",829 => \"/meteo/Bormida\",830 => \"/meteo/Bormio\",8334 => \"/meteo/Bormio+2000\",8335 => \"/meteo/Bormio+3000\",831 => \"/meteo/Bornasco\",832 => \"/meteo/Borno\",833 => \"/meteo/Boroneddu\",834 => \"/meteo/Borore\",835 => \"/meteo/Borrello\",836 => \"/meteo/Borriana\",837 => \"/meteo/Borso+del+Grappa\",838 => \"/meteo/Bortigali\",839 => \"/meteo/Bortigiadas\",840 => \"/meteo/Borutta\",841 => \"/meteo/Borzonasca\",842 => \"/meteo/Bosa\",843 => \"/meteo/Bosaro\",844 => \"/meteo/Boschi+Sant'Anna\",845 => \"/meteo/Bosco+Chiesanuova\",846 => \"/meteo/Bosco+Marengo\",847 => \"/meteo/Bosconero\",848 => \"/meteo/Boscoreale\",849 => \"/meteo/Boscotrecase\",850 => \"/meteo/Bosentino\",851 => \"/meteo/Bosia\",852 => \"/meteo/Bosio\",853 => \"/meteo/Bosisio+Parini\",854 => \"/meteo/Bosnasco\",855 => \"/meteo/Bossico\",856 => \"/meteo/Bossolasco\",857 => \"/meteo/Botricello\",858 => \"/meteo/Botrugno\",859 => \"/meteo/Bottanuco\",860 => \"/meteo/Botticino\",861 => \"/meteo/Bottidda\",8655 => \"/meteo/Bourg+San+Bernard\",862 => \"/meteo/Bova\",863 => \"/meteo/Bova+marina\",864 => \"/meteo/Bovalino\",865 => \"/meteo/Bovegno\",866 => \"/meteo/Boves\",867 => \"/meteo/Bovezzo\",868 => \"/meteo/Boville+Ernica\",869 => \"/meteo/Bovino\",870 => \"/meteo/Bovisio+Masciago\",871 => \"/meteo/Bovolenta\",872 => \"/meteo/Bovolone\",873 => \"/meteo/Bozzole\",874 => \"/meteo/Bozzolo\",875 => \"/meteo/Bra\",876 => \"/meteo/Bracca\",877 => \"/meteo/Bracciano\",878 => \"/meteo/Bracigliano\",879 => \"/meteo/Braies\",880 => \"/meteo/Brallo+di+Pregola\",881 => \"/meteo/Brancaleone\",882 => \"/meteo/Brandico\",883 => \"/meteo/Brandizzo\",884 => \"/meteo/Branzi\",885 => \"/meteo/Braone\",8740 => \"/meteo/Bratto\",886 => \"/meteo/Brebbia\",887 => \"/meteo/Breda+di+Piave\",888 => \"/meteo/Bregano\",889 => \"/meteo/Breganze\",890 => \"/meteo/Bregnano\",891 => \"/meteo/Breguzzo\",892 => \"/meteo/Breia\",8724 => \"/meteo/Breithorn\",893 => \"/meteo/Brembate\",894 => \"/meteo/Brembate+di+sopra\",895 => \"/meteo/Brembilla\",896 => \"/meteo/Brembio\",897 => \"/meteo/Breme\",898 => \"/meteo/Brendola\",899 => \"/meteo/Brenna\",900 => \"/meteo/Brennero\",901 => \"/meteo/Breno\",902 => \"/meteo/Brenta\",903 => \"/meteo/Brentino+Belluno\",904 => \"/meteo/Brentonico\",905 => \"/meteo/Brenzone\",906 => \"/meteo/Brescello\",907 => \"/meteo/Brescia\",8547 => \"/meteo/Brescia+Montichiari\",908 => \"/meteo/Bresimo\",909 => \"/meteo/Bressana+Bottarone\",910 => \"/meteo/Bressanone\",911 => \"/meteo/Bressanvido\",912 => \"/meteo/Bresso\",8226 => \"/meteo/Breuil-Cervinia\",913 => \"/meteo/Brez\",914 => \"/meteo/Brezzo+di+Bedero\",915 => \"/meteo/Briaglia\",916 => \"/meteo/Briatico\",917 => \"/meteo/Bricherasio\",918 => \"/meteo/Brienno\",919 => \"/meteo/Brienza\",920 => \"/meteo/Briga+alta\",921 => \"/meteo/Briga+novarese\",923 => \"/meteo/Brignano+Frascata\",922 => \"/meteo/Brignano+Gera+d'Adda\",924 => \"/meteo/Brindisi\",8358 => \"/meteo/Brindisi+montagna\",8549 => \"/meteo/Brindisi+Papola+Casale\",926 => \"/meteo/Brinzio\",927 => \"/meteo/Briona\",928 => \"/meteo/Brione\",929 => \"/meteo/Brione\",930 => \"/meteo/Briosco\",931 => \"/meteo/Brisighella\",932 => \"/meteo/Brissago+valtravaglia\",933 => \"/meteo/Brissogne\",934 => \"/meteo/Brittoli\",935 => \"/meteo/Brivio\",936 => \"/meteo/Broccostella\",937 => \"/meteo/Brogliano\",938 => \"/meteo/Brognaturo\",939 => \"/meteo/Brolo\",940 => \"/meteo/Brondello\",941 => \"/meteo/Broni\",942 => \"/meteo/Bronte\",943 => \"/meteo/Bronzolo\",944 => \"/meteo/Brossasco\",945 => \"/meteo/Brosso\",946 => \"/meteo/Brovello+Carpugnino\",947 => \"/meteo/Brozolo\",948 => \"/meteo/Brugherio\",949 => \"/meteo/Brugine\",950 => \"/meteo/Brugnato\",951 => \"/meteo/Brugnera\",952 => \"/meteo/Bruino\",953 => \"/meteo/Brumano\",954 => \"/meteo/Brunate\",955 => \"/meteo/Brunello\",956 => \"/meteo/Brunico\",957 => \"/meteo/Bruno\",958 => \"/meteo/Brusaporto\",959 => \"/meteo/Brusasco\",960 => \"/meteo/Brusciano\",961 => \"/meteo/Brusimpiano\",962 => \"/meteo/Brusnengo\",963 => \"/meteo/Brusson\",8645 => \"/meteo/Brusson+2000+Estoul\",964 => \"/meteo/Bruzolo\",965 => \"/meteo/Bruzzano+Zeffirio\",966 => \"/meteo/Bubbiano\",967 => \"/meteo/Bubbio\",968 => \"/meteo/Buccheri\",969 => \"/meteo/Bucchianico\",970 => \"/meteo/Bucciano\",971 => \"/meteo/Buccinasco\",972 => \"/meteo/Buccino\",973 => \"/meteo/Bucine\",974 => \"/meteo/Budduso'\",975 => \"/meteo/Budoia\",976 => \"/meteo/Budoni\",977 => \"/meteo/Budrio\",978 => \"/meteo/Buggerru\",979 => \"/meteo/Buggiano\",980 => \"/meteo/Buglio+in+Monte\",981 => \"/meteo/Bugnara\",982 => \"/meteo/Buguggiate\",983 => \"/meteo/Buia\",984 => \"/meteo/Bulciago\",985 => \"/meteo/Bulgarograsso\",986 => \"/meteo/Bultei\",987 => \"/meteo/Bulzi\",988 => \"/meteo/Buonabitacolo\",989 => \"/meteo/Buonalbergo\",990 => \"/meteo/Buonconvento\",991 => \"/meteo/Buonvicino\",992 => \"/meteo/Burago+di+Molgora\",993 => \"/meteo/Burcei\",994 => \"/meteo/Burgio\",995 => \"/meteo/Burgos\",996 => \"/meteo/Buriasco\",997 => \"/meteo/Burolo\",998 => \"/meteo/Buronzo\",8483 => \"/meteo/Burrino\",999 => \"/meteo/Busachi\",1000 => \"/meteo/Busalla\",1001 => \"/meteo/Busana\",1002 => \"/meteo/Busano\",1003 => \"/meteo/Busca\",1004 => \"/meteo/Buscate\",1005 => \"/meteo/Buscemi\",1006 => \"/meteo/Buseto+Palizzolo\",1007 => \"/meteo/Busnago\",1008 => \"/meteo/Bussero\",1009 => \"/meteo/Busseto\",1010 => \"/meteo/Bussi+sul+Tirino\",1011 => \"/meteo/Busso\",1012 => \"/meteo/Bussolengo\",1013 => \"/meteo/Bussoleno\",1014 => \"/meteo/Busto+Arsizio\",1015 => \"/meteo/Busto+Garolfo\",1016 => \"/meteo/Butera\",1017 => \"/meteo/Buti\",1018 => \"/meteo/Buttapietra\",1019 => \"/meteo/Buttigliera+alta\",1020 => \"/meteo/Buttigliera+d'Asti\",1021 => \"/meteo/Buttrio\",1022 => \"/meteo/Ca'+d'Andrea\",1023 => \"/meteo/Cabella+ligure\",1024 => \"/meteo/Cabiate\",1025 => \"/meteo/Cabras\",1026 => \"/meteo/Caccamo\",1027 => \"/meteo/Caccuri\",1028 => \"/meteo/Cadegliano+Viconago\",1029 => \"/meteo/Cadelbosco+di+sopra\",1030 => \"/meteo/Cadeo\",1031 => \"/meteo/Caderzone\",8566 => \"/meteo/Cadipietra\",1032 => \"/meteo/Cadoneghe\",1033 => \"/meteo/Cadorago\",1034 => \"/meteo/Cadrezzate\",1035 => \"/meteo/Caerano+di+San+Marco\",1036 => \"/meteo/Cafasse\",1037 => \"/meteo/Caggiano\",1038 => \"/meteo/Cagli\",1039 => \"/meteo/Cagliari\",8500 => \"/meteo/Cagliari+Elmas\",1040 => \"/meteo/Caglio\",1041 => \"/meteo/Cagnano+Amiterno\",1042 => \"/meteo/Cagnano+Varano\",1043 => \"/meteo/Cagno\",1044 => \"/meteo/Cagno'\",1045 => \"/meteo/Caianello\",1046 => \"/meteo/Caiazzo\",1047 => \"/meteo/Caines\",1048 => \"/meteo/Caino\",1049 => \"/meteo/Caiolo\",1050 => \"/meteo/Cairano\",1051 => \"/meteo/Cairate\",1052 => \"/meteo/Cairo+Montenotte\",1053 => \"/meteo/Caivano\",8168 => \"/meteo/Cala+Gonone\",1054 => \"/meteo/Calabritto\",1055 => \"/meteo/Calalzo+di+cadore\",1056 => \"/meteo/Calamandrana\",1057 => \"/meteo/Calamonaci\",1058 => \"/meteo/Calangianus\",1059 => \"/meteo/Calanna\",1060 => \"/meteo/Calasca+Castiglione\",1061 => \"/meteo/Calascibetta\",1062 => \"/meteo/Calascio\",1063 => \"/meteo/Calasetta\",1064 => \"/meteo/Calatabiano\",1065 => \"/meteo/Calatafimi\",1066 => \"/meteo/Calavino\",1067 => \"/meteo/Calcata\",1068 => \"/meteo/Calceranica+al+lago\",1069 => \"/meteo/Calci\",8424 => \"/meteo/Calciano\",1071 => \"/meteo/Calcinaia\",1072 => \"/meteo/Calcinate\",1073 => \"/meteo/Calcinato\",1074 => \"/meteo/Calcio\",1075 => \"/meteo/Calco\",1076 => \"/meteo/Caldaro+sulla+strada+del+vino\",1077 => \"/meteo/Caldarola\",1078 => \"/meteo/Calderara+di+Reno\",1079 => \"/meteo/Caldes\",1080 => \"/meteo/Caldiero\",1081 => \"/meteo/Caldogno\",1082 => \"/meteo/Caldonazzo\",1083 => \"/meteo/Calendasco\",8614 => \"/meteo/Calenella\",1084 => \"/meteo/Calenzano\",1085 => \"/meteo/Calestano\",1086 => \"/meteo/Calice+al+Cornoviglio\",1087 => \"/meteo/Calice+ligure\",8692 => \"/meteo/California+di+Lesmo\",1088 => \"/meteo/Calimera\",1089 => \"/meteo/Calitri\",1090 => \"/meteo/Calizzano\",1091 => \"/meteo/Callabiana\",1092 => \"/meteo/Calliano\",1093 => \"/meteo/Calliano\",1094 => \"/meteo/Calolziocorte\",1095 => \"/meteo/Calopezzati\",1096 => \"/meteo/Calosso\",1097 => \"/meteo/Caloveto\",1098 => \"/meteo/Caltabellotta\",1099 => \"/meteo/Caltagirone\",1100 => \"/meteo/Caltanissetta\",1101 => \"/meteo/Caltavuturo\",1102 => \"/meteo/Caltignaga\",1103 => \"/meteo/Calto\",1104 => \"/meteo/Caltrano\",1105 => \"/meteo/Calusco+d'Adda\",1106 => \"/meteo/Caluso\",1107 => \"/meteo/Calvagese+della+Riviera\",1108 => \"/meteo/Calvanico\",1109 => \"/meteo/Calvatone\",8406 => \"/meteo/Calvello\",1111 => \"/meteo/Calvene\",1112 => \"/meteo/Calvenzano\",8373 => \"/meteo/Calvera\",1114 => \"/meteo/Calvi\",1115 => \"/meteo/Calvi+dell'Umbria\",1116 => \"/meteo/Calvi+risorta\",1117 => \"/meteo/Calvignano\",1118 => \"/meteo/Calvignasco\",1119 => \"/meteo/Calvisano\",1120 => \"/meteo/Calvizzano\",1121 => \"/meteo/Camagna+monferrato\",1122 => \"/meteo/Camaiore\",1123 => \"/meteo/Camairago\",1124 => \"/meteo/Camandona\",1125 => \"/meteo/Camastra\",1126 => \"/meteo/Cambiago\",1127 => \"/meteo/Cambiano\",1128 => \"/meteo/Cambiasca\",1129 => \"/meteo/Camburzano\",1130 => \"/meteo/Camerana\",1131 => \"/meteo/Camerano\",1132 => \"/meteo/Camerano+Casasco\",1133 => \"/meteo/Camerata+Cornello\",1134 => \"/meteo/Camerata+Nuova\",1135 => \"/meteo/Camerata+picena\",1136 => \"/meteo/Cameri\",1137 => \"/meteo/Camerino\",1138 => \"/meteo/Camerota\",1139 => \"/meteo/Camigliano\",8119 => \"/meteo/Camigliatello+silano\",1140 => \"/meteo/Caminata\",1141 => \"/meteo/Camini\",1142 => \"/meteo/Camino\",1143 => \"/meteo/Camino+al+Tagliamento\",1144 => \"/meteo/Camisano\",1145 => \"/meteo/Camisano+vicentino\",1146 => \"/meteo/Cammarata\",1147 => \"/meteo/Camo\",1148 => \"/meteo/Camogli\",1149 => \"/meteo/Campagna\",1150 => \"/meteo/Campagna+Lupia\",1151 => \"/meteo/Campagnano+di+Roma\",1152 => \"/meteo/Campagnatico\",1153 => \"/meteo/Campagnola+cremasca\",1154 => \"/meteo/Campagnola+emilia\",1155 => \"/meteo/Campana\",1156 => \"/meteo/Camparada\",1157 => \"/meteo/Campegine\",1158 => \"/meteo/Campello+sul+Clitunno\",1159 => \"/meteo/Campertogno\",1160 => \"/meteo/Campi+Bisenzio\",1161 => \"/meteo/Campi+salentina\",1162 => \"/meteo/Campiglia+cervo\",1163 => \"/meteo/Campiglia+dei+Berici\",1164 => \"/meteo/Campiglia+marittima\",1165 => \"/meteo/Campiglione+Fenile\",8127 => \"/meteo/Campigna\",1166 => \"/meteo/Campione+d'Italia\",1167 => \"/meteo/Campitello+di+Fassa\",8155 => \"/meteo/Campitello+matese\",1168 => \"/meteo/Campli\",1169 => \"/meteo/Campo+calabro\",8754 => \"/meteo/Campo+Carlo+Magno\",8134 => \"/meteo/Campo+Catino\",8610 => \"/meteo/Campo+Cecina\",1170 => \"/meteo/Campo+di+Giove\",1171 => \"/meteo/Campo+di+Trens\",8345 => \"/meteo/Campo+Felice\",8101 => \"/meteo/Campo+imperatore\",1172 => \"/meteo/Campo+ligure\",1173 => \"/meteo/Campo+nell'Elba\",1174 => \"/meteo/Campo+San+Martino\",8135 => \"/meteo/Campo+Staffi\",8644 => \"/meteo/Campo+Tenese\",1175 => \"/meteo/Campo+Tures\",1176 => \"/meteo/Campobasso\",1177 => \"/meteo/Campobello+di+Licata\",1178 => \"/meteo/Campobello+di+Mazara\",1179 => \"/meteo/Campochiaro\",1180 => \"/meteo/Campodarsego\",1181 => \"/meteo/Campodenno\",8357 => \"/meteo/Campodimele\",1183 => \"/meteo/Campodipietra\",1184 => \"/meteo/Campodolcino\",1185 => \"/meteo/Campodoro\",1186 => \"/meteo/Campofelice+di+Fitalia\",1187 => \"/meteo/Campofelice+di+Roccella\",1188 => \"/meteo/Campofilone\",1189 => \"/meteo/Campofiorito\",1190 => \"/meteo/Campoformido\",1191 => \"/meteo/Campofranco\",1192 => \"/meteo/Campogalliano\",1193 => \"/meteo/Campolattaro\",1194 => \"/meteo/Campoli+Appennino\",1195 => \"/meteo/Campoli+del+Monte+Taburno\",1196 => \"/meteo/Campolieto\",1197 => \"/meteo/Campolongo+al+Torre\",1198 => \"/meteo/Campolongo+Maggiore\",1199 => \"/meteo/Campolongo+sul+Brenta\",8391 => \"/meteo/Campomaggiore\",1201 => \"/meteo/Campomarino\",1202 => \"/meteo/Campomorone\",1203 => \"/meteo/Camponogara\",1204 => \"/meteo/Campora\",1205 => \"/meteo/Camporeale\",1206 => \"/meteo/Camporgiano\",1207 => \"/meteo/Camporosso\",1208 => \"/meteo/Camporotondo+di+Fiastrone\",1209 => \"/meteo/Camporotondo+etneo\",1210 => \"/meteo/Camposampiero\",1211 => \"/meteo/Camposano\",1212 => \"/meteo/Camposanto\",1213 => \"/meteo/Campospinoso\",1214 => \"/meteo/Campotosto\",1215 => \"/meteo/Camugnano\",1216 => \"/meteo/Canal+San+Bovo\",1217 => \"/meteo/Canale\",1218 => \"/meteo/Canale+d'Agordo\",1219 => \"/meteo/Canale+Monterano\",1220 => \"/meteo/Canaro\",1221 => \"/meteo/Canazei\",8407 => \"/meteo/Cancellara\",1223 => \"/meteo/Cancello+ed+Arnone\",1224 => \"/meteo/Canda\",1225 => \"/meteo/Candela\",8468 => \"/meteo/Candela+casello\",1226 => \"/meteo/Candelo\",1227 => \"/meteo/Candia+canavese\",1228 => \"/meteo/Candia+lomellina\",1229 => \"/meteo/Candiana\",1230 => \"/meteo/Candida\",1231 => \"/meteo/Candidoni\",1232 => \"/meteo/Candiolo\",1233 => \"/meteo/Canegrate\",1234 => \"/meteo/Canelli\",1235 => \"/meteo/Canepina\",1236 => \"/meteo/Caneva\",8562 => \"/meteo/Canevare+di+Fanano\",1237 => \"/meteo/Canevino\",1238 => \"/meteo/Canicatti'\",1239 => \"/meteo/Canicattini+Bagni\",1240 => \"/meteo/Canino\",1241 => \"/meteo/Canischio\",1242 => \"/meteo/Canistro\",1243 => \"/meteo/Canna\",1244 => \"/meteo/Cannalonga\",1245 => \"/meteo/Cannara\",1246 => \"/meteo/Cannero+riviera\",1247 => \"/meteo/Canneto+pavese\",1248 => \"/meteo/Canneto+sull'Oglio\",8588 => \"/meteo/Cannigione\",1249 => \"/meteo/Cannobio\",1250 => \"/meteo/Cannole\",1251 => \"/meteo/Canolo\",1252 => \"/meteo/Canonica+d'Adda\",1253 => \"/meteo/Canosa+di+Puglia\",1254 => \"/meteo/Canosa+sannita\",1255 => \"/meteo/Canosio\",1256 => \"/meteo/Canossa\",1257 => \"/meteo/Cansano\",1258 => \"/meteo/Cantagallo\",1259 => \"/meteo/Cantalice\",1260 => \"/meteo/Cantalupa\",1261 => \"/meteo/Cantalupo+in+Sabina\",1262 => \"/meteo/Cantalupo+ligure\",1263 => \"/meteo/Cantalupo+nel+Sannio\",1264 => \"/meteo/Cantarana\",1265 => \"/meteo/Cantello\",1266 => \"/meteo/Canterano\",1267 => \"/meteo/Cantiano\",1268 => \"/meteo/Cantoira\",1269 => \"/meteo/Cantu'\",1270 => \"/meteo/Canzano\",1271 => \"/meteo/Canzo\",1272 => \"/meteo/Caorle\",1273 => \"/meteo/Caorso\",1274 => \"/meteo/Capaccio\",1275 => \"/meteo/Capaci\",1276 => \"/meteo/Capalbio\",8242 => \"/meteo/Capanna+Margherita\",8297 => \"/meteo/Capanne+di+Sillano\",1277 => \"/meteo/Capannoli\",1278 => \"/meteo/Capannori\",1279 => \"/meteo/Capena\",1280 => \"/meteo/Capergnanica\",1281 => \"/meteo/Capestrano\",1282 => \"/meteo/Capiago+Intimiano\",1283 => \"/meteo/Capistrano\",1284 => \"/meteo/Capistrello\",1285 => \"/meteo/Capitignano\",1286 => \"/meteo/Capizzi\",1287 => \"/meteo/Capizzone\",8609 => \"/meteo/Capo+Bellavista\",8113 => \"/meteo/Capo+Colonna\",1288 => \"/meteo/Capo+d'Orlando\",1289 => \"/meteo/Capo+di+Ponte\",8676 => \"/meteo/Capo+Mele\",8607 => \"/meteo/Capo+Palinuro\",8112 => \"/meteo/Capo+Rizzuto\",1290 => \"/meteo/Capodimonte\",1291 => \"/meteo/Capodrise\",1292 => \"/meteo/Capoliveri\",1293 => \"/meteo/Capolona\",1294 => \"/meteo/Caponago\",1295 => \"/meteo/Caporciano\",1296 => \"/meteo/Caposele\",1297 => \"/meteo/Capoterra\",1298 => \"/meteo/Capovalle\",1299 => \"/meteo/Cappadocia\",1300 => \"/meteo/Cappella+Cantone\",1301 => \"/meteo/Cappella+de'+Picenardi\",1302 => \"/meteo/Cappella+Maggiore\",1303 => \"/meteo/Cappelle+sul+Tavo\",1304 => \"/meteo/Capracotta\",1305 => \"/meteo/Capraia+e+Limite\",1306 => \"/meteo/Capraia+isola\",1307 => \"/meteo/Capralba\",1308 => \"/meteo/Capranica\",1309 => \"/meteo/Capranica+Prenestina\",1310 => \"/meteo/Caprarica+di+Lecce\",1311 => \"/meteo/Caprarola\",1312 => \"/meteo/Caprauna\",1313 => \"/meteo/Caprese+Michelangelo\",1314 => \"/meteo/Caprezzo\",1315 => \"/meteo/Capri\",1316 => \"/meteo/Capri+Leone\",1317 => \"/meteo/Capriana\",1318 => \"/meteo/Capriano+del+Colle\",1319 => \"/meteo/Capriata+d'Orba\",1320 => \"/meteo/Capriate+San+Gervasio\",1321 => \"/meteo/Capriati+a+Volturno\",1322 => \"/meteo/Caprie\",1323 => \"/meteo/Capriglia+irpina\",1324 => \"/meteo/Capriglio\",1325 => \"/meteo/Caprile\",1326 => \"/meteo/Caprino+bergamasco\",1327 => \"/meteo/Caprino+veronese\",1328 => \"/meteo/Capriolo\",1329 => \"/meteo/Capriva+del+Friuli\",1330 => \"/meteo/Capua\",1331 => \"/meteo/Capurso\",1332 => \"/meteo/Caraffa+del+Bianco\",1333 => \"/meteo/Caraffa+di+Catanzaro\",1334 => \"/meteo/Caraglio\",1335 => \"/meteo/Caramagna+Piemonte\",1336 => \"/meteo/Caramanico+terme\",1337 => \"/meteo/Carano\",1338 => \"/meteo/Carapelle\",1339 => \"/meteo/Carapelle+Calvisio\",1340 => \"/meteo/Carasco\",1341 => \"/meteo/Carassai\",1342 => \"/meteo/Carate+brianza\",1343 => \"/meteo/Carate+Urio\",1344 => \"/meteo/Caravaggio\",1345 => \"/meteo/Caravate\",1346 => \"/meteo/Caravino\",1347 => \"/meteo/Caravonica\",1348 => \"/meteo/Carbognano\",1349 => \"/meteo/Carbonara+al+Ticino\",1350 => \"/meteo/Carbonara+di+Nola\",1351 => \"/meteo/Carbonara+di+Po\",1352 => \"/meteo/Carbonara+Scrivia\",1353 => \"/meteo/Carbonate\",8374 => \"/meteo/Carbone\",1355 => \"/meteo/Carbonera\",1356 => \"/meteo/Carbonia\",1357 => \"/meteo/Carcare\",1358 => \"/meteo/Carceri\",1359 => \"/meteo/Carcoforo\",1360 => \"/meteo/Cardano+al+Campo\",1361 => \"/meteo/Carde'\",1362 => \"/meteo/Cardedu\",1363 => \"/meteo/Cardeto\",1364 => \"/meteo/Cardinale\",1365 => \"/meteo/Cardito\",1366 => \"/meteo/Careggine\",1367 => \"/meteo/Carema\",1368 => \"/meteo/Carenno\",1369 => \"/meteo/Carentino\",1370 => \"/meteo/Careri\",1371 => \"/meteo/Caresana\",1372 => \"/meteo/Caresanablot\",8625 => \"/meteo/Carezza+al+lago\",1373 => \"/meteo/Carezzano\",1374 => \"/meteo/Carfizzi\",1375 => \"/meteo/Cargeghe\",1376 => \"/meteo/Cariati\",1377 => \"/meteo/Carife\",1378 => \"/meteo/Carignano\",1379 => \"/meteo/Carimate\",1380 => \"/meteo/Carinaro\",1381 => \"/meteo/Carini\",1382 => \"/meteo/Carinola\",1383 => \"/meteo/Carisio\",1384 => \"/meteo/Carisolo\",1385 => \"/meteo/Carlantino\",1386 => \"/meteo/Carlazzo\",1387 => \"/meteo/Carlentini\",1388 => \"/meteo/Carlino\",1389 => \"/meteo/Carloforte\",1390 => \"/meteo/Carlopoli\",1391 => \"/meteo/Carmagnola\",1392 => \"/meteo/Carmiano\",1393 => \"/meteo/Carmignano\",1394 => \"/meteo/Carmignano+di+Brenta\",1395 => \"/meteo/Carnago\",1396 => \"/meteo/Carnate\",1397 => \"/meteo/Carobbio+degli+Angeli\",1398 => \"/meteo/Carolei\",1399 => \"/meteo/Carona\",8541 => \"/meteo/Carona+Carisole\",1400 => \"/meteo/Caronia\",1401 => \"/meteo/Caronno+Pertusella\",1402 => \"/meteo/Caronno+varesino\",8253 => \"/meteo/Carosello+3000\",1403 => \"/meteo/Carosino\",1404 => \"/meteo/Carovigno\",1405 => \"/meteo/Carovilli\",1406 => \"/meteo/Carpaneto+piacentino\",1407 => \"/meteo/Carpanzano\",1408 => \"/meteo/Carpasio\",1409 => \"/meteo/Carpegna\",1410 => \"/meteo/Carpenedolo\",1411 => \"/meteo/Carpeneto\",1412 => \"/meteo/Carpi\",1413 => \"/meteo/Carpiano\",1414 => \"/meteo/Carpignano+salentino\",1415 => \"/meteo/Carpignano+Sesia\",1416 => \"/meteo/Carpineti\",1417 => \"/meteo/Carpineto+della+Nora\",1418 => \"/meteo/Carpineto+romano\",1419 => \"/meteo/Carpineto+Sinello\",1420 => \"/meteo/Carpino\",1421 => \"/meteo/Carpinone\",1422 => \"/meteo/Carrara\",1423 => \"/meteo/Carre'\",1424 => \"/meteo/Carrega+ligure\",1425 => \"/meteo/Carro\",1426 => \"/meteo/Carrodano\",1427 => \"/meteo/Carrosio\",1428 => \"/meteo/Carru'\",1429 => \"/meteo/Carsoli\",1430 => \"/meteo/Cartigliano\",1431 => \"/meteo/Cartignano\",1432 => \"/meteo/Cartoceto\",1433 => \"/meteo/Cartosio\",1434 => \"/meteo/Cartura\",1435 => \"/meteo/Carugate\",1436 => \"/meteo/Carugo\",1437 => \"/meteo/Carunchio\",1438 => \"/meteo/Carvico\",1439 => \"/meteo/Carzano\",1440 => \"/meteo/Casabona\",1441 => \"/meteo/Casacalenda\",1442 => \"/meteo/Casacanditella\",1443 => \"/meteo/Casagiove\",1444 => \"/meteo/Casal+Cermelli\",1445 => \"/meteo/Casal+di+Principe\",1446 => \"/meteo/Casal+Velino\",1447 => \"/meteo/Casalanguida\",1448 => \"/meteo/Casalattico\",8648 => \"/meteo/Casalavera\",1449 => \"/meteo/Casalbeltrame\",1450 => \"/meteo/Casalbordino\",1451 => \"/meteo/Casalbore\",1452 => \"/meteo/Casalborgone\",1453 => \"/meteo/Casalbuono\",1454 => \"/meteo/Casalbuttano+ed+Uniti\",1455 => \"/meteo/Casalciprano\",1456 => \"/meteo/Casalduni\",1457 => \"/meteo/Casale+Corte+Cerro\",1458 => \"/meteo/Casale+cremasco+Vidolasco\",1459 => \"/meteo/Casale+di+Scodosia\",1460 => \"/meteo/Casale+Litta\",1461 => \"/meteo/Casale+marittimo\",1462 => \"/meteo/Casale+monferrato\",1463 => \"/meteo/Casale+sul+Sile\",1464 => \"/meteo/Casalecchio+di+Reno\",1465 => \"/meteo/Casaleggio+Boiro\",1466 => \"/meteo/Casaleggio+Novara\",1467 => \"/meteo/Casaleone\",1468 => \"/meteo/Casaletto+Ceredano\",1469 => \"/meteo/Casaletto+di+sopra\",1470 => \"/meteo/Casaletto+lodigiano\",1471 => \"/meteo/Casaletto+Spartano\",1472 => \"/meteo/Casaletto+Vaprio\",1473 => \"/meteo/Casalfiumanese\",1474 => \"/meteo/Casalgrande\",1475 => \"/meteo/Casalgrasso\",1476 => \"/meteo/Casalincontrada\",1477 => \"/meteo/Casalino\",1478 => \"/meteo/Casalmaggiore\",1479 => \"/meteo/Casalmaiocco\",1480 => \"/meteo/Casalmorano\",1481 => \"/meteo/Casalmoro\",1482 => \"/meteo/Casalnoceto\",1483 => \"/meteo/Casalnuovo+di+Napoli\",1484 => \"/meteo/Casalnuovo+Monterotaro\",1485 => \"/meteo/Casaloldo\",1486 => \"/meteo/Casalpusterlengo\",1487 => \"/meteo/Casalromano\",1488 => \"/meteo/Casalserugo\",1489 => \"/meteo/Casaluce\",1490 => \"/meteo/Casalvecchio+di+Puglia\",1491 => \"/meteo/Casalvecchio+siculo\",1492 => \"/meteo/Casalvieri\",1493 => \"/meteo/Casalvolone\",1494 => \"/meteo/Casalzuigno\",1495 => \"/meteo/Casamarciano\",1496 => \"/meteo/Casamassima\",1497 => \"/meteo/Casamicciola+terme\",1498 => \"/meteo/Casandrino\",1499 => \"/meteo/Casanova+Elvo\",1500 => \"/meteo/Casanova+Lerrone\",1501 => \"/meteo/Casanova+Lonati\",1502 => \"/meteo/Casape\",1503 => \"/meteo/Casapesenna\",1504 => \"/meteo/Casapinta\",1505 => \"/meteo/Casaprota\",1506 => \"/meteo/Casapulla\",1507 => \"/meteo/Casarano\",1508 => \"/meteo/Casargo\",1509 => \"/meteo/Casarile\",1510 => \"/meteo/Casarsa+della+Delizia\",1511 => \"/meteo/Casarza+ligure\",1512 => \"/meteo/Casasco\",1513 => \"/meteo/Casasco+d'Intelvi\",1514 => \"/meteo/Casatenovo\",1515 => \"/meteo/Casatisma\",1516 => \"/meteo/Casavatore\",1517 => \"/meteo/Casazza\",8160 => \"/meteo/Cascate+del+Toce\",1518 => \"/meteo/Cascia\",1519 => \"/meteo/Casciago\",1520 => \"/meteo/Casciana+terme\",1521 => \"/meteo/Cascina\",1522 => \"/meteo/Cascinette+d'Ivrea\",1523 => \"/meteo/Casei+Gerola\",1524 => \"/meteo/Caselette\",1525 => \"/meteo/Casella\",1526 => \"/meteo/Caselle+in+Pittari\",1527 => \"/meteo/Caselle+Landi\",1528 => \"/meteo/Caselle+Lurani\",1529 => \"/meteo/Caselle+torinese\",1530 => \"/meteo/Caserta\",1531 => \"/meteo/Casier\",1532 => \"/meteo/Casignana\",1533 => \"/meteo/Casina\",1534 => \"/meteo/Casirate+d'Adda\",1535 => \"/meteo/Caslino+d'Erba\",1536 => \"/meteo/Casnate+con+Bernate\",1537 => \"/meteo/Casnigo\",1538 => \"/meteo/Casola+di+Napoli\",1539 => \"/meteo/Casola+in+lunigiana\",1540 => \"/meteo/Casola+valsenio\",1541 => \"/meteo/Casole+Bruzio\",1542 => \"/meteo/Casole+d'Elsa\",1543 => \"/meteo/Casoli\",1544 => \"/meteo/Casorate+Primo\",1545 => \"/meteo/Casorate+Sempione\",1546 => \"/meteo/Casorezzo\",1547 => \"/meteo/Casoria\",1548 => \"/meteo/Casorzo\",1549 => \"/meteo/Casperia\",1550 => \"/meteo/Caspoggio\",1551 => \"/meteo/Cassacco\",1552 => \"/meteo/Cassago+brianza\",1553 => \"/meteo/Cassano+allo+Ionio\",1554 => \"/meteo/Cassano+d'Adda\",1555 => \"/meteo/Cassano+delle+murge\",1556 => \"/meteo/Cassano+irpino\",1557 => \"/meteo/Cassano+Magnago\",1558 => \"/meteo/Cassano+Spinola\",1559 => \"/meteo/Cassano+valcuvia\",1560 => \"/meteo/Cassaro\",1561 => \"/meteo/Cassiglio\",1562 => \"/meteo/Cassina+de'+Pecchi\",1563 => \"/meteo/Cassina+Rizzardi\",1564 => \"/meteo/Cassina+valsassina\",1565 => \"/meteo/Cassinasco\",1566 => \"/meteo/Cassine\",1567 => \"/meteo/Cassinelle\",1568 => \"/meteo/Cassinetta+di+Lugagnano\",1569 => \"/meteo/Cassino\",1570 => \"/meteo/Cassola\",1571 => \"/meteo/Cassolnovo\",1572 => \"/meteo/Castagnaro\",1573 => \"/meteo/Castagneto+Carducci\",1574 => \"/meteo/Castagneto+po\",1575 => \"/meteo/Castagnito\",1576 => \"/meteo/Castagnole+delle+Lanze\",1577 => \"/meteo/Castagnole+monferrato\",1578 => \"/meteo/Castagnole+Piemonte\",1579 => \"/meteo/Castana\",1580 => \"/meteo/Castano+Primo\",1581 => \"/meteo/Casteggio\",1582 => \"/meteo/Castegnato\",1583 => \"/meteo/Castegnero\",1584 => \"/meteo/Castel+Baronia\",1585 => \"/meteo/Castel+Boglione\",1586 => \"/meteo/Castel+bolognese\",1587 => \"/meteo/Castel+Campagnano\",1588 => \"/meteo/Castel+Castagna\",1589 => \"/meteo/Castel+Colonna\",1590 => \"/meteo/Castel+Condino\",1591 => \"/meteo/Castel+d'Aiano\",1592 => \"/meteo/Castel+d'Ario\",1593 => \"/meteo/Castel+d'Azzano\",1594 => \"/meteo/Castel+del+Giudice\",1595 => \"/meteo/Castel+del+monte\",1596 => \"/meteo/Castel+del+piano\",1597 => \"/meteo/Castel+del+rio\",1598 => \"/meteo/Castel+di+Casio\",1599 => \"/meteo/Castel+di+Ieri\",1600 => \"/meteo/Castel+di+Iudica\",1601 => \"/meteo/Castel+di+Lama\",1602 => \"/meteo/Castel+di+Lucio\",1603 => \"/meteo/Castel+di+Sangro\",1604 => \"/meteo/Castel+di+Sasso\",1605 => \"/meteo/Castel+di+Tora\",1606 => \"/meteo/Castel+Focognano\",1607 => \"/meteo/Castel+frentano\",1608 => \"/meteo/Castel+Gabbiano\",1609 => \"/meteo/Castel+Gandolfo\",1610 => \"/meteo/Castel+Giorgio\",1611 => \"/meteo/Castel+Goffredo\",1612 => \"/meteo/Castel+Guelfo+di+Bologna\",1613 => \"/meteo/Castel+Madama\",1614 => \"/meteo/Castel+Maggiore\",1615 => \"/meteo/Castel+Mella\",1616 => \"/meteo/Castel+Morrone\",1617 => \"/meteo/Castel+Ritaldi\",1618 => \"/meteo/Castel+Rocchero\",1619 => \"/meteo/Castel+Rozzone\",1620 => \"/meteo/Castel+San+Giorgio\",1621 => \"/meteo/Castel+San+Giovanni\",1622 => \"/meteo/Castel+San+Lorenzo\",1623 => \"/meteo/Castel+San+Niccolo'\",1624 => \"/meteo/Castel+San+Pietro+romano\",1625 => \"/meteo/Castel+San+Pietro+terme\",1626 => \"/meteo/Castel+San+Vincenzo\",1627 => \"/meteo/Castel+Sant'Angelo\",1628 => \"/meteo/Castel+Sant'Elia\",1629 => \"/meteo/Castel+Viscardo\",1630 => \"/meteo/Castel+Vittorio\",1631 => \"/meteo/Castel+volturno\",1632 => \"/meteo/Castelbaldo\",1633 => \"/meteo/Castelbelforte\",1634 => \"/meteo/Castelbellino\",1635 => \"/meteo/Castelbello+Ciardes\",1636 => \"/meteo/Castelbianco\",1637 => \"/meteo/Castelbottaccio\",1638 => \"/meteo/Castelbuono\",1639 => \"/meteo/Castelcivita\",1640 => \"/meteo/Castelcovati\",1641 => \"/meteo/Castelcucco\",1642 => \"/meteo/Casteldaccia\",1643 => \"/meteo/Casteldelci\",1644 => \"/meteo/Casteldelfino\",1645 => \"/meteo/Casteldidone\",1646 => \"/meteo/Castelfidardo\",1647 => \"/meteo/Castelfiorentino\",1648 => \"/meteo/Castelfondo\",1649 => \"/meteo/Castelforte\",1650 => \"/meteo/Castelfranci\",1651 => \"/meteo/Castelfranco+di+sopra\",1652 => \"/meteo/Castelfranco+di+sotto\",1653 => \"/meteo/Castelfranco+Emilia\",1654 => \"/meteo/Castelfranco+in+Miscano\",1655 => \"/meteo/Castelfranco+Veneto\",1656 => \"/meteo/Castelgomberto\",8385 => \"/meteo/Castelgrande\",1658 => \"/meteo/Castelguglielmo\",1659 => \"/meteo/Castelguidone\",1660 => \"/meteo/Castell'alfero\",1661 => \"/meteo/Castell'arquato\",1662 => \"/meteo/Castell'azzara\",1663 => \"/meteo/Castell'umberto\",1664 => \"/meteo/Castellabate\",1665 => \"/meteo/Castellafiume\",1666 => \"/meteo/Castellalto\",1667 => \"/meteo/Castellammare+del+Golfo\",1668 => \"/meteo/Castellammare+di+Stabia\",1669 => \"/meteo/Castellamonte\",1670 => \"/meteo/Castellana+Grotte\",1671 => \"/meteo/Castellana+sicula\",1672 => \"/meteo/Castellaneta\",1673 => \"/meteo/Castellania\",1674 => \"/meteo/Castellanza\",1675 => \"/meteo/Castellar\",1676 => \"/meteo/Castellar+Guidobono\",1677 => \"/meteo/Castellarano\",1678 => \"/meteo/Castellaro\",1679 => \"/meteo/Castellazzo+Bormida\",1680 => \"/meteo/Castellazzo+novarese\",1681 => \"/meteo/Castelleone\",1682 => \"/meteo/Castelleone+di+Suasa\",1683 => \"/meteo/Castellero\",1684 => \"/meteo/Castelletto+Cervo\",1685 => \"/meteo/Castelletto+d'Erro\",1686 => \"/meteo/Castelletto+d'Orba\",1687 => \"/meteo/Castelletto+di+Branduzzo\",1688 => \"/meteo/Castelletto+Merli\",1689 => \"/meteo/Castelletto+Molina\",1690 => \"/meteo/Castelletto+monferrato\",1691 => \"/meteo/Castelletto+sopra+Ticino\",1692 => \"/meteo/Castelletto+Stura\",1693 => \"/meteo/Castelletto+Uzzone\",1694 => \"/meteo/Castelli\",1695 => \"/meteo/Castelli+Calepio\",1696 => \"/meteo/Castellina+in+chianti\",1697 => \"/meteo/Castellina+marittima\",1698 => \"/meteo/Castellinaldo\",1699 => \"/meteo/Castellino+del+Biferno\",1700 => \"/meteo/Castellino+Tanaro\",1701 => \"/meteo/Castelliri\",1702 => \"/meteo/Castello+Cabiaglio\",1703 => \"/meteo/Castello+d'Agogna\",1704 => \"/meteo/Castello+d'Argile\",1705 => \"/meteo/Castello+del+matese\",1706 => \"/meteo/Castello+dell'Acqua\",1707 => \"/meteo/Castello+di+Annone\",1708 => \"/meteo/Castello+di+brianza\",1709 => \"/meteo/Castello+di+Cisterna\",1710 => \"/meteo/Castello+di+Godego\",1711 => \"/meteo/Castello+di+Serravalle\",1712 => \"/meteo/Castello+Lavazzo\",1714 => \"/meteo/Castello+Molina+di+Fiemme\",1713 => \"/meteo/Castello+tesino\",1715 => \"/meteo/Castellucchio\",8219 => \"/meteo/Castelluccio\",1716 => \"/meteo/Castelluccio+dei+Sauri\",8395 => \"/meteo/Castelluccio+inferiore\",8359 => \"/meteo/Castelluccio+superiore\",1719 => \"/meteo/Castelluccio+valmaggiore\",8452 => \"/meteo/Castelmadama+casello\",1720 => \"/meteo/Castelmagno\",1721 => \"/meteo/Castelmarte\",1722 => \"/meteo/Castelmassa\",1723 => \"/meteo/Castelmauro\",8363 => \"/meteo/Castelmezzano\",1725 => \"/meteo/Castelmola\",1726 => \"/meteo/Castelnovetto\",1727 => \"/meteo/Castelnovo+Bariano\",1728 => \"/meteo/Castelnovo+del+Friuli\",1729 => \"/meteo/Castelnovo+di+sotto\",8124 => \"/meteo/Castelnovo+ne'+Monti\",1731 => \"/meteo/Castelnuovo\",1732 => \"/meteo/Castelnuovo+Belbo\",1733 => \"/meteo/Castelnuovo+Berardenga\",1734 => \"/meteo/Castelnuovo+bocca+d'Adda\",1735 => \"/meteo/Castelnuovo+Bormida\",1736 => \"/meteo/Castelnuovo+Bozzente\",1737 => \"/meteo/Castelnuovo+Calcea\",1738 => \"/meteo/Castelnuovo+cilento\",1739 => \"/meteo/Castelnuovo+del+Garda\",1740 => \"/meteo/Castelnuovo+della+daunia\",1741 => \"/meteo/Castelnuovo+di+Ceva\",1742 => \"/meteo/Castelnuovo+di+Conza\",1743 => \"/meteo/Castelnuovo+di+Farfa\",1744 => \"/meteo/Castelnuovo+di+Garfagnana\",1745 => \"/meteo/Castelnuovo+di+Porto\",1746 => \"/meteo/Castelnuovo+di+val+di+Cecina\",1747 => \"/meteo/Castelnuovo+Don+Bosco\",1748 => \"/meteo/Castelnuovo+Magra\",1749 => \"/meteo/Castelnuovo+Nigra\",1750 => \"/meteo/Castelnuovo+Parano\",1751 => \"/meteo/Castelnuovo+Rangone\",1752 => \"/meteo/Castelnuovo+Scrivia\",1753 => \"/meteo/Castelpagano\",1754 => \"/meteo/Castelpetroso\",1755 => \"/meteo/Castelpizzuto\",1756 => \"/meteo/Castelplanio\",1757 => \"/meteo/Castelpoto\",1758 => \"/meteo/Castelraimondo\",1759 => \"/meteo/Castelrotto\",1760 => \"/meteo/Castelsantangelo+sul+Nera\",8378 => \"/meteo/Castelsaraceno\",1762 => \"/meteo/Castelsardo\",1763 => \"/meteo/Castelseprio\",1764 => \"/meteo/Castelsilano\",1765 => \"/meteo/Castelspina\",1766 => \"/meteo/Casteltermini\",1767 => \"/meteo/Castelveccana\",1768 => \"/meteo/Castelvecchio+Calvisio\",1769 => \"/meteo/Castelvecchio+di+Rocca+Barbena\",1770 => \"/meteo/Castelvecchio+Subequo\",1771 => \"/meteo/Castelvenere\",1772 => \"/meteo/Castelverde\",1773 => \"/meteo/Castelverrino\",1774 => \"/meteo/Castelvetere+in+val+fortore\",1775 => \"/meteo/Castelvetere+sul+Calore\",1776 => \"/meteo/Castelvetrano\",1777 => \"/meteo/Castelvetro+di+Modena\",1778 => \"/meteo/Castelvetro+piacentino\",1779 => \"/meteo/Castelvisconti\",1780 => \"/meteo/Castenaso\",1781 => \"/meteo/Castenedolo\",1782 => \"/meteo/Castiadas\",1783 => \"/meteo/Castiglion+Fibocchi\",1784 => \"/meteo/Castiglion+fiorentino\",8193 => \"/meteo/Castiglioncello\",1785 => \"/meteo/Castiglione+a+Casauria\",1786 => \"/meteo/Castiglione+chiavarese\",1787 => \"/meteo/Castiglione+cosentino\",1788 => \"/meteo/Castiglione+d'Adda\",1789 => \"/meteo/Castiglione+d'Intelvi\",1790 => \"/meteo/Castiglione+d'Orcia\",1791 => \"/meteo/Castiglione+dei+Pepoli\",1792 => \"/meteo/Castiglione+del+Genovesi\",1793 => \"/meteo/Castiglione+del+Lago\",1794 => \"/meteo/Castiglione+della+Pescaia\",1795 => \"/meteo/Castiglione+delle+Stiviere\",1796 => \"/meteo/Castiglione+di+garfagnana\",1797 => \"/meteo/Castiglione+di+Sicilia\",1798 => \"/meteo/Castiglione+Falletto\",1799 => \"/meteo/Castiglione+in+teverina\",1800 => \"/meteo/Castiglione+Messer+Marino\",1801 => \"/meteo/Castiglione+Messer+Raimondo\",1802 => \"/meteo/Castiglione+Olona\",1803 => \"/meteo/Castiglione+Tinella\",1804 => \"/meteo/Castiglione+torinese\",1805 => \"/meteo/Castignano\",1806 => \"/meteo/Castilenti\",1807 => \"/meteo/Castino\",1808 => \"/meteo/Castione+Andevenno\",1809 => \"/meteo/Castione+della+Presolana\",1810 => \"/meteo/Castions+di+Strada\",1811 => \"/meteo/Castiraga+Vidardo\",1812 => \"/meteo/Casto\",1813 => \"/meteo/Castorano\",8723 => \"/meteo/Castore\",1814 => \"/meteo/Castrezzato\",1815 => \"/meteo/Castri+di+Lecce\",1816 => \"/meteo/Castrignano+de'+Greci\",1817 => \"/meteo/Castrignano+del+Capo\",1818 => \"/meteo/Castro\",1819 => \"/meteo/Castro\",1820 => \"/meteo/Castro+dei+Volsci\",8167 => \"/meteo/Castro+Marina\",1821 => \"/meteo/Castrocaro+terme+e+terra+del+Sole\",1822 => \"/meteo/Castrocielo\",1823 => \"/meteo/Castrofilippo\",1824 => \"/meteo/Castrolibero\",1825 => \"/meteo/Castronno\",1826 => \"/meteo/Castronuovo+di+Sant'Andrea\",1827 => \"/meteo/Castronuovo+di+Sicilia\",1828 => \"/meteo/Castropignano\",1829 => \"/meteo/Castroreale\",1830 => \"/meteo/Castroregio\",1831 => \"/meteo/Castrovillari\",1832 => \"/meteo/Catania\",8273 => \"/meteo/Catania+Fontanarossa\",1833 => \"/meteo/Catanzaro\",1834 => \"/meteo/Catenanuova\",1835 => \"/meteo/Catignano\",8281 => \"/meteo/Catinaccio\",1836 => \"/meteo/Cattolica\",1837 => \"/meteo/Cattolica+Eraclea\",1838 => \"/meteo/Caulonia\",8673 => \"/meteo/Caulonia+Marina\",1839 => \"/meteo/Cautano\",1840 => \"/meteo/Cava+de'+Tirreni\",1841 => \"/meteo/Cava+manara\",1842 => \"/meteo/Cavacurta\",1843 => \"/meteo/Cavaglia'\",1844 => \"/meteo/Cavaglietto\",1845 => \"/meteo/Cavaglio+d'Agogna\",1846 => \"/meteo/Cavaglio+Spoccia\",1847 => \"/meteo/Cavagnolo\",1848 => \"/meteo/Cavaion+veronese\",1849 => \"/meteo/Cavalese\",1850 => \"/meteo/Cavallasca\",1851 => \"/meteo/Cavallerleone\",1852 => \"/meteo/Cavallermaggiore\",1853 => \"/meteo/Cavallino\",8657 => \"/meteo/Cavallino\",1854 => \"/meteo/Cavallino+treporti\",1855 => \"/meteo/Cavallirio\",1856 => \"/meteo/Cavareno\",1857 => \"/meteo/Cavargna\",1858 => \"/meteo/Cavaria+con+Premezzo\",1859 => \"/meteo/Cavarzere\",1860 => \"/meteo/Cavaso+del+Tomba\",1861 => \"/meteo/Cavasso+nuovo\",1862 => \"/meteo/Cavatore\",1863 => \"/meteo/Cavazzo+carnico\",1864 => \"/meteo/Cave\",1865 => \"/meteo/Cavedago\",1866 => \"/meteo/Cavedine\",1867 => \"/meteo/Cavenago+d'Adda\",1868 => \"/meteo/Cavenago+di+brianza\",1869 => \"/meteo/Cavernago\",1870 => \"/meteo/Cavezzo\",1871 => \"/meteo/Cavizzana\",1872 => \"/meteo/Cavour\",1873 => \"/meteo/Cavriago\",1874 => \"/meteo/Cavriana\",1875 => \"/meteo/Cavriglia\",1876 => \"/meteo/Cazzago+Brabbia\",1877 => \"/meteo/Cazzago+San+Martino\",1878 => \"/meteo/Cazzano+di+Tramigna\",1879 => \"/meteo/Cazzano+Sant'Andrea\",1880 => \"/meteo/Ceccano\",1881 => \"/meteo/Cecima\",1882 => \"/meteo/Cecina\",1883 => \"/meteo/Cedegolo\",1884 => \"/meteo/Cedrasco\",1885 => \"/meteo/Cefala'+Diana\",1886 => \"/meteo/Cefalu'\",1887 => \"/meteo/Ceggia\",1888 => \"/meteo/Ceglie+Messapica\",1889 => \"/meteo/Celano\",1890 => \"/meteo/Celenza+sul+Trigno\",1891 => \"/meteo/Celenza+valfortore\",1892 => \"/meteo/Celico\",1893 => \"/meteo/Cella+dati\",1894 => \"/meteo/Cella+monte\",1895 => \"/meteo/Cellamare\",1896 => \"/meteo/Cellara\",1897 => \"/meteo/Cellarengo\",1898 => \"/meteo/Cellatica\",1899 => \"/meteo/Celle+di+Bulgheria\",1900 => \"/meteo/Celle+di+Macra\",1901 => \"/meteo/Celle+di+San+Vito\",1902 => \"/meteo/Celle+Enomondo\",1903 => \"/meteo/Celle+ligure\",1904 => \"/meteo/Celleno\",1905 => \"/meteo/Cellere\",1906 => \"/meteo/Cellino+Attanasio\",1907 => \"/meteo/Cellino+San+Marco\",1908 => \"/meteo/Cellio\",1909 => \"/meteo/Cellole\",1910 => \"/meteo/Cembra\",1911 => \"/meteo/Cenadi\",1912 => \"/meteo/Cenate+sopra\",1913 => \"/meteo/Cenate+sotto\",1914 => \"/meteo/Cencenighe+Agordino\",1915 => \"/meteo/Cene\",1916 => \"/meteo/Ceneselli\",1917 => \"/meteo/Cengio\",1918 => \"/meteo/Centa+San+Nicolo'\",1919 => \"/meteo/Centallo\",1920 => \"/meteo/Cento\",1921 => \"/meteo/Centola\",1922 => \"/meteo/Centrache\",1923 => \"/meteo/Centuripe\",1924 => \"/meteo/Cepagatti\",1925 => \"/meteo/Ceppaloni\",1926 => \"/meteo/Ceppo+Morelli\",1927 => \"/meteo/Ceprano\",1928 => \"/meteo/Cerami\",1929 => \"/meteo/Ceranesi\",1930 => \"/meteo/Cerano\",1931 => \"/meteo/Cerano+d'intelvi\",1932 => \"/meteo/Ceranova\",1933 => \"/meteo/Ceraso\",1934 => \"/meteo/Cercemaggiore\",1935 => \"/meteo/Cercenasco\",1936 => \"/meteo/Cercepiccola\",1937 => \"/meteo/Cerchiara+di+Calabria\",1938 => \"/meteo/Cerchio\",1939 => \"/meteo/Cercino\",1940 => \"/meteo/Cercivento\",1941 => \"/meteo/Cercola\",1942 => \"/meteo/Cerda\",1943 => \"/meteo/Cerea\",1944 => \"/meteo/Ceregnano\",1945 => \"/meteo/Cerenzia\",1946 => \"/meteo/Ceres\",1947 => \"/meteo/Ceresara\",1948 => \"/meteo/Cereseto\",1949 => \"/meteo/Ceresole+Alba\",1950 => \"/meteo/Ceresole+reale\",1951 => \"/meteo/Cerete\",1952 => \"/meteo/Ceretto+lomellina\",1953 => \"/meteo/Cergnago\",1954 => \"/meteo/Ceriale\",1955 => \"/meteo/Ceriana\",1956 => \"/meteo/Ceriano+Laghetto\",1957 => \"/meteo/Cerignale\",1958 => \"/meteo/Cerignola\",1959 => \"/meteo/Cerisano\",1960 => \"/meteo/Cermenate\",1961 => \"/meteo/Cermes\",1962 => \"/meteo/Cermignano\",1963 => \"/meteo/Cernobbio\",1964 => \"/meteo/Cernusco+lombardone\",1965 => \"/meteo/Cernusco+sul+Naviglio\",1966 => \"/meteo/Cerreto+Castello\",1967 => \"/meteo/Cerreto+d'Asti\",1968 => \"/meteo/Cerreto+d'Esi\",1969 => \"/meteo/Cerreto+di+Spoleto\",1970 => \"/meteo/Cerreto+Grue\",1971 => \"/meteo/Cerreto+Guidi\",1972 => \"/meteo/Cerreto+langhe\",1973 => \"/meteo/Cerreto+laziale\",1974 => \"/meteo/Cerreto+sannita\",1975 => \"/meteo/Cerrina+monferrato\",1976 => \"/meteo/Cerrione\",1977 => \"/meteo/Cerro+al+Lambro\",1978 => \"/meteo/Cerro+al+Volturno\",1979 => \"/meteo/Cerro+maggiore\",1980 => \"/meteo/Cerro+Tanaro\",1981 => \"/meteo/Cerro+veronese\",8396 => \"/meteo/Cersosimo\",1983 => \"/meteo/Certaldo\",1984 => \"/meteo/Certosa+di+Pavia\",1985 => \"/meteo/Cerva\",1986 => \"/meteo/Cervara+di+Roma\",1987 => \"/meteo/Cervarese+Santa+Croce\",1988 => \"/meteo/Cervaro\",1989 => \"/meteo/Cervasca\",1990 => \"/meteo/Cervatto\",1991 => \"/meteo/Cerveno\",1992 => \"/meteo/Cervere\",1993 => \"/meteo/Cervesina\",1994 => \"/meteo/Cerveteri\",1995 => \"/meteo/Cervia\",1996 => \"/meteo/Cervicati\",1997 => \"/meteo/Cervignano+d'Adda\",1998 => \"/meteo/Cervignano+del+Friuli\",1999 => \"/meteo/Cervinara\",2000 => \"/meteo/Cervino\",2001 => \"/meteo/Cervo\",2002 => \"/meteo/Cerzeto\",2003 => \"/meteo/Cesa\",2004 => \"/meteo/Cesana+brianza\",2005 => \"/meteo/Cesana+torinese\",2006 => \"/meteo/Cesano+Boscone\",2007 => \"/meteo/Cesano+Maderno\",2008 => \"/meteo/Cesara\",2009 => \"/meteo/Cesaro'\",2010 => \"/meteo/Cesate\",2011 => \"/meteo/Cesena\",2012 => \"/meteo/Cesenatico\",2013 => \"/meteo/Cesinali\",2014 => \"/meteo/Cesio\",2015 => \"/meteo/Cesiomaggiore\",2016 => \"/meteo/Cessalto\",2017 => \"/meteo/Cessaniti\",2018 => \"/meteo/Cessapalombo\",2019 => \"/meteo/Cessole\",2020 => \"/meteo/Cetara\",2021 => \"/meteo/Ceto\",2022 => \"/meteo/Cetona\",2023 => \"/meteo/Cetraro\",2024 => \"/meteo/Ceva\",8721 => \"/meteo/Cevedale\",2025 => \"/meteo/Cevo\",2026 => \"/meteo/Challand+Saint+Anselme\",2027 => \"/meteo/Challand+Saint+Victor\",2028 => \"/meteo/Chambave\",2029 => \"/meteo/Chamois\",8255 => \"/meteo/Chamole`\",2030 => \"/meteo/Champdepraz\",8225 => \"/meteo/Champoluc\",2031 => \"/meteo/Champorcher\",8331 => \"/meteo/Champorcher+Cimetta+Rossa\",8330 => \"/meteo/Champorcher+Laris\",2032 => \"/meteo/Charvensod\",2033 => \"/meteo/Chatillon\",2034 => \"/meteo/Cherasco\",2035 => \"/meteo/Cheremule\",8668 => \"/meteo/Chesal\",2036 => \"/meteo/Chialamberto\",2037 => \"/meteo/Chiampo\",2038 => \"/meteo/Chianche\",2039 => \"/meteo/Chianciano+terme\",2040 => \"/meteo/Chianni\",2041 => \"/meteo/Chianocco\",2042 => \"/meteo/Chiaramonte+Gulfi\",2043 => \"/meteo/Chiaramonti\",2044 => \"/meteo/Chiarano\",2045 => \"/meteo/Chiaravalle\",2046 => \"/meteo/Chiaravalle+centrale\",8151 => \"/meteo/Chiareggio\",2047 => \"/meteo/Chiari\",2048 => \"/meteo/Chiaromonte\",8432 => \"/meteo/Chiasso\",2049 => \"/meteo/Chiauci\",2050 => \"/meteo/Chiavari\",2051 => \"/meteo/Chiavenna\",2052 => \"/meteo/Chiaverano\",2053 => \"/meteo/Chienes\",2054 => \"/meteo/Chieri\",2055 => \"/meteo/Chies+d'Alpago\",2056 => \"/meteo/Chiesa+in+valmalenco\",2057 => \"/meteo/Chiesanuova\",2058 => \"/meteo/Chiesina+uzzanese\",2059 => \"/meteo/Chieti\",8319 => \"/meteo/Chieti+Scalo\",2060 => \"/meteo/Chieuti\",2061 => \"/meteo/Chieve\",2062 => \"/meteo/Chignolo+d'Isola\",2063 => \"/meteo/Chignolo+Po\",2064 => \"/meteo/Chioggia\",2065 => \"/meteo/Chiomonte\",2066 => \"/meteo/Chions\",2067 => \"/meteo/Chiopris+Viscone\",2068 => \"/meteo/Chitignano\",2069 => \"/meteo/Chiuduno\",2070 => \"/meteo/Chiuppano\",2071 => \"/meteo/Chiuro\",2072 => \"/meteo/Chiusa\",2073 => \"/meteo/Chiusa+di+Pesio\",2074 => \"/meteo/Chiusa+di+San+Michele\",2075 => \"/meteo/Chiusa+Sclafani\",2076 => \"/meteo/Chiusaforte\",2077 => \"/meteo/Chiusanico\",2078 => \"/meteo/Chiusano+d'Asti\",2079 => \"/meteo/Chiusano+di+San+Domenico\",2080 => \"/meteo/Chiusavecchia\",2081 => \"/meteo/Chiusdino\",2082 => \"/meteo/Chiusi\",2083 => \"/meteo/Chiusi+della+Verna\",2084 => \"/meteo/Chivasso\",8515 => \"/meteo/Ciampac+Alba\",2085 => \"/meteo/Ciampino\",2086 => \"/meteo/Cianciana\",2087 => \"/meteo/Cibiana+di+cadore\",2088 => \"/meteo/Cicagna\",2089 => \"/meteo/Cicala\",2090 => \"/meteo/Cicciano\",2091 => \"/meteo/Cicerale\",2092 => \"/meteo/Ciciliano\",2093 => \"/meteo/Cicognolo\",2094 => \"/meteo/Ciconio\",2095 => \"/meteo/Cigliano\",2096 => \"/meteo/Ciglie'\",2097 => \"/meteo/Cigognola\",2098 => \"/meteo/Cigole\",2099 => \"/meteo/Cilavegna\",8340 => \"/meteo/Cima+Durand\",8590 => \"/meteo/Cima+Pisciadu'\",8764 => \"/meteo/Cima+Plose\",8703 => \"/meteo/Cima+Portavescovo\",8282 => \"/meteo/Cima+Sole\",2100 => \"/meteo/Cimadolmo\",2101 => \"/meteo/Cimbergo\",8332 => \"/meteo/Cime+Bianche\",2102 => \"/meteo/Cimego\",2103 => \"/meteo/Cimina'\",2104 => \"/meteo/Ciminna\",2105 => \"/meteo/Cimitile\",2106 => \"/meteo/Cimolais\",8433 => \"/meteo/Cimoncino\",2107 => \"/meteo/Cimone\",2108 => \"/meteo/Cinaglio\",2109 => \"/meteo/Cineto+romano\",2110 => \"/meteo/Cingia+de'+Botti\",2111 => \"/meteo/Cingoli\",2112 => \"/meteo/Cinigiano\",2113 => \"/meteo/Cinisello+Balsamo\",2114 => \"/meteo/Cinisi\",2115 => \"/meteo/Cino\",2116 => \"/meteo/Cinquefrondi\",2117 => \"/meteo/Cintano\",2118 => \"/meteo/Cinte+tesino\",2119 => \"/meteo/Cinto+Caomaggiore\",2120 => \"/meteo/Cinto+Euganeo\",2121 => \"/meteo/Cinzano\",2122 => \"/meteo/Ciorlano\",2123 => \"/meteo/Cipressa\",2124 => \"/meteo/Circello\",2125 => \"/meteo/Cirie'\",2126 => \"/meteo/Cirigliano\",2127 => \"/meteo/Cirimido\",2128 => \"/meteo/Ciro'\",2129 => \"/meteo/Ciro'+marina\",2130 => \"/meteo/Cis\",2131 => \"/meteo/Cisano+bergamasco\",2132 => \"/meteo/Cisano+sul+Neva\",2133 => \"/meteo/Ciserano\",2134 => \"/meteo/Cislago\",2135 => \"/meteo/Cisliano\",2136 => \"/meteo/Cismon+del+Grappa\",2137 => \"/meteo/Cison+di+valmarino\",2138 => \"/meteo/Cissone\",2139 => \"/meteo/Cisterna+d'Asti\",2140 => \"/meteo/Cisterna+di+Latina\",2141 => \"/meteo/Cisternino\",2142 => \"/meteo/Citerna\",8142 => \"/meteo/Città+del+Vaticano\",2143 => \"/meteo/Citta'+della+Pieve\",2144 => \"/meteo/Citta'+di+Castello\",2145 => \"/meteo/Citta'+Sant'Angelo\",2146 => \"/meteo/Cittadella\",2147 => \"/meteo/Cittaducale\",2148 => \"/meteo/Cittanova\",2149 => \"/meteo/Cittareale\",2150 => \"/meteo/Cittiglio\",2151 => \"/meteo/Civate\",2152 => \"/meteo/Civenna\",2153 => \"/meteo/Civezza\",2154 => \"/meteo/Civezzano\",2155 => \"/meteo/Civiasco\",2156 => \"/meteo/Cividale+del+Friuli\",2157 => \"/meteo/Cividate+al+piano\",2158 => \"/meteo/Cividate+camuno\",2159 => \"/meteo/Civita\",2160 => \"/meteo/Civita+Castellana\",2161 => \"/meteo/Civita+d'Antino\",2162 => \"/meteo/Civitacampomarano\",2163 => \"/meteo/Civitaluparella\",2164 => \"/meteo/Civitanova+del+sannio\",2165 => \"/meteo/Civitanova+Marche\",8356 => \"/meteo/Civitaquana\",2167 => \"/meteo/Civitavecchia\",2168 => \"/meteo/Civitella+Alfedena\",2169 => \"/meteo/Civitella+Casanova\",2170 => \"/meteo/Civitella+d'Agliano\",2171 => \"/meteo/Civitella+del+Tronto\",2172 => \"/meteo/Civitella+di+Romagna\",2173 => \"/meteo/Civitella+in+val+di+Chiana\",2174 => \"/meteo/Civitella+Messer+Raimondo\",2175 => \"/meteo/Civitella+Paganico\",2176 => \"/meteo/Civitella+Roveto\",2177 => \"/meteo/Civitella+San+Paolo\",2178 => \"/meteo/Civo\",2179 => \"/meteo/Claino+con+osteno\",2180 => \"/meteo/Claut\",2181 => \"/meteo/Clauzetto\",2182 => \"/meteo/Clavesana\",2183 => \"/meteo/Claviere\",2184 => \"/meteo/Cles\",2185 => \"/meteo/Cleto\",2186 => \"/meteo/Clivio\",2187 => \"/meteo/Cloz\",2188 => \"/meteo/Clusone\",2189 => \"/meteo/Coassolo+torinese\",2190 => \"/meteo/Coazze\",2191 => \"/meteo/Coazzolo\",2192 => \"/meteo/Coccaglio\",2193 => \"/meteo/Cocconato\",2194 => \"/meteo/Cocquio+Trevisago\",2195 => \"/meteo/Cocullo\",2196 => \"/meteo/Codevigo\",2197 => \"/meteo/Codevilla\",2198 => \"/meteo/Codigoro\",2199 => \"/meteo/Codogne'\",2200 => \"/meteo/Codogno\",2201 => \"/meteo/Codroipo\",2202 => \"/meteo/Codrongianos\",2203 => \"/meteo/Coggiola\",2204 => \"/meteo/Cogliate\",2205 => \"/meteo/Cogne\",8654 => \"/meteo/Cogne+Lillaz\",2206 => \"/meteo/Cogoleto\",2207 => \"/meteo/Cogollo+del+Cengio\",5049 => \"/meteo/Cogolo\",2208 => \"/meteo/Cogorno\",8354 => \"/meteo/Col+de+Joux\",8604 => \"/meteo/Col+Indes\",2209 => \"/meteo/Colazza\",2210 => \"/meteo/Colbordolo\",2211 => \"/meteo/Colere\",2212 => \"/meteo/Colfelice\",8217 => \"/meteo/Colfiorito\",8761 => \"/meteo/Colfosco\",2213 => \"/meteo/Coli\",2214 => \"/meteo/Colico\",2215 => \"/meteo/Collagna\",2216 => \"/meteo/Collalto+sabino\",2217 => \"/meteo/Collarmele\",2218 => \"/meteo/Collazzone\",8249 => \"/meteo/Colle+Bettaforca\",2219 => \"/meteo/Colle+Brianza\",2220 => \"/meteo/Colle+d'Anchise\",8687 => \"/meteo/Colle+del+Gran+San+Bernardo\",8688 => \"/meteo/Colle+del+Moncenisio\",8686 => \"/meteo/Colle+del+Piccolo+San+Bernardo\",8481 => \"/meteo/Colle+del+Prel\",2221 => \"/meteo/Colle+di+Tora\",2222 => \"/meteo/Colle+di+val+d'Elsa\",2223 => \"/meteo/Colle+San+Magno\",2224 => \"/meteo/Colle+sannita\",2225 => \"/meteo/Colle+Santa+Lucia\",8246 => \"/meteo/Colle+Sarezza\",2226 => \"/meteo/Colle+Umberto\",2227 => \"/meteo/Collebeato\",2228 => \"/meteo/Collecchio\",2229 => \"/meteo/Collecorvino\",2230 => \"/meteo/Colledara\",8453 => \"/meteo/Colledara+casello\",2231 => \"/meteo/Colledimacine\",2232 => \"/meteo/Colledimezzo\",2233 => \"/meteo/Colleferro\",2234 => \"/meteo/Collegiove\",2235 => \"/meteo/Collegno\",2236 => \"/meteo/Collelongo\",2237 => \"/meteo/Collepardo\",2238 => \"/meteo/Collepasso\",2239 => \"/meteo/Collepietro\",2240 => \"/meteo/Colleretto+castelnuovo\",2241 => \"/meteo/Colleretto+Giacosa\",2242 => \"/meteo/Collesalvetti\",2243 => \"/meteo/Collesano\",2244 => \"/meteo/Colletorto\",2245 => \"/meteo/Collevecchio\",2246 => \"/meteo/Colli+a+volturno\",2247 => \"/meteo/Colli+del+Tronto\",2248 => \"/meteo/Colli+sul+Velino\",2249 => \"/meteo/Colliano\",2250 => \"/meteo/Collinas\",2251 => \"/meteo/Collio\",2252 => \"/meteo/Collobiano\",2253 => \"/meteo/Colloredo+di+monte+Albano\",2254 => \"/meteo/Colmurano\",2255 => \"/meteo/Colobraro\",2256 => \"/meteo/Cologna+veneta\",2257 => \"/meteo/Cologne\",2258 => \"/meteo/Cologno+al+Serio\",2259 => \"/meteo/Cologno+monzese\",2260 => \"/meteo/Colognola+ai+Colli\",2261 => \"/meteo/Colonna\",2262 => \"/meteo/Colonnella\",2263 => \"/meteo/Colonno\",2264 => \"/meteo/Colorina\",2265 => \"/meteo/Colorno\",2266 => \"/meteo/Colosimi\",2267 => \"/meteo/Colturano\",2268 => \"/meteo/Colzate\",2269 => \"/meteo/Comabbio\",2270 => \"/meteo/Comacchio\",2271 => \"/meteo/Comano\",2272 => \"/meteo/Comazzo\",2273 => \"/meteo/Comeglians\",2274 => \"/meteo/Comelico+superiore\",2275 => \"/meteo/Comerio\",2276 => \"/meteo/Comezzano+Cizzago\",2277 => \"/meteo/Comignago\",2278 => \"/meteo/Comiso\",2279 => \"/meteo/Comitini\",2280 => \"/meteo/Comiziano\",2281 => \"/meteo/Commessaggio\",2282 => \"/meteo/Commezzadura\",2283 => \"/meteo/Como\",2284 => \"/meteo/Compiano\",8711 => \"/meteo/Comprensorio+Cimone\",2285 => \"/meteo/Comun+nuovo\",2286 => \"/meteo/Comunanza\",2287 => \"/meteo/Cona\",2288 => \"/meteo/Conca+Casale\",2289 => \"/meteo/Conca+dei+Marini\",2290 => \"/meteo/Conca+della+Campania\",2291 => \"/meteo/Concamarise\",2292 => \"/meteo/Concei\",2293 => \"/meteo/Concerviano\",2294 => \"/meteo/Concesio\",2295 => \"/meteo/Conco\",2296 => \"/meteo/Concordia+Sagittaria\",2297 => \"/meteo/Concordia+sulla+Secchia\",2298 => \"/meteo/Concorezzo\",2299 => \"/meteo/Condino\",2300 => \"/meteo/Condofuri\",8689 => \"/meteo/Condofuri+Marina\",2301 => \"/meteo/Condove\",2302 => \"/meteo/Condro'\",2303 => \"/meteo/Conegliano\",2304 => \"/meteo/Confienza\",2305 => \"/meteo/Configni\",2306 => \"/meteo/Conflenti\",2307 => \"/meteo/Coniolo\",2308 => \"/meteo/Conselice\",2309 => \"/meteo/Conselve\",2310 => \"/meteo/Consiglio+di+Rumo\",2311 => \"/meteo/Contessa+Entellina\",2312 => \"/meteo/Contigliano\",2313 => \"/meteo/Contrada\",2314 => \"/meteo/Controguerra\",2315 => \"/meteo/Controne\",2316 => \"/meteo/Contursi+terme\",2317 => \"/meteo/Conversano\",2318 => \"/meteo/Conza+della+Campania\",2319 => \"/meteo/Conzano\",2320 => \"/meteo/Copertino\",2321 => \"/meteo/Copiano\",2322 => \"/meteo/Copparo\",2323 => \"/meteo/Corana\",2324 => \"/meteo/Corato\",2325 => \"/meteo/Corbara\",2326 => \"/meteo/Corbetta\",2327 => \"/meteo/Corbola\",2328 => \"/meteo/Corchiano\",2329 => \"/meteo/Corciano\",2330 => \"/meteo/Cordenons\",2331 => \"/meteo/Cordignano\",2332 => \"/meteo/Cordovado\",2333 => \"/meteo/Coredo\",2334 => \"/meteo/Coreglia+Antelminelli\",2335 => \"/meteo/Coreglia+ligure\",2336 => \"/meteo/Coreno+Ausonio\",2337 => \"/meteo/Corfinio\",2338 => \"/meteo/Cori\",2339 => \"/meteo/Coriano\",2340 => \"/meteo/Corigliano+calabro\",8110 => \"/meteo/Corigliano+Calabro+Marina\",2341 => \"/meteo/Corigliano+d'Otranto\",2342 => \"/meteo/Corinaldo\",2343 => \"/meteo/Corio\",2344 => \"/meteo/Corleone\",2345 => \"/meteo/Corleto+monforte\",2346 => \"/meteo/Corleto+Perticara\",2347 => \"/meteo/Cormano\",2348 => \"/meteo/Cormons\",2349 => \"/meteo/Corna+imagna\",2350 => \"/meteo/Cornalba\",2351 => \"/meteo/Cornale\",2352 => \"/meteo/Cornaredo\",2353 => \"/meteo/Cornate+d'Adda\",2354 => \"/meteo/Cornedo+all'Isarco\",2355 => \"/meteo/Cornedo+vicentino\",2356 => \"/meteo/Cornegliano+laudense\",2357 => \"/meteo/Corneliano+d'Alba\",2358 => \"/meteo/Corniglio\",8537 => \"/meteo/Corno+alle+Scale\",8353 => \"/meteo/Corno+del+Renon\",2359 => \"/meteo/Corno+di+Rosazzo\",2360 => \"/meteo/Corno+Giovine\",2361 => \"/meteo/Cornovecchio\",2362 => \"/meteo/Cornuda\",2363 => \"/meteo/Correggio\",2364 => \"/meteo/Correzzana\",2365 => \"/meteo/Correzzola\",2366 => \"/meteo/Corrido\",2367 => \"/meteo/Corridonia\",2368 => \"/meteo/Corropoli\",2369 => \"/meteo/Corsano\",2370 => \"/meteo/Corsico\",2371 => \"/meteo/Corsione\",2372 => \"/meteo/Cortaccia+sulla+strada+del+vino\",2373 => \"/meteo/Cortale\",2374 => \"/meteo/Cortandone\",2375 => \"/meteo/Cortanze\",2376 => \"/meteo/Cortazzone\",2377 => \"/meteo/Corte+brugnatella\",2378 => \"/meteo/Corte+de'+Cortesi+con+Cignone\",2379 => \"/meteo/Corte+de'+Frati\",2380 => \"/meteo/Corte+Franca\",2381 => \"/meteo/Corte+Palasio\",2382 => \"/meteo/Cortemaggiore\",2383 => \"/meteo/Cortemilia\",2384 => \"/meteo/Corteno+Golgi\",2385 => \"/meteo/Cortenova\",2386 => \"/meteo/Cortenuova\",2387 => \"/meteo/Corteolona\",2388 => \"/meteo/Cortiglione\",2389 => \"/meteo/Cortina+d'Ampezzo\",2390 => \"/meteo/Cortina+sulla+strada+del+vino\",2391 => \"/meteo/Cortino\",2392 => \"/meteo/Cortona\",2393 => \"/meteo/Corvara\",2394 => \"/meteo/Corvara+in+Badia\",2395 => \"/meteo/Corvino+san+Quirico\",2396 => \"/meteo/Corzano\",2397 => \"/meteo/Coseano\",2398 => \"/meteo/Cosenza\",2399 => \"/meteo/Cosio+di+Arroscia\",2400 => \"/meteo/Cosio+valtellino\",2401 => \"/meteo/Cosoleto\",2402 => \"/meteo/Cossano+belbo\",2403 => \"/meteo/Cossano+canavese\",2404 => \"/meteo/Cossato\",2405 => \"/meteo/Cosseria\",2406 => \"/meteo/Cossignano\",2407 => \"/meteo/Cossogno\",2408 => \"/meteo/Cossoine\",2409 => \"/meteo/Cossombrato\",2410 => \"/meteo/Costa+de'+Nobili\",2411 => \"/meteo/Costa+di+Mezzate\",2412 => \"/meteo/Costa+di+Rovigo\",2413 => \"/meteo/Costa+di+serina\",2414 => \"/meteo/Costa+masnaga\",8177 => \"/meteo/Costa+Rei\",2415 => \"/meteo/Costa+valle+imagna\",2416 => \"/meteo/Costa+Vescovato\",2417 => \"/meteo/Costa+Volpino\",2418 => \"/meteo/Costabissara\",2419 => \"/meteo/Costacciaro\",2420 => \"/meteo/Costanzana\",2421 => \"/meteo/Costarainera\",2422 => \"/meteo/Costermano\",2423 => \"/meteo/Costigliole+d'Asti\",2424 => \"/meteo/Costigliole+Saluzzo\",2425 => \"/meteo/Cotignola\",2426 => \"/meteo/Cotronei\",2427 => \"/meteo/Cottanello\",8256 => \"/meteo/Couis+2\",2428 => \"/meteo/Courmayeur\",2429 => \"/meteo/Covo\",2430 => \"/meteo/Cozzo\",8382 => \"/meteo/Craco\",2432 => \"/meteo/Crandola+valsassina\",2433 => \"/meteo/Cravagliana\",2434 => \"/meteo/Cravanzana\",2435 => \"/meteo/Craveggia\",2436 => \"/meteo/Creazzo\",2437 => \"/meteo/Crecchio\",2438 => \"/meteo/Credaro\",2439 => \"/meteo/Credera+Rubbiano\",2440 => \"/meteo/Crema\",2441 => \"/meteo/Cremella\",2442 => \"/meteo/Cremenaga\",2443 => \"/meteo/Cremeno\",2444 => \"/meteo/Cremia\",2445 => \"/meteo/Cremolino\",2446 => \"/meteo/Cremona\",2447 => \"/meteo/Cremosano\",2448 => \"/meteo/Crescentino\",2449 => \"/meteo/Crespadoro\",2450 => \"/meteo/Crespano+del+Grappa\",2451 => \"/meteo/Crespellano\",2452 => \"/meteo/Crespiatica\",2453 => \"/meteo/Crespina\",2454 => \"/meteo/Crespino\",2455 => \"/meteo/Cressa\",8247 => \"/meteo/Crest\",8741 => \"/meteo/Cresta+Youla\",8646 => \"/meteo/Crevacol\",2456 => \"/meteo/Crevacuore\",2457 => \"/meteo/Crevalcore\",2458 => \"/meteo/Crevoladossola\",2459 => \"/meteo/Crispano\",2460 => \"/meteo/Crispiano\",2461 => \"/meteo/Crissolo\",8355 => \"/meteo/Crissolo+Pian+delle+Regine\",2462 => \"/meteo/Crocefieschi\",2463 => \"/meteo/Crocetta+del+Montello\",2464 => \"/meteo/Crodo\",2465 => \"/meteo/Crognaleto\",2466 => \"/meteo/Cropalati\",2467 => \"/meteo/Cropani\",2468 => \"/meteo/Crosa\",2469 => \"/meteo/Crosia\",2470 => \"/meteo/Crosio+della+valle\",2471 => \"/meteo/Crotone\",8552 => \"/meteo/Crotone+Sant'Anna\",2472 => \"/meteo/Crotta+d'Adda\",2473 => \"/meteo/Crova\",2474 => \"/meteo/Croviana\",2475 => \"/meteo/Crucoli\",2476 => \"/meteo/Cuasso+al+monte\",2477 => \"/meteo/Cuccaro+monferrato\",2478 => \"/meteo/Cuccaro+Vetere\",2479 => \"/meteo/Cucciago\",2480 => \"/meteo/Cuceglio\",2481 => \"/meteo/Cuggiono\",2482 => \"/meteo/Cugliate-fabiasco\",2483 => \"/meteo/Cuglieri\",2484 => \"/meteo/Cugnoli\",8718 => \"/meteo/Cuma\",2485 => \"/meteo/Cumiana\",2486 => \"/meteo/Cumignano+sul+Naviglio\",2487 => \"/meteo/Cunardo\",2488 => \"/meteo/Cuneo\",8553 => \"/meteo/Cuneo+Levaldigi\",2489 => \"/meteo/Cunevo\",2490 => \"/meteo/Cunico\",2491 => \"/meteo/Cuorgne'\",2492 => \"/meteo/Cupello\",2493 => \"/meteo/Cupra+marittima\",2494 => \"/meteo/Cupramontana\",2495 => \"/meteo/Cura+carpignano\",2496 => \"/meteo/Curcuris\",2497 => \"/meteo/Cureggio\",2498 => \"/meteo/Curiglia+con+Monteviasco\",2499 => \"/meteo/Curinga\",2500 => \"/meteo/Curino\",2501 => \"/meteo/Curno\",2502 => \"/meteo/Curon+Venosta\",2503 => \"/meteo/Cursi\",2504 => \"/meteo/Cursolo+orasso\",2505 => \"/meteo/Curtarolo\",2506 => \"/meteo/Curtatone\",2507 => \"/meteo/Curti\",2508 => \"/meteo/Cusago\",2509 => \"/meteo/Cusano+milanino\",2510 => \"/meteo/Cusano+Mutri\",2511 => \"/meteo/Cusino\",2512 => \"/meteo/Cusio\",2513 => \"/meteo/Custonaci\",2514 => \"/meteo/Cutigliano\",2515 => \"/meteo/Cutro\",2516 => \"/meteo/Cutrofiano\",2517 => \"/meteo/Cuveglio\",2518 => \"/meteo/Cuvio\",2519 => \"/meteo/Daiano\",2520 => \"/meteo/Dairago\",2521 => \"/meteo/Dalmine\",2522 => \"/meteo/Dambel\",2523 => \"/meteo/Danta+di+cadore\",2524 => \"/meteo/Daone\",2525 => \"/meteo/Dare'\",2526 => \"/meteo/Darfo+Boario+terme\",2527 => \"/meteo/Dasa'\",2528 => \"/meteo/Davagna\",2529 => \"/meteo/Daverio\",2530 => \"/meteo/Davoli\",2531 => \"/meteo/Dazio\",2532 => \"/meteo/Decimomannu\",2533 => \"/meteo/Decimoputzu\",2534 => \"/meteo/Decollatura\",2535 => \"/meteo/Dego\",2536 => \"/meteo/Deiva+marina\",2537 => \"/meteo/Delebio\",2538 => \"/meteo/Delia\",2539 => \"/meteo/Delianuova\",2540 => \"/meteo/Deliceto\",2541 => \"/meteo/Dello\",2542 => \"/meteo/Demonte\",2543 => \"/meteo/Denice\",2544 => \"/meteo/Denno\",2545 => \"/meteo/Dernice\",2546 => \"/meteo/Derovere\",2547 => \"/meteo/Deruta\",2548 => \"/meteo/Dervio\",2549 => \"/meteo/Desana\",2550 => \"/meteo/Desenzano+del+Garda\",2551 => \"/meteo/Desio\",2552 => \"/meteo/Desulo\",2553 => \"/meteo/Diamante\",2554 => \"/meteo/Diano+arentino\",2555 => \"/meteo/Diano+castello\",2556 => \"/meteo/Diano+d'Alba\",2557 => \"/meteo/Diano+marina\",2558 => \"/meteo/Diano+San+Pietro\",2559 => \"/meteo/Dicomano\",2560 => \"/meteo/Dignano\",2561 => \"/meteo/Dimaro\",2562 => \"/meteo/Dinami\",2563 => \"/meteo/Dipignano\",2564 => \"/meteo/Diso\",2565 => \"/meteo/Divignano\",2566 => \"/meteo/Dizzasco\",2567 => \"/meteo/Dobbiaco\",2568 => \"/meteo/Doberdo'+del+lago\",8628 => \"/meteo/Doganaccia\",2569 => \"/meteo/Dogliani\",2570 => \"/meteo/Dogliola\",2571 => \"/meteo/Dogna\",2572 => \"/meteo/Dolce'\",2573 => \"/meteo/Dolceacqua\",2574 => \"/meteo/Dolcedo\",2575 => \"/meteo/Dolegna+del+collio\",2576 => \"/meteo/Dolianova\",2577 => \"/meteo/Dolo\",8616 => \"/meteo/Dolonne\",2578 => \"/meteo/Dolzago\",2579 => \"/meteo/Domanico\",2580 => \"/meteo/Domaso\",2581 => \"/meteo/Domegge+di+cadore\",2582 => \"/meteo/Domicella\",2583 => \"/meteo/Domodossola\",2584 => \"/meteo/Domus+de+Maria\",2585 => \"/meteo/Domusnovas\",2586 => \"/meteo/Don\",2587 => \"/meteo/Donato\",2588 => \"/meteo/Dongo\",2589 => \"/meteo/Donnas\",2590 => \"/meteo/Donori'\",2591 => \"/meteo/Dorgali\",2592 => \"/meteo/Dorio\",2593 => \"/meteo/Dormelletto\",2594 => \"/meteo/Dorno\",2595 => \"/meteo/Dorsino\",2596 => \"/meteo/Dorzano\",2597 => \"/meteo/Dosolo\",2598 => \"/meteo/Dossena\",2599 => \"/meteo/Dosso+del+liro\",8323 => \"/meteo/Dosso+Pasò\",2600 => \"/meteo/Doues\",2601 => \"/meteo/Dovadola\",2602 => \"/meteo/Dovera\",2603 => \"/meteo/Dozza\",2604 => \"/meteo/Dragoni\",2605 => \"/meteo/Drapia\",2606 => \"/meteo/Drena\",2607 => \"/meteo/Drenchia\",2608 => \"/meteo/Dresano\",2609 => \"/meteo/Drezzo\",2610 => \"/meteo/Drizzona\",2611 => \"/meteo/Dro\",2612 => \"/meteo/Dronero\",2613 => \"/meteo/Druento\",2614 => \"/meteo/Druogno\",2615 => \"/meteo/Dualchi\",2616 => \"/meteo/Dubino\",2617 => \"/meteo/Due+carrare\",2618 => \"/meteo/Dueville\",2619 => \"/meteo/Dugenta\",2620 => \"/meteo/Duino+aurisina\",2621 => \"/meteo/Dumenza\",2622 => \"/meteo/Duno\",2623 => \"/meteo/Durazzano\",2624 => \"/meteo/Duronia\",2625 => \"/meteo/Dusino+San+Michele\",2626 => \"/meteo/Eboli\",2627 => \"/meteo/Edolo\",2628 => \"/meteo/Egna\",2629 => \"/meteo/Elice\",2630 => \"/meteo/Elini\",2631 => \"/meteo/Ello\",2632 => \"/meteo/Elmas\",2633 => \"/meteo/Elva\",2634 => \"/meteo/Emarese\",2635 => \"/meteo/Empoli\",2636 => \"/meteo/Endine+gaiano\",2637 => \"/meteo/Enego\",2638 => \"/meteo/Enemonzo\",2639 => \"/meteo/Enna\",2640 => \"/meteo/Entracque\",2641 => \"/meteo/Entratico\",8222 => \"/meteo/Entreves\",2642 => \"/meteo/Envie\",8397 => \"/meteo/Episcopia\",2644 => \"/meteo/Eraclea\",2645 => \"/meteo/Erba\",2646 => \"/meteo/Erbe'\",2647 => \"/meteo/Erbezzo\",2648 => \"/meteo/Erbusco\",2649 => \"/meteo/Erchie\",2650 => \"/meteo/Ercolano\",8531 => \"/meteo/Eremo+di+Camaldoli\",8606 => \"/meteo/Eremo+di+Carpegna\",2651 => \"/meteo/Erice\",2652 => \"/meteo/Erli\",2653 => \"/meteo/Erto+e+casso\",2654 => \"/meteo/Erula\",2655 => \"/meteo/Erve\",2656 => \"/meteo/Esanatoglia\",2657 => \"/meteo/Escalaplano\",2658 => \"/meteo/Escolca\",2659 => \"/meteo/Esine\",2660 => \"/meteo/Esino+lario\",2661 => \"/meteo/Esperia\",2662 => \"/meteo/Esporlatu\",2663 => \"/meteo/Este\",2664 => \"/meteo/Esterzili\",2665 => \"/meteo/Etroubles\",2666 => \"/meteo/Eupilio\",2667 => \"/meteo/Exilles\",2668 => \"/meteo/Fabbrica+Curone\",2669 => \"/meteo/Fabbriche+di+vallico\",2670 => \"/meteo/Fabbrico\",2671 => \"/meteo/Fabriano\",2672 => \"/meteo/Fabrica+di+Roma\",2673 => \"/meteo/Fabrizia\",2674 => \"/meteo/Fabro\",8458 => \"/meteo/Fabro+casello\",2675 => \"/meteo/Faedis\",2676 => \"/meteo/Faedo\",2677 => \"/meteo/Faedo+valtellino\",2678 => \"/meteo/Faenza\",2679 => \"/meteo/Faeto\",2680 => \"/meteo/Fagagna\",2681 => \"/meteo/Faggeto+lario\",2682 => \"/meteo/Faggiano\",2683 => \"/meteo/Fagnano+alto\",2684 => \"/meteo/Fagnano+castello\",2685 => \"/meteo/Fagnano+olona\",2686 => \"/meteo/Fai+della+paganella\",2687 => \"/meteo/Faicchio\",2688 => \"/meteo/Falcade\",2689 => \"/meteo/Falciano+del+massico\",2690 => \"/meteo/Falconara+albanese\",2691 => \"/meteo/Falconara+marittima\",2692 => \"/meteo/Falcone\",2693 => \"/meteo/Faleria\",2694 => \"/meteo/Falerna\",8116 => \"/meteo/Falerna+Marina\",2695 => \"/meteo/Falerone\",2696 => \"/meteo/Fallo\",2697 => \"/meteo/Falmenta\",2698 => \"/meteo/Faloppio\",2699 => \"/meteo/Falvaterra\",2700 => \"/meteo/Falzes\",2701 => \"/meteo/Fanano\",2702 => \"/meteo/Fanna\",2703 => \"/meteo/Fano\",2704 => \"/meteo/Fano+adriano\",2705 => \"/meteo/Fara+Filiorum+Petri\",2706 => \"/meteo/Fara+gera+d'Adda\",2707 => \"/meteo/Fara+in+sabina\",2708 => \"/meteo/Fara+novarese\",2709 => \"/meteo/Fara+Olivana+con+Sola\",2710 => \"/meteo/Fara+San+Martino\",2711 => \"/meteo/Fara+vicentino\",8360 => \"/meteo/Fardella\",2713 => \"/meteo/Farigliano\",2714 => \"/meteo/Farindola\",2715 => \"/meteo/Farini\",2716 => \"/meteo/Farnese\",2717 => \"/meteo/Farra+d'alpago\",2718 => \"/meteo/Farra+d'Isonzo\",2719 => \"/meteo/Farra+di+soligo\",2720 => \"/meteo/Fasano\",2721 => \"/meteo/Fascia\",2722 => \"/meteo/Fauglia\",2723 => \"/meteo/Faule\",2724 => \"/meteo/Favale+di+malvaro\",2725 => \"/meteo/Favara\",2726 => \"/meteo/Faver\",2727 => \"/meteo/Favignana\",2728 => \"/meteo/Favria\",2729 => \"/meteo/Feisoglio\",2730 => \"/meteo/Feletto\",2731 => \"/meteo/Felino\",2732 => \"/meteo/Felitto\",2733 => \"/meteo/Felizzano\",2734 => \"/meteo/Felonica\",2735 => \"/meteo/Feltre\",2736 => \"/meteo/Fenegro'\",2737 => \"/meteo/Fenestrelle\",2738 => \"/meteo/Fenis\",2739 => \"/meteo/Ferentillo\",2740 => \"/meteo/Ferentino\",2741 => \"/meteo/Ferla\",2742 => \"/meteo/Fermignano\",2743 => \"/meteo/Fermo\",2744 => \"/meteo/Ferno\",2745 => \"/meteo/Feroleto+Antico\",2746 => \"/meteo/Feroleto+della+chiesa\",8370 => \"/meteo/Ferrandina\",2748 => \"/meteo/Ferrara\",2749 => \"/meteo/Ferrara+di+monte+Baldo\",2750 => \"/meteo/Ferrazzano\",2751 => \"/meteo/Ferrera+di+Varese\",2752 => \"/meteo/Ferrera+Erbognone\",2753 => \"/meteo/Ferrere\",2754 => \"/meteo/Ferriere\",2755 => \"/meteo/Ferruzzano\",2756 => \"/meteo/Fiamignano\",2757 => \"/meteo/Fiano\",2758 => \"/meteo/Fiano+romano\",2759 => \"/meteo/Fiastra\",2760 => \"/meteo/Fiave'\",2761 => \"/meteo/Ficarazzi\",2762 => \"/meteo/Ficarolo\",2763 => \"/meteo/Ficarra\",2764 => \"/meteo/Ficulle\",2765 => \"/meteo/Fidenza\",2766 => \"/meteo/Fie'+allo+Sciliar\",2767 => \"/meteo/Fiera+di+primiero\",2768 => \"/meteo/Fierozzo\",2769 => \"/meteo/Fiesco\",2770 => \"/meteo/Fiesole\",2771 => \"/meteo/Fiesse\",2772 => \"/meteo/Fiesso+d'Artico\",2773 => \"/meteo/Fiesso+Umbertiano\",2774 => \"/meteo/Figino+Serenza\",2775 => \"/meteo/Figline+valdarno\",2776 => \"/meteo/Figline+Vegliaturo\",2777 => \"/meteo/Filacciano\",2778 => \"/meteo/Filadelfia\",2779 => \"/meteo/Filago\",2780 => \"/meteo/Filandari\",2781 => \"/meteo/Filattiera\",2782 => \"/meteo/Filettino\",2783 => \"/meteo/Filetto\",8392 => \"/meteo/Filiano\",2785 => \"/meteo/Filighera\",2786 => \"/meteo/Filignano\",2787 => \"/meteo/Filogaso\",2788 => \"/meteo/Filottrano\",2789 => \"/meteo/Finale+emilia\",2790 => \"/meteo/Finale+ligure\",2791 => \"/meteo/Fino+del+monte\",2792 => \"/meteo/Fino+Mornasco\",2793 => \"/meteo/Fiorano+al+Serio\",2794 => \"/meteo/Fiorano+canavese\",2795 => \"/meteo/Fiorano+modenese\",2796 => \"/meteo/Fiordimonte\",2797 => \"/meteo/Fiorenzuola+d'arda\",2798 => \"/meteo/Firenze\",8270 => \"/meteo/Firenze+Peretola\",2799 => \"/meteo/Firenzuola\",2800 => \"/meteo/Firmo\",2801 => \"/meteo/Fisciano\",2802 => \"/meteo/Fiuggi\",2803 => \"/meteo/Fiumalbo\",2804 => \"/meteo/Fiumara\",8489 => \"/meteo/Fiumata\",2805 => \"/meteo/Fiume+veneto\",2806 => \"/meteo/Fiumedinisi\",2807 => \"/meteo/Fiumefreddo+Bruzio\",2808 => \"/meteo/Fiumefreddo+di+Sicilia\",2809 => \"/meteo/Fiumicello\",2810 => \"/meteo/Fiumicino\",2811 => \"/meteo/Fiuminata\",2812 => \"/meteo/Fivizzano\",2813 => \"/meteo/Flaibano\",2814 => \"/meteo/Flavon\",2815 => \"/meteo/Flero\",2816 => \"/meteo/Floresta\",2817 => \"/meteo/Floridia\",2818 => \"/meteo/Florinas\",2819 => \"/meteo/Flumeri\",2820 => \"/meteo/Fluminimaggiore\",2821 => \"/meteo/Flussio\",2822 => \"/meteo/Fobello\",2823 => \"/meteo/Foggia\",2824 => \"/meteo/Foglianise\",2825 => \"/meteo/Fogliano+redipuglia\",2826 => \"/meteo/Foglizzo\",2827 => \"/meteo/Foiano+della+chiana\",2828 => \"/meteo/Foiano+di+val+fortore\",2829 => \"/meteo/Folgaria\",8202 => \"/meteo/Folgarida\",2830 => \"/meteo/Folignano\",2831 => \"/meteo/Foligno\",2832 => \"/meteo/Follina\",2833 => \"/meteo/Follo\",2834 => \"/meteo/Follonica\",2835 => \"/meteo/Fombio\",2836 => \"/meteo/Fondachelli+Fantina\",2837 => \"/meteo/Fondi\",2838 => \"/meteo/Fondo\",2839 => \"/meteo/Fonni\",2840 => \"/meteo/Fontainemore\",2841 => \"/meteo/Fontana+liri\",2842 => \"/meteo/Fontanafredda\",2843 => \"/meteo/Fontanarosa\",8185 => \"/meteo/Fontane+Bianche\",2844 => \"/meteo/Fontanelice\",2845 => \"/meteo/Fontanella\",2846 => \"/meteo/Fontanellato\",2847 => \"/meteo/Fontanelle\",2848 => \"/meteo/Fontaneto+d'Agogna\",2849 => \"/meteo/Fontanetto+po\",2850 => \"/meteo/Fontanigorda\",2851 => \"/meteo/Fontanile\",2852 => \"/meteo/Fontaniva\",2853 => \"/meteo/Fonte\",8643 => \"/meteo/Fonte+Cerreto\",2854 => \"/meteo/Fonte+Nuova\",2855 => \"/meteo/Fontecchio\",2856 => \"/meteo/Fontechiari\",2857 => \"/meteo/Fontegreca\",2858 => \"/meteo/Fonteno\",2859 => \"/meteo/Fontevivo\",2860 => \"/meteo/Fonzaso\",2861 => \"/meteo/Foppolo\",8540 => \"/meteo/Foppolo+IV+Baita\",2862 => \"/meteo/Forano\",2863 => \"/meteo/Force\",2864 => \"/meteo/Forchia\",2865 => \"/meteo/Forcola\",2866 => \"/meteo/Fordongianus\",2867 => \"/meteo/Forenza\",2868 => \"/meteo/Foresto+sparso\",2869 => \"/meteo/Forgaria+nel+friuli\",2870 => \"/meteo/Forino\",2871 => \"/meteo/Forio\",8551 => \"/meteo/Forlì+Ridolfi\",2872 => \"/meteo/Forli'\",2873 => \"/meteo/Forli'+del+sannio\",2874 => \"/meteo/Forlimpopoli\",2875 => \"/meteo/Formazza\",2876 => \"/meteo/Formello\",2877 => \"/meteo/Formia\",2878 => \"/meteo/Formicola\",2879 => \"/meteo/Formigara\",2880 => \"/meteo/Formigine\",2881 => \"/meteo/Formigliana\",2882 => \"/meteo/Formignana\",2883 => \"/meteo/Fornace\",2884 => \"/meteo/Fornelli\",2885 => \"/meteo/Forni+Avoltri\",2886 => \"/meteo/Forni+di+sopra\",2887 => \"/meteo/Forni+di+sotto\",8161 => \"/meteo/Forno+Alpi+Graie\",2888 => \"/meteo/Forno+canavese\",2889 => \"/meteo/Forno+di+Zoldo\",2890 => \"/meteo/Fornovo+di+Taro\",2891 => \"/meteo/Fornovo+San+Giovanni\",2892 => \"/meteo/Forte+dei+marmi\",2893 => \"/meteo/Fortezza\",2894 => \"/meteo/Fortunago\",2895 => \"/meteo/Forza+d'Agro'\",2896 => \"/meteo/Fosciandora\",8435 => \"/meteo/Fosdinovo\",2898 => \"/meteo/Fossa\",2899 => \"/meteo/Fossacesia\",2900 => \"/meteo/Fossalta+di+Piave\",2901 => \"/meteo/Fossalta+di+Portogruaro\",2902 => \"/meteo/Fossalto\",2903 => \"/meteo/Fossano\",2904 => \"/meteo/Fossato+di+vico\",2905 => \"/meteo/Fossato+serralta\",2906 => \"/meteo/Fosso'\",2907 => \"/meteo/Fossombrone\",2908 => \"/meteo/Foza\",2909 => \"/meteo/Frabosa+soprana\",2910 => \"/meteo/Frabosa+sottana\",2911 => \"/meteo/Fraconalto\",2912 => \"/meteo/Fragagnano\",2913 => \"/meteo/Fragneto+l'abate\",2914 => \"/meteo/Fragneto+monforte\",2915 => \"/meteo/Fraine\",2916 => \"/meteo/Framura\",2917 => \"/meteo/Francavilla+al+mare\",2918 => \"/meteo/Francavilla+angitola\",2919 => \"/meteo/Francavilla+bisio\",2920 => \"/meteo/Francavilla+d'ete\",2921 => \"/meteo/Francavilla+di+Sicilia\",2922 => \"/meteo/Francavilla+fontana\",8380 => \"/meteo/Francavilla+in+sinni\",2924 => \"/meteo/Francavilla+marittima\",2925 => \"/meteo/Francica\",2926 => \"/meteo/Francofonte\",2927 => \"/meteo/Francolise\",2928 => \"/meteo/Frascaro\",2929 => \"/meteo/Frascarolo\",2930 => \"/meteo/Frascati\",2931 => \"/meteo/Frascineto\",2932 => \"/meteo/Frassilongo\",2933 => \"/meteo/Frassinelle+polesine\",2934 => \"/meteo/Frassinello+monferrato\",2935 => \"/meteo/Frassineto+po\",2936 => \"/meteo/Frassinetto\",2937 => \"/meteo/Frassino\",2938 => \"/meteo/Frassinoro\",2939 => \"/meteo/Frasso+sabino\",2940 => \"/meteo/Frasso+telesino\",2941 => \"/meteo/Fratta+polesine\",2942 => \"/meteo/Fratta+todina\",2943 => \"/meteo/Frattamaggiore\",2944 => \"/meteo/Frattaminore\",2945 => \"/meteo/Fratte+rosa\",2946 => \"/meteo/Frazzano'\",8137 => \"/meteo/Fregene\",2947 => \"/meteo/Fregona\",8667 => \"/meteo/Frejusia\",2948 => \"/meteo/Fresagrandinaria\",2949 => \"/meteo/Fresonara\",2950 => \"/meteo/Frigento\",2951 => \"/meteo/Frignano\",2952 => \"/meteo/Frinco\",2953 => \"/meteo/Frisa\",2954 => \"/meteo/Frisanco\",2955 => \"/meteo/Front\",8153 => \"/meteo/Frontignano\",2956 => \"/meteo/Frontino\",2957 => \"/meteo/Frontone\",8751 => \"/meteo/Frontone+-+Monte+Catria\",2958 => \"/meteo/Frosinone\",8464 => \"/meteo/Frosinone+casello\",2959 => \"/meteo/Frosolone\",2960 => \"/meteo/Frossasco\",2961 => \"/meteo/Frugarolo\",2962 => \"/meteo/Fubine\",2963 => \"/meteo/Fucecchio\",2964 => \"/meteo/Fuipiano+valle+imagna\",2965 => \"/meteo/Fumane\",2966 => \"/meteo/Fumone\",2967 => \"/meteo/Funes\",2968 => \"/meteo/Furci\",2969 => \"/meteo/Furci+siculo\",2970 => \"/meteo/Furnari\",2971 => \"/meteo/Furore\",2972 => \"/meteo/Furtei\",2973 => \"/meteo/Fuscaldo\",2974 => \"/meteo/Fusignano\",2975 => \"/meteo/Fusine\",8702 => \"/meteo/Fusine+di+Zoldo\",8131 => \"/meteo/Fusine+in+Valromana\",2976 => \"/meteo/Futani\",2977 => \"/meteo/Gabbioneta+binanuova\",2978 => \"/meteo/Gabiano\",2979 => \"/meteo/Gabicce+mare\",8252 => \"/meteo/Gabiet\",2980 => \"/meteo/Gaby\",2981 => \"/meteo/Gadesco+Pieve+Delmona\",2982 => \"/meteo/Gadoni\",2983 => \"/meteo/Gaeta\",2984 => \"/meteo/Gaggi\",2985 => \"/meteo/Gaggiano\",2986 => \"/meteo/Gaggio+montano\",2987 => \"/meteo/Gaglianico\",2988 => \"/meteo/Gagliano+aterno\",2989 => \"/meteo/Gagliano+castelferrato\",2990 => \"/meteo/Gagliano+del+capo\",2991 => \"/meteo/Gagliato\",2992 => \"/meteo/Gagliole\",2993 => \"/meteo/Gaiarine\",2994 => \"/meteo/Gaiba\",2995 => \"/meteo/Gaiola\",2996 => \"/meteo/Gaiole+in+chianti\",2997 => \"/meteo/Gairo\",2998 => \"/meteo/Gais\",2999 => \"/meteo/Galati+Mamertino\",3000 => \"/meteo/Galatina\",3001 => \"/meteo/Galatone\",3002 => \"/meteo/Galatro\",3003 => \"/meteo/Galbiate\",3004 => \"/meteo/Galeata\",3005 => \"/meteo/Galgagnano\",3006 => \"/meteo/Gallarate\",3007 => \"/meteo/Gallese\",3008 => \"/meteo/Galliate\",3009 => \"/meteo/Galliate+lombardo\",3010 => \"/meteo/Galliavola\",3011 => \"/meteo/Gallicano\",3012 => \"/meteo/Gallicano+nel+Lazio\",8364 => \"/meteo/Gallicchio\",3014 => \"/meteo/Galliera\",3015 => \"/meteo/Galliera+veneta\",3016 => \"/meteo/Gallinaro\",3017 => \"/meteo/Gallio\",3018 => \"/meteo/Gallipoli\",3019 => \"/meteo/Gallo+matese\",3020 => \"/meteo/Gallodoro\",3021 => \"/meteo/Galluccio\",8315 => \"/meteo/Galluzzo\",3022 => \"/meteo/Galtelli\",3023 => \"/meteo/Galzignano+terme\",3024 => \"/meteo/Gamalero\",3025 => \"/meteo/Gambara\",3026 => \"/meteo/Gambarana\",8105 => \"/meteo/Gambarie\",3027 => \"/meteo/Gambasca\",3028 => \"/meteo/Gambassi+terme\",3029 => \"/meteo/Gambatesa\",3030 => \"/meteo/Gambellara\",3031 => \"/meteo/Gamberale\",3032 => \"/meteo/Gambettola\",3033 => \"/meteo/Gambolo'\",3034 => \"/meteo/Gambugliano\",3035 => \"/meteo/Gandellino\",3036 => \"/meteo/Gandino\",3037 => \"/meteo/Gandosso\",3038 => \"/meteo/Gangi\",8425 => \"/meteo/Garaguso\",3040 => \"/meteo/Garbagna\",3041 => \"/meteo/Garbagna+novarese\",3042 => \"/meteo/Garbagnate+milanese\",3043 => \"/meteo/Garbagnate+monastero\",3044 => \"/meteo/Garda\",3045 => \"/meteo/Gardone+riviera\",3046 => \"/meteo/Gardone+val+trompia\",3047 => \"/meteo/Garessio\",8349 => \"/meteo/Garessio+2000\",3048 => \"/meteo/Gargallo\",3049 => \"/meteo/Gargazzone\",3050 => \"/meteo/Gargnano\",3051 => \"/meteo/Garlasco\",3052 => \"/meteo/Garlate\",3053 => \"/meteo/Garlenda\",3054 => \"/meteo/Garniga\",3055 => \"/meteo/Garzeno\",3056 => \"/meteo/Garzigliana\",3057 => \"/meteo/Gasperina\",3058 => \"/meteo/Gassino+torinese\",3059 => \"/meteo/Gattatico\",3060 => \"/meteo/Gatteo\",3061 => \"/meteo/Gattico\",3062 => \"/meteo/Gattinara\",3063 => \"/meteo/Gavardo\",3064 => \"/meteo/Gavazzana\",3065 => \"/meteo/Gavello\",3066 => \"/meteo/Gaverina+terme\",3067 => \"/meteo/Gavi\",3068 => \"/meteo/Gavignano\",3069 => \"/meteo/Gavirate\",3070 => \"/meteo/Gavoi\",3071 => \"/meteo/Gavorrano\",3072 => \"/meteo/Gazoldo+degli+ippoliti\",3073 => \"/meteo/Gazzada+schianno\",3074 => \"/meteo/Gazzaniga\",3075 => \"/meteo/Gazzo\",3076 => \"/meteo/Gazzo+veronese\",3077 => \"/meteo/Gazzola\",3078 => \"/meteo/Gazzuolo\",3079 => \"/meteo/Gela\",3080 => \"/meteo/Gemmano\",3081 => \"/meteo/Gemona+del+friuli\",3082 => \"/meteo/Gemonio\",3083 => \"/meteo/Genazzano\",3084 => \"/meteo/Genga\",3085 => \"/meteo/Genivolta\",3086 => \"/meteo/Genola\",3087 => \"/meteo/Genoni\",3088 => \"/meteo/Genova\",8506 => \"/meteo/Genova+Nervi\",8276 => \"/meteo/Genova+Sestri\",3089 => \"/meteo/Genuri\",3090 => \"/meteo/Genzano+di+lucania\",3091 => \"/meteo/Genzano+di+roma\",3092 => \"/meteo/Genzone\",3093 => \"/meteo/Gera+lario\",3094 => \"/meteo/Gerace\",3095 => \"/meteo/Geraci+siculo\",3096 => \"/meteo/Gerano\",8176 => \"/meteo/Geremeas\",3097 => \"/meteo/Gerenzago\",3098 => \"/meteo/Gerenzano\",3099 => \"/meteo/Gergei\",3100 => \"/meteo/Germagnano\",3101 => \"/meteo/Germagno\",3102 => \"/meteo/Germasino\",3103 => \"/meteo/Germignaga\",8303 => \"/meteo/Gerno+di+Lesmo\",3104 => \"/meteo/Gerocarne\",3105 => \"/meteo/Gerola+alta\",3106 => \"/meteo/Gerosa\",3107 => \"/meteo/Gerre+de'caprioli\",3108 => \"/meteo/Gesico\",3109 => \"/meteo/Gessate\",3110 => \"/meteo/Gessopalena\",3111 => \"/meteo/Gesturi\",3112 => \"/meteo/Gesualdo\",3113 => \"/meteo/Ghedi\",3114 => \"/meteo/Ghemme\",8236 => \"/meteo/Ghiacciaio+Presena\",3115 => \"/meteo/Ghiffa\",3116 => \"/meteo/Ghilarza\",3117 => \"/meteo/Ghisalba\",3118 => \"/meteo/Ghislarengo\",3119 => \"/meteo/Giacciano+con+baruchella\",3120 => \"/meteo/Giaglione\",3121 => \"/meteo/Gianico\",3122 => \"/meteo/Giano+dell'umbria\",3123 => \"/meteo/Giano+vetusto\",3124 => \"/meteo/Giardinello\",3125 => \"/meteo/Giardini+Naxos\",3126 => \"/meteo/Giarole\",3127 => \"/meteo/Giarratana\",3128 => \"/meteo/Giarre\",3129 => \"/meteo/Giave\",3130 => \"/meteo/Giaveno\",3131 => \"/meteo/Giavera+del+montello\",3132 => \"/meteo/Giba\",3133 => \"/meteo/Gibellina\",3134 => \"/meteo/Gifflenga\",3135 => \"/meteo/Giffone\",3136 => \"/meteo/Giffoni+sei+casali\",3137 => \"/meteo/Giffoni+valle+piana\",3380 => \"/meteo/Giglio+castello\",3138 => \"/meteo/Gignese\",3139 => \"/meteo/Gignod\",3140 => \"/meteo/Gildone\",3141 => \"/meteo/Gimigliano\",8403 => \"/meteo/Ginestra\",3143 => \"/meteo/Ginestra+degli+schiavoni\",8430 => \"/meteo/Ginosa\",3145 => \"/meteo/Gioi\",3146 => \"/meteo/Gioia+dei+marsi\",3147 => \"/meteo/Gioia+del+colle\",3148 => \"/meteo/Gioia+sannitica\",3149 => \"/meteo/Gioia+tauro\",3150 => \"/meteo/Gioiosa+ionica\",3151 => \"/meteo/Gioiosa+marea\",3152 => \"/meteo/Giove\",3153 => \"/meteo/Giovinazzo\",3154 => \"/meteo/Giovo\",3155 => \"/meteo/Girasole\",3156 => \"/meteo/Girifalco\",3157 => \"/meteo/Gironico\",3158 => \"/meteo/Gissi\",3159 => \"/meteo/Giuggianello\",3160 => \"/meteo/Giugliano+in+campania\",3161 => \"/meteo/Giuliana\",3162 => \"/meteo/Giuliano+di+roma\",3163 => \"/meteo/Giuliano+teatino\",3164 => \"/meteo/Giulianova\",3165 => \"/meteo/Giuncugnano\",3166 => \"/meteo/Giungano\",3167 => \"/meteo/Giurdignano\",3168 => \"/meteo/Giussago\",3169 => \"/meteo/Giussano\",3170 => \"/meteo/Giustenice\",3171 => \"/meteo/Giustino\",3172 => \"/meteo/Giusvalla\",3173 => \"/meteo/Givoletto\",3174 => \"/meteo/Gizzeria\",3175 => \"/meteo/Glorenza\",3176 => \"/meteo/Godega+di+sant'urbano\",3177 => \"/meteo/Godiasco\",3178 => \"/meteo/Godrano\",3179 => \"/meteo/Goito\",3180 => \"/meteo/Golasecca\",3181 => \"/meteo/Golferenzo\",3182 => \"/meteo/Golfo+aranci\",3183 => \"/meteo/Gombito\",3184 => \"/meteo/Gonars\",3185 => \"/meteo/Goni\",3186 => \"/meteo/Gonnesa\",3187 => \"/meteo/Gonnoscodina\",3188 => \"/meteo/Gonnosfanadiga\",3189 => \"/meteo/Gonnosno'\",3190 => \"/meteo/Gonnostramatza\",3191 => \"/meteo/Gonzaga\",3192 => \"/meteo/Gordona\",3193 => \"/meteo/Gorga\",3194 => \"/meteo/Gorgo+al+monticano\",3195 => \"/meteo/Gorgoglione\",3196 => \"/meteo/Gorgonzola\",3197 => \"/meteo/Goriano+sicoli\",3198 => \"/meteo/Gorizia\",3199 => \"/meteo/Gorla+maggiore\",3200 => \"/meteo/Gorla+minore\",3201 => \"/meteo/Gorlago\",3202 => \"/meteo/Gorle\",3203 => \"/meteo/Gornate+olona\",3204 => \"/meteo/Gorno\",3205 => \"/meteo/Goro\",3206 => \"/meteo/Gorreto\",3207 => \"/meteo/Gorzegno\",3208 => \"/meteo/Gosaldo\",3209 => \"/meteo/Gossolengo\",3210 => \"/meteo/Gottasecca\",3211 => \"/meteo/Gottolengo\",3212 => \"/meteo/Govone\",3213 => \"/meteo/Gozzano\",3214 => \"/meteo/Gradara\",3215 => \"/meteo/Gradisca+d'isonzo\",3216 => \"/meteo/Grado\",3217 => \"/meteo/Gradoli\",3218 => \"/meteo/Graffignana\",3219 => \"/meteo/Graffignano\",3220 => \"/meteo/Graglia\",3221 => \"/meteo/Gragnano\",3222 => \"/meteo/Gragnano+trebbiense\",3223 => \"/meteo/Grammichele\",8485 => \"/meteo/Gran+Paradiso\",3224 => \"/meteo/Grana\",3225 => \"/meteo/Granaglione\",3226 => \"/meteo/Granarolo+dell'emilia\",3227 => \"/meteo/Grancona\",8728 => \"/meteo/Grand+Combin\",8327 => \"/meteo/Grand+Crot\",3228 => \"/meteo/Grandate\",3229 => \"/meteo/Grandola+ed+uniti\",3230 => \"/meteo/Graniti\",3231 => \"/meteo/Granozzo+con+monticello\",3232 => \"/meteo/Grantola\",3233 => \"/meteo/Grantorto\",3234 => \"/meteo/Granze\",8371 => \"/meteo/Grassano\",8504 => \"/meteo/Grassina\",3236 => \"/meteo/Grassobbio\",3237 => \"/meteo/Gratteri\",3238 => \"/meteo/Grauno\",3239 => \"/meteo/Gravedona\",3240 => \"/meteo/Gravellona+lomellina\",3241 => \"/meteo/Gravellona+toce\",3242 => \"/meteo/Gravere\",3243 => \"/meteo/Gravina+di+Catania\",3244 => \"/meteo/Gravina+in+puglia\",3245 => \"/meteo/Grazzanise\",3246 => \"/meteo/Grazzano+badoglio\",3247 => \"/meteo/Greccio\",3248 => \"/meteo/Greci\",3249 => \"/meteo/Greggio\",3250 => \"/meteo/Gremiasco\",3251 => \"/meteo/Gressan\",3252 => \"/meteo/Gressoney+la+trinite'\",3253 => \"/meteo/Gressoney+saint+jean\",3254 => \"/meteo/Greve+in+chianti\",3255 => \"/meteo/Grezzago\",3256 => \"/meteo/Grezzana\",3257 => \"/meteo/Griante\",3258 => \"/meteo/Gricignano+di+aversa\",8733 => \"/meteo/Grigna\",3259 => \"/meteo/Grignasco\",3260 => \"/meteo/Grigno\",3261 => \"/meteo/Grimacco\",3262 => \"/meteo/Grimaldi\",3263 => \"/meteo/Grinzane+cavour\",3264 => \"/meteo/Grisignano+di+zocco\",3265 => \"/meteo/Grisolia\",8520 => \"/meteo/Grivola\",3266 => \"/meteo/Grizzana+morandi\",3267 => \"/meteo/Grognardo\",3268 => \"/meteo/Gromo\",3269 => \"/meteo/Grondona\",3270 => \"/meteo/Grone\",3271 => \"/meteo/Grontardo\",3272 => \"/meteo/Gropello+cairoli\",3273 => \"/meteo/Gropparello\",3274 => \"/meteo/Groscavallo\",3275 => \"/meteo/Grosio\",3276 => \"/meteo/Grosotto\",3277 => \"/meteo/Grosseto\",3278 => \"/meteo/Grosso\",3279 => \"/meteo/Grottaferrata\",3280 => \"/meteo/Grottaglie\",3281 => \"/meteo/Grottaminarda\",3282 => \"/meteo/Grottammare\",3283 => \"/meteo/Grottazzolina\",3284 => \"/meteo/Grotte\",3285 => \"/meteo/Grotte+di+castro\",3286 => \"/meteo/Grotteria\",3287 => \"/meteo/Grottole\",3288 => \"/meteo/Grottolella\",3289 => \"/meteo/Gruaro\",3290 => \"/meteo/Grugliasco\",3291 => \"/meteo/Grumello+cremonese+ed+uniti\",3292 => \"/meteo/Grumello+del+monte\",8414 => \"/meteo/Grumento+nova\",3294 => \"/meteo/Grumes\",3295 => \"/meteo/Grumo+appula\",3296 => \"/meteo/Grumo+nevano\",3297 => \"/meteo/Grumolo+delle+abbadesse\",3298 => \"/meteo/Guagnano\",3299 => \"/meteo/Gualdo\",3300 => \"/meteo/Gualdo+Cattaneo\",3301 => \"/meteo/Gualdo+tadino\",3302 => \"/meteo/Gualtieri\",3303 => \"/meteo/Gualtieri+sicamino'\",3304 => \"/meteo/Guamaggiore\",3305 => \"/meteo/Guanzate\",3306 => \"/meteo/Guarcino\",3307 => \"/meteo/Guarda+veneta\",3308 => \"/meteo/Guardabosone\",3309 => \"/meteo/Guardamiglio\",3310 => \"/meteo/Guardavalle\",3311 => \"/meteo/Guardea\",3312 => \"/meteo/Guardia+lombardi\",8365 => \"/meteo/Guardia+perticara\",3314 => \"/meteo/Guardia+piemontese\",3315 => \"/meteo/Guardia+sanframondi\",3316 => \"/meteo/Guardiagrele\",3317 => \"/meteo/Guardialfiera\",3318 => \"/meteo/Guardiaregia\",3319 => \"/meteo/Guardistallo\",3320 => \"/meteo/Guarene\",3321 => \"/meteo/Guasila\",3322 => \"/meteo/Guastalla\",3323 => \"/meteo/Guazzora\",3324 => \"/meteo/Gubbio\",3325 => \"/meteo/Gudo+visconti\",3326 => \"/meteo/Guglionesi\",3327 => \"/meteo/Guidizzolo\",8508 => \"/meteo/Guidonia\",3328 => \"/meteo/Guidonia+montecelio\",3329 => \"/meteo/Guiglia\",3330 => \"/meteo/Guilmi\",3331 => \"/meteo/Gurro\",3332 => \"/meteo/Guspini\",3333 => \"/meteo/Gussago\",3334 => \"/meteo/Gussola\",3335 => \"/meteo/Hone\",8587 => \"/meteo/I+Prati\",3336 => \"/meteo/Idro\",3337 => \"/meteo/Iglesias\",3338 => \"/meteo/Igliano\",3339 => \"/meteo/Ilbono\",3340 => \"/meteo/Illasi\",3341 => \"/meteo/Illorai\",3342 => \"/meteo/Imbersago\",3343 => \"/meteo/Imer\",3344 => \"/meteo/Imola\",3345 => \"/meteo/Imperia\",3346 => \"/meteo/Impruneta\",3347 => \"/meteo/Inarzo\",3348 => \"/meteo/Incisa+in+val+d'arno\",3349 => \"/meteo/Incisa+scapaccino\",3350 => \"/meteo/Incudine\",3351 => \"/meteo/Induno+olona\",3352 => \"/meteo/Ingria\",3353 => \"/meteo/Intragna\",3354 => \"/meteo/Introbio\",3355 => \"/meteo/Introd\",3356 => \"/meteo/Introdacqua\",3357 => \"/meteo/Introzzo\",3358 => \"/meteo/Inverigo\",3359 => \"/meteo/Inverno+e+monteleone\",3360 => \"/meteo/Inverso+pinasca\",3361 => \"/meteo/Inveruno\",3362 => \"/meteo/Invorio\",3363 => \"/meteo/Inzago\",3364 => \"/meteo/Ionadi\",3365 => \"/meteo/Irgoli\",3366 => \"/meteo/Irma\",3367 => \"/meteo/Irsina\",3368 => \"/meteo/Isasca\",3369 => \"/meteo/Isca+sullo+ionio\",3370 => \"/meteo/Ischia\",3371 => \"/meteo/Ischia+di+castro\",3372 => \"/meteo/Ischitella\",3373 => \"/meteo/Iseo\",3374 => \"/meteo/Isera\",3375 => \"/meteo/Isernia\",3376 => \"/meteo/Isili\",3377 => \"/meteo/Isnello\",8742 => \"/meteo/Isola+Albarella\",3378 => \"/meteo/Isola+d'asti\",3379 => \"/meteo/Isola+del+cantone\",8190 => \"/meteo/Isola+del+Giglio\",3381 => \"/meteo/Isola+del+gran+sasso+d'italia\",3382 => \"/meteo/Isola+del+liri\",3383 => \"/meteo/Isola+del+piano\",3384 => \"/meteo/Isola+della+scala\",3385 => \"/meteo/Isola+delle+femmine\",3386 => \"/meteo/Isola+di+capo+rizzuto\",3387 => \"/meteo/Isola+di+fondra\",8671 => \"/meteo/Isola+di+Giannutri\",3388 => \"/meteo/Isola+dovarese\",3389 => \"/meteo/Isola+rizza\",8173 => \"/meteo/Isola+Rossa\",8183 => \"/meteo/Isola+Salina\",3390 => \"/meteo/Isola+sant'antonio\",3391 => \"/meteo/Isola+vicentina\",3392 => \"/meteo/Isolabella\",3393 => \"/meteo/Isolabona\",3394 => \"/meteo/Isole+tremiti\",3395 => \"/meteo/Isorella\",3396 => \"/meteo/Ispani\",3397 => \"/meteo/Ispica\",3398 => \"/meteo/Ispra\",3399 => \"/meteo/Issiglio\",3400 => \"/meteo/Issime\",3401 => \"/meteo/Isso\",3402 => \"/meteo/Issogne\",3403 => \"/meteo/Istrana\",3404 => \"/meteo/Itala\",3405 => \"/meteo/Itri\",3406 => \"/meteo/Ittireddu\",3407 => \"/meteo/Ittiri\",3408 => \"/meteo/Ivano+fracena\",3409 => \"/meteo/Ivrea\",3410 => \"/meteo/Izano\",3411 => \"/meteo/Jacurso\",3412 => \"/meteo/Jelsi\",3413 => \"/meteo/Jenne\",3414 => \"/meteo/Jerago+con+Orago\",3415 => \"/meteo/Jerzu\",3416 => \"/meteo/Jesi\",3417 => \"/meteo/Jesolo\",3418 => \"/meteo/Jolanda+di+Savoia\",3419 => \"/meteo/Joppolo\",3420 => \"/meteo/Joppolo+Giancaxio\",3421 => \"/meteo/Jovencan\",8568 => \"/meteo/Klausberg\",3422 => \"/meteo/L'Aquila\",3423 => \"/meteo/La+Cassa\",8227 => \"/meteo/La+Lechere\",3424 => \"/meteo/La+Loggia\",3425 => \"/meteo/La+Maddalena\",3426 => \"/meteo/La+Magdeleine\",3427 => \"/meteo/La+Morra\",8617 => \"/meteo/La+Palud\",3428 => \"/meteo/La+Salle\",3429 => \"/meteo/La+Spezia\",3430 => \"/meteo/La+Thuile\",3431 => \"/meteo/La+Valle\",3432 => \"/meteo/La+Valle+Agordina\",8762 => \"/meteo/La+Villa\",3433 => \"/meteo/Labico\",3434 => \"/meteo/Labro\",3435 => \"/meteo/Lacchiarella\",3436 => \"/meteo/Lacco+ameno\",3437 => \"/meteo/Lacedonia\",8245 => \"/meteo/Laceno\",3438 => \"/meteo/Laces\",3439 => \"/meteo/Laconi\",3440 => \"/meteo/Ladispoli\",8571 => \"/meteo/Ladurno\",3441 => \"/meteo/Laerru\",3442 => \"/meteo/Laganadi\",3443 => \"/meteo/Laghi\",3444 => \"/meteo/Laglio\",3445 => \"/meteo/Lagnasco\",3446 => \"/meteo/Lago\",3447 => \"/meteo/Lagonegro\",3448 => \"/meteo/Lagosanto\",3449 => \"/meteo/Lagundo\",3450 => \"/meteo/Laigueglia\",3451 => \"/meteo/Lainate\",3452 => \"/meteo/Laino\",3453 => \"/meteo/Laino+borgo\",3454 => \"/meteo/Laino+castello\",3455 => \"/meteo/Laion\",3456 => \"/meteo/Laives\",3457 => \"/meteo/Lajatico\",3458 => \"/meteo/Lallio\",3459 => \"/meteo/Lama+dei+peligni\",3460 => \"/meteo/Lama+mocogno\",3461 => \"/meteo/Lambrugo\",8477 => \"/meteo/Lamezia+Santa+Eufemia\",3462 => \"/meteo/Lamezia+terme\",3463 => \"/meteo/Lamon\",8179 => \"/meteo/Lampedusa\",3464 => \"/meteo/Lampedusa+e+linosa\",3465 => \"/meteo/Lamporecchio\",3466 => \"/meteo/Lamporo\",3467 => \"/meteo/Lana\",3468 => \"/meteo/Lanciano\",8467 => \"/meteo/Lanciano+casello\",3469 => \"/meteo/Landiona\",3470 => \"/meteo/Landriano\",3471 => \"/meteo/Langhirano\",3472 => \"/meteo/Langosco\",3473 => \"/meteo/Lanusei\",3474 => \"/meteo/Lanuvio\",3475 => \"/meteo/Lanzada\",3476 => \"/meteo/Lanzo+d'intelvi\",3477 => \"/meteo/Lanzo+torinese\",3478 => \"/meteo/Lapedona\",3479 => \"/meteo/Lapio\",3480 => \"/meteo/Lappano\",3481 => \"/meteo/Larciano\",3482 => \"/meteo/Lardaro\",3483 => \"/meteo/Lardirago\",3484 => \"/meteo/Lari\",3485 => \"/meteo/Lariano\",3486 => \"/meteo/Larino\",3487 => \"/meteo/Las+plassas\",3488 => \"/meteo/Lasa\",3489 => \"/meteo/Lascari\",3490 => \"/meteo/Lasino\",3491 => \"/meteo/Lasnigo\",3492 => \"/meteo/Lastebasse\",3493 => \"/meteo/Lastra+a+signa\",3494 => \"/meteo/Latera\",3495 => \"/meteo/Laterina\",3496 => \"/meteo/Laterza\",3497 => \"/meteo/Latiano\",3498 => \"/meteo/Latina\",3499 => \"/meteo/Latisana\",3500 => \"/meteo/Latronico\",3501 => \"/meteo/Lattarico\",3502 => \"/meteo/Lauco\",3503 => \"/meteo/Laureana+cilento\",3504 => \"/meteo/Laureana+di+borrello\",3505 => \"/meteo/Lauregno\",3506 => \"/meteo/Laurenzana\",3507 => \"/meteo/Lauria\",3508 => \"/meteo/Lauriano\",3509 => \"/meteo/Laurino\",3510 => \"/meteo/Laurito\",3511 => \"/meteo/Lauro\",3512 => \"/meteo/Lavagna\",3513 => \"/meteo/Lavagno\",3514 => \"/meteo/Lavarone\",3515 => \"/meteo/Lavello\",3516 => \"/meteo/Lavena+ponte+tresa\",3517 => \"/meteo/Laveno+mombello\",3518 => \"/meteo/Lavenone\",3519 => \"/meteo/Laviano\",8695 => \"/meteo/Lavinio\",3520 => \"/meteo/Lavis\",3521 => \"/meteo/Lazise\",3522 => \"/meteo/Lazzate\",8434 => \"/meteo/Le+polle\",3523 => \"/meteo/Lecce\",3524 => \"/meteo/Lecce+nei+marsi\",3525 => \"/meteo/Lecco\",3526 => \"/meteo/Leffe\",3527 => \"/meteo/Leggiuno\",3528 => \"/meteo/Legnago\",3529 => \"/meteo/Legnano\",3530 => \"/meteo/Legnaro\",3531 => \"/meteo/Lei\",3532 => \"/meteo/Leini\",3533 => \"/meteo/Leivi\",3534 => \"/meteo/Lemie\",3535 => \"/meteo/Lendinara\",3536 => \"/meteo/Leni\",3537 => \"/meteo/Lenna\",3538 => \"/meteo/Lenno\",3539 => \"/meteo/Leno\",3540 => \"/meteo/Lenola\",3541 => \"/meteo/Lenta\",3542 => \"/meteo/Lentate+sul+seveso\",3543 => \"/meteo/Lentella\",3544 => \"/meteo/Lentiai\",3545 => \"/meteo/Lentini\",3546 => \"/meteo/Leonessa\",3547 => \"/meteo/Leonforte\",3548 => \"/meteo/Leporano\",3549 => \"/meteo/Lequile\",3550 => \"/meteo/Lequio+berria\",3551 => \"/meteo/Lequio+tanaro\",3552 => \"/meteo/Lercara+friddi\",3553 => \"/meteo/Lerici\",3554 => \"/meteo/Lerma\",8250 => \"/meteo/Les+Suches\",3555 => \"/meteo/Lesa\",3556 => \"/meteo/Lesegno\",3557 => \"/meteo/Lesignano+de+'bagni\",3558 => \"/meteo/Lesina\",3559 => \"/meteo/Lesmo\",3560 => \"/meteo/Lessolo\",3561 => \"/meteo/Lessona\",3562 => \"/meteo/Lestizza\",3563 => \"/meteo/Letino\",3564 => \"/meteo/Letojanni\",3565 => \"/meteo/Lettere\",3566 => \"/meteo/Lettomanoppello\",3567 => \"/meteo/Lettopalena\",3568 => \"/meteo/Levanto\",3569 => \"/meteo/Levate\",3570 => \"/meteo/Leverano\",3571 => \"/meteo/Levice\",3572 => \"/meteo/Levico+terme\",3573 => \"/meteo/Levone\",3574 => \"/meteo/Lezzeno\",3575 => \"/meteo/Liberi\",3576 => \"/meteo/Librizzi\",3577 => \"/meteo/Licata\",3578 => \"/meteo/Licciana+nardi\",3579 => \"/meteo/Licenza\",3580 => \"/meteo/Licodia+eubea\",8442 => \"/meteo/Lido+degli+Estensi\",8441 => \"/meteo/Lido+delle+Nazioni\",8200 => \"/meteo/Lido+di+Camaiore\",8136 => \"/meteo/Lido+di+Ostia\",8746 => \"/meteo/Lido+di+Volano\",8594 => \"/meteo/Lido+Marini\",3581 => \"/meteo/Lierna\",3582 => \"/meteo/Lignana\",3583 => \"/meteo/Lignano+sabbiadoro\",3584 => \"/meteo/Ligonchio\",3585 => \"/meteo/Ligosullo\",3586 => \"/meteo/Lillianes\",3587 => \"/meteo/Limana\",3588 => \"/meteo/Limatola\",3589 => \"/meteo/Limbadi\",3590 => \"/meteo/Limbiate\",3591 => \"/meteo/Limena\",3592 => \"/meteo/Limido+comasco\",3593 => \"/meteo/Limina\",3594 => \"/meteo/Limone+piemonte\",3595 => \"/meteo/Limone+sul+garda\",3596 => \"/meteo/Limosano\",3597 => \"/meteo/Linarolo\",3598 => \"/meteo/Linguaglossa\",8180 => \"/meteo/Linosa\",3599 => \"/meteo/Lioni\",3600 => \"/meteo/Lipari\",3601 => \"/meteo/Lipomo\",3602 => \"/meteo/Lirio\",3603 => \"/meteo/Liscate\",3604 => \"/meteo/Liscia\",3605 => \"/meteo/Lisciano+niccone\",3606 => \"/meteo/Lisignago\",3607 => \"/meteo/Lisio\",3608 => \"/meteo/Lissone\",3609 => \"/meteo/Liveri\",3610 => \"/meteo/Livigno\",3611 => \"/meteo/Livinallongo+del+col+di+lana\",3613 => \"/meteo/Livo\",3612 => \"/meteo/Livo\",3614 => \"/meteo/Livorno\",3615 => \"/meteo/Livorno+ferraris\",3616 => \"/meteo/Livraga\",3617 => \"/meteo/Lizzanello\",3618 => \"/meteo/Lizzano\",3619 => \"/meteo/Lizzano+in+belvedere\",8300 => \"/meteo/Lizzola\",3620 => \"/meteo/Loano\",3621 => \"/meteo/Loazzolo\",3622 => \"/meteo/Locana\",3623 => \"/meteo/Locate+di+triulzi\",3624 => \"/meteo/Locate+varesino\",3625 => \"/meteo/Locatello\",3626 => \"/meteo/Loceri\",3627 => \"/meteo/Locorotondo\",3628 => \"/meteo/Locri\",3629 => \"/meteo/Loculi\",3630 => \"/meteo/Lode'\",3631 => \"/meteo/Lodi\",3632 => \"/meteo/Lodi+vecchio\",3633 => \"/meteo/Lodine\",3634 => \"/meteo/Lodrino\",3635 => \"/meteo/Lograto\",3636 => \"/meteo/Loiano\",8748 => \"/meteo/Loiano+RFI\",3637 => \"/meteo/Loiri+porto+san+paolo\",3638 => \"/meteo/Lomagna\",3639 => \"/meteo/Lomaso\",3640 => \"/meteo/Lomazzo\",3641 => \"/meteo/Lombardore\",3642 => \"/meteo/Lombriasco\",3643 => \"/meteo/Lomello\",3644 => \"/meteo/Lona+lases\",3645 => \"/meteo/Lonate+ceppino\",3646 => \"/meteo/Lonate+pozzolo\",3647 => \"/meteo/Lonato\",3648 => \"/meteo/Londa\",3649 => \"/meteo/Longano\",3650 => \"/meteo/Longare\",3651 => \"/meteo/Longarone\",3652 => \"/meteo/Longhena\",3653 => \"/meteo/Longi\",3654 => \"/meteo/Longiano\",3655 => \"/meteo/Longobardi\",3656 => \"/meteo/Longobucco\",3657 => \"/meteo/Longone+al+segrino\",3658 => \"/meteo/Longone+sabino\",3659 => \"/meteo/Lonigo\",3660 => \"/meteo/Loranze'\",3661 => \"/meteo/Loreggia\",3662 => \"/meteo/Loreglia\",3663 => \"/meteo/Lorenzago+di+cadore\",3664 => \"/meteo/Lorenzana\",3665 => \"/meteo/Loreo\",3666 => \"/meteo/Loreto\",3667 => \"/meteo/Loreto+aprutino\",3668 => \"/meteo/Loria\",8523 => \"/meteo/Lorica\",3669 => \"/meteo/Loro+ciuffenna\",3670 => \"/meteo/Loro+piceno\",3671 => \"/meteo/Lorsica\",3672 => \"/meteo/Losine\",3673 => \"/meteo/Lotzorai\",3674 => \"/meteo/Lovere\",3675 => \"/meteo/Lovero\",3676 => \"/meteo/Lozio\",3677 => \"/meteo/Lozza\",3678 => \"/meteo/Lozzo+atestino\",3679 => \"/meteo/Lozzo+di+cadore\",3680 => \"/meteo/Lozzolo\",3681 => \"/meteo/Lu\",3682 => \"/meteo/Lubriano\",3683 => \"/meteo/Lucca\",3684 => \"/meteo/Lucca+sicula\",3685 => \"/meteo/Lucera\",3686 => \"/meteo/Lucignano\",3687 => \"/meteo/Lucinasco\",3688 => \"/meteo/Lucito\",3689 => \"/meteo/Luco+dei+marsi\",3690 => \"/meteo/Lucoli\",3691 => \"/meteo/Lugagnano+val+d'arda\",3692 => \"/meteo/Lugnacco\",3693 => \"/meteo/Lugnano+in+teverina\",3694 => \"/meteo/Lugo\",3695 => \"/meteo/Lugo+di+vicenza\",3696 => \"/meteo/Luino\",3697 => \"/meteo/Luisago\",3698 => \"/meteo/Lula\",3699 => \"/meteo/Lumarzo\",3700 => \"/meteo/Lumezzane\",3701 => \"/meteo/Lunamatrona\",3702 => \"/meteo/Lunano\",3703 => \"/meteo/Lungavilla\",3704 => \"/meteo/Lungro\",3705 => \"/meteo/Luogosano\",3706 => \"/meteo/Luogosanto\",3707 => \"/meteo/Lupara\",3708 => \"/meteo/Lurago+d'erba\",3709 => \"/meteo/Lurago+marinone\",3710 => \"/meteo/Lurano\",3711 => \"/meteo/Luras\",3712 => \"/meteo/Lurate+caccivio\",3713 => \"/meteo/Lusciano\",8636 => \"/meteo/Lusentino\",3714 => \"/meteo/Luserna\",3715 => \"/meteo/Luserna+san+giovanni\",3716 => \"/meteo/Lusernetta\",3717 => \"/meteo/Lusevera\",3718 => \"/meteo/Lusia\",3719 => \"/meteo/Lusiana\",3720 => \"/meteo/Lusiglie'\",3721 => \"/meteo/Luson\",3722 => \"/meteo/Lustra\",8572 => \"/meteo/Lutago\",3723 => \"/meteo/Luvinate\",3724 => \"/meteo/Luzzana\",3725 => \"/meteo/Luzzara\",3726 => \"/meteo/Luzzi\",8447 => \"/meteo/L`Aquila+est\",8446 => \"/meteo/L`Aquila+ovest\",3727 => \"/meteo/Maccagno\",3728 => \"/meteo/Maccastorna\",3729 => \"/meteo/Macchia+d'isernia\",3730 => \"/meteo/Macchia+valfortore\",3731 => \"/meteo/Macchiagodena\",3732 => \"/meteo/Macello\",3733 => \"/meteo/Macerata\",3734 => \"/meteo/Macerata+campania\",3735 => \"/meteo/Macerata+feltria\",3736 => \"/meteo/Macherio\",3737 => \"/meteo/Maclodio\",3738 => \"/meteo/Macomer\",3739 => \"/meteo/Macra\",3740 => \"/meteo/Macugnaga\",3741 => \"/meteo/Maddaloni\",3742 => \"/meteo/Madesimo\",3743 => \"/meteo/Madignano\",3744 => \"/meteo/Madone\",3745 => \"/meteo/Madonna+del+sasso\",8201 => \"/meteo/Madonna+di+Campiglio\",3746 => \"/meteo/Maenza\",3747 => \"/meteo/Mafalda\",3748 => \"/meteo/Magasa\",3749 => \"/meteo/Magenta\",3750 => \"/meteo/Maggiora\",3751 => \"/meteo/Magherno\",3752 => \"/meteo/Magione\",3753 => \"/meteo/Magisano\",3754 => \"/meteo/Magliano+alfieri\",3755 => \"/meteo/Magliano+alpi\",8461 => \"/meteo/Magliano+casello\",3756 => \"/meteo/Magliano+de'+marsi\",3757 => \"/meteo/Magliano+di+tenna\",3758 => \"/meteo/Magliano+in+toscana\",3759 => \"/meteo/Magliano+romano\",3760 => \"/meteo/Magliano+sabina\",3761 => \"/meteo/Magliano+vetere\",3762 => \"/meteo/Maglie\",3763 => \"/meteo/Magliolo\",3764 => \"/meteo/Maglione\",3765 => \"/meteo/Magnacavallo\",3766 => \"/meteo/Magnago\",3767 => \"/meteo/Magnano\",3768 => \"/meteo/Magnano+in+riviera\",8322 => \"/meteo/Magnolta\",3769 => \"/meteo/Magomadas\",3770 => \"/meteo/Magre'+sulla+strada+del+vino\",3771 => \"/meteo/Magreglio\",3772 => \"/meteo/Maida\",3773 => \"/meteo/Maiera'\",3774 => \"/meteo/Maierato\",3775 => \"/meteo/Maiolati+spontini\",3776 => \"/meteo/Maiolo\",3777 => \"/meteo/Maiori\",3778 => \"/meteo/Mairago\",3779 => \"/meteo/Mairano\",3780 => \"/meteo/Maissana\",3781 => \"/meteo/Majano\",3782 => \"/meteo/Malagnino\",3783 => \"/meteo/Malalbergo\",3784 => \"/meteo/Malborghetto+valbruna\",3785 => \"/meteo/Malcesine\",3786 => \"/meteo/Male'\",3787 => \"/meteo/Malegno\",3788 => \"/meteo/Maleo\",3789 => \"/meteo/Malesco\",3790 => \"/meteo/Maletto\",3791 => \"/meteo/Malfa\",8229 => \"/meteo/Malga+Ciapela\",8333 => \"/meteo/Malga+Polzone\",8661 => \"/meteo/Malga+San+Giorgio\",3792 => \"/meteo/Malgesso\",3793 => \"/meteo/Malgrate\",3794 => \"/meteo/Malito\",3795 => \"/meteo/Mallare\",3796 => \"/meteo/Malles+Venosta\",3797 => \"/meteo/Malnate\",3798 => \"/meteo/Malo\",3799 => \"/meteo/Malonno\",3800 => \"/meteo/Malosco\",3801 => \"/meteo/Maltignano\",3802 => \"/meteo/Malvagna\",3803 => \"/meteo/Malvicino\",3804 => \"/meteo/Malvito\",3805 => \"/meteo/Mammola\",3806 => \"/meteo/Mamoiada\",3807 => \"/meteo/Manciano\",3808 => \"/meteo/Mandanici\",3809 => \"/meteo/Mandas\",3810 => \"/meteo/Mandatoriccio\",3811 => \"/meteo/Mandela\",3812 => \"/meteo/Mandello+del+lario\",3813 => \"/meteo/Mandello+vitta\",3814 => \"/meteo/Manduria\",3815 => \"/meteo/Manerba+del+garda\",3816 => \"/meteo/Manerbio\",3817 => \"/meteo/Manfredonia\",3818 => \"/meteo/Mango\",3819 => \"/meteo/Mangone\",3820 => \"/meteo/Maniace\",3821 => \"/meteo/Maniago\",3822 => \"/meteo/Manocalzati\",3823 => \"/meteo/Manoppello\",3824 => \"/meteo/Mansue'\",3825 => \"/meteo/Manta\",3826 => \"/meteo/Mantello\",3827 => \"/meteo/Mantova\",8129 => \"/meteo/Manzano\",3829 => \"/meteo/Manziana\",3830 => \"/meteo/Mapello\",3831 => \"/meteo/Mara\",3832 => \"/meteo/Maracalagonis\",3833 => \"/meteo/Maranello\",3834 => \"/meteo/Marano+di+napoli\",3835 => \"/meteo/Marano+di+valpolicella\",3836 => \"/meteo/Marano+equo\",3837 => \"/meteo/Marano+lagunare\",3838 => \"/meteo/Marano+marchesato\",3839 => \"/meteo/Marano+principato\",3840 => \"/meteo/Marano+sul+panaro\",3841 => \"/meteo/Marano+ticino\",3842 => \"/meteo/Marano+vicentino\",3843 => \"/meteo/Maranzana\",3844 => \"/meteo/Maratea\",3845 => \"/meteo/Marcallo+con+Casone\",3846 => \"/meteo/Marcaria\",3847 => \"/meteo/Marcedusa\",3848 => \"/meteo/Marcellina\",3849 => \"/meteo/Marcellinara\",3850 => \"/meteo/Marcetelli\",3851 => \"/meteo/Marcheno\",3852 => \"/meteo/Marchirolo\",3853 => \"/meteo/Marciana\",3854 => \"/meteo/Marciana+marina\",3855 => \"/meteo/Marcianise\",3856 => \"/meteo/Marciano+della+chiana\",3857 => \"/meteo/Marcignago\",3858 => \"/meteo/Marcon\",3859 => \"/meteo/Marebbe\",8478 => \"/meteo/Marene\",3861 => \"/meteo/Mareno+di+piave\",3862 => \"/meteo/Marentino\",3863 => \"/meteo/Maretto\",3864 => \"/meteo/Margarita\",3865 => \"/meteo/Margherita+di+savoia\",3866 => \"/meteo/Margno\",3867 => \"/meteo/Mariana+mantovana\",3868 => \"/meteo/Mariano+comense\",3869 => \"/meteo/Mariano+del+friuli\",3870 => \"/meteo/Marianopoli\",3871 => \"/meteo/Mariglianella\",3872 => \"/meteo/Marigliano\",8291 => \"/meteo/Marilleva\",8490 => \"/meteo/Marina+di+Arbus\",8599 => \"/meteo/Marina+di+Camerota\",8582 => \"/meteo/Marina+di+Campo\",8111 => \"/meteo/Marina+di+Cariati\",8118 => \"/meteo/Marina+di+Cetraro\",8175 => \"/meteo/Marina+di+Gairo\",8164 => \"/meteo/Marina+di+Ginosa\",3873 => \"/meteo/Marina+di+gioiosa+ionica\",8166 => \"/meteo/Marina+di+Leuca\",8184 => \"/meteo/Marina+di+Modica\",8156 => \"/meteo/Marina+di+montenero\",8165 => \"/meteo/Marina+di+Ostuni\",8186 => \"/meteo/Marina+di+Palma\",8141 => \"/meteo/Marina+di+Pescia+Romana\",8591 => \"/meteo/Marina+di+Pescoluse\",8298 => \"/meteo/Marina+di+Pietrasanta\",8128 => \"/meteo/Marina+di+Ravenna\",8174 => \"/meteo/Marina+di+Sorso\",8188 => \"/meteo/Marinella\",3874 => \"/meteo/Marineo\",3875 => \"/meteo/Marino\",3876 => \"/meteo/Marlengo\",3877 => \"/meteo/Marliana\",3878 => \"/meteo/Marmentino\",3879 => \"/meteo/Marmirolo\",8205 => \"/meteo/Marmolada\",3880 => \"/meteo/Marmora\",3881 => \"/meteo/Marnate\",3882 => \"/meteo/Marone\",3883 => \"/meteo/Maropati\",3884 => \"/meteo/Marostica\",8154 => \"/meteo/Marotta\",3885 => \"/meteo/Marradi\",3886 => \"/meteo/Marrubiu\",3887 => \"/meteo/Marsaglia\",3888 => \"/meteo/Marsala\",3889 => \"/meteo/Marsciano\",3890 => \"/meteo/Marsico+nuovo\",3891 => \"/meteo/Marsicovetere\",3892 => \"/meteo/Marta\",3893 => \"/meteo/Martano\",3894 => \"/meteo/Martellago\",3895 => \"/meteo/Martello\",3896 => \"/meteo/Martignacco\",3897 => \"/meteo/Martignana+di+po\",3898 => \"/meteo/Martignano\",3899 => \"/meteo/Martina+franca\",3900 => \"/meteo/Martinengo\",3901 => \"/meteo/Martiniana+po\",3902 => \"/meteo/Martinsicuro\",3903 => \"/meteo/Martirano\",3904 => \"/meteo/Martirano+lombardo\",3905 => \"/meteo/Martis\",3906 => \"/meteo/Martone\",3907 => \"/meteo/Marudo\",3908 => \"/meteo/Maruggio\",3909 => \"/meteo/Marzabotto\",3910 => \"/meteo/Marzano\",3911 => \"/meteo/Marzano+appio\",3912 => \"/meteo/Marzano+di+nola\",3913 => \"/meteo/Marzi\",3914 => \"/meteo/Marzio\",3915 => \"/meteo/Masainas\",3916 => \"/meteo/Masate\",3917 => \"/meteo/Mascali\",3918 => \"/meteo/Mascalucia\",3919 => \"/meteo/Maschito\",3920 => \"/meteo/Masciago+primo\",3921 => \"/meteo/Maser\",3922 => \"/meteo/Masera\",3923 => \"/meteo/Masera'+di+Padova\",3924 => \"/meteo/Maserada+sul+piave\",3925 => \"/meteo/Masi\",3926 => \"/meteo/Masi+torello\",3927 => \"/meteo/Masio\",3928 => \"/meteo/Maslianico\",8216 => \"/meteo/Maso+Corto\",3929 => \"/meteo/Mason+vicentino\",3930 => \"/meteo/Masone\",3931 => \"/meteo/Massa\",3932 => \"/meteo/Massa+d'albe\",3933 => \"/meteo/Massa+di+somma\",3934 => \"/meteo/Massa+e+cozzile\",3935 => \"/meteo/Massa+fermana\",3936 => \"/meteo/Massa+fiscaglia\",3937 => \"/meteo/Massa+lombarda\",3938 => \"/meteo/Massa+lubrense\",3939 => \"/meteo/Massa+marittima\",3940 => \"/meteo/Massa+martana\",3941 => \"/meteo/Massafra\",3942 => \"/meteo/Massalengo\",3943 => \"/meteo/Massanzago\",3944 => \"/meteo/Massarosa\",3945 => \"/meteo/Massazza\",3946 => \"/meteo/Massello\",3947 => \"/meteo/Masserano\",3948 => \"/meteo/Massignano\",3949 => \"/meteo/Massimeno\",3950 => \"/meteo/Massimino\",3951 => \"/meteo/Massino+visconti\",3952 => \"/meteo/Massiola\",3953 => \"/meteo/Masullas\",3954 => \"/meteo/Matelica\",3955 => \"/meteo/Matera\",3956 => \"/meteo/Mathi\",3957 => \"/meteo/Matino\",3958 => \"/meteo/Matrice\",3959 => \"/meteo/Mattie\",3960 => \"/meteo/Mattinata\",3961 => \"/meteo/Mazara+del+vallo\",3962 => \"/meteo/Mazzano\",3963 => \"/meteo/Mazzano+romano\",3964 => \"/meteo/Mazzarino\",3965 => \"/meteo/Mazzarra'+sant'andrea\",3966 => \"/meteo/Mazzarrone\",3967 => \"/meteo/Mazze'\",3968 => \"/meteo/Mazzin\",3969 => \"/meteo/Mazzo+di+valtellina\",3970 => \"/meteo/Meana+di+susa\",3971 => \"/meteo/Meana+sardo\",3972 => \"/meteo/Meda\",3973 => \"/meteo/Mede\",3974 => \"/meteo/Medea\",3975 => \"/meteo/Medesano\",3976 => \"/meteo/Medicina\",3977 => \"/meteo/Mediglia\",3978 => \"/meteo/Medolago\",3979 => \"/meteo/Medole\",3980 => \"/meteo/Medolla\",3981 => \"/meteo/Meduna+di+livenza\",3982 => \"/meteo/Meduno\",3983 => \"/meteo/Megliadino+san+fidenzio\",3984 => \"/meteo/Megliadino+san+vitale\",3985 => \"/meteo/Meina\",3986 => \"/meteo/Mel\",3987 => \"/meteo/Melara\",3988 => \"/meteo/Melazzo\",8443 => \"/meteo/Meldola\",3990 => \"/meteo/Mele\",3991 => \"/meteo/Melegnano\",3992 => \"/meteo/Melendugno\",3993 => \"/meteo/Meleti\",8666 => \"/meteo/Melezet\",3994 => \"/meteo/Melfi\",3995 => \"/meteo/Melicucca'\",3996 => \"/meteo/Melicucco\",3997 => \"/meteo/Melilli\",3998 => \"/meteo/Melissa\",3999 => \"/meteo/Melissano\",4000 => \"/meteo/Melito+di+napoli\",4001 => \"/meteo/Melito+di+porto+salvo\",4002 => \"/meteo/Melito+irpino\",4003 => \"/meteo/Melizzano\",4004 => \"/meteo/Melle\",4005 => \"/meteo/Mello\",4006 => \"/meteo/Melpignano\",4007 => \"/meteo/Meltina\",4008 => \"/meteo/Melzo\",4009 => \"/meteo/Menaggio\",4010 => \"/meteo/Menarola\",4011 => \"/meteo/Menconico\",4012 => \"/meteo/Mendatica\",4013 => \"/meteo/Mendicino\",4014 => \"/meteo/Menfi\",4015 => \"/meteo/Mentana\",4016 => \"/meteo/Meolo\",4017 => \"/meteo/Merana\",4018 => \"/meteo/Merano\",8351 => \"/meteo/Merano+2000\",4019 => \"/meteo/Merate\",4020 => \"/meteo/Mercallo\",4021 => \"/meteo/Mercatello+sul+metauro\",4022 => \"/meteo/Mercatino+conca\",8437 => \"/meteo/Mercato\",4023 => \"/meteo/Mercato+san+severino\",4024 => \"/meteo/Mercato+saraceno\",4025 => \"/meteo/Mercenasco\",4026 => \"/meteo/Mercogliano\",4027 => \"/meteo/Mereto+di+tomba\",4028 => \"/meteo/Mergo\",4029 => \"/meteo/Mergozzo\",4030 => \"/meteo/Meri'\",4031 => \"/meteo/Merlara\",4032 => \"/meteo/Merlino\",4033 => \"/meteo/Merone\",4034 => \"/meteo/Mesagne\",4035 => \"/meteo/Mese\",4036 => \"/meteo/Mesenzana\",4037 => \"/meteo/Mesero\",4038 => \"/meteo/Mesola\",4039 => \"/meteo/Mesoraca\",4040 => \"/meteo/Messina\",4041 => \"/meteo/Mestrino\",4042 => \"/meteo/Meta\",8104 => \"/meteo/Metaponto\",4043 => \"/meteo/Meugliano\",4044 => \"/meteo/Mezzago\",4045 => \"/meteo/Mezzana\",4046 => \"/meteo/Mezzana+bigli\",4047 => \"/meteo/Mezzana+mortigliengo\",4048 => \"/meteo/Mezzana+rabattone\",4049 => \"/meteo/Mezzane+di+sotto\",4050 => \"/meteo/Mezzanego\",4051 => \"/meteo/Mezzani\",4052 => \"/meteo/Mezzanino\",4053 => \"/meteo/Mezzano\",4054 => \"/meteo/Mezzegra\",4055 => \"/meteo/Mezzenile\",4056 => \"/meteo/Mezzocorona\",4057 => \"/meteo/Mezzojuso\",4058 => \"/meteo/Mezzoldo\",4059 => \"/meteo/Mezzolombardo\",4060 => \"/meteo/Mezzomerico\",8524 => \"/meteo/MI+Olgettina\",8526 => \"/meteo/MI+Primaticcio\",8527 => \"/meteo/MI+Silla\",8525 => \"/meteo/MI+Zama\",4061 => \"/meteo/Miagliano\",4062 => \"/meteo/Miane\",4063 => \"/meteo/Miasino\",4064 => \"/meteo/Miazzina\",4065 => \"/meteo/Micigliano\",4066 => \"/meteo/Miggiano\",4067 => \"/meteo/Miglianico\",4068 => \"/meteo/Migliarino\",4069 => \"/meteo/Migliaro\",4070 => \"/meteo/Miglierina\",4071 => \"/meteo/Miglionico\",4072 => \"/meteo/Mignanego\",4073 => \"/meteo/Mignano+monte+lungo\",4074 => \"/meteo/Milano\",8495 => \"/meteo/Milano+Linate\",8496 => \"/meteo/Milano+Malpensa\",8240 => \"/meteo/Milano+marittima\",4075 => \"/meteo/Milazzo\",4076 => \"/meteo/Milena\",4077 => \"/meteo/Mileto\",4078 => \"/meteo/Milis\",4079 => \"/meteo/Militello+in+val+di+catania\",4080 => \"/meteo/Militello+rosmarino\",4081 => \"/meteo/Millesimo\",4082 => \"/meteo/Milo\",4083 => \"/meteo/Milzano\",4084 => \"/meteo/Mineo\",4085 => \"/meteo/Minerbe\",4086 => \"/meteo/Minerbio\",4087 => \"/meteo/Minervino+di+lecce\",4088 => \"/meteo/Minervino+murge\",4089 => \"/meteo/Minori\",4090 => \"/meteo/Minturno\",4091 => \"/meteo/Minucciano\",4092 => \"/meteo/Mioglia\",4093 => \"/meteo/Mira\",4094 => \"/meteo/Mirabella+eclano\",4095 => \"/meteo/Mirabella+imbaccari\",4096 => \"/meteo/Mirabello\",4097 => \"/meteo/Mirabello+monferrato\",4098 => \"/meteo/Mirabello+sannitico\",4099 => \"/meteo/Miradolo+terme\",4100 => \"/meteo/Miranda\",4101 => \"/meteo/Mirandola\",4102 => \"/meteo/Mirano\",4103 => \"/meteo/Mirto\",4104 => \"/meteo/Misano+adriatico\",4105 => \"/meteo/Misano+di+gera+d'adda\",4106 => \"/meteo/Misilmeri\",4107 => \"/meteo/Misinto\",4108 => \"/meteo/Missaglia\",8416 => \"/meteo/Missanello\",4110 => \"/meteo/Misterbianco\",4111 => \"/meteo/Mistretta\",8623 => \"/meteo/Misurina\",4112 => \"/meteo/Moasca\",4113 => \"/meteo/Moconesi\",4114 => \"/meteo/Modena\",4115 => \"/meteo/Modica\",4116 => \"/meteo/Modigliana\",4117 => \"/meteo/Modolo\",4118 => \"/meteo/Modugno\",4119 => \"/meteo/Moena\",4120 => \"/meteo/Moggio\",4121 => \"/meteo/Moggio+udinese\",4122 => \"/meteo/Moglia\",4123 => \"/meteo/Mogliano\",4124 => \"/meteo/Mogliano+veneto\",4125 => \"/meteo/Mogorella\",4126 => \"/meteo/Mogoro\",4127 => \"/meteo/Moiano\",8615 => \"/meteo/Moie\",4128 => \"/meteo/Moimacco\",4129 => \"/meteo/Moio+Alcantara\",4130 => \"/meteo/Moio+de'calvi\",4131 => \"/meteo/Moio+della+civitella\",4132 => \"/meteo/Moiola\",4133 => \"/meteo/Mola+di+bari\",4134 => \"/meteo/Molare\",4135 => \"/meteo/Molazzana\",4136 => \"/meteo/Molfetta\",4137 => \"/meteo/Molina+aterno\",4138 => \"/meteo/Molina+di+ledro\",4139 => \"/meteo/Molinara\",4140 => \"/meteo/Molinella\",4141 => \"/meteo/Molini+di+triora\",4142 => \"/meteo/Molino+dei+torti\",4143 => \"/meteo/Molise\",4144 => \"/meteo/Moliterno\",4145 => \"/meteo/Mollia\",4146 => \"/meteo/Molochio\",4147 => \"/meteo/Molteno\",4148 => \"/meteo/Moltrasio\",4149 => \"/meteo/Molvena\",4150 => \"/meteo/Molveno\",4151 => \"/meteo/Mombaldone\",4152 => \"/meteo/Mombarcaro\",4153 => \"/meteo/Mombaroccio\",4154 => \"/meteo/Mombaruzzo\",4155 => \"/meteo/Mombasiglio\",4156 => \"/meteo/Mombello+di+torino\",4157 => \"/meteo/Mombello+monferrato\",4158 => \"/meteo/Mombercelli\",4159 => \"/meteo/Momo\",4160 => \"/meteo/Mompantero\",4161 => \"/meteo/Mompeo\",4162 => \"/meteo/Momperone\",4163 => \"/meteo/Monacilioni\",4164 => \"/meteo/Monale\",4165 => \"/meteo/Monasterace\",4166 => \"/meteo/Monastero+bormida\",4167 => \"/meteo/Monastero+di+lanzo\",4168 => \"/meteo/Monastero+di+vasco\",4169 => \"/meteo/Monasterolo+casotto\",4170 => \"/meteo/Monasterolo+del+castello\",4171 => \"/meteo/Monasterolo+di+savigliano\",4172 => \"/meteo/Monastier+di+treviso\",4173 => \"/meteo/Monastir\",4174 => \"/meteo/Moncalieri\",4175 => \"/meteo/Moncalvo\",4176 => \"/meteo/Moncenisio\",4177 => \"/meteo/Moncestino\",4178 => \"/meteo/Monchiero\",4179 => \"/meteo/Monchio+delle+corti\",4180 => \"/meteo/Monclassico\",4181 => \"/meteo/Moncrivello\",8649 => \"/meteo/Moncucco\",4182 => \"/meteo/Moncucco+torinese\",4183 => \"/meteo/Mondaino\",4184 => \"/meteo/Mondavio\",4185 => \"/meteo/Mondolfo\",4186 => \"/meteo/Mondovi'\",4187 => \"/meteo/Mondragone\",4188 => \"/meteo/Moneglia\",8143 => \"/meteo/Monesi\",4189 => \"/meteo/Monesiglio\",4190 => \"/meteo/Monfalcone\",4191 => \"/meteo/Monforte+d'alba\",4192 => \"/meteo/Monforte+san+giorgio\",4193 => \"/meteo/Monfumo\",4194 => \"/meteo/Mongardino\",4195 => \"/meteo/Monghidoro\",4196 => \"/meteo/Mongiana\",4197 => \"/meteo/Mongiardino+ligure\",8637 => \"/meteo/Monginevro+Montgenevre\",4198 => \"/meteo/Mongiuffi+melia\",4199 => \"/meteo/Mongrando\",4200 => \"/meteo/Mongrassano\",4201 => \"/meteo/Monguelfo\",4202 => \"/meteo/Monguzzo\",4203 => \"/meteo/Moniga+del+garda\",4204 => \"/meteo/Monleale\",4205 => \"/meteo/Monno\",4206 => \"/meteo/Monopoli\",4207 => \"/meteo/Monreale\",4208 => \"/meteo/Monrupino\",4209 => \"/meteo/Monsampietro+morico\",4210 => \"/meteo/Monsampolo+del+tronto\",4211 => \"/meteo/Monsano\",4212 => \"/meteo/Monselice\",4213 => \"/meteo/Monserrato\",4214 => \"/meteo/Monsummano+terme\",4215 => \"/meteo/Monta'\",4216 => \"/meteo/Montabone\",4217 => \"/meteo/Montacuto\",4218 => \"/meteo/Montafia\",4219 => \"/meteo/Montagano\",4220 => \"/meteo/Montagna\",4221 => \"/meteo/Montagna+in+valtellina\",8301 => \"/meteo/Montagnana\",4223 => \"/meteo/Montagnareale\",4224 => \"/meteo/Montagne\",4225 => \"/meteo/Montaguto\",4226 => \"/meteo/Montaione\",4227 => \"/meteo/Montalbano+Elicona\",4228 => \"/meteo/Montalbano+jonico\",4229 => \"/meteo/Montalcino\",4230 => \"/meteo/Montaldeo\",4231 => \"/meteo/Montaldo+bormida\",4232 => \"/meteo/Montaldo+di+mondovi'\",4233 => \"/meteo/Montaldo+roero\",4234 => \"/meteo/Montaldo+scarampi\",4235 => \"/meteo/Montaldo+torinese\",4236 => \"/meteo/Montale\",4237 => \"/meteo/Montalenghe\",4238 => \"/meteo/Montallegro\",4239 => \"/meteo/Montalto+delle+marche\",4240 => \"/meteo/Montalto+di+castro\",4241 => \"/meteo/Montalto+dora\",4242 => \"/meteo/Montalto+ligure\",4243 => \"/meteo/Montalto+pavese\",4244 => \"/meteo/Montalto+uffugo\",4245 => \"/meteo/Montanaro\",4246 => \"/meteo/Montanaso+lombardo\",4247 => \"/meteo/Montanera\",4248 => \"/meteo/Montano+antilia\",4249 => \"/meteo/Montano+lucino\",4250 => \"/meteo/Montappone\",4251 => \"/meteo/Montaquila\",4252 => \"/meteo/Montasola\",4253 => \"/meteo/Montauro\",4254 => \"/meteo/Montazzoli\",8738 => \"/meteo/Monte+Alben\",8350 => \"/meteo/Monte+Amiata\",4255 => \"/meteo/Monte+Argentario\",8696 => \"/meteo/Monte+Avena\",8660 => \"/meteo/Monte+Baldo\",8251 => \"/meteo/Monte+Belvedere\",8720 => \"/meteo/Monte+Bianco\",8292 => \"/meteo/Monte+Bondone\",8757 => \"/meteo/Monte+Caio\",8149 => \"/meteo/Monte+Campione\",4256 => \"/meteo/Monte+Castello+di+Vibio\",4257 => \"/meteo/Monte+Cavallo\",4258 => \"/meteo/Monte+Cerignone\",8722 => \"/meteo/Monte+Cervino\",8533 => \"/meteo/Monte+Cimone\",4259 => \"/meteo/Monte+Colombo\",8658 => \"/meteo/Monte+Cornizzolo\",4260 => \"/meteo/Monte+Cremasco\",4261 => \"/meteo/Monte+di+Malo\",4262 => \"/meteo/Monte+di+Procida\",8581 => \"/meteo/Monte+Elmo\",8701 => \"/meteo/Monte+Faloria\",4263 => \"/meteo/Monte+Giberto\",8486 => \"/meteo/Monte+Gomito\",8232 => \"/meteo/Monte+Grappa\",4264 => \"/meteo/Monte+Isola\",8735 => \"/meteo/Monte+Legnone\",8631 => \"/meteo/Monte+Livata\",8574 => \"/meteo/Monte+Lussari\",8484 => \"/meteo/Monte+Malanotte\",4265 => \"/meteo/Monte+Marenzo\",8611 => \"/meteo/Monte+Matajur\",8732 => \"/meteo/Monte+Matto\",8266 => \"/meteo/Monte+Moro\",8697 => \"/meteo/Monte+Mucrone\",8619 => \"/meteo/Monte+Pigna\",8288 => \"/meteo/Monte+Pora+Base\",8310 => \"/meteo/Monte+Pora+Cima\",4266 => \"/meteo/Monte+Porzio\",4267 => \"/meteo/Monte+Porzio+Catone\",8608 => \"/meteo/Monte+Prata\",8320 => \"/meteo/Monte+Pratello\",4268 => \"/meteo/Monte+Rinaldo\",4269 => \"/meteo/Monte+Roberto\",4270 => \"/meteo/Monte+Romano\",4271 => \"/meteo/Monte+San+Biagio\",4272 => \"/meteo/Monte+San+Giacomo\",4273 => \"/meteo/Monte+San+Giovanni+Campano\",4274 => \"/meteo/Monte+San+Giovanni+in+Sabina\",4275 => \"/meteo/Monte+San+Giusto\",4276 => \"/meteo/Monte+San+Martino\",4277 => \"/meteo/Monte+San+Pietrangeli\",4278 => \"/meteo/Monte+San+Pietro\",8538 => \"/meteo/Monte+San+Primo\",4279 => \"/meteo/Monte+San+Savino\",8652 => \"/meteo/Monte+San+Vigilio\",4280 => \"/meteo/Monte+San+Vito\",4281 => \"/meteo/Monte+Sant'Angelo\",4282 => \"/meteo/Monte+Santa+Maria+Tiberina\",8570 => \"/meteo/Monte+Scuro\",8278 => \"/meteo/Monte+Spinale\",4283 => \"/meteo/Monte+Urano\",8758 => \"/meteo/Monte+Ventasso\",4284 => \"/meteo/Monte+Vidon+Combatte\",4285 => \"/meteo/Monte+Vidon+Corrado\",8729 => \"/meteo/Monte+Volturino\",8346 => \"/meteo/Monte+Zoncolan\",4286 => \"/meteo/Montebello+della+Battaglia\",4287 => \"/meteo/Montebello+di+Bertona\",4288 => \"/meteo/Montebello+Ionico\",4289 => \"/meteo/Montebello+sul+Sangro\",4290 => \"/meteo/Montebello+Vicentino\",4291 => \"/meteo/Montebelluna\",4292 => \"/meteo/Montebruno\",4293 => \"/meteo/Montebuono\",4294 => \"/meteo/Montecalvo+in+Foglia\",4295 => \"/meteo/Montecalvo+Irpino\",4296 => \"/meteo/Montecalvo+Versiggia\",4297 => \"/meteo/Montecarlo\",4298 => \"/meteo/Montecarotto\",4299 => \"/meteo/Montecassiano\",4300 => \"/meteo/Montecastello\",4301 => \"/meteo/Montecastrilli\",4303 => \"/meteo/Montecatini+terme\",4302 => \"/meteo/Montecatini+Val+di+Cecina\",4304 => \"/meteo/Montecchia+di+Crosara\",4305 => \"/meteo/Montecchio\",4306 => \"/meteo/Montecchio+Emilia\",4307 => \"/meteo/Montecchio+Maggiore\",4308 => \"/meteo/Montecchio+Precalcino\",4309 => \"/meteo/Montechiaro+d'Acqui\",4310 => \"/meteo/Montechiaro+d'Asti\",4311 => \"/meteo/Montechiarugolo\",4312 => \"/meteo/Monteciccardo\",4313 => \"/meteo/Montecilfone\",4314 => \"/meteo/Montecompatri\",4315 => \"/meteo/Montecopiolo\",4316 => \"/meteo/Montecorice\",4317 => \"/meteo/Montecorvino+Pugliano\",4318 => \"/meteo/Montecorvino+Rovella\",4319 => \"/meteo/Montecosaro\",4320 => \"/meteo/Montecrestese\",4321 => \"/meteo/Montecreto\",4322 => \"/meteo/Montedinove\",4323 => \"/meteo/Montedoro\",4324 => \"/meteo/Montefalcione\",4325 => \"/meteo/Montefalco\",4326 => \"/meteo/Montefalcone+Appennino\",4327 => \"/meteo/Montefalcone+di+Val+Fortore\",4328 => \"/meteo/Montefalcone+nel+Sannio\",4329 => \"/meteo/Montefano\",4330 => \"/meteo/Montefelcino\",4331 => \"/meteo/Monteferrante\",4332 => \"/meteo/Montefiascone\",4333 => \"/meteo/Montefino\",4334 => \"/meteo/Montefiore+conca\",4335 => \"/meteo/Montefiore+dell'Aso\",4336 => \"/meteo/Montefiorino\",4337 => \"/meteo/Monteflavio\",4338 => \"/meteo/Monteforte+Cilento\",4339 => \"/meteo/Monteforte+d'Alpone\",4340 => \"/meteo/Monteforte+Irpino\",4341 => \"/meteo/Montefortino\",4342 => \"/meteo/Montefranco\",4343 => \"/meteo/Montefredane\",4344 => \"/meteo/Montefusco\",4345 => \"/meteo/Montegabbione\",4346 => \"/meteo/Montegalda\",4347 => \"/meteo/Montegaldella\",4348 => \"/meteo/Montegallo\",4349 => \"/meteo/Montegioco\",4350 => \"/meteo/Montegiordano\",4351 => \"/meteo/Montegiorgio\",4352 => \"/meteo/Montegranaro\",4353 => \"/meteo/Montegridolfo\",4354 => \"/meteo/Montegrimano\",4355 => \"/meteo/Montegrino+valtravaglia\",4356 => \"/meteo/Montegrosso+d'Asti\",4357 => \"/meteo/Montegrosso+pian+latte\",4358 => \"/meteo/Montegrotto+terme\",4359 => \"/meteo/Monteiasi\",4360 => \"/meteo/Montelabbate\",4361 => \"/meteo/Montelanico\",4362 => \"/meteo/Montelapiano\",4363 => \"/meteo/Monteleone+d'orvieto\",4364 => \"/meteo/Monteleone+di+fermo\",4365 => \"/meteo/Monteleone+di+puglia\",4366 => \"/meteo/Monteleone+di+spoleto\",4367 => \"/meteo/Monteleone+rocca+doria\",4368 => \"/meteo/Monteleone+sabino\",4369 => \"/meteo/Montelepre\",4370 => \"/meteo/Montelibretti\",4371 => \"/meteo/Montella\",4372 => \"/meteo/Montello\",4373 => \"/meteo/Montelongo\",4374 => \"/meteo/Montelparo\",4375 => \"/meteo/Montelupo+albese\",4376 => \"/meteo/Montelupo+fiorentino\",4377 => \"/meteo/Montelupone\",4378 => \"/meteo/Montemaggiore+al+metauro\",4379 => \"/meteo/Montemaggiore+belsito\",4380 => \"/meteo/Montemagno\",4381 => \"/meteo/Montemale+di+cuneo\",4382 => \"/meteo/Montemarano\",4383 => \"/meteo/Montemarciano\",4384 => \"/meteo/Montemarzino\",4385 => \"/meteo/Montemesola\",4386 => \"/meteo/Montemezzo\",4387 => \"/meteo/Montemignaio\",4388 => \"/meteo/Montemiletto\",8401 => \"/meteo/Montemilone\",4390 => \"/meteo/Montemitro\",4391 => \"/meteo/Montemonaco\",4392 => \"/meteo/Montemurlo\",8408 => \"/meteo/Montemurro\",4394 => \"/meteo/Montenars\",4395 => \"/meteo/Montenero+di+bisaccia\",4396 => \"/meteo/Montenero+sabino\",4397 => \"/meteo/Montenero+val+cocchiara\",4398 => \"/meteo/Montenerodomo\",4399 => \"/meteo/Monteodorisio\",4400 => \"/meteo/Montepaone\",4401 => \"/meteo/Monteparano\",8296 => \"/meteo/Montepiano\",4402 => \"/meteo/Monteprandone\",4403 => \"/meteo/Montepulciano\",4404 => \"/meteo/Monterado\",4405 => \"/meteo/Monterchi\",4406 => \"/meteo/Montereale\",4407 => \"/meteo/Montereale+valcellina\",4408 => \"/meteo/Monterenzio\",4409 => \"/meteo/Monteriggioni\",4410 => \"/meteo/Monteroduni\",4411 => \"/meteo/Monteroni+d'arbia\",4412 => \"/meteo/Monteroni+di+lecce\",4413 => \"/meteo/Monterosi\",4414 => \"/meteo/Monterosso+al+mare\",4415 => \"/meteo/Monterosso+almo\",4416 => \"/meteo/Monterosso+calabro\",4417 => \"/meteo/Monterosso+grana\",4418 => \"/meteo/Monterotondo\",4419 => \"/meteo/Monterotondo+marittimo\",4420 => \"/meteo/Monterubbiano\",4421 => \"/meteo/Montesano+salentino\",4422 => \"/meteo/Montesano+sulla+marcellana\",4423 => \"/meteo/Montesarchio\",8389 => \"/meteo/Montescaglioso\",4425 => \"/meteo/Montescano\",4426 => \"/meteo/Montescheno\",4427 => \"/meteo/Montescudaio\",4428 => \"/meteo/Montescudo\",4429 => \"/meteo/Montese\",4430 => \"/meteo/Montesegale\",4431 => \"/meteo/Montesilvano\",8491 => \"/meteo/Montesilvano+Marina\",4432 => \"/meteo/Montespertoli\",1730 => \"/meteo/Montespluga\",4433 => \"/meteo/Monteu+da+Po\",4434 => \"/meteo/Monteu+roero\",4435 => \"/meteo/Montevago\",4436 => \"/meteo/Montevarchi\",4437 => \"/meteo/Montevecchia\",4438 => \"/meteo/Monteveglio\",4439 => \"/meteo/Monteverde\",4440 => \"/meteo/Monteverdi+marittimo\",8589 => \"/meteo/Montevergine\",4441 => \"/meteo/Monteviale\",4442 => \"/meteo/Montezemolo\",4443 => \"/meteo/Monti\",4444 => \"/meteo/Montiano\",4445 => \"/meteo/Monticelli+brusati\",4446 => \"/meteo/Monticelli+d'ongina\",4447 => \"/meteo/Monticelli+pavese\",4448 => \"/meteo/Monticello+brianza\",4449 => \"/meteo/Monticello+conte+otto\",4450 => \"/meteo/Monticello+d'alba\",4451 => \"/meteo/Montichiari\",4452 => \"/meteo/Monticiano\",4453 => \"/meteo/Montieri\",4454 => \"/meteo/Montiglio+monferrato\",4455 => \"/meteo/Montignoso\",4456 => \"/meteo/Montirone\",4457 => \"/meteo/Montjovet\",4458 => \"/meteo/Montodine\",4459 => \"/meteo/Montoggio\",4460 => \"/meteo/Montone\",4461 => \"/meteo/Montopoli+di+sabina\",4462 => \"/meteo/Montopoli+in+val+d'arno\",4463 => \"/meteo/Montorfano\",4464 => \"/meteo/Montorio+al+vomano\",4465 => \"/meteo/Montorio+nei+frentani\",4466 => \"/meteo/Montorio+romano\",4467 => \"/meteo/Montoro+inferiore\",4468 => \"/meteo/Montoro+superiore\",4469 => \"/meteo/Montorso+vicentino\",4470 => \"/meteo/Montottone\",4471 => \"/meteo/Montresta\",4472 => \"/meteo/Montu'+beccaria\",8326 => \"/meteo/Montzeuc\",4473 => \"/meteo/Monvalle\",8726 => \"/meteo/Monviso\",4474 => \"/meteo/Monza\",4475 => \"/meteo/Monzambano\",4476 => \"/meteo/Monzuno\",4477 => \"/meteo/Morano+calabro\",4478 => \"/meteo/Morano+sul+Po\",4479 => \"/meteo/Moransengo\",4480 => \"/meteo/Moraro\",4481 => \"/meteo/Morazzone\",4482 => \"/meteo/Morbegno\",4483 => \"/meteo/Morbello\",4484 => \"/meteo/Morciano+di+leuca\",4485 => \"/meteo/Morciano+di+romagna\",4486 => \"/meteo/Morcone\",4487 => \"/meteo/Mordano\",8262 => \"/meteo/Morel\",4488 => \"/meteo/Morengo\",4489 => \"/meteo/Mores\",4490 => \"/meteo/Moresco\",4491 => \"/meteo/Moretta\",4492 => \"/meteo/Morfasso\",4493 => \"/meteo/Morgano\",8717 => \"/meteo/Morgantina\",4494 => \"/meteo/Morgex\",4495 => \"/meteo/Morgongiori\",4496 => \"/meteo/Mori\",4497 => \"/meteo/Moriago+della+battaglia\",4498 => \"/meteo/Moricone\",4499 => \"/meteo/Morigerati\",4500 => \"/meteo/Morimondo\",4501 => \"/meteo/Morino\",4502 => \"/meteo/Moriondo+torinese\",4503 => \"/meteo/Morlupo\",4504 => \"/meteo/Mormanno\",4505 => \"/meteo/Mornago\",4506 => \"/meteo/Mornese\",4507 => \"/meteo/Mornico+al+serio\",4508 => \"/meteo/Mornico+losana\",4509 => \"/meteo/Morolo\",4510 => \"/meteo/Morozzo\",4511 => \"/meteo/Morra+de+sanctis\",4512 => \"/meteo/Morro+d'alba\",4513 => \"/meteo/Morro+d'oro\",4514 => \"/meteo/Morro+reatino\",4515 => \"/meteo/Morrone+del+sannio\",4516 => \"/meteo/Morrovalle\",4517 => \"/meteo/Morsano+al+tagliamento\",4518 => \"/meteo/Morsasco\",4519 => \"/meteo/Mortara\",4520 => \"/meteo/Mortegliano\",4521 => \"/meteo/Morterone\",4522 => \"/meteo/Moruzzo\",4523 => \"/meteo/Moscazzano\",4524 => \"/meteo/Moschiano\",4525 => \"/meteo/Mosciano+sant'angelo\",4526 => \"/meteo/Moscufo\",4527 => \"/meteo/Moso+in+Passiria\",4528 => \"/meteo/Mossa\",4529 => \"/meteo/Mossano\",4530 => \"/meteo/Mosso+Santa+Maria\",4531 => \"/meteo/Motta+baluffi\",4532 => \"/meteo/Motta+Camastra\",4533 => \"/meteo/Motta+d'affermo\",4534 => \"/meteo/Motta+de'+conti\",4535 => \"/meteo/Motta+di+livenza\",4536 => \"/meteo/Motta+montecorvino\",4537 => \"/meteo/Motta+san+giovanni\",4538 => \"/meteo/Motta+sant'anastasia\",4539 => \"/meteo/Motta+santa+lucia\",4540 => \"/meteo/Motta+visconti\",4541 => \"/meteo/Mottafollone\",4542 => \"/meteo/Mottalciata\",8621 => \"/meteo/Mottarone\",4543 => \"/meteo/Motteggiana\",4544 => \"/meteo/Mottola\",8254 => \"/meteo/Mottolino\",4545 => \"/meteo/Mozzagrogna\",4546 => \"/meteo/Mozzanica\",4547 => \"/meteo/Mozzate\",4548 => \"/meteo/Mozzecane\",4549 => \"/meteo/Mozzo\",4550 => \"/meteo/Muccia\",4551 => \"/meteo/Muggia\",4552 => \"/meteo/Muggio'\",4553 => \"/meteo/Mugnano+del+cardinale\",4554 => \"/meteo/Mugnano+di+napoli\",4555 => \"/meteo/Mulazzano\",4556 => \"/meteo/Mulazzo\",4557 => \"/meteo/Mura\",4558 => \"/meteo/Muravera\",4559 => \"/meteo/Murazzano\",4560 => \"/meteo/Murello\",4561 => \"/meteo/Murialdo\",4562 => \"/meteo/Murisengo\",4563 => \"/meteo/Murlo\",4564 => \"/meteo/Muro+leccese\",4565 => \"/meteo/Muro+lucano\",4566 => \"/meteo/Muros\",4567 => \"/meteo/Muscoline\",4568 => \"/meteo/Musei\",4569 => \"/meteo/Musile+di+piave\",4570 => \"/meteo/Musso\",4571 => \"/meteo/Mussolente\",4572 => \"/meteo/Mussomeli\",4573 => \"/meteo/Muzzana+del+turgnano\",4574 => \"/meteo/Muzzano\",4575 => \"/meteo/Nago+torbole\",4576 => \"/meteo/Nalles\",4577 => \"/meteo/Nanno\",4578 => \"/meteo/Nanto\",4579 => \"/meteo/Napoli\",8498 => \"/meteo/Napoli+Capodichino\",4580 => \"/meteo/Narbolia\",4581 => \"/meteo/Narcao\",4582 => \"/meteo/Nardo'\",4583 => \"/meteo/Nardodipace\",4584 => \"/meteo/Narni\",4585 => \"/meteo/Naro\",4586 => \"/meteo/Narzole\",4587 => \"/meteo/Nasino\",4588 => \"/meteo/Naso\",4589 => \"/meteo/Naturno\",4590 => \"/meteo/Nave\",4591 => \"/meteo/Nave+san+rocco\",4592 => \"/meteo/Navelli\",4593 => \"/meteo/Naz+Sciaves\",4594 => \"/meteo/Nazzano\",4595 => \"/meteo/Ne\",4596 => \"/meteo/Nebbiuno\",4597 => \"/meteo/Negrar\",4598 => \"/meteo/Neirone\",4599 => \"/meteo/Neive\",4600 => \"/meteo/Nembro\",4601 => \"/meteo/Nemi\",8381 => \"/meteo/Nemoli\",4603 => \"/meteo/Neoneli\",4604 => \"/meteo/Nepi\",4605 => \"/meteo/Nereto\",4606 => \"/meteo/Nerola\",4607 => \"/meteo/Nervesa+della+battaglia\",4608 => \"/meteo/Nerviano\",4609 => \"/meteo/Nespolo\",4610 => \"/meteo/Nesso\",4611 => \"/meteo/Netro\",4612 => \"/meteo/Nettuno\",4613 => \"/meteo/Neviano\",4614 => \"/meteo/Neviano+degli+arduini\",4615 => \"/meteo/Neviglie\",4616 => \"/meteo/Niardo\",4617 => \"/meteo/Nibbiano\",4618 => \"/meteo/Nibbiola\",4619 => \"/meteo/Nibionno\",4620 => \"/meteo/Nichelino\",4621 => \"/meteo/Nicolosi\",4622 => \"/meteo/Nicorvo\",4623 => \"/meteo/Nicosia\",4624 => \"/meteo/Nicotera\",8117 => \"/meteo/Nicotera+Marina\",4625 => \"/meteo/Niella+belbo\",8475 => \"/meteo/Niella+Tanaro\",4627 => \"/meteo/Nimis\",4628 => \"/meteo/Niscemi\",4629 => \"/meteo/Nissoria\",4630 => \"/meteo/Nizza+di+sicilia\",4631 => \"/meteo/Nizza+monferrato\",4632 => \"/meteo/Noale\",4633 => \"/meteo/Noasca\",4634 => \"/meteo/Nocara\",4635 => \"/meteo/Nocciano\",4636 => \"/meteo/Nocera+inferiore\",4637 => \"/meteo/Nocera+superiore\",4638 => \"/meteo/Nocera+terinese\",4639 => \"/meteo/Nocera+umbra\",4640 => \"/meteo/Noceto\",4641 => \"/meteo/Noci\",4642 => \"/meteo/Nociglia\",8375 => \"/meteo/Noepoli\",4644 => \"/meteo/Nogara\",4645 => \"/meteo/Nogaredo\",4646 => \"/meteo/Nogarole+rocca\",4647 => \"/meteo/Nogarole+vicentino\",4648 => \"/meteo/Noicattaro\",4649 => \"/meteo/Nola\",4650 => \"/meteo/Nole\",4651 => \"/meteo/Noli\",4652 => \"/meteo/Nomaglio\",4653 => \"/meteo/Nomi\",4654 => \"/meteo/Nonantola\",4655 => \"/meteo/None\",4656 => \"/meteo/Nonio\",4657 => \"/meteo/Noragugume\",4658 => \"/meteo/Norbello\",4659 => \"/meteo/Norcia\",4660 => \"/meteo/Norma\",4661 => \"/meteo/Nosate\",4662 => \"/meteo/Notaresco\",4663 => \"/meteo/Noto\",4664 => \"/meteo/Nova+Levante\",4665 => \"/meteo/Nova+milanese\",4666 => \"/meteo/Nova+Ponente\",8428 => \"/meteo/Nova+siri\",4668 => \"/meteo/Novafeltria\",4669 => \"/meteo/Novaledo\",4670 => \"/meteo/Novalesa\",4671 => \"/meteo/Novara\",4672 => \"/meteo/Novara+di+Sicilia\",4673 => \"/meteo/Novate+mezzola\",4674 => \"/meteo/Novate+milanese\",4675 => \"/meteo/Nove\",4676 => \"/meteo/Novedrate\",4677 => \"/meteo/Novellara\",4678 => \"/meteo/Novello\",4679 => \"/meteo/Noventa+di+piave\",4680 => \"/meteo/Noventa+padovana\",4681 => \"/meteo/Noventa+vicentina\",4682 => \"/meteo/Novi+di+modena\",4683 => \"/meteo/Novi+ligure\",4684 => \"/meteo/Novi+velia\",4685 => \"/meteo/Noviglio\",4686 => \"/meteo/Novoli\",4687 => \"/meteo/Nucetto\",4688 => \"/meteo/Nughedu+di+san+nicolo'\",4689 => \"/meteo/Nughedu+santa+vittoria\",4690 => \"/meteo/Nule\",4691 => \"/meteo/Nulvi\",4692 => \"/meteo/Numana\",4693 => \"/meteo/Nuoro\",4694 => \"/meteo/Nurachi\",4695 => \"/meteo/Nuragus\",4696 => \"/meteo/Nurallao\",4697 => \"/meteo/Nuraminis\",4698 => \"/meteo/Nureci\",4699 => \"/meteo/Nurri\",4700 => \"/meteo/Nus\",4701 => \"/meteo/Nusco\",4702 => \"/meteo/Nuvolento\",4703 => \"/meteo/Nuvolera\",4704 => \"/meteo/Nuxis\",8260 => \"/meteo/Obereggen\",4705 => \"/meteo/Occhieppo+inferiore\",4706 => \"/meteo/Occhieppo+superiore\",4707 => \"/meteo/Occhiobello\",4708 => \"/meteo/Occimiano\",4709 => \"/meteo/Ocre\",4710 => \"/meteo/Odalengo+grande\",4711 => \"/meteo/Odalengo+piccolo\",4712 => \"/meteo/Oderzo\",4713 => \"/meteo/Odolo\",4714 => \"/meteo/Ofena\",4715 => \"/meteo/Offagna\",4716 => \"/meteo/Offanengo\",4717 => \"/meteo/Offida\",4718 => \"/meteo/Offlaga\",4719 => \"/meteo/Oggebbio\",4720 => \"/meteo/Oggiona+con+santo+stefano\",4721 => \"/meteo/Oggiono\",4722 => \"/meteo/Oglianico\",4723 => \"/meteo/Ogliastro+cilento\",4724 => \"/meteo/Olbia\",8470 => \"/meteo/Olbia+Costa+Smeralda\",4725 => \"/meteo/Olcenengo\",4726 => \"/meteo/Oldenico\",4727 => \"/meteo/Oleggio\",4728 => \"/meteo/Oleggio+castello\",4729 => \"/meteo/Olevano+di+lomellina\",4730 => \"/meteo/Olevano+romano\",4731 => \"/meteo/Olevano+sul+tusciano\",4732 => \"/meteo/Olgiate+comasco\",4733 => \"/meteo/Olgiate+molgora\",4734 => \"/meteo/Olgiate+olona\",4735 => \"/meteo/Olginate\",4736 => \"/meteo/Oliena\",4737 => \"/meteo/Oliva+gessi\",4738 => \"/meteo/Olivadi\",4739 => \"/meteo/Oliveri\",4740 => \"/meteo/Oliveto+citra\",4741 => \"/meteo/Oliveto+lario\",8426 => \"/meteo/Oliveto+lucano\",4743 => \"/meteo/Olivetta+san+michele\",4744 => \"/meteo/Olivola\",4745 => \"/meteo/Ollastra+simaxis\",4746 => \"/meteo/Ollolai\",4747 => \"/meteo/Ollomont\",4748 => \"/meteo/Olmedo\",4749 => \"/meteo/Olmeneta\",4750 => \"/meteo/Olmo+al+brembo\",4751 => \"/meteo/Olmo+gentile\",4752 => \"/meteo/Oltre+il+colle\",4753 => \"/meteo/Oltressenda+alta\",4754 => \"/meteo/Oltrona+di+san+mamette\",4755 => \"/meteo/Olzai\",4756 => \"/meteo/Ome\",4757 => \"/meteo/Omegna\",4758 => \"/meteo/Omignano\",4759 => \"/meteo/Onani\",4760 => \"/meteo/Onano\",4761 => \"/meteo/Oncino\",8283 => \"/meteo/Oneglia\",4762 => \"/meteo/Oneta\",4763 => \"/meteo/Onifai\",4764 => \"/meteo/Oniferi\",8664 => \"/meteo/Onna\",4765 => \"/meteo/Ono+san+pietro\",4766 => \"/meteo/Onore\",4767 => \"/meteo/Onzo\",4768 => \"/meteo/Opera\",4769 => \"/meteo/Opi\",4770 => \"/meteo/Oppeano\",8409 => \"/meteo/Oppido+lucano\",4772 => \"/meteo/Oppido+mamertina\",4773 => \"/meteo/Ora\",4774 => \"/meteo/Orani\",4775 => \"/meteo/Oratino\",4776 => \"/meteo/Orbassano\",4777 => \"/meteo/Orbetello\",4778 => \"/meteo/Orciano+di+pesaro\",4779 => \"/meteo/Orciano+pisano\",4780 => \"/meteo/Orco+feglino\",4781 => \"/meteo/Ordona\",4782 => \"/meteo/Orero\",4783 => \"/meteo/Orgiano\",4784 => \"/meteo/Orgosolo\",4785 => \"/meteo/Oria\",4786 => \"/meteo/Oricola\",4787 => \"/meteo/Origgio\",4788 => \"/meteo/Orino\",4789 => \"/meteo/Orio+al+serio\",4790 => \"/meteo/Orio+canavese\",4791 => \"/meteo/Orio+litta\",4792 => \"/meteo/Oriolo\",4793 => \"/meteo/Oriolo+romano\",4794 => \"/meteo/Oristano\",4795 => \"/meteo/Ormea\",4796 => \"/meteo/Ormelle\",4797 => \"/meteo/Ornago\",4798 => \"/meteo/Ornavasso\",4799 => \"/meteo/Ornica\",8348 => \"/meteo/Oropa\",8169 => \"/meteo/Orosei\",4801 => \"/meteo/Orotelli\",4802 => \"/meteo/Orria\",4803 => \"/meteo/Orroli\",4804 => \"/meteo/Orsago\",4805 => \"/meteo/Orsara+bormida\",4806 => \"/meteo/Orsara+di+puglia\",4807 => \"/meteo/Orsenigo\",4808 => \"/meteo/Orsogna\",4809 => \"/meteo/Orsomarso\",4810 => \"/meteo/Orta+di+atella\",4811 => \"/meteo/Orta+nova\",4812 => \"/meteo/Orta+san+giulio\",4813 => \"/meteo/Ortacesus\",4814 => \"/meteo/Orte\",8460 => \"/meteo/Orte+casello\",4815 => \"/meteo/Ortelle\",4816 => \"/meteo/Ortezzano\",4817 => \"/meteo/Ortignano+raggiolo\",4818 => \"/meteo/Ortisei\",8725 => \"/meteo/Ortles\",4819 => \"/meteo/Ortona\",4820 => \"/meteo/Ortona+dei+marsi\",4821 => \"/meteo/Ortonovo\",4822 => \"/meteo/Ortovero\",4823 => \"/meteo/Ortucchio\",4824 => \"/meteo/Ortueri\",4825 => \"/meteo/Orune\",4826 => \"/meteo/Orvieto\",8459 => \"/meteo/Orvieto+casello\",4827 => \"/meteo/Orvinio\",4828 => \"/meteo/Orzinuovi\",4829 => \"/meteo/Orzivecchi\",4830 => \"/meteo/Osasco\",4831 => \"/meteo/Osasio\",4832 => \"/meteo/Oschiri\",4833 => \"/meteo/Osidda\",4834 => \"/meteo/Osiglia\",4835 => \"/meteo/Osilo\",4836 => \"/meteo/Osimo\",4837 => \"/meteo/Osini\",4838 => \"/meteo/Osio+sopra\",4839 => \"/meteo/Osio+sotto\",4840 => \"/meteo/Osmate\",4841 => \"/meteo/Osnago\",8465 => \"/meteo/Osoppo\",4843 => \"/meteo/Ospedaletti\",4844 => \"/meteo/Ospedaletto\",4845 => \"/meteo/Ospedaletto+d'alpinolo\",4846 => \"/meteo/Ospedaletto+euganeo\",4847 => \"/meteo/Ospedaletto+lodigiano\",4848 => \"/meteo/Ospitale+di+cadore\",4849 => \"/meteo/Ospitaletto\",4850 => \"/meteo/Ossago+lodigiano\",4851 => \"/meteo/Ossana\",4852 => \"/meteo/Ossi\",4853 => \"/meteo/Ossimo\",4854 => \"/meteo/Ossona\",4855 => \"/meteo/Ossuccio\",4856 => \"/meteo/Ostana\",4857 => \"/meteo/Ostellato\",4858 => \"/meteo/Ostiano\",4859 => \"/meteo/Ostiglia\",4860 => \"/meteo/Ostra\",4861 => \"/meteo/Ostra+vetere\",4862 => \"/meteo/Ostuni\",4863 => \"/meteo/Otranto\",4864 => \"/meteo/Otricoli\",4865 => \"/meteo/Ottana\",4866 => \"/meteo/Ottati\",4867 => \"/meteo/Ottaviano\",4868 => \"/meteo/Ottiglio\",4869 => \"/meteo/Ottobiano\",4870 => \"/meteo/Ottone\",4871 => \"/meteo/Oulx\",4872 => \"/meteo/Ovada\",4873 => \"/meteo/Ovaro\",4874 => \"/meteo/Oviglio\",4875 => \"/meteo/Ovindoli\",4876 => \"/meteo/Ovodda\",4877 => \"/meteo/Oyace\",4878 => \"/meteo/Ozegna\",4879 => \"/meteo/Ozieri\",4880 => \"/meteo/Ozzano+dell'emilia\",4881 => \"/meteo/Ozzano+monferrato\",4882 => \"/meteo/Ozzero\",4883 => \"/meteo/Pabillonis\",4884 => \"/meteo/Pace+del+mela\",4885 => \"/meteo/Paceco\",4886 => \"/meteo/Pacentro\",4887 => \"/meteo/Pachino\",4888 => \"/meteo/Paciano\",4889 => \"/meteo/Padenghe+sul+garda\",4890 => \"/meteo/Padergnone\",4891 => \"/meteo/Paderna\",4892 => \"/meteo/Paderno+d'adda\",4893 => \"/meteo/Paderno+del+grappa\",4894 => \"/meteo/Paderno+dugnano\",4895 => \"/meteo/Paderno+franciacorta\",4896 => \"/meteo/Paderno+ponchielli\",4897 => \"/meteo/Padova\",4898 => \"/meteo/Padria\",4899 => \"/meteo/Padru\",4900 => \"/meteo/Padula\",4901 => \"/meteo/Paduli\",4902 => \"/meteo/Paesana\",4903 => \"/meteo/Paese\",8713 => \"/meteo/Paestum\",8203 => \"/meteo/Paganella\",4904 => \"/meteo/Pagani\",8663 => \"/meteo/Paganica\",4905 => \"/meteo/Paganico\",4906 => \"/meteo/Pagazzano\",4907 => \"/meteo/Pagliara\",4908 => \"/meteo/Paglieta\",4909 => \"/meteo/Pagnacco\",4910 => \"/meteo/Pagno\",4911 => \"/meteo/Pagnona\",4912 => \"/meteo/Pago+del+vallo+di+lauro\",4913 => \"/meteo/Pago+veiano\",4914 => \"/meteo/Paisco+loveno\",4915 => \"/meteo/Paitone\",4916 => \"/meteo/Paladina\",8534 => \"/meteo/Palafavera\",4917 => \"/meteo/Palagano\",4918 => \"/meteo/Palagianello\",4919 => \"/meteo/Palagiano\",4920 => \"/meteo/Palagonia\",4921 => \"/meteo/Palaia\",4922 => \"/meteo/Palanzano\",4923 => \"/meteo/Palata\",4924 => \"/meteo/Palau\",4925 => \"/meteo/Palazzago\",4926 => \"/meteo/Palazzo+adriano\",4927 => \"/meteo/Palazzo+canavese\",4928 => \"/meteo/Palazzo+pignano\",4929 => \"/meteo/Palazzo+san+gervasio\",4930 => \"/meteo/Palazzolo+acreide\",4931 => \"/meteo/Palazzolo+dello+stella\",4932 => \"/meteo/Palazzolo+sull'Oglio\",4933 => \"/meteo/Palazzolo+vercellese\",4934 => \"/meteo/Palazzuolo+sul+senio\",4935 => \"/meteo/Palena\",4936 => \"/meteo/Palermiti\",4937 => \"/meteo/Palermo\",8575 => \"/meteo/Palermo+Boccadifalco\",8272 => \"/meteo/Palermo+Punta+Raisi\",4938 => \"/meteo/Palestrina\",4939 => \"/meteo/Palestro\",4940 => \"/meteo/Paliano\",8121 => \"/meteo/Palinuro\",4941 => \"/meteo/Palizzi\",8108 => \"/meteo/Palizzi+Marina\",4942 => \"/meteo/Pallagorio\",4943 => \"/meteo/Pallanzeno\",4944 => \"/meteo/Pallare\",4945 => \"/meteo/Palma+campania\",4946 => \"/meteo/Palma+di+montechiaro\",4947 => \"/meteo/Palmanova\",4948 => \"/meteo/Palmariggi\",4949 => \"/meteo/Palmas+arborea\",4950 => \"/meteo/Palmi\",4951 => \"/meteo/Palmiano\",4952 => \"/meteo/Palmoli\",4953 => \"/meteo/Palo+del+colle\",4954 => \"/meteo/Palombara+sabina\",4955 => \"/meteo/Palombaro\",4956 => \"/meteo/Palomonte\",4957 => \"/meteo/Palosco\",4958 => \"/meteo/Palu'\",4959 => \"/meteo/Palu'+del+fersina\",4960 => \"/meteo/Paludi\",4961 => \"/meteo/Paluzza\",4962 => \"/meteo/Pamparato\",8257 => \"/meteo/Pampeago\",8753 => \"/meteo/Panarotta\",4963 => \"/meteo/Pancalieri\",8261 => \"/meteo/Pancani\",4964 => \"/meteo/Pancarana\",4965 => \"/meteo/Panchia'\",4966 => \"/meteo/Pandino\",4967 => \"/meteo/Panettieri\",4968 => \"/meteo/Panicale\",4969 => \"/meteo/Pannarano\",4970 => \"/meteo/Panni\",4971 => \"/meteo/Pantelleria\",4972 => \"/meteo/Pantigliate\",4973 => \"/meteo/Paola\",4974 => \"/meteo/Paolisi\",4975 => \"/meteo/Papasidero\",4976 => \"/meteo/Papozze\",4977 => \"/meteo/Parabiago\",4978 => \"/meteo/Parabita\",4979 => \"/meteo/Paratico\",4980 => \"/meteo/Parcines\",4981 => \"/meteo/Pare'\",4982 => \"/meteo/Parella\",4983 => \"/meteo/Parenti\",4984 => \"/meteo/Parete\",4985 => \"/meteo/Pareto\",4986 => \"/meteo/Parghelia\",4987 => \"/meteo/Parlasco\",4988 => \"/meteo/Parma\",8554 => \"/meteo/Parma+Verdi\",4989 => \"/meteo/Parodi+ligure\",4990 => \"/meteo/Paroldo\",4991 => \"/meteo/Parolise\",4992 => \"/meteo/Parona\",4993 => \"/meteo/Parrano\",4994 => \"/meteo/Parre\",4995 => \"/meteo/Partanna\",4996 => \"/meteo/Partinico\",4997 => \"/meteo/Paruzzaro\",4998 => \"/meteo/Parzanica\",4999 => \"/meteo/Pasian+di+prato\",5000 => \"/meteo/Pasiano+di+pordenone\",5001 => \"/meteo/Paspardo\",5002 => \"/meteo/Passerano+Marmorito\",5003 => \"/meteo/Passignano+sul+trasimeno\",5004 => \"/meteo/Passirano\",8613 => \"/meteo/Passo+Bernina\",8760 => \"/meteo/Passo+Campolongo\",8329 => \"/meteo/Passo+Costalunga\",8618 => \"/meteo/Passo+dei+Salati\",8207 => \"/meteo/Passo+del+Brennero\",8577 => \"/meteo/Passo+del+Brocon\",8627 => \"/meteo/Passo+del+Cerreto\",8147 => \"/meteo/Passo+del+Foscagno\",8308 => \"/meteo/Passo+del+Lupo\",8206 => \"/meteo/Passo+del+Rombo\",8150 => \"/meteo/Passo+del+Tonale\",8196 => \"/meteo/Passo+della+Cisa\",8235 => \"/meteo/Passo+della+Consuma\",8290 => \"/meteo/Passo+della+Presolana\",8659 => \"/meteo/Passo+delle+Fittanze\",8145 => \"/meteo/Passo+dello+Stelvio\",8213 => \"/meteo/Passo+di+Resia\",8752 => \"/meteo/Passo+di+Vezzena\",8328 => \"/meteo/Passo+Fedaia\",8759 => \"/meteo/Passo+Gardena\",8277 => \"/meteo/Passo+Groste'\",8756 => \"/meteo/Passo+Lanciano\",8280 => \"/meteo/Passo+Pordoi\",8626 => \"/meteo/Passo+Pramollo\",8210 => \"/meteo/Passo+Rolle\",8279 => \"/meteo/Passo+San+Pellegrino\",8325 => \"/meteo/Passo+Sella\",5005 => \"/meteo/Pastena\",5006 => \"/meteo/Pastorano\",5007 => \"/meteo/Pastrengo\",5008 => \"/meteo/Pasturana\",5009 => \"/meteo/Pasturo\",8417 => \"/meteo/Paterno\",5011 => \"/meteo/Paterno+calabro\",5012 => \"/meteo/Paterno'\",5013 => \"/meteo/Paternopoli\",5014 => \"/meteo/Patrica\",5015 => \"/meteo/Pattada\",5016 => \"/meteo/Patti\",5017 => \"/meteo/Patu'\",5018 => \"/meteo/Pau\",5019 => \"/meteo/Paularo\",5020 => \"/meteo/Pauli+arbarei\",5021 => \"/meteo/Paulilatino\",5022 => \"/meteo/Paullo\",5023 => \"/meteo/Paupisi\",5024 => \"/meteo/Pavarolo\",5025 => \"/meteo/Pavia\",5026 => \"/meteo/Pavia+di+udine\",5027 => \"/meteo/Pavone+canavese\",5028 => \"/meteo/Pavone+del+mella\",5029 => \"/meteo/Pavullo+nel+frignano\",5030 => \"/meteo/Pazzano\",5031 => \"/meteo/Peccioli\",5032 => \"/meteo/Pecco\",5033 => \"/meteo/Pecetto+di+valenza\",5034 => \"/meteo/Pecetto+torinese\",5035 => \"/meteo/Pecorara\",5036 => \"/meteo/Pedace\",5037 => \"/meteo/Pedara\",5038 => \"/meteo/Pedaso\",5039 => \"/meteo/Pedavena\",5040 => \"/meteo/Pedemonte\",5041 => \"/meteo/Pederobba\",5042 => \"/meteo/Pedesina\",5043 => \"/meteo/Pedivigliano\",8473 => \"/meteo/Pedraces\",5044 => \"/meteo/Pedrengo\",5045 => \"/meteo/Peglio\",5046 => \"/meteo/Peglio\",5047 => \"/meteo/Pegognaga\",5048 => \"/meteo/Peia\",8665 => \"/meteo/Pejo\",5050 => \"/meteo/Pelago\",5051 => \"/meteo/Pella\",5052 => \"/meteo/Pellegrino+parmense\",5053 => \"/meteo/Pellezzano\",5054 => \"/meteo/Pellio+intelvi\",5055 => \"/meteo/Pellizzano\",5056 => \"/meteo/Pelugo\",5057 => \"/meteo/Penango\",5058 => \"/meteo/Penna+in+teverina\",5059 => \"/meteo/Penna+san+giovanni\",5060 => \"/meteo/Penna+sant'andrea\",5061 => \"/meteo/Pennabilli\",5062 => \"/meteo/Pennadomo\",5063 => \"/meteo/Pennapiedimonte\",5064 => \"/meteo/Penne\",8208 => \"/meteo/Pennes\",5065 => \"/meteo/Pentone\",5066 => \"/meteo/Perano\",5067 => \"/meteo/Perarolo+di+cadore\",5068 => \"/meteo/Perca\",5069 => \"/meteo/Percile\",5070 => \"/meteo/Perdasdefogu\",5071 => \"/meteo/Perdaxius\",5072 => \"/meteo/Perdifumo\",5073 => \"/meteo/Perego\",5074 => \"/meteo/Pereto\",5075 => \"/meteo/Perfugas\",5076 => \"/meteo/Pergine+valdarno\",5077 => \"/meteo/Pergine+valsugana\",5078 => \"/meteo/Pergola\",5079 => \"/meteo/Perinaldo\",5080 => \"/meteo/Perito\",5081 => \"/meteo/Perledo\",5082 => \"/meteo/Perletto\",5083 => \"/meteo/Perlo\",5084 => \"/meteo/Perloz\",5085 => \"/meteo/Pernumia\",5086 => \"/meteo/Pero\",5087 => \"/meteo/Perosa+argentina\",5088 => \"/meteo/Perosa+canavese\",5089 => \"/meteo/Perrero\",5090 => \"/meteo/Persico+dosimo\",5091 => \"/meteo/Pertengo\",5092 => \"/meteo/Pertica+alta\",5093 => \"/meteo/Pertica+bassa\",8586 => \"/meteo/Perticara+di+Novafeltria\",5094 => \"/meteo/Pertosa\",5095 => \"/meteo/Pertusio\",5096 => \"/meteo/Perugia\",8555 => \"/meteo/Perugia+Sant'Egidio\",5097 => \"/meteo/Pesaro\",5098 => \"/meteo/Pescaglia\",5099 => \"/meteo/Pescantina\",5100 => \"/meteo/Pescara\",8275 => \"/meteo/Pescara+Liberi\",5101 => \"/meteo/Pescarolo+ed+uniti\",5102 => \"/meteo/Pescasseroli\",5103 => \"/meteo/Pescate\",8312 => \"/meteo/Pescegallo\",5104 => \"/meteo/Pesche\",5105 => \"/meteo/Peschici\",5106 => \"/meteo/Peschiera+borromeo\",5107 => \"/meteo/Peschiera+del+garda\",5108 => \"/meteo/Pescia\",5109 => \"/meteo/Pescina\",8454 => \"/meteo/Pescina+casello\",5110 => \"/meteo/Pesco+sannita\",5111 => \"/meteo/Pescocostanzo\",5112 => \"/meteo/Pescolanciano\",5113 => \"/meteo/Pescopagano\",5114 => \"/meteo/Pescopennataro\",5115 => \"/meteo/Pescorocchiano\",5116 => \"/meteo/Pescosansonesco\",5117 => \"/meteo/Pescosolido\",5118 => \"/meteo/Pessano+con+Bornago\",5119 => \"/meteo/Pessina+cremonese\",5120 => \"/meteo/Pessinetto\",5121 => \"/meteo/Petacciato\",5122 => \"/meteo/Petilia+policastro\",5123 => \"/meteo/Petina\",5124 => \"/meteo/Petralia+soprana\",5125 => \"/meteo/Petralia+sottana\",5126 => \"/meteo/Petrella+salto\",5127 => \"/meteo/Petrella+tifernina\",5128 => \"/meteo/Petriano\",5129 => \"/meteo/Petriolo\",5130 => \"/meteo/Petritoli\",5131 => \"/meteo/Petrizzi\",5132 => \"/meteo/Petrona'\",5133 => \"/meteo/Petrosino\",5134 => \"/meteo/Petruro+irpino\",5135 => \"/meteo/Pettenasco\",5136 => \"/meteo/Pettinengo\",5137 => \"/meteo/Pettineo\",5138 => \"/meteo/Pettoranello+del+molise\",5139 => \"/meteo/Pettorano+sul+gizio\",5140 => \"/meteo/Pettorazza+grimani\",5141 => \"/meteo/Peveragno\",5142 => \"/meteo/Pezzana\",5143 => \"/meteo/Pezzaze\",5144 => \"/meteo/Pezzolo+valle+uzzone\",5145 => \"/meteo/Piacenza\",5146 => \"/meteo/Piacenza+d'adige\",5147 => \"/meteo/Piadena\",5148 => \"/meteo/Piagge\",5149 => \"/meteo/Piaggine\",8706 => \"/meteo/Piamprato\",5150 => \"/meteo/Pian+camuno\",8309 => \"/meteo/Pian+Cavallaro\",8233 => \"/meteo/Pian+del+Cansiglio\",8642 => \"/meteo/Pian+del+Frais\",8705 => \"/meteo/Pian+della+Mussa\",8634 => \"/meteo/Pian+delle+Betulle\",5151 => \"/meteo/Pian+di+sco'\",8712 => \"/meteo/Pian+di+Sole\",5152 => \"/meteo/Piana+crixia\",5153 => \"/meteo/Piana+degli+albanesi\",8653 => \"/meteo/Piana+di+Marcesina\",5154 => \"/meteo/Piana+di+monte+verna\",8305 => \"/meteo/Pianalunga\",5155 => \"/meteo/Piancastagnaio\",8516 => \"/meteo/Piancavallo\",5156 => \"/meteo/Piancogno\",5157 => \"/meteo/Piandimeleto\",5158 => \"/meteo/Piane+crati\",8561 => \"/meteo/Piane+di+Mocogno\",5159 => \"/meteo/Pianella\",5160 => \"/meteo/Pianello+del+lario\",5161 => \"/meteo/Pianello+val+tidone\",5162 => \"/meteo/Pianengo\",5163 => \"/meteo/Pianezza\",5164 => \"/meteo/Pianezze\",5165 => \"/meteo/Pianfei\",8605 => \"/meteo/Piani+d'Erna\",8517 => \"/meteo/Piani+di+Artavaggio\",8234 => \"/meteo/Piani+di+Bobbio\",5166 => \"/meteo/Pianico\",5167 => \"/meteo/Pianiga\",8314 => \"/meteo/Piano+del+Voglio\",5168 => \"/meteo/Piano+di+Sorrento\",8630 => \"/meteo/Piano+Provenzana\",5169 => \"/meteo/Pianopoli\",5170 => \"/meteo/Pianoro\",5171 => \"/meteo/Piansano\",5172 => \"/meteo/Piantedo\",5173 => \"/meteo/Piario\",5174 => \"/meteo/Piasco\",5175 => \"/meteo/Piateda\",5176 => \"/meteo/Piatto\",5177 => \"/meteo/Piazza+al+serchio\",5178 => \"/meteo/Piazza+armerina\",5179 => \"/meteo/Piazza+brembana\",5180 => \"/meteo/Piazzatorre\",5181 => \"/meteo/Piazzola+sul+brenta\",5182 => \"/meteo/Piazzolo\",5183 => \"/meteo/Picciano\",5184 => \"/meteo/Picerno\",5185 => \"/meteo/Picinisco\",5186 => \"/meteo/Pico\",5187 => \"/meteo/Piea\",5188 => \"/meteo/Piedicavallo\",8218 => \"/meteo/Piediluco\",5189 => \"/meteo/Piedimonte+etneo\",5190 => \"/meteo/Piedimonte+matese\",5191 => \"/meteo/Piedimonte+san+germano\",5192 => \"/meteo/Piedimulera\",5193 => \"/meteo/Piegaro\",5194 => \"/meteo/Pienza\",5195 => \"/meteo/Pieranica\",5196 => \"/meteo/Pietra+de'giorgi\",5197 => \"/meteo/Pietra+ligure\",5198 => \"/meteo/Pietra+marazzi\",5199 => \"/meteo/Pietrabbondante\",5200 => \"/meteo/Pietrabruna\",5201 => \"/meteo/Pietracamela\",5202 => \"/meteo/Pietracatella\",5203 => \"/meteo/Pietracupa\",5204 => \"/meteo/Pietradefusi\",5205 => \"/meteo/Pietraferrazzana\",5206 => \"/meteo/Pietrafitta\",5207 => \"/meteo/Pietragalla\",5208 => \"/meteo/Pietralunga\",5209 => \"/meteo/Pietramelara\",5210 => \"/meteo/Pietramontecorvino\",5211 => \"/meteo/Pietranico\",5212 => \"/meteo/Pietrapaola\",5213 => \"/meteo/Pietrapertosa\",5214 => \"/meteo/Pietraperzia\",5215 => \"/meteo/Pietraporzio\",5216 => \"/meteo/Pietraroja\",5217 => \"/meteo/Pietrarubbia\",5218 => \"/meteo/Pietrasanta\",5219 => \"/meteo/Pietrastornina\",5220 => \"/meteo/Pietravairano\",5221 => \"/meteo/Pietrelcina\",5222 => \"/meteo/Pieve+a+nievole\",5223 => \"/meteo/Pieve+albignola\",5224 => \"/meteo/Pieve+d'alpago\",5225 => \"/meteo/Pieve+d'olmi\",5226 => \"/meteo/Pieve+del+cairo\",5227 => \"/meteo/Pieve+di+bono\",5228 => \"/meteo/Pieve+di+cadore\",5229 => \"/meteo/Pieve+di+cento\",5230 => \"/meteo/Pieve+di+coriano\",5231 => \"/meteo/Pieve+di+ledro\",5232 => \"/meteo/Pieve+di+soligo\",5233 => \"/meteo/Pieve+di+teco\",5234 => \"/meteo/Pieve+emanuele\",5235 => \"/meteo/Pieve+fissiraga\",5236 => \"/meteo/Pieve+fosciana\",5237 => \"/meteo/Pieve+ligure\",5238 => \"/meteo/Pieve+porto+morone\",5239 => \"/meteo/Pieve+san+giacomo\",5240 => \"/meteo/Pieve+santo+stefano\",5241 => \"/meteo/Pieve+tesino\",5242 => \"/meteo/Pieve+torina\",5243 => \"/meteo/Pieve+vergonte\",5244 => \"/meteo/Pievebovigliana\",5245 => \"/meteo/Pievepelago\",5246 => \"/meteo/Piglio\",5247 => \"/meteo/Pigna\",5248 => \"/meteo/Pignataro+interamna\",5249 => \"/meteo/Pignataro+maggiore\",5250 => \"/meteo/Pignola\",5251 => \"/meteo/Pignone\",5252 => \"/meteo/Pigra\",5253 => \"/meteo/Pila\",8221 => \"/meteo/Pila\",5254 => \"/meteo/Pimentel\",5255 => \"/meteo/Pimonte\",5256 => \"/meteo/Pinarolo+po\",5257 => \"/meteo/Pinasca\",5258 => \"/meteo/Pincara\",5259 => \"/meteo/Pinerolo\",5260 => \"/meteo/Pineto\",5261 => \"/meteo/Pino+d'asti\",5262 => \"/meteo/Pino+sulla+sponda+del+lago+magg.\",5263 => \"/meteo/Pino+torinese\",5264 => \"/meteo/Pinzano+al+tagliamento\",5265 => \"/meteo/Pinzolo\",5266 => \"/meteo/Piobbico\",5267 => \"/meteo/Piobesi+d'alba\",5268 => \"/meteo/Piobesi+torinese\",5269 => \"/meteo/Piode\",5270 => \"/meteo/Pioltello\",5271 => \"/meteo/Piombino\",5272 => \"/meteo/Piombino+dese\",5273 => \"/meteo/Pioraco\",5274 => \"/meteo/Piossasco\",5275 => \"/meteo/Piova'+massaia\",5276 => \"/meteo/Piove+di+sacco\",5277 => \"/meteo/Piovene+rocchette\",5278 => \"/meteo/Piovera\",5279 => \"/meteo/Piozzano\",5280 => \"/meteo/Piozzo\",5281 => \"/meteo/Piraino\",5282 => \"/meteo/Pisa\",8518 => \"/meteo/Pisa+San+Giusto\",5283 => \"/meteo/Pisano\",5284 => \"/meteo/Piscina\",5285 => \"/meteo/Piscinas\",5286 => \"/meteo/Pisciotta\",5287 => \"/meteo/Pisogne\",5288 => \"/meteo/Pisoniano\",5289 => \"/meteo/Pisticci\",5290 => \"/meteo/Pistoia\",5291 => \"/meteo/Piteglio\",5292 => \"/meteo/Pitigliano\",5293 => \"/meteo/Piubega\",5294 => \"/meteo/Piuro\",5295 => \"/meteo/Piverone\",5296 => \"/meteo/Pizzale\",5297 => \"/meteo/Pizzighettone\",5298 => \"/meteo/Pizzo\",8737 => \"/meteo/Pizzo+Arera\",8727 => \"/meteo/Pizzo+Bernina\",8736 => \"/meteo/Pizzo+dei+Tre+Signori\",8739 => \"/meteo/Pizzo+della+Presolana\",5299 => \"/meteo/Pizzoferrato\",5300 => \"/meteo/Pizzoli\",5301 => \"/meteo/Pizzone\",5302 => \"/meteo/Pizzoni\",5303 => \"/meteo/Placanica\",8342 => \"/meteo/Plaghera\",8685 => \"/meteo/Plain+Maison\",8324 => \"/meteo/Plain+Mason\",8337 => \"/meteo/Plan\",8469 => \"/meteo/Plan+Boè\",8633 => \"/meteo/Plan+Checrouit\",8204 => \"/meteo/Plan+de+Corones\",8576 => \"/meteo/Plan+in+Passiria\",5304 => \"/meteo/Plataci\",5305 => \"/meteo/Platania\",8241 => \"/meteo/Plateau+Rosa\",5306 => \"/meteo/Plati'\",5307 => \"/meteo/Plaus\",5308 => \"/meteo/Plesio\",5309 => \"/meteo/Ploaghe\",5310 => \"/meteo/Plodio\",8569 => \"/meteo/Plose\",5311 => \"/meteo/Pocapaglia\",5312 => \"/meteo/Pocenia\",5313 => \"/meteo/Podenzana\",5314 => \"/meteo/Podenzano\",5315 => \"/meteo/Pofi\",5316 => \"/meteo/Poggiardo\",5317 => \"/meteo/Poggibonsi\",5318 => \"/meteo/Poggio+a+caiano\",5319 => \"/meteo/Poggio+berni\",5320 => \"/meteo/Poggio+bustone\",5321 => \"/meteo/Poggio+catino\",5322 => \"/meteo/Poggio+imperiale\",5323 => \"/meteo/Poggio+mirteto\",5324 => \"/meteo/Poggio+moiano\",5325 => \"/meteo/Poggio+nativo\",5326 => \"/meteo/Poggio+picenze\",5327 => \"/meteo/Poggio+renatico\",5328 => \"/meteo/Poggio+rusco\",5329 => \"/meteo/Poggio+san+lorenzo\",5330 => \"/meteo/Poggio+san+marcello\",5331 => \"/meteo/Poggio+san+vicino\",5332 => \"/meteo/Poggio+sannita\",5333 => \"/meteo/Poggiodomo\",5334 => \"/meteo/Poggiofiorito\",5335 => \"/meteo/Poggiomarino\",5336 => \"/meteo/Poggioreale\",5337 => \"/meteo/Poggiorsini\",5338 => \"/meteo/Poggiridenti\",5339 => \"/meteo/Pogliano+milanese\",8339 => \"/meteo/Pogliola\",5340 => \"/meteo/Pognana+lario\",5341 => \"/meteo/Pognano\",5342 => \"/meteo/Pogno\",5343 => \"/meteo/Poiana+maggiore\",5344 => \"/meteo/Poirino\",5345 => \"/meteo/Polaveno\",5346 => \"/meteo/Polcenigo\",5347 => \"/meteo/Polesella\",5348 => \"/meteo/Polesine+parmense\",5349 => \"/meteo/Poli\",5350 => \"/meteo/Polia\",5351 => \"/meteo/Policoro\",5352 => \"/meteo/Polignano+a+mare\",5353 => \"/meteo/Polinago\",5354 => \"/meteo/Polino\",5355 => \"/meteo/Polistena\",5356 => \"/meteo/Polizzi+generosa\",5357 => \"/meteo/Polla\",5358 => \"/meteo/Pollein\",5359 => \"/meteo/Pollena+trocchia\",5360 => \"/meteo/Pollenza\",5361 => \"/meteo/Pollica\",5362 => \"/meteo/Pollina\",5363 => \"/meteo/Pollone\",5364 => \"/meteo/Pollutri\",5365 => \"/meteo/Polonghera\",5366 => \"/meteo/Polpenazze+del+garda\",8650 => \"/meteo/Polsa+San+Valentino\",5367 => \"/meteo/Polverara\",5368 => \"/meteo/Polverigi\",5369 => \"/meteo/Pomarance\",5370 => \"/meteo/Pomaretto\",8384 => \"/meteo/Pomarico\",5372 => \"/meteo/Pomaro+monferrato\",5373 => \"/meteo/Pomarolo\",5374 => \"/meteo/Pombia\",5375 => \"/meteo/Pomezia\",5376 => \"/meteo/Pomigliano+d'arco\",5377 => \"/meteo/Pompei\",5378 => \"/meteo/Pompeiana\",5379 => \"/meteo/Pompiano\",5380 => \"/meteo/Pomponesco\",5381 => \"/meteo/Pompu\",5382 => \"/meteo/Poncarale\",5383 => \"/meteo/Ponderano\",5384 => \"/meteo/Ponna\",5385 => \"/meteo/Ponsacco\",5386 => \"/meteo/Ponso\",8220 => \"/meteo/Pont\",5389 => \"/meteo/Pont+canavese\",5427 => \"/meteo/Pont+Saint+Martin\",5387 => \"/meteo/Pontassieve\",5388 => \"/meteo/Pontboset\",5390 => \"/meteo/Ponte\",5391 => \"/meteo/Ponte+buggianese\",5392 => \"/meteo/Ponte+dell'olio\",5393 => \"/meteo/Ponte+di+legno\",5394 => \"/meteo/Ponte+di+piave\",5395 => \"/meteo/Ponte+Gardena\",5396 => \"/meteo/Ponte+in+valtellina\",5397 => \"/meteo/Ponte+lambro\",5398 => \"/meteo/Ponte+nelle+alpi\",5399 => \"/meteo/Ponte+nizza\",5400 => \"/meteo/Ponte+nossa\",5401 => \"/meteo/Ponte+San+Nicolo'\",5402 => \"/meteo/Ponte+San+Pietro\",5403 => \"/meteo/Pontebba\",5404 => \"/meteo/Pontecagnano+faiano\",5405 => \"/meteo/Pontecchio+polesine\",5406 => \"/meteo/Pontechianale\",5407 => \"/meteo/Pontecorvo\",5408 => \"/meteo/Pontecurone\",5409 => \"/meteo/Pontedassio\",5410 => \"/meteo/Pontedera\",5411 => \"/meteo/Pontelandolfo\",5412 => \"/meteo/Pontelatone\",5413 => \"/meteo/Pontelongo\",5414 => \"/meteo/Pontenure\",5415 => \"/meteo/Ponteranica\",5416 => \"/meteo/Pontestura\",5417 => \"/meteo/Pontevico\",5418 => \"/meteo/Pontey\",5419 => \"/meteo/Ponti\",5420 => \"/meteo/Ponti+sul+mincio\",5421 => \"/meteo/Pontida\",5422 => \"/meteo/Pontinia\",5423 => \"/meteo/Pontinvrea\",5424 => \"/meteo/Pontirolo+nuovo\",5425 => \"/meteo/Pontoglio\",5426 => \"/meteo/Pontremoli\",5428 => \"/meteo/Ponza\",5429 => \"/meteo/Ponzano+di+fermo\",8462 => \"/meteo/Ponzano+galleria\",5430 => \"/meteo/Ponzano+monferrato\",5431 => \"/meteo/Ponzano+romano\",5432 => \"/meteo/Ponzano+veneto\",5433 => \"/meteo/Ponzone\",5434 => \"/meteo/Popoli\",5435 => \"/meteo/Poppi\",8192 => \"/meteo/Populonia\",5436 => \"/meteo/Porano\",5437 => \"/meteo/Porcari\",5438 => \"/meteo/Porcia\",5439 => \"/meteo/Pordenone\",5440 => \"/meteo/Porlezza\",5441 => \"/meteo/Pornassio\",5442 => \"/meteo/Porpetto\",5443 => \"/meteo/Porretta+terme\",5444 => \"/meteo/Portacomaro\",5445 => \"/meteo/Portalbera\",5446 => \"/meteo/Porte\",5447 => \"/meteo/Portici\",5448 => \"/meteo/Portico+di+caserta\",5449 => \"/meteo/Portico+e+san+benedetto\",5450 => \"/meteo/Portigliola\",8294 => \"/meteo/Porto+Alabe\",5451 => \"/meteo/Porto+azzurro\",5452 => \"/meteo/Porto+ceresio\",8528 => \"/meteo/Porto+Cervo\",5453 => \"/meteo/Porto+cesareo\",8295 => \"/meteo/Porto+Conte\",8612 => \"/meteo/Porto+Corsini\",5454 => \"/meteo/Porto+empedocle\",8669 => \"/meteo/Porto+Ercole\",8743 => \"/meteo/Porto+Levante\",5455 => \"/meteo/Porto+mantovano\",8178 => \"/meteo/Porto+Pino\",5456 => \"/meteo/Porto+recanati\",8529 => \"/meteo/Porto+Rotondo\",5457 => \"/meteo/Porto+san+giorgio\",5458 => \"/meteo/Porto+sant'elpidio\",8670 => \"/meteo/Porto+Santo+Stefano\",5459 => \"/meteo/Porto+tolle\",5460 => \"/meteo/Porto+torres\",5461 => \"/meteo/Porto+valtravaglia\",5462 => \"/meteo/Porto+viro\",8172 => \"/meteo/Portobello+di+Gallura\",5463 => \"/meteo/Portobuffole'\",5464 => \"/meteo/Portocannone\",5465 => \"/meteo/Portoferraio\",5466 => \"/meteo/Portofino\",5467 => \"/meteo/Portogruaro\",5468 => \"/meteo/Portomaggiore\",5469 => \"/meteo/Portopalo+di+capo+passero\",8171 => \"/meteo/Portorotondo\",5470 => \"/meteo/Portoscuso\",5471 => \"/meteo/Portovenere\",5472 => \"/meteo/Portula\",5473 => \"/meteo/Posada\",5474 => \"/meteo/Posina\",5475 => \"/meteo/Positano\",5476 => \"/meteo/Possagno\",5477 => \"/meteo/Posta\",5478 => \"/meteo/Posta+fibreno\",5479 => \"/meteo/Postal\",5480 => \"/meteo/Postalesio\",5481 => \"/meteo/Postiglione\",5482 => \"/meteo/Postua\",5483 => \"/meteo/Potenza\",5484 => \"/meteo/Potenza+picena\",5485 => \"/meteo/Pove+del+grappa\",5486 => \"/meteo/Povegliano\",5487 => \"/meteo/Povegliano+veronese\",5488 => \"/meteo/Poviglio\",5489 => \"/meteo/Povoletto\",5490 => \"/meteo/Pozza+di+fassa\",5491 => \"/meteo/Pozzaglia+sabino\",5492 => \"/meteo/Pozzaglio+ed+uniti\",5493 => \"/meteo/Pozzallo\",5494 => \"/meteo/Pozzilli\",5495 => \"/meteo/Pozzo+d'adda\",5496 => \"/meteo/Pozzol+groppo\",5497 => \"/meteo/Pozzolengo\",5498 => \"/meteo/Pozzoleone\",5499 => \"/meteo/Pozzolo+formigaro\",5500 => \"/meteo/Pozzomaggiore\",5501 => \"/meteo/Pozzonovo\",5502 => \"/meteo/Pozzuoli\",5503 => \"/meteo/Pozzuolo+del+friuli\",5504 => \"/meteo/Pozzuolo+martesana\",8693 => \"/meteo/Pra+Catinat\",5505 => \"/meteo/Pradalunga\",5506 => \"/meteo/Pradamano\",5507 => \"/meteo/Pradleves\",5508 => \"/meteo/Pragelato\",5509 => \"/meteo/Praia+a+mare\",5510 => \"/meteo/Praiano\",5511 => \"/meteo/Pralboino\",5512 => \"/meteo/Prali\",5513 => \"/meteo/Pralormo\",5514 => \"/meteo/Pralungo\",5515 => \"/meteo/Pramaggiore\",5516 => \"/meteo/Pramollo\",5517 => \"/meteo/Prarolo\",5518 => \"/meteo/Prarostino\",5519 => \"/meteo/Prasco\",5520 => \"/meteo/Prascorsano\",5521 => \"/meteo/Praso\",5522 => \"/meteo/Prata+camportaccio\",5523 => \"/meteo/Prata+d'ansidonia\",5524 => \"/meteo/Prata+di+pordenone\",5525 => \"/meteo/Prata+di+principato+ultra\",5526 => \"/meteo/Prata+sannita\",5527 => \"/meteo/Pratella\",8102 => \"/meteo/Prati+di+Tivo\",8694 => \"/meteo/Pratica+di+Mare\",5528 => \"/meteo/Pratiglione\",5529 => \"/meteo/Prato\",5530 => \"/meteo/Prato+allo+Stelvio\",5531 => \"/meteo/Prato+carnico\",8157 => \"/meteo/Prato+Nevoso\",5532 => \"/meteo/Prato+sesia\",8560 => \"/meteo/Prato+Spilla\",5533 => \"/meteo/Pratola+peligna\",5534 => \"/meteo/Pratola+serra\",5535 => \"/meteo/Pratovecchio\",5536 => \"/meteo/Pravisdomini\",5537 => \"/meteo/Pray\",5538 => \"/meteo/Prazzo\",5539 => \"/meteo/Pre'+Saint+Didier\",5540 => \"/meteo/Precenicco\",5541 => \"/meteo/Preci\",5542 => \"/meteo/Predappio\",5543 => \"/meteo/Predazzo\",5544 => \"/meteo/Predoi\",5545 => \"/meteo/Predore\",5546 => \"/meteo/Predosa\",5547 => \"/meteo/Preganziol\",5548 => \"/meteo/Pregnana+milanese\",5549 => \"/meteo/Prela'\",5550 => \"/meteo/Premana\",5551 => \"/meteo/Premariacco\",5552 => \"/meteo/Premeno\",5553 => \"/meteo/Premia\",5554 => \"/meteo/Premilcuore\",5555 => \"/meteo/Premolo\",5556 => \"/meteo/Premosello+chiovenda\",5557 => \"/meteo/Preone\",5558 => \"/meteo/Preore\",5559 => \"/meteo/Prepotto\",8578 => \"/meteo/Presanella\",5560 => \"/meteo/Preseglie\",5561 => \"/meteo/Presenzano\",5562 => \"/meteo/Presezzo\",5563 => \"/meteo/Presicce\",5564 => \"/meteo/Pressana\",5565 => \"/meteo/Prestine\",5566 => \"/meteo/Pretoro\",5567 => \"/meteo/Prevalle\",5568 => \"/meteo/Prezza\",5569 => \"/meteo/Prezzo\",5570 => \"/meteo/Priero\",5571 => \"/meteo/Prignano+cilento\",5572 => \"/meteo/Prignano+sulla+secchia\",5573 => \"/meteo/Primaluna\",5574 => \"/meteo/Priocca\",5575 => \"/meteo/Priola\",5576 => \"/meteo/Priolo+gargallo\",5577 => \"/meteo/Priverno\",5578 => \"/meteo/Prizzi\",5579 => \"/meteo/Proceno\",5580 => \"/meteo/Procida\",5581 => \"/meteo/Propata\",5582 => \"/meteo/Proserpio\",5583 => \"/meteo/Prossedi\",5584 => \"/meteo/Provaglio+d'iseo\",5585 => \"/meteo/Provaglio+val+sabbia\",5586 => \"/meteo/Proves\",5587 => \"/meteo/Provvidenti\",8189 => \"/meteo/Prunetta\",5588 => \"/meteo/Prunetto\",5589 => \"/meteo/Puegnago+sul+garda\",5590 => \"/meteo/Puglianello\",5591 => \"/meteo/Pula\",5592 => \"/meteo/Pulfero\",5593 => \"/meteo/Pulsano\",5594 => \"/meteo/Pumenengo\",8584 => \"/meteo/Punta+Ala\",8708 => \"/meteo/Punta+Ban\",8564 => \"/meteo/Punta+Helbronner\",8306 => \"/meteo/Punta+Indren\",8107 => \"/meteo/Punta+Stilo\",5595 => \"/meteo/Puos+d'alpago\",5596 => \"/meteo/Pusiano\",5597 => \"/meteo/Putifigari\",5598 => \"/meteo/Putignano\",5599 => \"/meteo/Quadrelle\",5600 => \"/meteo/Quadri\",5601 => \"/meteo/Quagliuzzo\",5602 => \"/meteo/Qualiano\",5603 => \"/meteo/Quaranti\",5604 => \"/meteo/Quaregna\",5605 => \"/meteo/Quargnento\",5606 => \"/meteo/Quarna+sopra\",5607 => \"/meteo/Quarna+sotto\",5608 => \"/meteo/Quarona\",5609 => \"/meteo/Quarrata\",5610 => \"/meteo/Quart\",5611 => \"/meteo/Quarto\",5612 => \"/meteo/Quarto+d'altino\",5613 => \"/meteo/Quartu+sant'elena\",5614 => \"/meteo/Quartucciu\",5615 => \"/meteo/Quassolo\",5616 => \"/meteo/Quattordio\",5617 => \"/meteo/Quattro+castella\",5618 => \"/meteo/Quero\",5619 => \"/meteo/Quiliano\",5620 => \"/meteo/Quincinetto\",5621 => \"/meteo/Quindici\",5622 => \"/meteo/Quingentole\",5623 => \"/meteo/Quintano\",5624 => \"/meteo/Quinto+di+treviso\",5625 => \"/meteo/Quinto+vercellese\",5626 => \"/meteo/Quinto+vicentino\",5627 => \"/meteo/Quinzano+d'oglio\",5628 => \"/meteo/Quistello\",5629 => \"/meteo/Quittengo\",5630 => \"/meteo/Rabbi\",5631 => \"/meteo/Racale\",5632 => \"/meteo/Racalmuto\",5633 => \"/meteo/Racconigi\",5634 => \"/meteo/Raccuja\",5635 => \"/meteo/Racines\",8352 => \"/meteo/Racines+Giovo\",5636 => \"/meteo/Radda+in+chianti\",5637 => \"/meteo/Raddusa\",5638 => \"/meteo/Radicofani\",5639 => \"/meteo/Radicondoli\",5640 => \"/meteo/Raffadali\",5641 => \"/meteo/Ragalna\",5642 => \"/meteo/Ragogna\",5643 => \"/meteo/Ragoli\",5644 => \"/meteo/Ragusa\",5645 => \"/meteo/Raiano\",5646 => \"/meteo/Ramacca\",5647 => \"/meteo/Ramiseto\",5648 => \"/meteo/Ramponio+verna\",5649 => \"/meteo/Rancio+valcuvia\",5650 => \"/meteo/Ranco\",5651 => \"/meteo/Randazzo\",5652 => \"/meteo/Ranica\",5653 => \"/meteo/Ranzanico\",5654 => \"/meteo/Ranzo\",5655 => \"/meteo/Rapagnano\",5656 => \"/meteo/Rapallo\",5657 => \"/meteo/Rapino\",5658 => \"/meteo/Rapolano+terme\",8394 => \"/meteo/Rapolla\",5660 => \"/meteo/Rapone\",5661 => \"/meteo/Rassa\",5662 => \"/meteo/Rasun+Anterselva\",5663 => \"/meteo/Rasura\",5664 => \"/meteo/Ravanusa\",5665 => \"/meteo/Ravarino\",5666 => \"/meteo/Ravascletto\",5667 => \"/meteo/Ravello\",5668 => \"/meteo/Ravenna\",5669 => \"/meteo/Raveo\",5670 => \"/meteo/Raviscanina\",5671 => \"/meteo/Re\",5672 => \"/meteo/Rea\",5673 => \"/meteo/Realmonte\",5674 => \"/meteo/Reana+del+roiale\",5675 => \"/meteo/Reano\",5676 => \"/meteo/Recale\",5677 => \"/meteo/Recanati\",5678 => \"/meteo/Recco\",5679 => \"/meteo/Recetto\",8639 => \"/meteo/Recoaro+Mille\",5680 => \"/meteo/Recoaro+Terme\",5681 => \"/meteo/Redavalle\",5682 => \"/meteo/Redondesco\",5683 => \"/meteo/Refrancore\",5684 => \"/meteo/Refrontolo\",5685 => \"/meteo/Regalbuto\",5686 => \"/meteo/Reggello\",8542 => \"/meteo/Reggio+Aeroporto+dello+Stretto\",5687 => \"/meteo/Reggio+Calabria\",5688 => \"/meteo/Reggio+Emilia\",5689 => \"/meteo/Reggiolo\",5690 => \"/meteo/Reino\",5691 => \"/meteo/Reitano\",5692 => \"/meteo/Remanzacco\",5693 => \"/meteo/Remedello\",5694 => \"/meteo/Renate\",5695 => \"/meteo/Rende\",5696 => \"/meteo/Renon\",5697 => \"/meteo/Resana\",5698 => \"/meteo/Rescaldina\",8734 => \"/meteo/Resegone\",5699 => \"/meteo/Resia\",5700 => \"/meteo/Resiutta\",5701 => \"/meteo/Resuttano\",5702 => \"/meteo/Retorbido\",5703 => \"/meteo/Revello\",5704 => \"/meteo/Revere\",5705 => \"/meteo/Revigliasco+d'asti\",5706 => \"/meteo/Revine+lago\",5707 => \"/meteo/Revo'\",5708 => \"/meteo/Rezzago\",5709 => \"/meteo/Rezzato\",5710 => \"/meteo/Rezzo\",5711 => \"/meteo/Rezzoaglio\",5712 => \"/meteo/Rhemes+Notre+Dame\",5713 => \"/meteo/Rhemes+Saint+Georges\",5714 => \"/meteo/Rho\",5715 => \"/meteo/Riace\",8106 => \"/meteo/Riace+Marina\",5716 => \"/meteo/Rialto\",5717 => \"/meteo/Riano\",5718 => \"/meteo/Riardo\",5719 => \"/meteo/Ribera\",5720 => \"/meteo/Ribordone\",5721 => \"/meteo/Ricadi\",5722 => \"/meteo/Ricaldone\",5723 => \"/meteo/Riccia\",5724 => \"/meteo/Riccione\",5725 => \"/meteo/Ricco'+del+golfo+di+spezia\",5726 => \"/meteo/Ricengo\",5727 => \"/meteo/Ricigliano\",5728 => \"/meteo/Riese+pio+x\",5729 => \"/meteo/Riesi\",5730 => \"/meteo/Rieti\",5731 => \"/meteo/Rifiano\",5732 => \"/meteo/Rifreddo\",8691 => \"/meteo/Rifugio+Boffalora+Ticino\",8244 => \"/meteo/Rifugio+Calvi+Laghi+Gemelli\",8684 => \"/meteo/Rifugio+Chivasso+-+Colle+del+Nivolet\",8678 => \"/meteo/Rifugio+Curò\",8679 => \"/meteo/Rifugio+laghi+Gemelli\",8731 => \"/meteo/Rifugio+Livio+Bianco\",8681 => \"/meteo/Rifugio+Mezzalama\",8682 => \"/meteo/Rifugio+Quintino+Sella\",8629 => \"/meteo/Rifugio+Sapienza\",8683 => \"/meteo/Rifugio+Torino\",8680 => \"/meteo/Rifugio+Viviani\",5733 => \"/meteo/Rignano+flaminio\",5734 => \"/meteo/Rignano+garganico\",5735 => \"/meteo/Rignano+sull'arno\",5736 => \"/meteo/Rigolato\",5737 => \"/meteo/Rima+san+giuseppe\",5738 => \"/meteo/Rimasco\",5739 => \"/meteo/Rimella\",5740 => \"/meteo/Rimini\",8546 => \"/meteo/Rimini+Miramare\",5741 => \"/meteo/Rio+di+Pusteria\",5742 => \"/meteo/Rio+marina\",5743 => \"/meteo/Rio+nell'elba\",5744 => \"/meteo/Rio+saliceto\",5745 => \"/meteo/Riofreddo\",5746 => \"/meteo/Riola+sardo\",5747 => \"/meteo/Riolo+terme\",5748 => \"/meteo/Riolunato\",5749 => \"/meteo/Riomaggiore\",5750 => \"/meteo/Rionero+in+vulture\",5751 => \"/meteo/Rionero+sannitico\",8503 => \"/meteo/Rioveggio\",5752 => \"/meteo/Ripa+teatina\",5753 => \"/meteo/Ripabottoni\",8404 => \"/meteo/Ripacandida\",5755 => \"/meteo/Ripalimosani\",5756 => \"/meteo/Ripalta+arpina\",5757 => \"/meteo/Ripalta+cremasca\",5758 => \"/meteo/Ripalta+guerina\",5759 => \"/meteo/Riparbella\",5760 => \"/meteo/Ripatransone\",5761 => \"/meteo/Ripe\",5762 => \"/meteo/Ripe+san+ginesio\",5763 => \"/meteo/Ripi\",5764 => \"/meteo/Riposto\",5765 => \"/meteo/Rittana\",5766 => \"/meteo/Riva+del+garda\",5767 => \"/meteo/Riva+di+solto\",8579 => \"/meteo/Riva+di+Tures\",5768 => \"/meteo/Riva+ligure\",5769 => \"/meteo/Riva+presso+chieri\",5770 => \"/meteo/Riva+valdobbia\",5771 => \"/meteo/Rivalba\",5772 => \"/meteo/Rivalta+bormida\",5773 => \"/meteo/Rivalta+di+torino\",5774 => \"/meteo/Rivamonte+agordino\",5775 => \"/meteo/Rivanazzano\",5776 => \"/meteo/Rivara\",5777 => \"/meteo/Rivarolo+canavese\",5778 => \"/meteo/Rivarolo+del+re+ed+uniti\",5779 => \"/meteo/Rivarolo+mantovano\",5780 => \"/meteo/Rivarone\",5781 => \"/meteo/Rivarossa\",5782 => \"/meteo/Rive\",5783 => \"/meteo/Rive+d'arcano\",8398 => \"/meteo/Rivello\",5785 => \"/meteo/Rivergaro\",5786 => \"/meteo/Rivignano\",5787 => \"/meteo/Rivisondoli\",5788 => \"/meteo/Rivodutri\",5789 => \"/meteo/Rivoli\",8436 => \"/meteo/Rivoli+veronese\",5791 => \"/meteo/Rivolta+d'adda\",5792 => \"/meteo/Rizziconi\",5793 => \"/meteo/Ro\",5794 => \"/meteo/Roana\",5795 => \"/meteo/Roaschia\",5796 => \"/meteo/Roascio\",5797 => \"/meteo/Roasio\",5798 => \"/meteo/Roatto\",5799 => \"/meteo/Robassomero\",5800 => \"/meteo/Robbiate\",5801 => \"/meteo/Robbio\",5802 => \"/meteo/Robecchetto+con+Induno\",5803 => \"/meteo/Robecco+d'oglio\",5804 => \"/meteo/Robecco+pavese\",5805 => \"/meteo/Robecco+sul+naviglio\",5806 => \"/meteo/Robella\",5807 => \"/meteo/Robilante\",5808 => \"/meteo/Roburent\",5809 => \"/meteo/Rocca+canavese\",5810 => \"/meteo/Rocca+Canterano\",5811 => \"/meteo/Rocca+Ciglie'\",5812 => \"/meteo/Rocca+d'Arazzo\",5813 => \"/meteo/Rocca+d'Arce\",5814 => \"/meteo/Rocca+d'Evandro\",5815 => \"/meteo/Rocca+de'+Baldi\",5816 => \"/meteo/Rocca+de'+Giorgi\",5817 => \"/meteo/Rocca+di+Botte\",5818 => \"/meteo/Rocca+di+Cambio\",5819 => \"/meteo/Rocca+di+Cave\",5820 => \"/meteo/Rocca+di+Mezzo\",5821 => \"/meteo/Rocca+di+Neto\",5822 => \"/meteo/Rocca+di+Papa\",5823 => \"/meteo/Rocca+Grimalda\",5824 => \"/meteo/Rocca+Imperiale\",8115 => \"/meteo/Rocca+Imperiale+Marina\",5825 => \"/meteo/Rocca+Massima\",5826 => \"/meteo/Rocca+Pia\",5827 => \"/meteo/Rocca+Pietore\",5828 => \"/meteo/Rocca+Priora\",5829 => \"/meteo/Rocca+San+Casciano\",5830 => \"/meteo/Rocca+San+Felice\",5831 => \"/meteo/Rocca+San+Giovanni\",5832 => \"/meteo/Rocca+Santa+Maria\",5833 => \"/meteo/Rocca+Santo+Stefano\",5834 => \"/meteo/Rocca+Sinibalda\",5835 => \"/meteo/Rocca+Susella\",5836 => \"/meteo/Roccabascerana\",5837 => \"/meteo/Roccabernarda\",5838 => \"/meteo/Roccabianca\",5839 => \"/meteo/Roccabruna\",8535 => \"/meteo/Roccacaramanico\",5840 => \"/meteo/Roccacasale\",5841 => \"/meteo/Roccadaspide\",5842 => \"/meteo/Roccafiorita\",5843 => \"/meteo/Roccafluvione\",5844 => \"/meteo/Roccaforte+del+greco\",5845 => \"/meteo/Roccaforte+ligure\",5846 => \"/meteo/Roccaforte+mondovi'\",5847 => \"/meteo/Roccaforzata\",5848 => \"/meteo/Roccafranca\",5849 => \"/meteo/Roccagiovine\",5850 => \"/meteo/Roccagloriosa\",5851 => \"/meteo/Roccagorga\",5852 => \"/meteo/Roccalbegna\",5853 => \"/meteo/Roccalumera\",5854 => \"/meteo/Roccamandolfi\",5855 => \"/meteo/Roccamena\",5856 => \"/meteo/Roccamonfina\",5857 => \"/meteo/Roccamontepiano\",5858 => \"/meteo/Roccamorice\",8418 => \"/meteo/Roccanova\",5860 => \"/meteo/Roccantica\",5861 => \"/meteo/Roccapalumba\",5862 => \"/meteo/Roccapiemonte\",5863 => \"/meteo/Roccarainola\",5864 => \"/meteo/Roccaraso\",5865 => \"/meteo/Roccaromana\",5866 => \"/meteo/Roccascalegna\",5867 => \"/meteo/Roccasecca\",5868 => \"/meteo/Roccasecca+dei+volsci\",5869 => \"/meteo/Roccasicura\",5870 => \"/meteo/Roccasparvera\",5871 => \"/meteo/Roccaspinalveti\",5872 => \"/meteo/Roccastrada\",5873 => \"/meteo/Roccavaldina\",5874 => \"/meteo/Roccaverano\",5875 => \"/meteo/Roccavignale\",5876 => \"/meteo/Roccavione\",5877 => \"/meteo/Roccavivara\",5878 => \"/meteo/Roccella+ionica\",5879 => \"/meteo/Roccella+valdemone\",5880 => \"/meteo/Rocchetta+a+volturno\",5881 => \"/meteo/Rocchetta+belbo\",5882 => \"/meteo/Rocchetta+di+vara\",5883 => \"/meteo/Rocchetta+e+croce\",5884 => \"/meteo/Rocchetta+ligure\",5885 => \"/meteo/Rocchetta+nervina\",5886 => \"/meteo/Rocchetta+palafea\",5887 => \"/meteo/Rocchetta+sant'antonio\",5888 => \"/meteo/Rocchetta+tanaro\",5889 => \"/meteo/Rodano\",5890 => \"/meteo/Roddi\",5891 => \"/meteo/Roddino\",5892 => \"/meteo/Rodello\",5893 => \"/meteo/Rodengo\",5894 => \"/meteo/Rodengo-saiano\",5895 => \"/meteo/Rodero\",5896 => \"/meteo/Rodi+garganico\",5897 => \"/meteo/Rodi'+milici\",5898 => \"/meteo/Rodigo\",5899 => \"/meteo/Roe'+volciano\",5900 => \"/meteo/Rofrano\",5901 => \"/meteo/Rogeno\",5902 => \"/meteo/Roggiano+gravina\",5903 => \"/meteo/Roghudi\",5904 => \"/meteo/Rogliano\",5905 => \"/meteo/Rognano\",5906 => \"/meteo/Rogno\",5907 => \"/meteo/Rogolo\",5908 => \"/meteo/Roiate\",5909 => \"/meteo/Roio+del+sangro\",5910 => \"/meteo/Roisan\",5911 => \"/meteo/Roletto\",5912 => \"/meteo/Rolo\",5913 => \"/meteo/Roma\",8545 => \"/meteo/Roma+Ciampino\",8499 => \"/meteo/Roma+Fiumicino\",5914 => \"/meteo/Romagnano+al+monte\",5915 => \"/meteo/Romagnano+sesia\",5916 => \"/meteo/Romagnese\",5917 => \"/meteo/Romallo\",5918 => \"/meteo/Romana\",5919 => \"/meteo/Romanengo\",5920 => \"/meteo/Romano+canavese\",5921 => \"/meteo/Romano+d'ezzelino\",5922 => \"/meteo/Romano+di+lombardia\",5923 => \"/meteo/Romans+d'isonzo\",5924 => \"/meteo/Rombiolo\",5925 => \"/meteo/Romeno\",5926 => \"/meteo/Romentino\",5927 => \"/meteo/Rometta\",5928 => \"/meteo/Ronago\",5929 => \"/meteo/Ronca'\",5930 => \"/meteo/Roncade\",5931 => \"/meteo/Roncadelle\",5932 => \"/meteo/Roncaro\",5933 => \"/meteo/Roncegno\",5934 => \"/meteo/Roncello\",5935 => \"/meteo/Ronchi+dei+legionari\",5936 => \"/meteo/Ronchi+valsugana\",5937 => \"/meteo/Ronchis\",5938 => \"/meteo/Ronciglione\",5939 => \"/meteo/Ronco+all'adige\",8231 => \"/meteo/Ronco+all`Adige\",5940 => \"/meteo/Ronco+biellese\",5941 => \"/meteo/Ronco+briantino\",5942 => \"/meteo/Ronco+canavese\",5943 => \"/meteo/Ronco+scrivia\",5944 => \"/meteo/Roncobello\",5945 => \"/meteo/Roncoferraro\",5946 => \"/meteo/Roncofreddo\",5947 => \"/meteo/Roncola\",5948 => \"/meteo/Roncone\",5949 => \"/meteo/Rondanina\",5950 => \"/meteo/Rondissone\",5951 => \"/meteo/Ronsecco\",5952 => \"/meteo/Ronzo+chienis\",5953 => \"/meteo/Ronzone\",5954 => \"/meteo/Roppolo\",5955 => \"/meteo/Rora'\",5956 => \"/meteo/Rosa'\",5957 => \"/meteo/Rosarno\",5958 => \"/meteo/Rosasco\",5959 => \"/meteo/Rosate\",5960 => \"/meteo/Rosazza\",5961 => \"/meteo/Rosciano\",5962 => \"/meteo/Roscigno\",5963 => \"/meteo/Rose\",5964 => \"/meteo/Rosello\",5965 => \"/meteo/Roseto+capo+spulico\",8439 => \"/meteo/Roseto+casello\",5966 => \"/meteo/Roseto+degli+abruzzi\",5967 => \"/meteo/Roseto+valfortore\",5968 => \"/meteo/Rosignano+marittimo\",5969 => \"/meteo/Rosignano+monferrato\",8195 => \"/meteo/Rosignano+Solvay\",5970 => \"/meteo/Rosolina\",8744 => \"/meteo/Rosolina+mare\",5971 => \"/meteo/Rosolini\",8704 => \"/meteo/Rosone\",5972 => \"/meteo/Rosora\",5973 => \"/meteo/Rossa\",5974 => \"/meteo/Rossana\",5975 => \"/meteo/Rossano\",8109 => \"/meteo/Rossano+Calabro+Marina\",5976 => \"/meteo/Rossano+veneto\",8431 => \"/meteo/Rossera\",5977 => \"/meteo/Rossiglione\",5978 => \"/meteo/Rosta\",5979 => \"/meteo/Rota+d'imagna\",5980 => \"/meteo/Rota+greca\",5981 => \"/meteo/Rotella\",5982 => \"/meteo/Rotello\",8429 => \"/meteo/Rotonda\",5984 => \"/meteo/Rotondella\",5985 => \"/meteo/Rotondi\",5986 => \"/meteo/Rottofreno\",5987 => \"/meteo/Rotzo\",5988 => \"/meteo/Roure\",5989 => \"/meteo/Rovagnate\",5990 => \"/meteo/Rovasenda\",5991 => \"/meteo/Rovato\",5992 => \"/meteo/Rovegno\",5993 => \"/meteo/Rovellasca\",5994 => \"/meteo/Rovello+porro\",5995 => \"/meteo/Roverbella\",5996 => \"/meteo/Roverchiara\",5997 => \"/meteo/Rovere'+della+luna\",5998 => \"/meteo/Rovere'+veronese\",5999 => \"/meteo/Roveredo+di+gua'\",6000 => \"/meteo/Roveredo+in+piano\",6001 => \"/meteo/Rovereto\",6002 => \"/meteo/Rovescala\",6003 => \"/meteo/Rovetta\",6004 => \"/meteo/Roviano\",6005 => \"/meteo/Rovigo\",6006 => \"/meteo/Rovito\",6007 => \"/meteo/Rovolon\",6008 => \"/meteo/Rozzano\",6009 => \"/meteo/Rubano\",6010 => \"/meteo/Rubiana\",6011 => \"/meteo/Rubiera\",8632 => \"/meteo/Rucas\",6012 => \"/meteo/Ruda\",6013 => \"/meteo/Rudiano\",6014 => \"/meteo/Rueglio\",6015 => \"/meteo/Ruffano\",6016 => \"/meteo/Ruffia\",6017 => \"/meteo/Ruffre'\",6018 => \"/meteo/Rufina\",6019 => \"/meteo/Ruinas\",6020 => \"/meteo/Ruino\",6021 => \"/meteo/Rumo\",8366 => \"/meteo/Ruoti\",6023 => \"/meteo/Russi\",6024 => \"/meteo/Rutigliano\",6025 => \"/meteo/Rutino\",6026 => \"/meteo/Ruviano\",8393 => \"/meteo/Ruvo+del+monte\",6028 => \"/meteo/Ruvo+di+Puglia\",6029 => \"/meteo/Sabaudia\",6030 => \"/meteo/Sabbia\",6031 => \"/meteo/Sabbio+chiese\",6032 => \"/meteo/Sabbioneta\",6033 => \"/meteo/Sacco\",6034 => \"/meteo/Saccolongo\",6035 => \"/meteo/Sacile\",8700 => \"/meteo/Sacra+di+San+Michele\",6036 => \"/meteo/Sacrofano\",6037 => \"/meteo/Sadali\",6038 => \"/meteo/Sagama\",6039 => \"/meteo/Sagliano+micca\",6040 => \"/meteo/Sagrado\",6041 => \"/meteo/Sagron+mis\",8602 => \"/meteo/Saint+Barthelemy\",6042 => \"/meteo/Saint+Christophe\",6043 => \"/meteo/Saint+Denis\",8304 => \"/meteo/Saint+Jacques\",6044 => \"/meteo/Saint+Marcel\",6045 => \"/meteo/Saint+Nicolas\",6046 => \"/meteo/Saint+Oyen+Flassin\",6047 => \"/meteo/Saint+Pierre\",6048 => \"/meteo/Saint+Rhemy+en+Bosses\",6049 => \"/meteo/Saint+Vincent\",6050 => \"/meteo/Sala+Baganza\",6051 => \"/meteo/Sala+Biellese\",6052 => \"/meteo/Sala+Bolognese\",6053 => \"/meteo/Sala+Comacina\",6054 => \"/meteo/Sala+Consilina\",6055 => \"/meteo/Sala+Monferrato\",8372 => \"/meteo/Salandra\",6057 => \"/meteo/Salaparuta\",6058 => \"/meteo/Salara\",6059 => \"/meteo/Salasco\",6060 => \"/meteo/Salassa\",6061 => \"/meteo/Salbertrand\",6062 => \"/meteo/Salcedo\",6063 => \"/meteo/Salcito\",6064 => \"/meteo/Sale\",6065 => \"/meteo/Sale+delle+Langhe\",6066 => \"/meteo/Sale+Marasino\",6067 => \"/meteo/Sale+San+Giovanni\",6068 => \"/meteo/Salemi\",6069 => \"/meteo/Salento\",6070 => \"/meteo/Salerano+Canavese\",6071 => \"/meteo/Salerano+sul+Lambro\",6072 => \"/meteo/Salerno\",6073 => \"/meteo/Saletto\",6074 => \"/meteo/Salgareda\",6075 => \"/meteo/Sali+Vercellese\",6076 => \"/meteo/Salice+Salentino\",6077 => \"/meteo/Saliceto\",6078 => \"/meteo/Salisano\",6079 => \"/meteo/Salizzole\",6080 => \"/meteo/Salle\",6081 => \"/meteo/Salmour\",6082 => \"/meteo/Salo'\",6083 => \"/meteo/Salorno\",6084 => \"/meteo/Salsomaggiore+Terme\",6085 => \"/meteo/Saltara\",6086 => \"/meteo/Saltrio\",6087 => \"/meteo/Saludecio\",6088 => \"/meteo/Saluggia\",6089 => \"/meteo/Salussola\",6090 => \"/meteo/Saluzzo\",6091 => \"/meteo/Salve\",6092 => \"/meteo/Salvirola\",6093 => \"/meteo/Salvitelle\",6094 => \"/meteo/Salza+di+Pinerolo\",6095 => \"/meteo/Salza+Irpina\",6096 => \"/meteo/Salzano\",6097 => \"/meteo/Samarate\",6098 => \"/meteo/Samassi\",6099 => \"/meteo/Samatzai\",6100 => \"/meteo/Sambuca+di+Sicilia\",6101 => \"/meteo/Sambuca+Pistoiese\",6102 => \"/meteo/Sambuci\",6103 => \"/meteo/Sambuco\",6104 => \"/meteo/Sammichele+di+Bari\",6105 => \"/meteo/Samo\",6106 => \"/meteo/Samolaco\",6107 => \"/meteo/Samone\",6108 => \"/meteo/Samone\",6109 => \"/meteo/Sampeyre\",6110 => \"/meteo/Samugheo\",6111 => \"/meteo/San+Bartolomeo+al+Mare\",6112 => \"/meteo/San+Bartolomeo+in+Galdo\",6113 => \"/meteo/San+Bartolomeo+Val+Cavargna\",6114 => \"/meteo/San+Basile\",6115 => \"/meteo/San+Basilio\",6116 => \"/meteo/San+Bassano\",6117 => \"/meteo/San+Bellino\",6118 => \"/meteo/San+Benedetto+Belbo\",6119 => \"/meteo/San+Benedetto+dei+Marsi\",6120 => \"/meteo/San+Benedetto+del+Tronto\",8126 => \"/meteo/San+Benedetto+in+Alpe\",6121 => \"/meteo/San+Benedetto+in+Perillis\",6122 => \"/meteo/San+Benedetto+Po\",6123 => \"/meteo/San+Benedetto+Ullano\",6124 => \"/meteo/San+Benedetto+val+di+Sambro\",6125 => \"/meteo/San+Benigno+Canavese\",8641 => \"/meteo/San+Bernardino\",6126 => \"/meteo/San+Bernardino+Verbano\",6127 => \"/meteo/San+Biagio+della+Cima\",6128 => \"/meteo/San+Biagio+di+Callalta\",6129 => \"/meteo/San+Biagio+Platani\",6130 => \"/meteo/San+Biagio+Saracinisco\",6131 => \"/meteo/San+Biase\",6132 => \"/meteo/San+Bonifacio\",6133 => \"/meteo/San+Buono\",6134 => \"/meteo/San+Calogero\",6135 => \"/meteo/San+Candido\",6136 => \"/meteo/San+Canzian+d'Isonzo\",6137 => \"/meteo/San+Carlo+Canavese\",6138 => \"/meteo/San+Casciano+dei+Bagni\",6139 => \"/meteo/San+Casciano+in+Val+di+Pesa\",6140 => \"/meteo/San+Cassiano\",8624 => \"/meteo/San+Cassiano+in+Badia\",6141 => \"/meteo/San+Cataldo\",6142 => \"/meteo/San+Cesareo\",6143 => \"/meteo/San+Cesario+di+Lecce\",6144 => \"/meteo/San+Cesario+sul+Panaro\",8367 => \"/meteo/San+Chirico+Nuovo\",6146 => \"/meteo/San+Chirico+Raparo\",6147 => \"/meteo/San+Cipirello\",6148 => \"/meteo/San+Cipriano+d'Aversa\",6149 => \"/meteo/San+Cipriano+Picentino\",6150 => \"/meteo/San+Cipriano+Po\",6151 => \"/meteo/San+Clemente\",6152 => \"/meteo/San+Colombano+al+Lambro\",6153 => \"/meteo/San+Colombano+Belmonte\",6154 => \"/meteo/San+Colombano+Certenoli\",8622 => \"/meteo/San+Colombano+Valdidentro\",6155 => \"/meteo/San+Cono\",6156 => \"/meteo/San+Cosmo+Albanese\",8376 => \"/meteo/San+Costantino+Albanese\",6158 => \"/meteo/San+Costantino+Calabro\",6159 => \"/meteo/San+Costanzo\",6160 => \"/meteo/San+Cristoforo\",6161 => \"/meteo/San+Damiano+al+Colle\",6162 => \"/meteo/San+Damiano+d'Asti\",6163 => \"/meteo/San+Damiano+Macra\",6164 => \"/meteo/San+Daniele+del+Friuli\",6165 => \"/meteo/San+Daniele+Po\",6166 => \"/meteo/San+Demetrio+Corone\",6167 => \"/meteo/San+Demetrio+ne'+Vestini\",6168 => \"/meteo/San+Didero\",8556 => \"/meteo/San+Domenico+di+Varzo\",6169 => \"/meteo/San+Dona'+di+Piave\",6170 => \"/meteo/San+Donaci\",6171 => \"/meteo/San+Donato+di+Lecce\",6172 => \"/meteo/San+Donato+di+Ninea\",6173 => \"/meteo/San+Donato+Milanese\",6174 => \"/meteo/San+Donato+Val+di+Comino\",6175 => \"/meteo/San+Dorligo+della+Valle\",6176 => \"/meteo/San+Fedele+Intelvi\",6177 => \"/meteo/San+Fele\",6178 => \"/meteo/San+Felice+a+Cancello\",6179 => \"/meteo/San+Felice+Circeo\",6180 => \"/meteo/San+Felice+del+Benaco\",6181 => \"/meteo/San+Felice+del+Molise\",6182 => \"/meteo/San+Felice+sul+Panaro\",6183 => \"/meteo/San+Ferdinando\",6184 => \"/meteo/San+Ferdinando+di+Puglia\",6185 => \"/meteo/San+Fermo+della+Battaglia\",6186 => \"/meteo/San+Fili\",6187 => \"/meteo/San+Filippo+del+mela\",6188 => \"/meteo/San+Fior\",6189 => \"/meteo/San+Fiorano\",6190 => \"/meteo/San+Floriano+del+collio\",6191 => \"/meteo/San+Floro\",6192 => \"/meteo/San+Francesco+al+campo\",6193 => \"/meteo/San+Fratello\",8690 => \"/meteo/San+Galgano\",6194 => \"/meteo/San+Gavino+monreale\",6195 => \"/meteo/San+Gemini\",6196 => \"/meteo/San+Genesio+Atesino\",6197 => \"/meteo/San+Genesio+ed+uniti\",6198 => \"/meteo/San+Gennaro+vesuviano\",6199 => \"/meteo/San+Germano+chisone\",6200 => \"/meteo/San+Germano+dei+berici\",6201 => \"/meteo/San+Germano+vercellese\",6202 => \"/meteo/San+Gervasio+bresciano\",6203 => \"/meteo/San+Giacomo+degli+schiavoni\",6204 => \"/meteo/San+Giacomo+delle+segnate\",8620 => \"/meteo/San+Giacomo+di+Roburent\",6205 => \"/meteo/San+Giacomo+filippo\",6206 => \"/meteo/San+Giacomo+vercellese\",6207 => \"/meteo/San+Gillio\",6208 => \"/meteo/San+Gimignano\",6209 => \"/meteo/San+Ginesio\",6210 => \"/meteo/San+Giorgio+a+cremano\",6211 => \"/meteo/San+Giorgio+a+liri\",6212 => \"/meteo/San+Giorgio+albanese\",6213 => \"/meteo/San+Giorgio+canavese\",6214 => \"/meteo/San+Giorgio+del+sannio\",6215 => \"/meteo/San+Giorgio+della+richinvelda\",6216 => \"/meteo/San+Giorgio+delle+Pertiche\",6217 => \"/meteo/San+Giorgio+di+lomellina\",6218 => \"/meteo/San+Giorgio+di+mantova\",6219 => \"/meteo/San+Giorgio+di+nogaro\",6220 => \"/meteo/San+Giorgio+di+pesaro\",6221 => \"/meteo/San+Giorgio+di+piano\",6222 => \"/meteo/San+Giorgio+in+bosco\",6223 => \"/meteo/San+Giorgio+ionico\",6224 => \"/meteo/San+Giorgio+la+molara\",6225 => \"/meteo/San+Giorgio+lucano\",6226 => \"/meteo/San+Giorgio+monferrato\",6227 => \"/meteo/San+Giorgio+morgeto\",6228 => \"/meteo/San+Giorgio+piacentino\",6229 => \"/meteo/San+Giorgio+scarampi\",6230 => \"/meteo/San+Giorgio+su+Legnano\",6231 => \"/meteo/San+Giorio+di+susa\",6232 => \"/meteo/San+Giovanni+a+piro\",6233 => \"/meteo/San+Giovanni+al+natisone\",6234 => \"/meteo/San+Giovanni+bianco\",6235 => \"/meteo/San+Giovanni+d'asso\",6236 => \"/meteo/San+Giovanni+del+dosso\",6237 => \"/meteo/San+Giovanni+di+gerace\",6238 => \"/meteo/San+Giovanni+gemini\",6239 => \"/meteo/San+Giovanni+ilarione\",6240 => \"/meteo/San+Giovanni+in+croce\",6241 => \"/meteo/San+Giovanni+in+fiore\",6242 => \"/meteo/San+Giovanni+in+galdo\",6243 => \"/meteo/San+Giovanni+in+marignano\",6244 => \"/meteo/San+Giovanni+in+persiceto\",8567 => \"/meteo/San+Giovanni+in+val+Aurina\",6245 => \"/meteo/San+Giovanni+incarico\",6246 => \"/meteo/San+Giovanni+la+punta\",6247 => \"/meteo/San+Giovanni+lipioni\",6248 => \"/meteo/San+Giovanni+lupatoto\",6249 => \"/meteo/San+Giovanni+rotondo\",6250 => \"/meteo/San+Giovanni+suergiu\",6251 => \"/meteo/San+Giovanni+teatino\",6252 => \"/meteo/San+Giovanni+valdarno\",6253 => \"/meteo/San+Giuliano+del+sannio\",6254 => \"/meteo/San+Giuliano+di+Puglia\",6255 => \"/meteo/San+Giuliano+milanese\",6256 => \"/meteo/San+Giuliano+terme\",6257 => \"/meteo/San+Giuseppe+jato\",6258 => \"/meteo/San+Giuseppe+vesuviano\",6259 => \"/meteo/San+Giustino\",6260 => \"/meteo/San+Giusto+canavese\",6261 => \"/meteo/San+Godenzo\",6262 => \"/meteo/San+Gregorio+d'ippona\",6263 => \"/meteo/San+Gregorio+da+sassola\",6264 => \"/meteo/San+Gregorio+di+Catania\",6265 => \"/meteo/San+Gregorio+Magno\",6266 => \"/meteo/San+Gregorio+Matese\",6267 => \"/meteo/San+Gregorio+nelle+Alpi\",6268 => \"/meteo/San+Lazzaro+di+Savena\",6269 => \"/meteo/San+Leo\",6270 => \"/meteo/San+Leonardo\",6271 => \"/meteo/San+Leonardo+in+Passiria\",8580 => \"/meteo/San+Leone\",6272 => \"/meteo/San+Leucio+del+Sannio\",6273 => \"/meteo/San+Lorenzello\",6274 => \"/meteo/San+Lorenzo\",6275 => \"/meteo/San+Lorenzo+al+mare\",6276 => \"/meteo/San+Lorenzo+Bellizzi\",6277 => \"/meteo/San+Lorenzo+del+vallo\",6278 => \"/meteo/San+Lorenzo+di+Sebato\",6279 => \"/meteo/San+Lorenzo+in+Banale\",6280 => \"/meteo/San+Lorenzo+in+campo\",6281 => \"/meteo/San+Lorenzo+isontino\",6282 => \"/meteo/San+Lorenzo+Maggiore\",6283 => \"/meteo/San+Lorenzo+Nuovo\",6284 => \"/meteo/San+Luca\",6285 => \"/meteo/San+Lucido\",6286 => \"/meteo/San+Lupo\",6287 => \"/meteo/San+Mango+d'Aquino\",6288 => \"/meteo/San+Mango+Piemonte\",6289 => \"/meteo/San+Mango+sul+Calore\",6290 => \"/meteo/San+Marcellino\",6291 => \"/meteo/San+Marcello\",6292 => \"/meteo/San+Marcello+pistoiese\",6293 => \"/meteo/San+Marco+argentano\",6294 => \"/meteo/San+Marco+d'Alunzio\",6295 => \"/meteo/San+Marco+dei+Cavoti\",6296 => \"/meteo/San+Marco+Evangelista\",6297 => \"/meteo/San+Marco+in+Lamis\",6298 => \"/meteo/San+Marco+la+Catola\",8152 => \"/meteo/San+Marino\",6299 => \"/meteo/San+Martino+al+Tagliamento\",6300 => \"/meteo/San+Martino+Alfieri\",6301 => \"/meteo/San+Martino+Buon+Albergo\",6302 => \"/meteo/San+Martino+Canavese\",6303 => \"/meteo/San+Martino+d'Agri\",6304 => \"/meteo/San+Martino+dall'argine\",6305 => \"/meteo/San+Martino+del+lago\",8209 => \"/meteo/San+Martino+di+Castrozza\",6306 => \"/meteo/San+Martino+di+Finita\",6307 => \"/meteo/San+Martino+di+Lupari\",6308 => \"/meteo/San+Martino+di+venezze\",8410 => \"/meteo/San+Martino+d`agri\",6309 => \"/meteo/San+Martino+in+Badia\",6310 => \"/meteo/San+Martino+in+Passiria\",6311 => \"/meteo/San+Martino+in+pensilis\",6312 => \"/meteo/San+Martino+in+rio\",6313 => \"/meteo/San+Martino+in+strada\",6314 => \"/meteo/San+Martino+sannita\",6315 => \"/meteo/San+Martino+siccomario\",6316 => \"/meteo/San+Martino+sulla+marrucina\",6317 => \"/meteo/San+Martino+valle+caudina\",6318 => \"/meteo/San+Marzano+di+San+Giuseppe\",6319 => \"/meteo/San+Marzano+oliveto\",6320 => \"/meteo/San+Marzano+sul+Sarno\",6321 => \"/meteo/San+Massimo\",6322 => \"/meteo/San+Maurizio+canavese\",6323 => \"/meteo/San+Maurizio+d'opaglio\",6324 => \"/meteo/San+Mauro+castelverde\",6325 => \"/meteo/San+Mauro+cilento\",6326 => \"/meteo/San+Mauro+di+saline\",8427 => \"/meteo/San+Mauro+forte\",6328 => \"/meteo/San+Mauro+la+bruca\",6329 => \"/meteo/San+Mauro+marchesato\",6330 => \"/meteo/San+Mauro+Pascoli\",6331 => \"/meteo/San+Mauro+torinese\",6332 => \"/meteo/San+Michele+al+Tagliamento\",6333 => \"/meteo/San+Michele+all'Adige\",6334 => \"/meteo/San+Michele+di+ganzaria\",6335 => \"/meteo/San+Michele+di+serino\",6336 => \"/meteo/San+Michele+Mondovi'\",6337 => \"/meteo/San+Michele+salentino\",6338 => \"/meteo/San+Miniato\",6339 => \"/meteo/San+Nazario\",6340 => \"/meteo/San+Nazzaro\",6341 => \"/meteo/San+Nazzaro+Sesia\",6342 => \"/meteo/San+Nazzaro+val+cavargna\",6343 => \"/meteo/San+Nicola+arcella\",6344 => \"/meteo/San+Nicola+baronia\",6345 => \"/meteo/San+Nicola+da+crissa\",6346 => \"/meteo/San+Nicola+dell'alto\",6347 => \"/meteo/San+Nicola+la+strada\",6348 => \"/meteo/San+nicola+manfredi\",6349 => \"/meteo/San+nicolo'+d'arcidano\",6350 => \"/meteo/San+nicolo'+di+comelico\",6351 => \"/meteo/San+Nicolo'+Gerrei\",6352 => \"/meteo/San+Pancrazio\",6353 => \"/meteo/San+Pancrazio+salentino\",6354 => \"/meteo/San+Paolo\",8361 => \"/meteo/San+Paolo+albanese\",6356 => \"/meteo/San+Paolo+bel+sito\",6357 => \"/meteo/San+Paolo+cervo\",6358 => \"/meteo/San+Paolo+d'argon\",6359 => \"/meteo/San+Paolo+di+civitate\",6360 => \"/meteo/San+Paolo+di+Jesi\",6361 => \"/meteo/San+Paolo+solbrito\",6362 => \"/meteo/San+Pellegrino+terme\",6363 => \"/meteo/San+Pier+d'isonzo\",6364 => \"/meteo/San+Pier+niceto\",6365 => \"/meteo/San+Piero+a+sieve\",6366 => \"/meteo/San+Piero+Patti\",6367 => \"/meteo/San+Pietro+a+maida\",6368 => \"/meteo/San+Pietro+al+Natisone\",6369 => \"/meteo/San+Pietro+al+Tanagro\",6370 => \"/meteo/San+Pietro+apostolo\",6371 => \"/meteo/San+Pietro+avellana\",6372 => \"/meteo/San+Pietro+clarenza\",6373 => \"/meteo/San+Pietro+di+cadore\",6374 => \"/meteo/San+Pietro+di+carida'\",6375 => \"/meteo/San+Pietro+di+feletto\",6376 => \"/meteo/San+Pietro+di+morubio\",6377 => \"/meteo/San+Pietro+in+Amantea\",6378 => \"/meteo/San+Pietro+in+cariano\",6379 => \"/meteo/San+Pietro+in+casale\",6380 => \"/meteo/San+Pietro+in+cerro\",6381 => \"/meteo/San+Pietro+in+gu\",6382 => \"/meteo/San+Pietro+in+guarano\",6383 => \"/meteo/San+Pietro+in+lama\",6384 => \"/meteo/San+Pietro+infine\",6385 => \"/meteo/San+Pietro+mosezzo\",6386 => \"/meteo/San+Pietro+mussolino\",6387 => \"/meteo/San+Pietro+val+lemina\",6388 => \"/meteo/San+Pietro+vernotico\",6389 => \"/meteo/San+Pietro+Viminario\",6390 => \"/meteo/San+Pio+delle+camere\",6391 => \"/meteo/San+Polo+d'enza\",6392 => \"/meteo/San+Polo+dei+cavalieri\",6393 => \"/meteo/San+Polo+di+Piave\",6394 => \"/meteo/San+Polo+matese\",6395 => \"/meteo/San+Ponso\",6396 => \"/meteo/San+Possidonio\",6397 => \"/meteo/San+Potito+sannitico\",6398 => \"/meteo/San+Potito+ultra\",6399 => \"/meteo/San+Prisco\",6400 => \"/meteo/San+Procopio\",6401 => \"/meteo/San+Prospero\",6402 => \"/meteo/San+Quirico+d'orcia\",8199 => \"/meteo/San+Quirico+d`Orcia\",6403 => \"/meteo/San+Quirino\",6404 => \"/meteo/San+Raffaele+cimena\",6405 => \"/meteo/San+Roberto\",6406 => \"/meteo/San+Rocco+al+porto\",6407 => \"/meteo/San+Romano+in+garfagnana\",6408 => \"/meteo/San+Rufo\",6409 => \"/meteo/San+Salvatore+di+fitalia\",6410 => \"/meteo/San+Salvatore+Monferrato\",6411 => \"/meteo/San+Salvatore+Telesino\",6412 => \"/meteo/San+Salvo\",8103 => \"/meteo/San+Salvo+Marina\",6413 => \"/meteo/San+Sebastiano+al+Vesuvio\",6414 => \"/meteo/San+Sebastiano+Curone\",6415 => \"/meteo/San+Sebastiano+da+Po\",6416 => \"/meteo/San+Secondo+di+Pinerolo\",6417 => \"/meteo/San+Secondo+Parmense\",6418 => \"/meteo/San+Severino+Lucano\",6419 => \"/meteo/San+Severino+Marche\",6420 => \"/meteo/San+Severo\",8347 => \"/meteo/San+Sicario+di+Cesana\",8289 => \"/meteo/San+Simone\",8539 => \"/meteo/San+Simone+Baita+del+Camoscio\",6421 => \"/meteo/San+Siro\",6422 => \"/meteo/San+Sossio+Baronia\",6423 => \"/meteo/San+Sostene\",6424 => \"/meteo/San+Sosti\",6425 => \"/meteo/San+Sperate\",6426 => \"/meteo/San+Tammaro\",6427 => \"/meteo/San+Teodoro\",8170 => \"/meteo/San+Teodoro\",6429 => \"/meteo/San+Tomaso+agordino\",8212 => \"/meteo/San+Valentino+alla+Muta\",6430 => \"/meteo/San+Valentino+in+abruzzo+citeriore\",6431 => \"/meteo/San+Valentino+torio\",6432 => \"/meteo/San+Venanzo\",6433 => \"/meteo/San+Vendemiano\",6434 => \"/meteo/San+Vero+milis\",6435 => \"/meteo/San+Vincenzo\",6436 => \"/meteo/San+Vincenzo+la+costa\",6437 => \"/meteo/San+Vincenzo+valle+roveto\",6438 => \"/meteo/San+Vitaliano\",8293 => \"/meteo/San+Vito\",6440 => \"/meteo/San+Vito+al+tagliamento\",6441 => \"/meteo/San+Vito+al+torre\",6442 => \"/meteo/San+Vito+chietino\",6443 => \"/meteo/San+Vito+dei+normanni\",6444 => \"/meteo/San+Vito+di+cadore\",6445 => \"/meteo/San+Vito+di+fagagna\",6446 => \"/meteo/San+Vito+di+leguzzano\",6447 => \"/meteo/San+Vito+lo+capo\",6448 => \"/meteo/San+Vito+romano\",6449 => \"/meteo/San+Vito+sullo+ionio\",6450 => \"/meteo/San+Vittore+del+lazio\",6451 => \"/meteo/San+Vittore+Olona\",6452 => \"/meteo/San+Zeno+di+montagna\",6453 => \"/meteo/San+Zeno+naviglio\",6454 => \"/meteo/San+Zenone+al+lambro\",6455 => \"/meteo/San+Zenone+al+po\",6456 => \"/meteo/San+Zenone+degli+ezzelini\",6457 => \"/meteo/Sanarica\",6458 => \"/meteo/Sandigliano\",6459 => \"/meteo/Sandrigo\",6460 => \"/meteo/Sanfre'\",6461 => \"/meteo/Sanfront\",6462 => \"/meteo/Sangano\",6463 => \"/meteo/Sangiano\",6464 => \"/meteo/Sangineto\",6465 => \"/meteo/Sanguinetto\",6466 => \"/meteo/Sanluri\",6467 => \"/meteo/Sannazzaro+de'+Burgondi\",6468 => \"/meteo/Sannicandro+di+bari\",6469 => \"/meteo/Sannicandro+garganico\",6470 => \"/meteo/Sannicola\",6471 => \"/meteo/Sanremo\",6472 => \"/meteo/Sansepolcro\",6473 => \"/meteo/Sant'Agapito\",6474 => \"/meteo/Sant'Agata+bolognese\",6475 => \"/meteo/Sant'Agata+de'+goti\",6476 => \"/meteo/Sant'Agata+del+bianco\",6477 => \"/meteo/Sant'Agata+di+esaro\",6478 => \"/meteo/Sant'Agata+di+Militello\",6479 => \"/meteo/Sant'Agata+di+Puglia\",6480 => \"/meteo/Sant'Agata+feltria\",6481 => \"/meteo/Sant'Agata+fossili\",6482 => \"/meteo/Sant'Agata+li+battiati\",6483 => \"/meteo/Sant'Agata+sul+Santerno\",6484 => \"/meteo/Sant'Agnello\",6485 => \"/meteo/Sant'Agostino\",6486 => \"/meteo/Sant'Albano+stura\",6487 => \"/meteo/Sant'Alessio+con+vialone\",6488 => \"/meteo/Sant'Alessio+in+aspromonte\",6489 => \"/meteo/Sant'Alessio+siculo\",6490 => \"/meteo/Sant'Alfio\",6491 => \"/meteo/Sant'Ambrogio+di+Torino\",6492 => \"/meteo/Sant'Ambrogio+di+valpolicella\",6493 => \"/meteo/Sant'Ambrogio+sul+garigliano\",6494 => \"/meteo/Sant'Anastasia\",6495 => \"/meteo/Sant'Anatolia+di+narco\",6496 => \"/meteo/Sant'Andrea+apostolo+dello+ionio\",6497 => \"/meteo/Sant'Andrea+del+garigliano\",6498 => \"/meteo/Sant'Andrea+di+conza\",6499 => \"/meteo/Sant'Andrea+Frius\",8763 => \"/meteo/Sant'Andrea+in+Monte\",6500 => \"/meteo/Sant'Angelo+a+cupolo\",6501 => \"/meteo/Sant'Angelo+a+fasanella\",6502 => \"/meteo/Sant'Angelo+a+scala\",6503 => \"/meteo/Sant'Angelo+all'esca\",6504 => \"/meteo/Sant'Angelo+d'alife\",6505 => \"/meteo/Sant'Angelo+dei+lombardi\",6506 => \"/meteo/Sant'Angelo+del+pesco\",6507 => \"/meteo/Sant'Angelo+di+brolo\",6508 => \"/meteo/Sant'Angelo+di+Piove+di+Sacco\",6509 => \"/meteo/Sant'Angelo+in+lizzola\",6510 => \"/meteo/Sant'Angelo+in+pontano\",6511 => \"/meteo/Sant'Angelo+in+vado\",6512 => \"/meteo/Sant'Angelo+le+fratte\",6513 => \"/meteo/Sant'Angelo+limosano\",6514 => \"/meteo/Sant'Angelo+lodigiano\",6515 => \"/meteo/Sant'Angelo+lomellina\",6516 => \"/meteo/Sant'Angelo+muxaro\",6517 => \"/meteo/Sant'Angelo+romano\",6518 => \"/meteo/Sant'Anna+Arresi\",6519 => \"/meteo/Sant'Anna+d'Alfaedo\",8730 => \"/meteo/Sant'Anna+di+Valdieri\",8698 => \"/meteo/Sant'Anna+di+Vinadio\",8563 => \"/meteo/Sant'Anna+Pelago\",6520 => \"/meteo/Sant'Antimo\",6521 => \"/meteo/Sant'Antioco\",6522 => \"/meteo/Sant'Antonino+di+Susa\",6523 => \"/meteo/Sant'Antonio+Abate\",6524 => \"/meteo/Sant'Antonio+di+gallura\",6525 => \"/meteo/Sant'Apollinare\",6526 => \"/meteo/Sant'Arcangelo\",6527 => \"/meteo/Sant'Arcangelo+trimonte\",6528 => \"/meteo/Sant'Arpino\",6529 => \"/meteo/Sant'Arsenio\",6530 => \"/meteo/Sant'Egidio+alla+vibrata\",6531 => \"/meteo/Sant'Egidio+del+monte+Albino\",6532 => \"/meteo/Sant'Elena\",6533 => \"/meteo/Sant'Elena+sannita\",6534 => \"/meteo/Sant'Elia+a+pianisi\",6535 => \"/meteo/Sant'Elia+fiumerapido\",6536 => \"/meteo/Sant'Elpidio+a+mare\",6537 => \"/meteo/Sant'Eufemia+a+maiella\",6538 => \"/meteo/Sant'Eufemia+d'Aspromonte\",6539 => \"/meteo/Sant'Eusanio+del+Sangro\",6540 => \"/meteo/Sant'Eusanio+forconese\",6541 => \"/meteo/Sant'Ilario+d'Enza\",6542 => \"/meteo/Sant'Ilario+dello+Ionio\",6543 => \"/meteo/Sant'Ippolito\",6544 => \"/meteo/Sant'Olcese\",6545 => \"/meteo/Sant'Omero\",6546 => \"/meteo/Sant'Omobono+imagna\",6547 => \"/meteo/Sant'Onofrio\",6548 => \"/meteo/Sant'Oreste\",6549 => \"/meteo/Sant'Orsola+terme\",6550 => \"/meteo/Sant'Urbano\",6551 => \"/meteo/Santa+Brigida\",6552 => \"/meteo/Santa+Caterina+albanese\",6553 => \"/meteo/Santa+Caterina+dello+ionio\",8144 => \"/meteo/Santa+Caterina+Valfurva\",6554 => \"/meteo/Santa+Caterina+villarmosa\",6555 => \"/meteo/Santa+Cesarea+terme\",6556 => \"/meteo/Santa+Cristina+d'Aspromonte\",6557 => \"/meteo/Santa+Cristina+e+Bissone\",6558 => \"/meteo/Santa+Cristina+gela\",6559 => \"/meteo/Santa+Cristina+Valgardena\",6560 => \"/meteo/Santa+Croce+camerina\",6561 => \"/meteo/Santa+Croce+del+sannio\",6562 => \"/meteo/Santa+Croce+di+Magliano\",6563 => \"/meteo/Santa+Croce+sull'Arno\",6564 => \"/meteo/Santa+Domenica+talao\",6565 => \"/meteo/Santa+Domenica+Vittoria\",6566 => \"/meteo/Santa+Elisabetta\",6567 => \"/meteo/Santa+Fiora\",6568 => \"/meteo/Santa+Flavia\",6569 => \"/meteo/Santa+Giuletta\",6570 => \"/meteo/Santa+Giusta\",6571 => \"/meteo/Santa+Giustina\",6572 => \"/meteo/Santa+Giustina+in+Colle\",6573 => \"/meteo/Santa+Luce\",6574 => \"/meteo/Santa+Lucia+del+Mela\",6575 => \"/meteo/Santa+Lucia+di+Piave\",6576 => \"/meteo/Santa+Lucia+di+serino\",6577 => \"/meteo/Santa+Margherita+d'adige\",6578 => \"/meteo/Santa+Margherita+di+belice\",6579 => \"/meteo/Santa+Margherita+di+staffora\",8285 => \"/meteo/Santa+Margherita+Ligure\",6581 => \"/meteo/Santa+Maria+a+monte\",6582 => \"/meteo/Santa+Maria+a+vico\",6583 => \"/meteo/Santa+Maria+Capua+Vetere\",6584 => \"/meteo/Santa+Maria+coghinas\",6585 => \"/meteo/Santa+Maria+del+cedro\",6586 => \"/meteo/Santa+Maria+del+Molise\",6587 => \"/meteo/Santa+Maria+della+Versa\",8122 => \"/meteo/Santa+Maria+di+Castellabate\",6588 => \"/meteo/Santa+Maria+di+Licodia\",6589 => \"/meteo/Santa+Maria+di+sala\",6590 => \"/meteo/Santa+Maria+Hoe'\",6591 => \"/meteo/Santa+Maria+imbaro\",6592 => \"/meteo/Santa+Maria+la+carita'\",6593 => \"/meteo/Santa+Maria+la+fossa\",6594 => \"/meteo/Santa+Maria+la+longa\",6595 => \"/meteo/Santa+Maria+Maggiore\",6596 => \"/meteo/Santa+Maria+Nuova\",6597 => \"/meteo/Santa+Marina\",6598 => \"/meteo/Santa+Marina+salina\",6599 => \"/meteo/Santa+Marinella\",6600 => \"/meteo/Santa+Ninfa\",6601 => \"/meteo/Santa+Paolina\",6602 => \"/meteo/Santa+Severina\",6603 => \"/meteo/Santa+Sofia\",6604 => \"/meteo/Santa+Sofia+d'Epiro\",6605 => \"/meteo/Santa+Teresa+di+Riva\",6606 => \"/meteo/Santa+Teresa+gallura\",6607 => \"/meteo/Santa+Venerina\",6608 => \"/meteo/Santa+Vittoria+d'Alba\",6609 => \"/meteo/Santa+Vittoria+in+matenano\",6610 => \"/meteo/Santadi\",6611 => \"/meteo/Santarcangelo+di+Romagna\",6612 => \"/meteo/Sante+marie\",6613 => \"/meteo/Santena\",6614 => \"/meteo/Santeramo+in+colle\",6615 => \"/meteo/Santhia'\",6616 => \"/meteo/Santi+Cosma+e+Damiano\",6617 => \"/meteo/Santo+Stefano+al+mare\",6618 => \"/meteo/Santo+Stefano+Belbo\",6619 => \"/meteo/Santo+Stefano+d'Aveto\",6620 => \"/meteo/Santo+Stefano+del+sole\",6621 => \"/meteo/Santo+Stefano+di+Cadore\",6622 => \"/meteo/Santo+Stefano+di+Camastra\",6623 => \"/meteo/Santo+Stefano+di+Magra\",6624 => \"/meteo/Santo+Stefano+di+Rogliano\",6625 => \"/meteo/Santo+Stefano+di+Sessanio\",6626 => \"/meteo/Santo+Stefano+in+Aspromonte\",6627 => \"/meteo/Santo+Stefano+lodigiano\",6628 => \"/meteo/Santo+Stefano+quisquina\",6629 => \"/meteo/Santo+Stefano+roero\",6630 => \"/meteo/Santo+Stefano+Ticino\",6631 => \"/meteo/Santo+Stino+di+Livenza\",6632 => \"/meteo/Santomenna\",6633 => \"/meteo/Santopadre\",6634 => \"/meteo/Santorso\",6635 => \"/meteo/Santu+Lussurgiu\",8419 => \"/meteo/Sant`Angelo+le+fratte\",6636 => \"/meteo/Sanza\",6637 => \"/meteo/Sanzeno\",6638 => \"/meteo/Saonara\",6639 => \"/meteo/Saponara\",6640 => \"/meteo/Sappada\",6641 => \"/meteo/Sapri\",6642 => \"/meteo/Saracena\",6643 => \"/meteo/Saracinesco\",6644 => \"/meteo/Sarcedo\",8377 => \"/meteo/Sarconi\",6646 => \"/meteo/Sardara\",6647 => \"/meteo/Sardigliano\",6648 => \"/meteo/Sarego\",6649 => \"/meteo/Sarentino\",6650 => \"/meteo/Sarezzano\",6651 => \"/meteo/Sarezzo\",6652 => \"/meteo/Sarmato\",6653 => \"/meteo/Sarmede\",6654 => \"/meteo/Sarnano\",6655 => \"/meteo/Sarnico\",6656 => \"/meteo/Sarno\",6657 => \"/meteo/Sarnonico\",6658 => \"/meteo/Saronno\",6659 => \"/meteo/Sarre\",6660 => \"/meteo/Sarroch\",6661 => \"/meteo/Sarsina\",6662 => \"/meteo/Sarteano\",6663 => \"/meteo/Sartirana+lomellina\",6664 => \"/meteo/Sarule\",6665 => \"/meteo/Sarzana\",6666 => \"/meteo/Sassano\",6667 => \"/meteo/Sassari\",6668 => \"/meteo/Sassello\",6669 => \"/meteo/Sassetta\",6670 => \"/meteo/Sassinoro\",8387 => \"/meteo/Sasso+di+castalda\",6672 => \"/meteo/Sasso+marconi\",6673 => \"/meteo/Sassocorvaro\",6674 => \"/meteo/Sassofeltrio\",6675 => \"/meteo/Sassoferrato\",8656 => \"/meteo/Sassotetto\",6676 => \"/meteo/Sassuolo\",6677 => \"/meteo/Satriano\",8420 => \"/meteo/Satriano+di+Lucania\",6679 => \"/meteo/Sauris\",6680 => \"/meteo/Sauze+d'Oulx\",6681 => \"/meteo/Sauze+di+Cesana\",6682 => \"/meteo/Sava\",6683 => \"/meteo/Savelli\",6684 => \"/meteo/Saviano\",6685 => \"/meteo/Savigliano\",6686 => \"/meteo/Savignano+irpino\",6687 => \"/meteo/Savignano+sul+Panaro\",6688 => \"/meteo/Savignano+sul+Rubicone\",6689 => \"/meteo/Savigno\",6690 => \"/meteo/Savignone\",6691 => \"/meteo/Saviore+dell'Adamello\",6692 => \"/meteo/Savoca\",6693 => \"/meteo/Savogna\",6694 => \"/meteo/Savogna+d'Isonzo\",8411 => \"/meteo/Savoia+di+Lucania\",6696 => \"/meteo/Savona\",6697 => \"/meteo/Scafa\",6698 => \"/meteo/Scafati\",6699 => \"/meteo/Scagnello\",6700 => \"/meteo/Scala\",6701 => \"/meteo/Scala+coeli\",6702 => \"/meteo/Scaldasole\",6703 => \"/meteo/Scalea\",6704 => \"/meteo/Scalenghe\",6705 => \"/meteo/Scaletta+Zanclea\",6706 => \"/meteo/Scampitella\",6707 => \"/meteo/Scandale\",6708 => \"/meteo/Scandiano\",6709 => \"/meteo/Scandicci\",6710 => \"/meteo/Scandolara+ravara\",6711 => \"/meteo/Scandolara+ripa+d'Oglio\",6712 => \"/meteo/Scandriglia\",6713 => \"/meteo/Scanno\",6714 => \"/meteo/Scano+di+montiferro\",6715 => \"/meteo/Scansano\",6716 => \"/meteo/Scanzano+jonico\",6717 => \"/meteo/Scanzorosciate\",6718 => \"/meteo/Scapoli\",8120 => \"/meteo/Scario\",6719 => \"/meteo/Scarlino\",6720 => \"/meteo/Scarmagno\",6721 => \"/meteo/Scarnafigi\",6722 => \"/meteo/Scarperia\",8139 => \"/meteo/Scauri\",6723 => \"/meteo/Scena\",6724 => \"/meteo/Scerni\",6725 => \"/meteo/Scheggia+e+pascelupo\",6726 => \"/meteo/Scheggino\",6727 => \"/meteo/Schiavi+di+Abruzzo\",6728 => \"/meteo/Schiavon\",8456 => \"/meteo/Schiavonea+di+Corigliano\",6729 => \"/meteo/Schignano\",6730 => \"/meteo/Schilpario\",6731 => \"/meteo/Schio\",6732 => \"/meteo/Schivenoglia\",6733 => \"/meteo/Sciacca\",6734 => \"/meteo/Sciara\",6735 => \"/meteo/Scicli\",6736 => \"/meteo/Scido\",6737 => \"/meteo/Scigliano\",6738 => \"/meteo/Scilla\",6739 => \"/meteo/Scillato\",6740 => \"/meteo/Sciolze\",6741 => \"/meteo/Scisciano\",6742 => \"/meteo/Sclafani+bagni\",6743 => \"/meteo/Scontrone\",6744 => \"/meteo/Scopa\",6745 => \"/meteo/Scopello\",6746 => \"/meteo/Scoppito\",6747 => \"/meteo/Scordia\",6748 => \"/meteo/Scorrano\",6749 => \"/meteo/Scorze'\",6750 => \"/meteo/Scurcola+marsicana\",6751 => \"/meteo/Scurelle\",6752 => \"/meteo/Scurzolengo\",6753 => \"/meteo/Seborga\",6754 => \"/meteo/Secinaro\",6755 => \"/meteo/Secli'\",8336 => \"/meteo/Secondino\",6756 => \"/meteo/Secugnago\",6757 => \"/meteo/Sedegliano\",6758 => \"/meteo/Sedico\",6759 => \"/meteo/Sedilo\",6760 => \"/meteo/Sedini\",6761 => \"/meteo/Sedriano\",6762 => \"/meteo/Sedrina\",6763 => \"/meteo/Sefro\",6764 => \"/meteo/Segariu\",8714 => \"/meteo/Segesta\",6765 => \"/meteo/Seggiano\",6766 => \"/meteo/Segni\",6767 => \"/meteo/Segonzano\",6768 => \"/meteo/Segrate\",6769 => \"/meteo/Segusino\",6770 => \"/meteo/Selargius\",6771 => \"/meteo/Selci\",6772 => \"/meteo/Selegas\",8715 => \"/meteo/Selinunte\",8130 => \"/meteo/Sella+Nevea\",6773 => \"/meteo/Sellano\",8651 => \"/meteo/Sellata+Arioso\",6774 => \"/meteo/Sellero\",8238 => \"/meteo/Selletta\",6775 => \"/meteo/Sellia\",6776 => \"/meteo/Sellia+marina\",6777 => \"/meteo/Selva+dei+Molini\",6778 => \"/meteo/Selva+di+Cadore\",6779 => \"/meteo/Selva+di+Progno\",6780 => \"/meteo/Selva+di+Val+Gardena\",6781 => \"/meteo/Selvazzano+dentro\",6782 => \"/meteo/Selve+marcone\",6783 => \"/meteo/Selvino\",6784 => \"/meteo/Semestene\",6785 => \"/meteo/Semiana\",6786 => \"/meteo/Seminara\",6787 => \"/meteo/Semproniano\",6788 => \"/meteo/Senago\",6789 => \"/meteo/Senale+San+Felice\",6790 => \"/meteo/Senales\",6791 => \"/meteo/Seneghe\",6792 => \"/meteo/Senerchia\",6793 => \"/meteo/Seniga\",6794 => \"/meteo/Senigallia\",6795 => \"/meteo/Senis\",6796 => \"/meteo/Senise\",6797 => \"/meteo/Senna+comasco\",6798 => \"/meteo/Senna+lodigiana\",6799 => \"/meteo/Sennariolo\",6800 => \"/meteo/Sennori\",6801 => \"/meteo/Senorbi'\",6802 => \"/meteo/Sepino\",6803 => \"/meteo/Seppiana\",6804 => \"/meteo/Sequals\",6805 => \"/meteo/Seravezza\",6806 => \"/meteo/Serdiana\",6807 => \"/meteo/Seregno\",6808 => \"/meteo/Seren+del+grappa\",6809 => \"/meteo/Sergnano\",6810 => \"/meteo/Seriate\",6811 => \"/meteo/Serina\",6812 => \"/meteo/Serino\",6813 => \"/meteo/Serle\",6814 => \"/meteo/Sermide\",6815 => \"/meteo/Sermoneta\",6816 => \"/meteo/Sernaglia+della+Battaglia\",6817 => \"/meteo/Sernio\",6818 => \"/meteo/Serole\",6819 => \"/meteo/Serra+d'aiello\",6820 => \"/meteo/Serra+de'conti\",6821 => \"/meteo/Serra+pedace\",6822 => \"/meteo/Serra+ricco'\",6823 => \"/meteo/Serra+San+Bruno\",6824 => \"/meteo/Serra+San+Quirico\",6825 => \"/meteo/Serra+Sant'Abbondio\",6826 => \"/meteo/Serracapriola\",6827 => \"/meteo/Serradifalco\",6828 => \"/meteo/Serralunga+d'Alba\",6829 => \"/meteo/Serralunga+di+Crea\",6830 => \"/meteo/Serramanna\",6831 => \"/meteo/Serramazzoni\",6832 => \"/meteo/Serramezzana\",6833 => \"/meteo/Serramonacesca\",6834 => \"/meteo/Serrapetrona\",6835 => \"/meteo/Serrara+fontana\",6836 => \"/meteo/Serrastretta\",6837 => \"/meteo/Serrata\",6838 => \"/meteo/Serravalle+a+po\",6839 => \"/meteo/Serravalle+di+chienti\",6840 => \"/meteo/Serravalle+langhe\",6841 => \"/meteo/Serravalle+pistoiese\",6842 => \"/meteo/Serravalle+Scrivia\",6843 => \"/meteo/Serravalle+Sesia\",6844 => \"/meteo/Serre\",6845 => \"/meteo/Serrenti\",6846 => \"/meteo/Serri\",6847 => \"/meteo/Serrone\",6848 => \"/meteo/Serrungarina\",6849 => \"/meteo/Sersale\",6850 => \"/meteo/Servigliano\",6851 => \"/meteo/Sessa+aurunca\",6852 => \"/meteo/Sessa+cilento\",6853 => \"/meteo/Sessame\",6854 => \"/meteo/Sessano+del+Molise\",6855 => \"/meteo/Sesta+godano\",6856 => \"/meteo/Sestino\",6857 => \"/meteo/Sesto\",6858 => \"/meteo/Sesto+al+reghena\",6859 => \"/meteo/Sesto+calende\",8709 => \"/meteo/Sesto+Calende+Alta\",6860 => \"/meteo/Sesto+campano\",6861 => \"/meteo/Sesto+ed+Uniti\",6862 => \"/meteo/Sesto+fiorentino\",6863 => \"/meteo/Sesto+San+Giovanni\",6864 => \"/meteo/Sestola\",6865 => \"/meteo/Sestri+levante\",6866 => \"/meteo/Sestriere\",6867 => \"/meteo/Sestu\",6868 => \"/meteo/Settala\",8316 => \"/meteo/Settebagni\",6869 => \"/meteo/Settefrati\",6870 => \"/meteo/Settime\",6871 => \"/meteo/Settimo+milanese\",6872 => \"/meteo/Settimo+rottaro\",6873 => \"/meteo/Settimo+San+Pietro\",6874 => \"/meteo/Settimo+torinese\",6875 => \"/meteo/Settimo+vittone\",6876 => \"/meteo/Settingiano\",6877 => \"/meteo/Setzu\",6878 => \"/meteo/Seui\",6879 => \"/meteo/Seulo\",6880 => \"/meteo/Seveso\",6881 => \"/meteo/Sezzadio\",6882 => \"/meteo/Sezze\",6883 => \"/meteo/Sfruz\",6884 => \"/meteo/Sgonico\",6885 => \"/meteo/Sgurgola\",6886 => \"/meteo/Siamaggiore\",6887 => \"/meteo/Siamanna\",6888 => \"/meteo/Siano\",6889 => \"/meteo/Siapiccia\",8114 => \"/meteo/Sibari\",6890 => \"/meteo/Sicignano+degli+Alburni\",6891 => \"/meteo/Siculiana\",6892 => \"/meteo/Siddi\",6893 => \"/meteo/Siderno\",6894 => \"/meteo/Siena\",6895 => \"/meteo/Sigillo\",6896 => \"/meteo/Signa\",8603 => \"/meteo/Sigonella\",6897 => \"/meteo/Silandro\",6898 => \"/meteo/Silanus\",6899 => \"/meteo/Silea\",6900 => \"/meteo/Siligo\",6901 => \"/meteo/Siliqua\",6902 => \"/meteo/Silius\",6903 => \"/meteo/Sillano\",6904 => \"/meteo/Sillavengo\",6905 => \"/meteo/Silvano+d'orba\",6906 => \"/meteo/Silvano+pietra\",6907 => \"/meteo/Silvi\",6908 => \"/meteo/Simala\",6909 => \"/meteo/Simaxis\",6910 => \"/meteo/Simbario\",6911 => \"/meteo/Simeri+crichi\",6912 => \"/meteo/Sinagra\",6913 => \"/meteo/Sinalunga\",6914 => \"/meteo/Sindia\",6915 => \"/meteo/Sini\",6916 => \"/meteo/Sinio\",6917 => \"/meteo/Siniscola\",6918 => \"/meteo/Sinnai\",6919 => \"/meteo/Sinopoli\",6920 => \"/meteo/Siracusa\",6921 => \"/meteo/Sirignano\",6922 => \"/meteo/Siris\",6923 => \"/meteo/Sirmione\",8457 => \"/meteo/Sirolo\",6925 => \"/meteo/Sirone\",6926 => \"/meteo/Siror\",6927 => \"/meteo/Sirtori\",6928 => \"/meteo/Sissa\",8492 => \"/meteo/Sistiana\",6929 => \"/meteo/Siurgus+donigala\",6930 => \"/meteo/Siziano\",6931 => \"/meteo/Sizzano\",8258 => \"/meteo/Ski+center+Latemar\",6932 => \"/meteo/Sluderno\",6933 => \"/meteo/Smarano\",6934 => \"/meteo/Smerillo\",6935 => \"/meteo/Soave\",8341 => \"/meteo/Sobretta+Vallalpe\",6936 => \"/meteo/Socchieve\",6937 => \"/meteo/Soddi\",6938 => \"/meteo/Sogliano+al+rubicone\",6939 => \"/meteo/Sogliano+Cavour\",6940 => \"/meteo/Soglio\",6941 => \"/meteo/Soiano+del+lago\",6942 => \"/meteo/Solagna\",6943 => \"/meteo/Solarino\",6944 => \"/meteo/Solaro\",6945 => \"/meteo/Solarolo\",6946 => \"/meteo/Solarolo+Rainerio\",6947 => \"/meteo/Solarussa\",6948 => \"/meteo/Solbiate\",6949 => \"/meteo/Solbiate+Arno\",6950 => \"/meteo/Solbiate+Olona\",8307 => \"/meteo/Solda\",6951 => \"/meteo/Soldano\",6952 => \"/meteo/Soleminis\",6953 => \"/meteo/Solero\",6954 => \"/meteo/Solesino\",6955 => \"/meteo/Soleto\",6956 => \"/meteo/Solferino\",6957 => \"/meteo/Soliera\",6958 => \"/meteo/Solignano\",6959 => \"/meteo/Solofra\",6960 => \"/meteo/Solonghello\",6961 => \"/meteo/Solopaca\",6962 => \"/meteo/Solto+collina\",6963 => \"/meteo/Solza\",6964 => \"/meteo/Somaglia\",6965 => \"/meteo/Somano\",6966 => \"/meteo/Somma+lombardo\",6967 => \"/meteo/Somma+vesuviana\",6968 => \"/meteo/Sommacampagna\",6969 => \"/meteo/Sommariva+del+bosco\",6970 => \"/meteo/Sommariva+Perno\",6971 => \"/meteo/Sommatino\",6972 => \"/meteo/Sommo\",6973 => \"/meteo/Sona\",6974 => \"/meteo/Soncino\",6975 => \"/meteo/Sondalo\",6976 => \"/meteo/Sondrio\",6977 => \"/meteo/Songavazzo\",6978 => \"/meteo/Sonico\",6979 => \"/meteo/Sonnino\",6980 => \"/meteo/Soprana\",6981 => \"/meteo/Sora\",6982 => \"/meteo/Soraga\",6983 => \"/meteo/Soragna\",6984 => \"/meteo/Sorano\",6985 => \"/meteo/Sorbo+San+Basile\",6986 => \"/meteo/Sorbo+Serpico\",6987 => \"/meteo/Sorbolo\",6988 => \"/meteo/Sordevolo\",6989 => \"/meteo/Sordio\",6990 => \"/meteo/Soresina\",6991 => \"/meteo/Sorga'\",6992 => \"/meteo/Sorgono\",6993 => \"/meteo/Sori\",6994 => \"/meteo/Sorianello\",6995 => \"/meteo/Soriano+calabro\",6996 => \"/meteo/Soriano+nel+cimino\",6997 => \"/meteo/Sorico\",6998 => \"/meteo/Soriso\",6999 => \"/meteo/Sorisole\",7000 => \"/meteo/Sormano\",7001 => \"/meteo/Sorradile\",7002 => \"/meteo/Sorrento\",7003 => \"/meteo/Sorso\",7004 => \"/meteo/Sortino\",7005 => \"/meteo/Sospiro\",7006 => \"/meteo/Sospirolo\",7007 => \"/meteo/Sossano\",7008 => \"/meteo/Sostegno\",7009 => \"/meteo/Sotto+il+monte+Giovanni+XXIII\",8747 => \"/meteo/Sottomarina\",7010 => \"/meteo/Sover\",7011 => \"/meteo/Soverato\",7012 => \"/meteo/Sovere\",7013 => \"/meteo/Soveria+mannelli\",7014 => \"/meteo/Soveria+simeri\",7015 => \"/meteo/Soverzene\",7016 => \"/meteo/Sovicille\",7017 => \"/meteo/Sovico\",7018 => \"/meteo/Sovizzo\",7019 => \"/meteo/Sovramonte\",7020 => \"/meteo/Sozzago\",7021 => \"/meteo/Spadafora\",7022 => \"/meteo/Spadola\",7023 => \"/meteo/Sparanise\",7024 => \"/meteo/Sparone\",7025 => \"/meteo/Specchia\",7026 => \"/meteo/Spello\",8585 => \"/meteo/Spelonga\",7027 => \"/meteo/Spera\",7028 => \"/meteo/Sperlinga\",7029 => \"/meteo/Sperlonga\",7030 => \"/meteo/Sperone\",7031 => \"/meteo/Spessa\",7032 => \"/meteo/Spezzano+albanese\",7033 => \"/meteo/Spezzano+della+Sila\",7034 => \"/meteo/Spezzano+piccolo\",7035 => \"/meteo/Spiazzo\",7036 => \"/meteo/Spigno+monferrato\",7037 => \"/meteo/Spigno+saturnia\",7038 => \"/meteo/Spilamberto\",7039 => \"/meteo/Spilimbergo\",7040 => \"/meteo/Spilinga\",7041 => \"/meteo/Spinadesco\",7042 => \"/meteo/Spinazzola\",7043 => \"/meteo/Spinea\",7044 => \"/meteo/Spineda\",7045 => \"/meteo/Spinete\",7046 => \"/meteo/Spineto+Scrivia\",7047 => \"/meteo/Spinetoli\",7048 => \"/meteo/Spino+d'Adda\",7049 => \"/meteo/Spinone+al+lago\",8421 => \"/meteo/Spinoso\",7051 => \"/meteo/Spirano\",7052 => \"/meteo/Spoleto\",7053 => \"/meteo/Spoltore\",7054 => \"/meteo/Spongano\",7055 => \"/meteo/Spormaggiore\",7056 => \"/meteo/Sporminore\",7057 => \"/meteo/Spotorno\",7058 => \"/meteo/Spresiano\",7059 => \"/meteo/Spriana\",7060 => \"/meteo/Squillace\",7061 => \"/meteo/Squinzano\",8248 => \"/meteo/Staffal\",7062 => \"/meteo/Staffolo\",7063 => \"/meteo/Stagno+lombardo\",7064 => \"/meteo/Staiti\",7065 => \"/meteo/Staletti\",7066 => \"/meteo/Stanghella\",7067 => \"/meteo/Staranzano\",7068 => \"/meteo/Statte\",7069 => \"/meteo/Stazzano\",7070 => \"/meteo/Stazzema\",7071 => \"/meteo/Stazzona\",7072 => \"/meteo/Stefanaconi\",7073 => \"/meteo/Stella\",7074 => \"/meteo/Stella+cilento\",7075 => \"/meteo/Stellanello\",7076 => \"/meteo/Stelvio\",7077 => \"/meteo/Stenico\",7078 => \"/meteo/Sternatia\",7079 => \"/meteo/Stezzano\",7080 => \"/meteo/Stia\",7081 => \"/meteo/Stienta\",7082 => \"/meteo/Stigliano\",7083 => \"/meteo/Stignano\",7084 => \"/meteo/Stilo\",7085 => \"/meteo/Stimigliano\",7086 => \"/meteo/Stintino\",7087 => \"/meteo/Stio\",7088 => \"/meteo/Stornara\",7089 => \"/meteo/Stornarella\",7090 => \"/meteo/Storo\",7091 => \"/meteo/Stra\",7092 => \"/meteo/Stradella\",7093 => \"/meteo/Strambinello\",7094 => \"/meteo/Strambino\",7095 => \"/meteo/Strangolagalli\",7096 => \"/meteo/Stregna\",7097 => \"/meteo/Strembo\",7098 => \"/meteo/Stresa\",7099 => \"/meteo/Strevi\",7100 => \"/meteo/Striano\",7101 => \"/meteo/Strigno\",8182 => \"/meteo/Stromboli\",7102 => \"/meteo/Strona\",7103 => \"/meteo/Stroncone\",7104 => \"/meteo/Strongoli\",7105 => \"/meteo/Stroppiana\",7106 => \"/meteo/Stroppo\",7107 => \"/meteo/Strozza\",8493 => \"/meteo/Stupizza\",7108 => \"/meteo/Sturno\",7109 => \"/meteo/Suardi\",7110 => \"/meteo/Subbiano\",7111 => \"/meteo/Subiaco\",7112 => \"/meteo/Succivo\",7113 => \"/meteo/Sueglio\",7114 => \"/meteo/Suelli\",7115 => \"/meteo/Suello\",7116 => \"/meteo/Suisio\",7117 => \"/meteo/Sulbiate\",7118 => \"/meteo/Sulmona\",7119 => \"/meteo/Sulzano\",7120 => \"/meteo/Sumirago\",7121 => \"/meteo/Summonte\",7122 => \"/meteo/Suni\",7123 => \"/meteo/Suno\",7124 => \"/meteo/Supersano\",7125 => \"/meteo/Supino\",7126 => \"/meteo/Surano\",7127 => \"/meteo/Surbo\",7128 => \"/meteo/Susa\",7129 => \"/meteo/Susegana\",7130 => \"/meteo/Sustinente\",7131 => \"/meteo/Sutera\",7132 => \"/meteo/Sutri\",7133 => \"/meteo/Sutrio\",7134 => \"/meteo/Suvereto\",7135 => \"/meteo/Suzzara\",7136 => \"/meteo/Taceno\",7137 => \"/meteo/Tadasuni\",7138 => \"/meteo/Taggia\",7139 => \"/meteo/Tagliacozzo\",8450 => \"/meteo/Tagliacozzo+casello\",7140 => \"/meteo/Taglio+di+po\",7141 => \"/meteo/Tagliolo+monferrato\",7142 => \"/meteo/Taibon+agordino\",7143 => \"/meteo/Taino\",7144 => \"/meteo/Taio\",7145 => \"/meteo/Taipana\",7146 => \"/meteo/Talamello\",7147 => \"/meteo/Talamona\",8299 => \"/meteo/Talamone\",7148 => \"/meteo/Talana\",7149 => \"/meteo/Taleggio\",7150 => \"/meteo/Talla\",7151 => \"/meteo/Talmassons\",7152 => \"/meteo/Tambre\",7153 => \"/meteo/Taormina\",7154 => \"/meteo/Tapogliano\",7155 => \"/meteo/Tarano\",7156 => \"/meteo/Taranta+peligna\",7157 => \"/meteo/Tarantasca\",7158 => \"/meteo/Taranto\",8550 => \"/meteo/Taranto+M.+A.+Grottaglie\",7159 => \"/meteo/Tarcento\",7160 => \"/meteo/Tarquinia\",8140 => \"/meteo/Tarquinia+Lido\",7161 => \"/meteo/Tarsia\",7162 => \"/meteo/Tartano\",7163 => \"/meteo/Tarvisio\",8466 => \"/meteo/Tarvisio+casello\",7164 => \"/meteo/Tarzo\",7165 => \"/meteo/Tassarolo\",7166 => \"/meteo/Tassullo\",7167 => \"/meteo/Taurano\",7168 => \"/meteo/Taurasi\",7169 => \"/meteo/Taurianova\",7170 => \"/meteo/Taurisano\",7171 => \"/meteo/Tavagnacco\",7172 => \"/meteo/Tavagnasco\",7173 => \"/meteo/Tavarnelle+val+di+pesa\",7174 => \"/meteo/Tavazzano+con+villavesco\",7175 => \"/meteo/Tavenna\",7176 => \"/meteo/Taverna\",7177 => \"/meteo/Tavernerio\",7178 => \"/meteo/Tavernola+bergamasca\",7179 => \"/meteo/Tavernole+sul+Mella\",7180 => \"/meteo/Taviano\",7181 => \"/meteo/Tavigliano\",7182 => \"/meteo/Tavoleto\",7183 => \"/meteo/Tavullia\",8362 => \"/meteo/Teana\",7185 => \"/meteo/Teano\",7186 => \"/meteo/Teggiano\",7187 => \"/meteo/Teglio\",7188 => \"/meteo/Teglio+veneto\",7189 => \"/meteo/Telese+terme\",7190 => \"/meteo/Telgate\",7191 => \"/meteo/Telti\",7192 => \"/meteo/Telve\",7193 => \"/meteo/Telve+di+sopra\",7194 => \"/meteo/Tempio+Pausania\",7195 => \"/meteo/Temu'\",7196 => \"/meteo/Tenna\",7197 => \"/meteo/Tenno\",7198 => \"/meteo/Teolo\",7199 => \"/meteo/Teor\",7200 => \"/meteo/Teora\",7201 => \"/meteo/Teramo\",8449 => \"/meteo/Teramo+Val+Vomano\",7202 => \"/meteo/Terdobbiate\",7203 => \"/meteo/Terelle\",7204 => \"/meteo/Terento\",7205 => \"/meteo/Terenzo\",7206 => \"/meteo/Tergu\",7207 => \"/meteo/Terlago\",7208 => \"/meteo/Terlano\",7209 => \"/meteo/Terlizzi\",8158 => \"/meteo/Terme+di+Lurisia\",7210 => \"/meteo/Terme+vigliatore\",7211 => \"/meteo/Termeno+sulla+strada+del+vino\",7212 => \"/meteo/Termini+imerese\",8133 => \"/meteo/Terminillo\",7213 => \"/meteo/Termoli\",7214 => \"/meteo/Ternate\",7215 => \"/meteo/Ternengo\",7216 => \"/meteo/Terni\",7217 => \"/meteo/Terno+d'isola\",7218 => \"/meteo/Terracina\",7219 => \"/meteo/Terragnolo\",7220 => \"/meteo/Terralba\",7221 => \"/meteo/Terranova+da+Sibari\",7222 => \"/meteo/Terranova+dei+passerini\",8379 => \"/meteo/Terranova+di+Pollino\",7224 => \"/meteo/Terranova+Sappo+Minulio\",7225 => \"/meteo/Terranuova+bracciolini\",7226 => \"/meteo/Terrasini\",7227 => \"/meteo/Terrassa+padovana\",7228 => \"/meteo/Terravecchia\",7229 => \"/meteo/Terrazzo\",7230 => \"/meteo/Terres\",7231 => \"/meteo/Terricciola\",7232 => \"/meteo/Terruggia\",7233 => \"/meteo/Tertenia\",7234 => \"/meteo/Terzigno\",7235 => \"/meteo/Terzo\",7236 => \"/meteo/Terzo+d'Aquileia\",7237 => \"/meteo/Terzolas\",7238 => \"/meteo/Terzorio\",7239 => \"/meteo/Tesero\",7240 => \"/meteo/Tesimo\",7241 => \"/meteo/Tessennano\",7242 => \"/meteo/Testico\",7243 => \"/meteo/Teti\",7244 => \"/meteo/Teulada\",7245 => \"/meteo/Teverola\",7246 => \"/meteo/Tezze+sul+Brenta\",8716 => \"/meteo/Tharros\",7247 => \"/meteo/Thiene\",7248 => \"/meteo/Thiesi\",7249 => \"/meteo/Tiana\",7250 => \"/meteo/Tiarno+di+sopra\",7251 => \"/meteo/Tiarno+di+sotto\",7252 => \"/meteo/Ticengo\",7253 => \"/meteo/Ticineto\",7254 => \"/meteo/Tiggiano\",7255 => \"/meteo/Tiglieto\",7256 => \"/meteo/Tigliole\",7257 => \"/meteo/Tignale\",7258 => \"/meteo/Tinnura\",7259 => \"/meteo/Tione+degli+Abruzzi\",7260 => \"/meteo/Tione+di+Trento\",7261 => \"/meteo/Tirano\",7262 => \"/meteo/Tires\",7263 => \"/meteo/Tiriolo\",7264 => \"/meteo/Tirolo\",8194 => \"/meteo/Tirrenia\",8719 => \"/meteo/Tiscali\",7265 => \"/meteo/Tissi\",8422 => \"/meteo/Tito\",7267 => \"/meteo/Tivoli\",8451 => \"/meteo/Tivoli+casello\",7268 => \"/meteo/Tizzano+val+Parma\",7269 => \"/meteo/Toano\",7270 => \"/meteo/Tocco+caudio\",7271 => \"/meteo/Tocco+da+Casauria\",7272 => \"/meteo/Toceno\",7273 => \"/meteo/Todi\",7274 => \"/meteo/Toffia\",7275 => \"/meteo/Toirano\",7276 => \"/meteo/Tolentino\",7277 => \"/meteo/Tolfa\",7278 => \"/meteo/Tollegno\",7279 => \"/meteo/Tollo\",7280 => \"/meteo/Tolmezzo\",8423 => \"/meteo/Tolve\",7282 => \"/meteo/Tombolo\",7283 => \"/meteo/Ton\",7284 => \"/meteo/Tonadico\",7285 => \"/meteo/Tonara\",7286 => \"/meteo/Tonco\",7287 => \"/meteo/Tonengo\",7288 => \"/meteo/Tonezza+del+Cimone\",7289 => \"/meteo/Tora+e+piccilli\",8132 => \"/meteo/Torano\",7290 => \"/meteo/Torano+castello\",7291 => \"/meteo/Torano+nuovo\",7292 => \"/meteo/Torbole+casaglia\",7293 => \"/meteo/Torcegno\",7294 => \"/meteo/Torchiara\",7295 => \"/meteo/Torchiarolo\",7296 => \"/meteo/Torella+dei+lombardi\",7297 => \"/meteo/Torella+del+sannio\",7298 => \"/meteo/Torgiano\",7299 => \"/meteo/Torgnon\",7300 => \"/meteo/Torino\",8271 => \"/meteo/Torino+Caselle\",7301 => \"/meteo/Torino+di+Sangro\",8494 => \"/meteo/Torino+di+Sangro+Marina\",7302 => \"/meteo/Toritto\",7303 => \"/meteo/Torlino+Vimercati\",7304 => \"/meteo/Tornaco\",7305 => \"/meteo/Tornareccio\",7306 => \"/meteo/Tornata\",7307 => \"/meteo/Tornimparte\",8445 => \"/meteo/Tornimparte+casello\",7308 => \"/meteo/Torno\",7309 => \"/meteo/Tornolo\",7310 => \"/meteo/Toro\",7311 => \"/meteo/Torpe'\",7312 => \"/meteo/Torraca\",7313 => \"/meteo/Torralba\",7314 => \"/meteo/Torrazza+coste\",7315 => \"/meteo/Torrazza+Piemonte\",7316 => \"/meteo/Torrazzo\",7317 => \"/meteo/Torre+Annunziata\",7318 => \"/meteo/Torre+Beretti+e+Castellaro\",7319 => \"/meteo/Torre+boldone\",7320 => \"/meteo/Torre+bormida\",7321 => \"/meteo/Torre+cajetani\",7322 => \"/meteo/Torre+canavese\",7323 => \"/meteo/Torre+d'arese\",7324 => \"/meteo/Torre+d'isola\",7325 => \"/meteo/Torre+de'+passeri\",7326 => \"/meteo/Torre+de'busi\",7327 => \"/meteo/Torre+de'negri\",7328 => \"/meteo/Torre+de'picenardi\",7329 => \"/meteo/Torre+de'roveri\",7330 => \"/meteo/Torre+del+greco\",7331 => \"/meteo/Torre+di+mosto\",7332 => \"/meteo/Torre+di+ruggiero\",7333 => \"/meteo/Torre+di+Santa+Maria\",7334 => \"/meteo/Torre+le+nocelle\",7335 => \"/meteo/Torre+mondovi'\",7336 => \"/meteo/Torre+orsaia\",8592 => \"/meteo/Torre+Pali\",7337 => \"/meteo/Torre+pallavicina\",7338 => \"/meteo/Torre+pellice\",7339 => \"/meteo/Torre+San+Giorgio\",8596 => \"/meteo/Torre+San+Giovanni\",8595 => \"/meteo/Torre+San+Gregorio\",7340 => \"/meteo/Torre+San+Patrizio\",7341 => \"/meteo/Torre+Santa+Susanna\",8593 => \"/meteo/Torre+Vado\",7342 => \"/meteo/Torreano\",7343 => \"/meteo/Torrebelvicino\",7344 => \"/meteo/Torrebruna\",7345 => \"/meteo/Torrecuso\",7346 => \"/meteo/Torreglia\",7347 => \"/meteo/Torregrotta\",7348 => \"/meteo/Torremaggiore\",7349 => \"/meteo/Torrenova\",7350 => \"/meteo/Torresina\",7351 => \"/meteo/Torretta\",7352 => \"/meteo/Torrevecchia+pia\",7353 => \"/meteo/Torrevecchia+teatina\",7354 => \"/meteo/Torri+del+benaco\",7355 => \"/meteo/Torri+di+quartesolo\",7356 => \"/meteo/Torri+in+sabina\",7357 => \"/meteo/Torriana\",7358 => \"/meteo/Torrice\",7359 => \"/meteo/Torricella\",7360 => \"/meteo/Torricella+del+pizzo\",7361 => \"/meteo/Torricella+in+sabina\",7362 => \"/meteo/Torricella+peligna\",7363 => \"/meteo/Torricella+sicura\",7364 => \"/meteo/Torricella+verzate\",7365 => \"/meteo/Torriglia\",7366 => \"/meteo/Torrile\",7367 => \"/meteo/Torrioni\",7368 => \"/meteo/Torrita+di+Siena\",7369 => \"/meteo/Torrita+tiberina\",7370 => \"/meteo/Tortoli'\",7371 => \"/meteo/Tortona\",7372 => \"/meteo/Tortora\",7373 => \"/meteo/Tortorella\",7374 => \"/meteo/Tortoreto\",8601 => \"/meteo/Tortoreto+lido\",7375 => \"/meteo/Tortorici\",8138 => \"/meteo/Torvaianica\",7376 => \"/meteo/Torviscosa\",7377 => \"/meteo/Toscolano+maderno\",7378 => \"/meteo/Tossicia\",7379 => \"/meteo/Tovo+di+Sant'Agata\",7380 => \"/meteo/Tovo+San+Giacomo\",7381 => \"/meteo/Trabia\",7382 => \"/meteo/Tradate\",8214 => \"/meteo/Trafoi\",7383 => \"/meteo/Tramatza\",7384 => \"/meteo/Trambileno\",7385 => \"/meteo/Tramonti\",7386 => \"/meteo/Tramonti+di+sopra\",7387 => \"/meteo/Tramonti+di+sotto\",8412 => \"/meteo/Tramutola\",7389 => \"/meteo/Trana\",7390 => \"/meteo/Trani\",7391 => \"/meteo/Transacqua\",7392 => \"/meteo/Traona\",7393 => \"/meteo/Trapani\",8544 => \"/meteo/Trapani+Birgi\",7394 => \"/meteo/Trappeto\",7395 => \"/meteo/Trarego+Viggiona\",7396 => \"/meteo/Trasacco\",7397 => \"/meteo/Trasaghis\",7398 => \"/meteo/Trasquera\",7399 => \"/meteo/Tratalias\",7400 => \"/meteo/Trausella\",7401 => \"/meteo/Travaco'+siccomario\",7402 => \"/meteo/Travagliato\",7403 => \"/meteo/Travedona+monate\",7404 => \"/meteo/Traversella\",7405 => \"/meteo/Traversetolo\",7406 => \"/meteo/Traves\",7407 => \"/meteo/Travesio\",7408 => \"/meteo/Travo\",8187 => \"/meteo/Tre+fontane\",7409 => \"/meteo/Trebaseleghe\",7410 => \"/meteo/Trebisacce\",7411 => \"/meteo/Trecasali\",7412 => \"/meteo/Trecase\",7413 => \"/meteo/Trecastagni\",7414 => \"/meteo/Trecate\",7415 => \"/meteo/Trecchina\",7416 => \"/meteo/Trecenta\",7417 => \"/meteo/Tredozio\",7418 => \"/meteo/Treglio\",7419 => \"/meteo/Tregnago\",7420 => \"/meteo/Treia\",7421 => \"/meteo/Treiso\",7422 => \"/meteo/Tremenico\",7423 => \"/meteo/Tremestieri+etneo\",7424 => \"/meteo/Tremezzo\",7425 => \"/meteo/Tremosine\",7426 => \"/meteo/Trenta\",7427 => \"/meteo/Trentinara\",7428 => \"/meteo/Trento\",7429 => \"/meteo/Trentola-ducenta\",7430 => \"/meteo/Trenzano\",8146 => \"/meteo/Trepalle\",7431 => \"/meteo/Treppo+carnico\",7432 => \"/meteo/Treppo+grande\",7433 => \"/meteo/Trepuzzi\",7434 => \"/meteo/Trequanda\",7435 => \"/meteo/Tres\",7436 => \"/meteo/Tresana\",7437 => \"/meteo/Trescore+balneario\",7438 => \"/meteo/Trescore+cremasco\",7439 => \"/meteo/Tresigallo\",7440 => \"/meteo/Tresivio\",7441 => \"/meteo/Tresnuraghes\",7442 => \"/meteo/Trevenzuolo\",7443 => \"/meteo/Trevi\",7444 => \"/meteo/Trevi+nel+lazio\",7445 => \"/meteo/Trevico\",7446 => \"/meteo/Treviglio\",7447 => \"/meteo/Trevignano\",7448 => \"/meteo/Trevignano+romano\",7449 => \"/meteo/Treville\",7450 => \"/meteo/Treviolo\",7451 => \"/meteo/Treviso\",7452 => \"/meteo/Treviso+bresciano\",8543 => \"/meteo/Treviso+Sant'Angelo\",7453 => \"/meteo/Trezzano+rosa\",7454 => \"/meteo/Trezzano+sul+Naviglio\",7455 => \"/meteo/Trezzo+sull'Adda\",7456 => \"/meteo/Trezzo+Tinella\",7457 => \"/meteo/Trezzone\",7458 => \"/meteo/Tribano\",7459 => \"/meteo/Tribiano\",7460 => \"/meteo/Tribogna\",7461 => \"/meteo/Tricarico\",7462 => \"/meteo/Tricase\",8597 => \"/meteo/Tricase+porto\",7463 => \"/meteo/Tricerro\",7464 => \"/meteo/Tricesimo\",7465 => \"/meteo/Trichiana\",7466 => \"/meteo/Triei\",7467 => \"/meteo/Trieste\",8472 => \"/meteo/Trieste+Ronchi+dei+Legionari\",7468 => \"/meteo/Triggiano\",7469 => \"/meteo/Trigolo\",7470 => \"/meteo/Trinita+d'Agultu+e+Vignola\",7471 => \"/meteo/Trinita'\",7472 => \"/meteo/Trinitapoli\",7473 => \"/meteo/Trino\",7474 => \"/meteo/Triora\",7475 => \"/meteo/Tripi\",7476 => \"/meteo/Trisobbio\",7477 => \"/meteo/Trissino\",7478 => \"/meteo/Triuggio\",7479 => \"/meteo/Trivento\",7480 => \"/meteo/Trivero\",7481 => \"/meteo/Trivigliano\",7482 => \"/meteo/Trivignano+udinese\",8413 => \"/meteo/Trivigno\",7484 => \"/meteo/Trivolzio\",7485 => \"/meteo/Trodena\",7486 => \"/meteo/Trofarello\",7487 => \"/meteo/Troia\",7488 => \"/meteo/Troina\",7489 => \"/meteo/Tromello\",7490 => \"/meteo/Trontano\",7491 => \"/meteo/Tronzano+lago+maggiore\",7492 => \"/meteo/Tronzano+vercellese\",7493 => \"/meteo/Tropea\",7494 => \"/meteo/Trovo\",7495 => \"/meteo/Truccazzano\",7496 => \"/meteo/Tubre\",7497 => \"/meteo/Tuenno\",7498 => \"/meteo/Tufara\",7499 => \"/meteo/Tufillo\",7500 => \"/meteo/Tufino\",7501 => \"/meteo/Tufo\",7502 => \"/meteo/Tuglie\",7503 => \"/meteo/Tuili\",7504 => \"/meteo/Tula\",7505 => \"/meteo/Tuoro+sul+trasimeno\",7506 => \"/meteo/Turania\",7507 => \"/meteo/Turano+lodigiano\",7508 => \"/meteo/Turate\",7509 => \"/meteo/Turbigo\",7510 => \"/meteo/Turi\",7511 => \"/meteo/Turri\",7512 => \"/meteo/Turriaco\",7513 => \"/meteo/Turrivalignani\",8390 => \"/meteo/Tursi\",7515 => \"/meteo/Tusa\",7516 => \"/meteo/Tuscania\",7517 => \"/meteo/Ubiale+Clanezzo\",7518 => \"/meteo/Uboldo\",7519 => \"/meteo/Ucria\",7520 => \"/meteo/Udine\",7521 => \"/meteo/Ugento\",7522 => \"/meteo/Uggiano+la+chiesa\",7523 => \"/meteo/Uggiate+trevano\",7524 => \"/meteo/Ula'+Tirso\",7525 => \"/meteo/Ulassai\",7526 => \"/meteo/Ultimo\",7527 => \"/meteo/Umbertide\",7528 => \"/meteo/Umbriatico\",7529 => \"/meteo/Urago+d'Oglio\",7530 => \"/meteo/Uras\",7531 => \"/meteo/Urbana\",7532 => \"/meteo/Urbania\",7533 => \"/meteo/Urbe\",7534 => \"/meteo/Urbino\",7535 => \"/meteo/Urbisaglia\",7536 => \"/meteo/Urgnano\",7537 => \"/meteo/Uri\",7538 => \"/meteo/Ururi\",7539 => \"/meteo/Urzulei\",7540 => \"/meteo/Uscio\",7541 => \"/meteo/Usellus\",7542 => \"/meteo/Usini\",7543 => \"/meteo/Usmate+Velate\",7544 => \"/meteo/Ussana\",7545 => \"/meteo/Ussaramanna\",7546 => \"/meteo/Ussassai\",7547 => \"/meteo/Usseaux\",7548 => \"/meteo/Usseglio\",7549 => \"/meteo/Ussita\",7550 => \"/meteo/Ustica\",7551 => \"/meteo/Uta\",7552 => \"/meteo/Uzzano\",7553 => \"/meteo/Vaccarizzo+albanese\",7554 => \"/meteo/Vacone\",7555 => \"/meteo/Vacri\",7556 => \"/meteo/Vadena\",7557 => \"/meteo/Vado+ligure\",7558 => \"/meteo/Vagli+sotto\",7559 => \"/meteo/Vaglia\",8388 => \"/meteo/Vaglio+Basilicata\",7561 => \"/meteo/Vaglio+serra\",7562 => \"/meteo/Vaiano\",7563 => \"/meteo/Vaiano+cremasco\",7564 => \"/meteo/Vaie\",7565 => \"/meteo/Vailate\",7566 => \"/meteo/Vairano+Patenora\",7567 => \"/meteo/Vajont\",8511 => \"/meteo/Val+Canale\",7568 => \"/meteo/Val+della+torre\",8243 => \"/meteo/Val+di+Lei\",8237 => \"/meteo/Val+di+Luce\",7569 => \"/meteo/Val+di+nizza\",8440 => \"/meteo/Val+di+Sangro+casello\",7570 => \"/meteo/Val+di+vizze\",8223 => \"/meteo/Val+Ferret\",8521 => \"/meteo/Val+Grauson\",7571 => \"/meteo/Val+Masino\",7572 => \"/meteo/Val+Rezzo\",8215 => \"/meteo/Val+Senales\",8522 => \"/meteo/Val+Urtier\",8224 => \"/meteo/Val+Veny\",7573 => \"/meteo/Valbondione\",7574 => \"/meteo/Valbrembo\",7575 => \"/meteo/Valbrevenna\",7576 => \"/meteo/Valbrona\",8311 => \"/meteo/Valcava\",7577 => \"/meteo/Valda\",7578 => \"/meteo/Valdagno\",7579 => \"/meteo/Valdaora\",7580 => \"/meteo/Valdastico\",7581 => \"/meteo/Valdengo\",7582 => \"/meteo/Valderice\",7583 => \"/meteo/Valdidentro\",7584 => \"/meteo/Valdieri\",7585 => \"/meteo/Valdina\",7586 => \"/meteo/Valdisotto\",7587 => \"/meteo/Valdobbiadene\",7588 => \"/meteo/Valduggia\",7589 => \"/meteo/Valeggio\",7590 => \"/meteo/Valeggio+sul+Mincio\",7591 => \"/meteo/Valentano\",7592 => \"/meteo/Valenza\",7593 => \"/meteo/Valenzano\",7594 => \"/meteo/Valera+fratta\",7595 => \"/meteo/Valfabbrica\",7596 => \"/meteo/Valfenera\",7597 => \"/meteo/Valfloriana\",7598 => \"/meteo/Valfurva\",7599 => \"/meteo/Valganna\",7600 => \"/meteo/Valgioie\",7601 => \"/meteo/Valgoglio\",7602 => \"/meteo/Valgrana\",7603 => \"/meteo/Valgreghentino\",7604 => \"/meteo/Valgrisenche\",7605 => \"/meteo/Valguarnera+caropepe\",8344 => \"/meteo/Valico+Citerna\",8510 => \"/meteo/Valico+dei+Giovi\",8318 => \"/meteo/Valico+di+Monforte\",8509 => \"/meteo/Valico+di+Montemiletto\",8507 => \"/meteo/Valico+di+Scampitella\",7606 => \"/meteo/Vallada+agordina\",7607 => \"/meteo/Vallanzengo\",7608 => \"/meteo/Vallarsa\",7609 => \"/meteo/Vallata\",7610 => \"/meteo/Valle+agricola\",7611 => \"/meteo/Valle+Aurina\",7612 => \"/meteo/Valle+castellana\",8444 => \"/meteo/Valle+del+salto\",7613 => \"/meteo/Valle+dell'Angelo\",7614 => \"/meteo/Valle+di+Cadore\",7615 => \"/meteo/Valle+di+Casies\",7616 => \"/meteo/Valle+di+maddaloni\",7617 => \"/meteo/Valle+lomellina\",7618 => \"/meteo/Valle+mosso\",7619 => \"/meteo/Valle+salimbene\",7620 => \"/meteo/Valle+San+Nicolao\",7621 => \"/meteo/Vallebona\",7622 => \"/meteo/Vallecorsa\",7623 => \"/meteo/Vallecrosia\",7624 => \"/meteo/Valledolmo\",7625 => \"/meteo/Valledoria\",7626 => \"/meteo/Vallefiorita\",7627 => \"/meteo/Vallelonga\",7628 => \"/meteo/Vallelunga+pratameno\",7629 => \"/meteo/Vallemaio\",7630 => \"/meteo/Vallepietra\",7631 => \"/meteo/Vallerano\",7632 => \"/meteo/Vallermosa\",7633 => \"/meteo/Vallerotonda\",7634 => \"/meteo/Vallesaccarda\",8749 => \"/meteo/Valletta\",7635 => \"/meteo/Valleve\",7636 => \"/meteo/Valli+del+Pasubio\",7637 => \"/meteo/Vallinfreda\",7638 => \"/meteo/Vallio+terme\",7639 => \"/meteo/Vallo+della+Lucania\",7640 => \"/meteo/Vallo+di+Nera\",7641 => \"/meteo/Vallo+torinese\",8191 => \"/meteo/Vallombrosa\",8471 => \"/meteo/Vallon\",7642 => \"/meteo/Valloriate\",7643 => \"/meteo/Valmacca\",7644 => \"/meteo/Valmadrera\",7645 => \"/meteo/Valmala\",8313 => \"/meteo/Valmasino\",7646 => \"/meteo/Valmontone\",7647 => \"/meteo/Valmorea\",7648 => \"/meteo/Valmozzola\",7649 => \"/meteo/Valnegra\",7650 => \"/meteo/Valpelline\",7651 => \"/meteo/Valperga\",7652 => \"/meteo/Valprato+Soana\",7653 => \"/meteo/Valsavarenche\",7654 => \"/meteo/Valsecca\",7655 => \"/meteo/Valsinni\",7656 => \"/meteo/Valsolda\",7657 => \"/meteo/Valstagna\",7658 => \"/meteo/Valstrona\",7659 => \"/meteo/Valtopina\",7660 => \"/meteo/Valtorta\",8148 => \"/meteo/Valtorta+impianti\",7661 => \"/meteo/Valtournenche\",7662 => \"/meteo/Valva\",7663 => \"/meteo/Valvasone\",7664 => \"/meteo/Valverde\",7665 => \"/meteo/Valverde\",7666 => \"/meteo/Valvestino\",7667 => \"/meteo/Vandoies\",7668 => \"/meteo/Vanzaghello\",7669 => \"/meteo/Vanzago\",7670 => \"/meteo/Vanzone+con+San+Carlo\",7671 => \"/meteo/Vaprio+d'Adda\",7672 => \"/meteo/Vaprio+d'Agogna\",7673 => \"/meteo/Varallo\",7674 => \"/meteo/Varallo+Pombia\",7675 => \"/meteo/Varano+Borghi\",7676 => \"/meteo/Varano+de'+Melegari\",7677 => \"/meteo/Varapodio\",7678 => \"/meteo/Varazze\",8600 => \"/meteo/Varcaturo\",7679 => \"/meteo/Varco+sabino\",7680 => \"/meteo/Varedo\",7681 => \"/meteo/Varena\",7682 => \"/meteo/Varenna\",7683 => \"/meteo/Varese\",7684 => \"/meteo/Varese+ligure\",8284 => \"/meteo/Varigotti\",7685 => \"/meteo/Varisella\",7686 => \"/meteo/Varmo\",7687 => \"/meteo/Varna\",7688 => \"/meteo/Varsi\",7689 => \"/meteo/Varzi\",7690 => \"/meteo/Varzo\",7691 => \"/meteo/Vas\",7692 => \"/meteo/Vasanello\",7693 => \"/meteo/Vasia\",7694 => \"/meteo/Vasto\",7695 => \"/meteo/Vastogirardi\",7696 => \"/meteo/Vattaro\",7697 => \"/meteo/Vauda+canavese\",7698 => \"/meteo/Vazzano\",7699 => \"/meteo/Vazzola\",7700 => \"/meteo/Vecchiano\",7701 => \"/meteo/Vedano+al+Lambro\",7702 => \"/meteo/Vedano+Olona\",7703 => \"/meteo/Veddasca\",7704 => \"/meteo/Vedelago\",7705 => \"/meteo/Vedeseta\",7706 => \"/meteo/Veduggio+con+Colzano\",7707 => \"/meteo/Veggiano\",7708 => \"/meteo/Veglie\",7709 => \"/meteo/Veglio\",7710 => \"/meteo/Vejano\",7711 => \"/meteo/Veleso\",7712 => \"/meteo/Velezzo+lomellina\",8530 => \"/meteo/Vellano\",7713 => \"/meteo/Velletri\",7714 => \"/meteo/Vellezzo+Bellini\",7715 => \"/meteo/Velo+d'Astico\",7716 => \"/meteo/Velo+veronese\",7717 => \"/meteo/Velturno\",7718 => \"/meteo/Venafro\",7719 => \"/meteo/Venaria\",7720 => \"/meteo/Venarotta\",7721 => \"/meteo/Venasca\",7722 => \"/meteo/Venaus\",7723 => \"/meteo/Vendone\",7724 => \"/meteo/Vendrogno\",7725 => \"/meteo/Venegono+inferiore\",7726 => \"/meteo/Venegono+superiore\",7727 => \"/meteo/Venetico\",7728 => \"/meteo/Venezia\",8502 => \"/meteo/Venezia+Mestre\",8268 => \"/meteo/Venezia+Tessera\",7729 => \"/meteo/Veniano\",7730 => \"/meteo/Venosa\",7731 => \"/meteo/Venticano\",7732 => \"/meteo/Ventimiglia\",7733 => \"/meteo/Ventimiglia+di+Sicilia\",7734 => \"/meteo/Ventotene\",7735 => \"/meteo/Venzone\",7736 => \"/meteo/Verano\",7737 => \"/meteo/Verano+brianza\",7738 => \"/meteo/Verbania\",7739 => \"/meteo/Verbicaro\",7740 => \"/meteo/Vercana\",7741 => \"/meteo/Verceia\",7742 => \"/meteo/Vercelli\",7743 => \"/meteo/Vercurago\",7744 => \"/meteo/Verdellino\",7745 => \"/meteo/Verdello\",7746 => \"/meteo/Verderio+inferiore\",7747 => \"/meteo/Verderio+superiore\",7748 => \"/meteo/Verduno\",7749 => \"/meteo/Vergato\",7750 => \"/meteo/Vergemoli\",7751 => \"/meteo/Verghereto\",7752 => \"/meteo/Vergiate\",7753 => \"/meteo/Vermezzo\",7754 => \"/meteo/Vermiglio\",8583 => \"/meteo/Vernago\",7755 => \"/meteo/Vernante\",7756 => \"/meteo/Vernasca\",7757 => \"/meteo/Vernate\",7758 => \"/meteo/Vernazza\",7759 => \"/meteo/Vernio\",7760 => \"/meteo/Vernole\",7761 => \"/meteo/Verolanuova\",7762 => \"/meteo/Verolavecchia\",7763 => \"/meteo/Verolengo\",7764 => \"/meteo/Veroli\",7765 => \"/meteo/Verona\",8269 => \"/meteo/Verona+Villafranca\",7766 => \"/meteo/Veronella\",7767 => \"/meteo/Verrayes\",7768 => \"/meteo/Verres\",7769 => \"/meteo/Verretto\",7770 => \"/meteo/Verrone\",7771 => \"/meteo/Verrua+po\",7772 => \"/meteo/Verrua+Savoia\",7773 => \"/meteo/Vertemate+con+Minoprio\",7774 => \"/meteo/Vertova\",7775 => \"/meteo/Verucchio\",7776 => \"/meteo/Veruno\",7777 => \"/meteo/Vervio\",7778 => \"/meteo/Vervo'\",7779 => \"/meteo/Verzegnis\",7780 => \"/meteo/Verzino\",7781 => \"/meteo/Verzuolo\",7782 => \"/meteo/Vescovana\",7783 => \"/meteo/Vescovato\",7784 => \"/meteo/Vesime\",7785 => \"/meteo/Vespolate\",7786 => \"/meteo/Vessalico\",7787 => \"/meteo/Vestenanova\",7788 => \"/meteo/Vestigne'\",7789 => \"/meteo/Vestone\",7790 => \"/meteo/Vestreno\",7791 => \"/meteo/Vetralla\",7792 => \"/meteo/Vetto\",7793 => \"/meteo/Vezza+d'Alba\",7794 => \"/meteo/Vezza+d'Oglio\",7795 => \"/meteo/Vezzano\",7796 => \"/meteo/Vezzano+ligure\",7797 => \"/meteo/Vezzano+sul+crostolo\",7798 => \"/meteo/Vezzi+portio\",8317 => \"/meteo/Vezzo\",7799 => \"/meteo/Viadana\",7800 => \"/meteo/Viadanica\",7801 => \"/meteo/Viagrande\",7802 => \"/meteo/Viale\",7803 => \"/meteo/Vialfre'\",7804 => \"/meteo/Viano\",7805 => \"/meteo/Viareggio\",7806 => \"/meteo/Viarigi\",8674 => \"/meteo/Vibo+Marina\",7807 => \"/meteo/Vibo+Valentia\",7808 => \"/meteo/Vibonati\",7809 => \"/meteo/Vicalvi\",7810 => \"/meteo/Vicari\",7811 => \"/meteo/Vicchio\",7812 => \"/meteo/Vicenza\",7813 => \"/meteo/Vico+canavese\",7814 => \"/meteo/Vico+del+Gargano\",7815 => \"/meteo/Vico+Equense\",7816 => \"/meteo/Vico+nel+Lazio\",7817 => \"/meteo/Vicoforte\",7818 => \"/meteo/Vicoli\",7819 => \"/meteo/Vicolungo\",7820 => \"/meteo/Vicopisano\",7821 => \"/meteo/Vicovaro\",7822 => \"/meteo/Viddalba\",7823 => \"/meteo/Vidigulfo\",7824 => \"/meteo/Vidor\",7825 => \"/meteo/Vidracco\",7826 => \"/meteo/Vieste\",7827 => \"/meteo/Vietri+di+Potenza\",7828 => \"/meteo/Vietri+sul+mare\",7829 => \"/meteo/Viganella\",7830 => \"/meteo/Vigano+San+Martino\",7831 => \"/meteo/Vigano'\",7832 => \"/meteo/Vigarano+Mainarda\",7833 => \"/meteo/Vigasio\",7834 => \"/meteo/Vigevano\",7835 => \"/meteo/Viggianello\",7836 => \"/meteo/Viggiano\",7837 => \"/meteo/Viggiu'\",7838 => \"/meteo/Vighizzolo+d'Este\",7839 => \"/meteo/Vigliano+biellese\",7840 => \"/meteo/Vigliano+d'Asti\",7841 => \"/meteo/Vignale+monferrato\",7842 => \"/meteo/Vignanello\",7843 => \"/meteo/Vignate\",8125 => \"/meteo/Vignola\",7845 => \"/meteo/Vignola+Falesina\",7846 => \"/meteo/Vignole+Borbera\",7847 => \"/meteo/Vignolo\",7848 => \"/meteo/Vignone\",8514 => \"/meteo/Vigo+Ciampedie\",7849 => \"/meteo/Vigo+di+Cadore\",7850 => \"/meteo/Vigo+di+Fassa\",7851 => \"/meteo/Vigo+Rendena\",7852 => \"/meteo/Vigodarzere\",7853 => \"/meteo/Vigolo\",7854 => \"/meteo/Vigolo+Vattaro\",7855 => \"/meteo/Vigolzone\",7856 => \"/meteo/Vigone\",7857 => \"/meteo/Vigonovo\",7858 => \"/meteo/Vigonza\",7859 => \"/meteo/Viguzzolo\",7860 => \"/meteo/Villa+agnedo\",7861 => \"/meteo/Villa+bartolomea\",7862 => \"/meteo/Villa+basilica\",7863 => \"/meteo/Villa+biscossi\",7864 => \"/meteo/Villa+carcina\",7865 => \"/meteo/Villa+castelli\",7866 => \"/meteo/Villa+celiera\",7867 => \"/meteo/Villa+collemandina\",7868 => \"/meteo/Villa+cortese\",7869 => \"/meteo/Villa+d'Adda\",7870 => \"/meteo/Villa+d'Alme'\",7871 => \"/meteo/Villa+d'Ogna\",7872 => \"/meteo/Villa+del+bosco\",7873 => \"/meteo/Villa+del+conte\",7874 => \"/meteo/Villa+di+briano\",7875 => \"/meteo/Villa+di+Chiavenna\",7876 => \"/meteo/Villa+di+Serio\",7877 => \"/meteo/Villa+di+Tirano\",7878 => \"/meteo/Villa+Estense\",7879 => \"/meteo/Villa+Faraldi\",7880 => \"/meteo/Villa+Guardia\",7881 => \"/meteo/Villa+Lagarina\",7882 => \"/meteo/Villa+Latina\",7883 => \"/meteo/Villa+Literno\",7884 => \"/meteo/Villa+minozzo\",7885 => \"/meteo/Villa+poma\",7886 => \"/meteo/Villa+rendena\",7887 => \"/meteo/Villa+San+Giovanni\",7888 => \"/meteo/Villa+San+Giovanni+in+Tuscia\",7889 => \"/meteo/Villa+San+Pietro\",7890 => \"/meteo/Villa+San+Secondo\",7891 => \"/meteo/Villa+Sant'Angelo\",7892 => \"/meteo/Villa+Sant'Antonio\",7893 => \"/meteo/Villa+Santa+Lucia\",7894 => \"/meteo/Villa+Santa+Lucia+degli+Abruzzi\",7895 => \"/meteo/Villa+Santa+Maria\",7896 => \"/meteo/Villa+Santina\",7897 => \"/meteo/Villa+Santo+Stefano\",7898 => \"/meteo/Villa+verde\",7899 => \"/meteo/Villa+vicentina\",7900 => \"/meteo/Villabassa\",7901 => \"/meteo/Villabate\",7902 => \"/meteo/Villachiara\",7903 => \"/meteo/Villacidro\",7904 => \"/meteo/Villadeati\",7905 => \"/meteo/Villadose\",7906 => \"/meteo/Villadossola\",7907 => \"/meteo/Villafalletto\",7908 => \"/meteo/Villafranca+d'Asti\",7909 => \"/meteo/Villafranca+di+Verona\",7910 => \"/meteo/Villafranca+in+Lunigiana\",7911 => \"/meteo/Villafranca+padovana\",7912 => \"/meteo/Villafranca+Piemonte\",7913 => \"/meteo/Villafranca+sicula\",7914 => \"/meteo/Villafranca+tirrena\",7915 => \"/meteo/Villafrati\",7916 => \"/meteo/Villaga\",7917 => \"/meteo/Villagrande+Strisaili\",7918 => \"/meteo/Villalago\",7919 => \"/meteo/Villalba\",7920 => \"/meteo/Villalfonsina\",7921 => \"/meteo/Villalvernia\",7922 => \"/meteo/Villamagna\",7923 => \"/meteo/Villamaina\",7924 => \"/meteo/Villamar\",7925 => \"/meteo/Villamarzana\",7926 => \"/meteo/Villamassargia\",7927 => \"/meteo/Villamiroglio\",7928 => \"/meteo/Villandro\",7929 => \"/meteo/Villanova+biellese\",7930 => \"/meteo/Villanova+canavese\",7931 => \"/meteo/Villanova+d'Albenga\",7932 => \"/meteo/Villanova+d'Ardenghi\",7933 => \"/meteo/Villanova+d'Asti\",7934 => \"/meteo/Villanova+del+Battista\",7935 => \"/meteo/Villanova+del+Ghebbo\",7936 => \"/meteo/Villanova+del+Sillaro\",7937 => \"/meteo/Villanova+di+Camposampiero\",7938 => \"/meteo/Villanova+marchesana\",7939 => \"/meteo/Villanova+Mondovi'\",7940 => \"/meteo/Villanova+Monferrato\",7941 => \"/meteo/Villanova+Monteleone\",7942 => \"/meteo/Villanova+solaro\",7943 => \"/meteo/Villanova+sull'Arda\",7944 => \"/meteo/Villanova+Truschedu\",7945 => \"/meteo/Villanova+Tulo\",7946 => \"/meteo/Villanovaforru\",7947 => \"/meteo/Villanovafranca\",7948 => \"/meteo/Villanterio\",7949 => \"/meteo/Villanuova+sul+Clisi\",7950 => \"/meteo/Villaperuccio\",7951 => \"/meteo/Villapiana\",7952 => \"/meteo/Villaputzu\",7953 => \"/meteo/Villar+dora\",7954 => \"/meteo/Villar+focchiardo\",7955 => \"/meteo/Villar+pellice\",7956 => \"/meteo/Villar+Perosa\",7957 => \"/meteo/Villar+San+Costanzo\",7958 => \"/meteo/Villarbasse\",7959 => \"/meteo/Villarboit\",7960 => \"/meteo/Villareggia\",7961 => \"/meteo/Villaricca\",7962 => \"/meteo/Villaromagnano\",7963 => \"/meteo/Villarosa\",7964 => \"/meteo/Villasalto\",7965 => \"/meteo/Villasanta\",7966 => \"/meteo/Villasimius\",7967 => \"/meteo/Villasor\",7968 => \"/meteo/Villaspeciosa\",7969 => \"/meteo/Villastellone\",7970 => \"/meteo/Villata\",7971 => \"/meteo/Villaurbana\",7972 => \"/meteo/Villavallelonga\",7973 => \"/meteo/Villaverla\",7974 => \"/meteo/Villeneuve\",7975 => \"/meteo/Villesse\",7976 => \"/meteo/Villetta+Barrea\",7977 => \"/meteo/Villette\",7978 => \"/meteo/Villimpenta\",7979 => \"/meteo/Villongo\",7980 => \"/meteo/Villorba\",7981 => \"/meteo/Vilminore+di+scalve\",7982 => \"/meteo/Vimercate\",7983 => \"/meteo/Vimodrone\",7984 => \"/meteo/Vinadio\",7985 => \"/meteo/Vinchiaturo\",7986 => \"/meteo/Vinchio\",7987 => \"/meteo/Vinci\",7988 => \"/meteo/Vinovo\",7989 => \"/meteo/Vinzaglio\",7990 => \"/meteo/Viola\",7991 => \"/meteo/Vione\",7992 => \"/meteo/Vipiteno\",7993 => \"/meteo/Virgilio\",7994 => \"/meteo/Virle+Piemonte\",7995 => \"/meteo/Visano\",7996 => \"/meteo/Vische\",7997 => \"/meteo/Visciano\",7998 => \"/meteo/Visco\",7999 => \"/meteo/Visone\",8000 => \"/meteo/Visso\",8001 => \"/meteo/Vistarino\",8002 => \"/meteo/Vistrorio\",8003 => \"/meteo/Vita\",8004 => \"/meteo/Viterbo\",8005 => \"/meteo/Viticuso\",8006 => \"/meteo/Vito+d'Asio\",8007 => \"/meteo/Vitorchiano\",8008 => \"/meteo/Vittoria\",8009 => \"/meteo/Vittorio+Veneto\",8010 => \"/meteo/Vittorito\",8011 => \"/meteo/Vittuone\",8012 => \"/meteo/Vitulano\",8013 => \"/meteo/Vitulazio\",8014 => \"/meteo/Viu'\",8015 => \"/meteo/Vivaro\",8016 => \"/meteo/Vivaro+romano\",8017 => \"/meteo/Viverone\",8018 => \"/meteo/Vizzini\",8019 => \"/meteo/Vizzola+Ticino\",8020 => \"/meteo/Vizzolo+Predabissi\",8021 => \"/meteo/Vo'\",8022 => \"/meteo/Vobarno\",8023 => \"/meteo/Vobbia\",8024 => \"/meteo/Vocca\",8025 => \"/meteo/Vodo+cadore\",8026 => \"/meteo/Voghera\",8027 => \"/meteo/Voghiera\",8028 => \"/meteo/Vogogna\",8029 => \"/meteo/Volano\",8030 => \"/meteo/Volla\",8031 => \"/meteo/Volongo\",8032 => \"/meteo/Volpago+del+montello\",8033 => \"/meteo/Volpara\",8034 => \"/meteo/Volpedo\",8035 => \"/meteo/Volpeglino\",8036 => \"/meteo/Volpiano\",8037 => \"/meteo/Volta+mantovana\",8038 => \"/meteo/Voltaggio\",8039 => \"/meteo/Voltago+agordino\",8040 => \"/meteo/Volterra\",8041 => \"/meteo/Voltido\",8042 => \"/meteo/Volturara+Appula\",8043 => \"/meteo/Volturara+irpina\",8044 => \"/meteo/Volturino\",8045 => \"/meteo/Volvera\",8046 => \"/meteo/Vottignasco\",8181 => \"/meteo/Vulcano+Porto\",8047 => \"/meteo/Zaccanopoli\",8048 => \"/meteo/Zafferana+etnea\",8049 => \"/meteo/Zagarise\",8050 => \"/meteo/Zagarolo\",8051 => \"/meteo/Zambana\",8707 => \"/meteo/Zambla\",8052 => \"/meteo/Zambrone\",8053 => \"/meteo/Zandobbio\",8054 => \"/meteo/Zane'\",8055 => \"/meteo/Zanica\",8056 => \"/meteo/Zapponeta\",8057 => \"/meteo/Zavattarello\",8058 => \"/meteo/Zeccone\",8059 => \"/meteo/Zeddiani\",8060 => \"/meteo/Zelbio\",8061 => \"/meteo/Zelo+Buon+Persico\",8062 => \"/meteo/Zelo+Surrigone\",8063 => \"/meteo/Zeme\",8064 => \"/meteo/Zenevredo\",8065 => \"/meteo/Zenson+di+Piave\",8066 => \"/meteo/Zerba\",8067 => \"/meteo/Zerbo\",8068 => \"/meteo/Zerbolo'\",8069 => \"/meteo/Zerfaliu\",8070 => \"/meteo/Zeri\",8071 => \"/meteo/Zermeghedo\",8072 => \"/meteo/Zero+Branco\",8073 => \"/meteo/Zevio\",8455 => \"/meteo/Ziano+di+Fiemme\",8075 => \"/meteo/Ziano+piacentino\",8076 => \"/meteo/Zibello\",8077 => \"/meteo/Zibido+San+Giacomo\",8078 => \"/meteo/Zignago\",8079 => \"/meteo/Zimella\",8080 => \"/meteo/Zimone\",8081 => \"/meteo/Zinasco\",8082 => \"/meteo/Zoagli\",8083 => \"/meteo/Zocca\",8084 => \"/meteo/Zogno\",8085 => \"/meteo/Zola+Predosa\",8086 => \"/meteo/Zoldo+alto\",8087 => \"/meteo/Zollino\",8088 => \"/meteo/Zone\",8089 => \"/meteo/Zoppe'+di+cadore\",8090 => \"/meteo/Zoppola\",8091 => \"/meteo/Zovencedo\",8092 => \"/meteo/Zubiena\",8093 => \"/meteo/Zuccarello\",8094 => \"/meteo/Zuclo\",8095 => \"/meteo/Zugliano\",8096 => \"/meteo/Zuglio\",8097 => \"/meteo/Zumaglia\",8098 => \"/meteo/Zumpano\",8099 => \"/meteo/Zungoli\",8100 => \"/meteo/Zungri\");\n\n$trebi_locs = array(1 => \"Abano terme\",2 => \"Abbadia cerreto\",3 => \"Abbadia lariana\",4 => \"Abbadia San Salvatore\",5 => \"Abbasanta\",6 => \"Abbateggio\",7 => \"Abbiategrasso\",8 => \"Abetone\",8399 => \"Abriola\",10 => \"Acate\",11 => \"Accadia\",12 => \"Acceglio\",8369 => \"Accettura\",14 => \"Acciano\",15 => \"Accumoli\",16 => \"Acerenza\",17 => \"Acerno\",18 => \"Acerra\",19 => \"Aci bonaccorsi\",20 => \"Aci castello\",21 => \"Aci Catena\",22 => \"Aci Sant'Antonio\",23 => \"Acireale\",24 => \"Acquacanina\",25 => \"Acquafondata\",26 => \"Acquaformosa\",27 => \"Acquafredda\",8750 => \"Acquafredda\",28 => \"Acqualagna\",29 => \"Acquanegra cremonese\",30 => \"Acquanegra sul chiese\",31 => \"Acquapendente\",32 => \"Acquappesa\",33 => \"Acquarica del capo\",34 => \"Acquaro\",35 => \"Acquasanta terme\",36 => \"Acquasparta\",37 => \"Acquaviva collecroce\",38 => \"Acquaviva d'Isernia\",39 => \"Acquaviva delle fonti\",40 => \"Acquaviva picena\",41 => \"Acquaviva platani\",42 => \"Acquedolci\",43 => \"Acqui terme\",44 => \"Acri\",45 => \"Acuto\",46 => \"Adelfia\",47 => \"Adrano\",48 => \"Adrara San Martino\",49 => \"Adrara San Rocco\",50 => \"Adria\",51 => \"Adro\",52 => \"Affi\",53 => \"Affile\",54 => \"Afragola\",55 => \"Africo\",56 => \"Agazzano\",57 => \"Agerola\",58 => \"Aggius\",59 => \"Agira\",60 => \"Agliana\",61 => \"Agliano\",62 => \"Aglie'\",63 => \"Aglientu\",64 => \"Agna\",65 => \"Agnadello\",66 => \"Agnana calabra\",8598 => \"Agnano\",67 => \"Agnone\",68 => \"Agnosine\",69 => \"Agordo\",70 => \"Agosta\",71 => \"Agra\",72 => \"Agrate brianza\",73 => \"Agrate conturbia\",74 => \"Agrigento\",75 => \"Agropoli\",76 => \"Agugliano\",77 => \"Agugliaro\",78 => \"Aicurzio\",79 => \"Aidomaggiore\",80 => \"Aidone\",81 => \"Aielli\",82 => \"Aiello calabro\",83 => \"Aiello del Friuli\",84 => \"Aiello del Sabato\",85 => \"Aieta\",86 => \"Ailano\",87 => \"Ailoche\",88 => \"Airasca\",89 => \"Airola\",90 => \"Airole\",91 => \"Airuno\",92 => \"Aisone\",93 => \"Ala\",94 => \"Ala di Stura\",95 => \"Ala' dei Sardi\",96 => \"Alagna\",97 => \"Alagna Valsesia\",98 => \"Alanno\",99 => \"Alano di Piave\",100 => \"Alassio\",101 => \"Alatri\",102 => \"Alba\",103 => \"Alba adriatica\",104 => \"Albagiara\",105 => \"Albairate\",106 => \"Albanella\",8386 => \"Albano di lucania\",108 => \"Albano laziale\",109 => \"Albano Sant'Alessandro\",110 => \"Albano vercellese\",111 => \"Albaredo arnaboldi\",112 => \"Albaredo d'Adige\",113 => \"Albaredo per San Marco\",114 => \"Albareto\",115 => \"Albaretto della torre\",116 => \"Albavilla\",117 => \"Albenga\",118 => \"Albera ligure\",119 => \"Alberobello\",120 => \"Alberona\",121 => \"Albese con Cassano\",122 => \"Albettone\",123 => \"Albi\",124 => \"Albiano\",125 => \"Albiano d'ivrea\",126 => \"Albiate\",127 => \"Albidona\",128 => \"Albignasego\",129 => \"Albinea\",130 => \"Albino\",131 => \"Albiolo\",132 => \"Albisola marina\",133 => \"Albisola superiore\",134 => \"Albizzate\",135 => \"Albonese\",136 => \"Albosaggia\",137 => \"Albugnano\",138 => \"Albuzzano\",139 => \"Alcamo\",140 => \"Alcara li Fusi\",141 => \"Aldeno\",142 => \"Aldino\",143 => \"Ales\",144 => \"Alessandria\",145 => \"Alessandria del Carretto\",146 => \"Alessandria della Rocca\",147 => \"Alessano\",148 => \"Alezio\",149 => \"Alfano\",150 => \"Alfedena\",151 => \"Alfianello\",152 => \"Alfiano natta\",153 => \"Alfonsine\",154 => \"Alghero\",8532 => \"Alghero Fertilia\",155 => \"Algua\",156 => \"Ali'\",157 => \"Ali' terme\",158 => \"Alia\",159 => \"Aliano\",160 => \"Alice bel colle\",161 => \"Alice castello\",162 => \"Alice superiore\",163 => \"Alife\",164 => \"Alimena\",165 => \"Aliminusa\",166 => \"Allai\",167 => \"Alleghe\",168 => \"Allein\",169 => \"Allerona\",170 => \"Alliste\",171 => \"Allumiere\",172 => \"Alluvioni cambio'\",173 => \"Alme'\",174 => \"Almenno San Bartolomeo\",175 => \"Almenno San Salvatore\",176 => \"Almese\",177 => \"Alonte\",8259 => \"Alpe Cermis\",8557 => \"Alpe Devero\",8162 => \"Alpe di Mera\",8565 => \"Alpe di Siusi\",8755 => \"Alpe Giumello\",8264 => \"Alpe Lusia\",8559 => \"Alpe Nevegal\",8239 => \"Alpe Tre Potenze\",8558 => \"Alpe Veglia\",8482 => \"Alpet\",178 => \"Alpette\",179 => \"Alpignano\",180 => \"Alseno\",181 => \"Alserio\",182 => \"Altamura\",8474 => \"Altare\",184 => \"Altavilla irpina\",185 => \"Altavilla milicia\",186 => \"Altavilla monferrato\",187 => \"Altavilla silentina\",188 => \"Altavilla vicentina\",189 => \"Altidona\",190 => \"Altilia\",191 => \"Altino\",192 => \"Altissimo\",193 => \"Altivole\",194 => \"Alto\",195 => \"Altofonte\",196 => \"Altomonte\",197 => \"Altopascio\",8536 => \"Altopiano dei Fiorentini\",8662 => \"Altopiano della Sila\",8640 => \"Altopiano di Renon\",198 => \"Alviano\",199 => \"Alvignano\",200 => \"Alvito\",201 => \"Alzano lombardo\",202 => \"Alzano scrivia\",203 => \"Alzate brianza\",204 => \"Amalfi\",205 => \"Amandola\",206 => \"Amantea\",207 => \"Amaro\",208 => \"Amaroni\",209 => \"Amaseno\",210 => \"Amato\",211 => \"Amatrice\",212 => \"Ambivere\",213 => \"Amblar\",214 => \"Ameglia\",215 => \"Amelia\",216 => \"Amendolara\",217 => \"Ameno\",218 => \"Amorosi\",219 => \"Ampezzo\",220 => \"Anacapri\",221 => \"Anagni\",8463 => \"Anagni casello\",222 => \"Ancarano\",223 => \"Ancona\",8267 => \"Ancona Falconara\",224 => \"Andali\",225 => \"Andalo\",226 => \"Andalo valtellino\",227 => \"Andezeno\",228 => \"Andora\",229 => \"Andorno micca\",230 => \"Andrano\",231 => \"Andrate\",232 => \"Andreis\",233 => \"Andretta\",234 => \"Andria\",235 => \"Andriano\",236 => \"Anela\",237 => \"Anfo\",238 => \"Angera\",239 => \"Anghiari\",240 => \"Angiari\",241 => \"Angolo terme\",242 => \"Angri\",243 => \"Angrogna\",244 => \"Anguillara sabazia\",245 => \"Anguillara veneta\",246 => \"Annicco\",247 => \"Annone di brianza\",248 => \"Annone veneto\",249 => \"Anoia\",8302 => \"Antagnod\",250 => \"Antegnate\",251 => \"Anterivo\",8211 => \"Anterselva di Sopra\",252 => \"Antey saint andre'\",253 => \"Anticoli Corrado\",254 => \"Antignano\",255 => \"Antillo\",256 => \"Antonimina\",257 => \"Antrodoco\",258 => \"Antrona Schieranco\",259 => \"Anversa degli Abruzzi\",260 => \"Anzano del Parco\",261 => \"Anzano di Puglia\",8400 => \"Anzi\",263 => \"Anzio\",264 => \"Anzola d'Ossola\",265 => \"Anzola dell'Emilia\",266 => \"Aosta\",8548 => \"Aosta Saint Christophe\",267 => \"Apecchio\",268 => \"Apice\",269 => \"Apiro\",270 => \"Apollosa\",271 => \"Appiano Gentile\",272 => \"Appiano sulla strada del vino\",273 => \"Appignano\",274 => \"Appignano del Tronto\",275 => \"Aprica\",276 => \"Apricale\",277 => \"Apricena\",278 => \"Aprigliano\",279 => \"Aprilia\",280 => \"Aquara\",281 => \"Aquila di Arroscia\",282 => \"Aquileia\",283 => \"Aquilonia\",284 => \"Aquino\",8228 => \"Arabba\",285 => \"Aradeo\",286 => \"Aragona\",287 => \"Aramengo\",288 => \"Arba\",8487 => \"Arbatax\",289 => \"Arborea\",290 => \"Arborio\",291 => \"Arbus\",292 => \"Arcade\",293 => \"Arce\",294 => \"Arcene\",295 => \"Arcevia\",296 => \"Archi\",297 => \"Arcidosso\",298 => \"Arcinazzo romano\",299 => \"Arcisate\",300 => \"Arco\",301 => \"Arcola\",302 => \"Arcole\",303 => \"Arconate\",304 => \"Arcore\",305 => \"Arcugnano\",306 => \"Ardara\",307 => \"Ardauli\",308 => \"Ardea\",309 => \"Ardenno\",310 => \"Ardesio\",311 => \"Ardore\",8675 => \"Ardore Marina\",8321 => \"Aremogna\",312 => \"Arena\",313 => \"Arena po\",314 => \"Arenzano\",315 => \"Arese\",316 => \"Arezzo\",317 => \"Argegno\",318 => \"Argelato\",319 => \"Argenta\",320 => \"Argentera\",321 => \"Arguello\",322 => \"Argusto\",323 => \"Ari\",324 => \"Ariano irpino\",325 => \"Ariano nel polesine\",326 => \"Ariccia\",327 => \"Arielli\",328 => \"Arienzo\",329 => \"Arignano\",330 => \"Aritzo\",331 => \"Arizzano\",332 => \"Arlena di castro\",333 => \"Arluno\",8677 => \"Arma di Taggia\",334 => \"Armeno\",8405 => \"Armento\",336 => \"Armo\",337 => \"Armungia\",338 => \"Arnad\",339 => \"Arnara\",340 => \"Arnasco\",341 => \"Arnesano\",342 => \"Arola\",343 => \"Arona\",344 => \"Arosio\",345 => \"Arpaia\",346 => \"Arpaise\",347 => \"Arpino\",348 => \"Arqua' Petrarca\",349 => \"Arqua' polesine\",350 => \"Arquata del tronto\",351 => \"Arquata scrivia\",352 => \"Arre\",353 => \"Arrone\",354 => \"Arsago Seprio\",355 => \"Arsie'\",356 => \"Arsiero\",357 => \"Arsita\",358 => \"Arsoli\",359 => \"Arta terme\",360 => \"Artegna\",361 => \"Artena\",8338 => \"Artesina\",362 => \"Artogne\",363 => \"Arvier\",364 => \"Arzachena\",365 => \"Arzago d'Adda\",366 => \"Arzana\",367 => \"Arzano\",368 => \"Arzene\",369 => \"Arzergrande\",370 => \"Arzignano\",371 => \"Ascea\",8513 => \"Asciano\",8198 => \"Asciano Pisano\",373 => \"Ascoli piceno\",374 => \"Ascoli satriano\",375 => \"Ascrea\",376 => \"Asiago\",377 => \"Asigliano Veneto\",378 => \"Asigliano vercellese\",379 => \"Asola\",380 => \"Asolo\",8438 => \"Aspio terme\",381 => \"Assago\",382 => \"Assemini\",8488 => \"Assergi\",8448 => \"Assergi casello\",383 => \"Assisi\",384 => \"Asso\",385 => \"Assolo\",386 => \"Assoro\",387 => \"Asti\",388 => \"Asuni\",389 => \"Ateleta\",8383 => \"Atella\",391 => \"Atena lucana\",392 => \"Atessa\",393 => \"Atina\",394 => \"Atrani\",395 => \"Atri\",396 => \"Atripalda\",397 => \"Attigliano\",398 => \"Attimis\",399 => \"Atzara\",400 => \"Auditore\",401 => \"Augusta\",402 => \"Auletta\",403 => \"Aulla\",404 => \"Aurano\",405 => \"Aurigo\",406 => \"Auronzo di cadore\",407 => \"Ausonia\",408 => \"Austis\",409 => \"Avegno\",410 => \"Avelengo\",411 => \"Avella\",412 => \"Avellino\",413 => \"Averara\",414 => \"Aversa\",415 => \"Avetrana\",416 => \"Avezzano\",417 => \"Aviano\",418 => \"Aviatico\",419 => \"Avigliana\",420 => \"Avigliano\",421 => \"Avigliano umbro\",422 => \"Avio\",423 => \"Avise\",424 => \"Avola\",425 => \"Avolasca\",426 => \"Ayas\",427 => \"Aymavilles\",428 => \"Azeglio\",429 => \"Azzanello\",430 => \"Azzano d'Asti\",431 => \"Azzano decimo\",432 => \"Azzano mella\",433 => \"Azzano San Paolo\",434 => \"Azzate\",435 => \"Azzio\",436 => \"Azzone\",437 => \"Baceno\",438 => \"Bacoli\",439 => \"Badalucco\",440 => \"Badesi\",441 => \"Badia\",442 => \"Badia calavena\",443 => \"Badia pavese\",444 => \"Badia polesine\",445 => \"Badia tedalda\",446 => \"Badolato\",447 => \"Bagaladi\",448 => \"Bagheria\",449 => \"Bagnacavallo\",450 => \"Bagnara calabra\",451 => \"Bagnara di romagna\",452 => \"Bagnaria\",453 => \"Bagnaria arsa\",454 => \"Bagnasco\",455 => \"Bagnatica\",456 => \"Bagni di Lucca\",8699 => \"Bagni di Vinadio\",457 => \"Bagno a Ripoli\",458 => \"Bagno di Romagna\",459 => \"Bagnoli del Trigno\",460 => \"Bagnoli di sopra\",461 => \"Bagnoli irpino\",462 => \"Bagnolo cremasco\",463 => \"Bagnolo del salento\",464 => \"Bagnolo di po\",465 => \"Bagnolo in piano\",466 => \"Bagnolo Mella\",467 => \"Bagnolo Piemonte\",468 => \"Bagnolo San Vito\",469 => \"Bagnone\",470 => \"Bagnoregio\",471 => \"Bagolino\",8123 => \"Baia Domizia\",472 => \"Baia e Latina\",473 => \"Baiano\",474 => \"Baiardo\",475 => \"Bairo\",476 => \"Baiso\",477 => \"Balangero\",478 => \"Baldichieri d'Asti\",479 => \"Baldissero canavese\",480 => \"Baldissero d'Alba\",481 => \"Baldissero torinese\",482 => \"Balestrate\",483 => \"Balestrino\",484 => \"Ballabio\",485 => \"Ballao\",486 => \"Balme\",487 => \"Balmuccia\",488 => \"Balocco\",489 => \"Balsorano\",490 => \"Balvano\",491 => \"Balzola\",492 => \"Banari\",493 => \"Banchette\",494 => \"Bannio anzino\",8368 => \"Banzi\",496 => \"Baone\",497 => \"Baradili\",8415 => \"Baragiano\",499 => \"Baranello\",500 => \"Barano d'Ischia\",501 => \"Barasso\",502 => \"Baratili San Pietro\",503 => \"Barbania\",504 => \"Barbara\",505 => \"Barbarano romano\",506 => \"Barbarano vicentino\",507 => \"Barbaresco\",508 => \"Barbariga\",509 => \"Barbata\",510 => \"Barberino di mugello\",511 => \"Barberino val d'elsa\",512 => \"Barbianello\",513 => \"Barbiano\",514 => \"Barbona\",515 => \"Barcellona pozzo di Gotto\",516 => \"Barchi\",517 => \"Barcis\",518 => \"Bard\",519 => \"Bardello\",520 => \"Bardi\",521 => \"Bardineto\",522 => \"Bardolino\",523 => \"Bardonecchia\",524 => \"Bareggio\",525 => \"Barengo\",526 => \"Baressa\",527 => \"Barete\",528 => \"Barga\",529 => \"Bargagli\",530 => \"Barge\",531 => \"Barghe\",532 => \"Bari\",8274 => \"Bari Palese\",533 => \"Bari sardo\",534 => \"Bariano\",535 => \"Baricella\",8402 => \"Barile\",537 => \"Barisciano\",538 => \"Barlassina\",539 => \"Barletta\",540 => \"Barni\",541 => \"Barolo\",542 => \"Barone canavese\",543 => \"Baronissi\",544 => \"Barrafranca\",545 => \"Barrali\",546 => \"Barrea\",8745 => \"Barricata\",547 => \"Barumini\",548 => \"Barzago\",549 => \"Barzana\",550 => \"Barzano'\",551 => \"Barzio\",552 => \"Basaluzzo\",553 => \"Bascape'\",554 => \"Baschi\",555 => \"Basciano\",556 => \"Baselga di Pine'\",557 => \"Baselice\",558 => \"Basiano\",559 => \"Basico'\",560 => \"Basiglio\",561 => \"Basiliano\",562 => \"Bassano bresciano\",563 => \"Bassano del grappa\",564 => \"Bassano in teverina\",565 => \"Bassano romano\",566 => \"Bassiano\",567 => \"Bassignana\",568 => \"Bastia\",569 => \"Bastia mondovi'\",570 => \"Bastida de' Dossi\",571 => \"Bastida pancarana\",572 => \"Bastiglia\",573 => \"Battaglia terme\",574 => \"Battifollo\",575 => \"Battipaglia\",576 => \"Battuda\",577 => \"Baucina\",578 => \"Bauladu\",579 => \"Baunei\",580 => \"Baveno\",581 => \"Bazzano\",582 => \"Bedero valcuvia\",583 => \"Bedizzole\",584 => \"Bedollo\",585 => \"Bedonia\",586 => \"Bedulita\",587 => \"Bee\",588 => \"Beinasco\",589 => \"Beinette\",590 => \"Belcastro\",591 => \"Belfiore\",592 => \"Belforte all'Isauro\",593 => \"Belforte del chienti\",594 => \"Belforte monferrato\",595 => \"Belgioioso\",596 => \"Belgirate\",597 => \"Bella\",598 => \"Bellagio\",8263 => \"Bellamonte\",599 => \"Bellano\",600 => \"Bellante\",601 => \"Bellaria Igea marina\",602 => \"Bellegra\",603 => \"Bellino\",604 => \"Bellinzago lombardo\",605 => \"Bellinzago novarese\",606 => \"Bellizzi\",607 => \"Bellona\",608 => \"Bellosguardo\",609 => \"Belluno\",610 => \"Bellusco\",611 => \"Belmonte calabro\",612 => \"Belmonte castello\",613 => \"Belmonte del sannio\",614 => \"Belmonte in sabina\",615 => \"Belmonte mezzagno\",616 => \"Belmonte piceno\",617 => \"Belpasso\",8573 => \"Belpiano Schoeneben\",618 => \"Belsito\",8265 => \"Belvedere\",619 => \"Belvedere di Spinello\",620 => \"Belvedere langhe\",621 => \"Belvedere marittimo\",622 => \"Belvedere ostrense\",623 => \"Belveglio\",624 => \"Belvi\",625 => \"Bema\",626 => \"Bene lario\",627 => \"Bene vagienna\",628 => \"Benestare\",629 => \"Benetutti\",630 => \"Benevello\",631 => \"Benevento\",632 => \"Benna\",633 => \"Bentivoglio\",634 => \"Berbenno\",635 => \"Berbenno di valtellina\",636 => \"Berceto\",637 => \"Berchidda\",638 => \"Beregazzo con Figliaro\",639 => \"Bereguardo\",640 => \"Bergamasco\",641 => \"Bergamo\",8519 => \"Bergamo città alta\",8497 => \"Bergamo Orio al Serio\",642 => \"Bergantino\",643 => \"Bergeggi\",644 => \"Bergolo\",645 => \"Berlingo\",646 => \"Bernalda\",647 => \"Bernareggio\",648 => \"Bernate ticino\",649 => \"Bernezzo\",650 => \"Berra\",651 => \"Bersone\",652 => \"Bertinoro\",653 => \"Bertiolo\",654 => \"Bertonico\",655 => \"Berzano di San Pietro\",656 => \"Berzano di Tortona\",657 => \"Berzo Demo\",658 => \"Berzo inferiore\",659 => \"Berzo San Fermo\",660 => \"Besana in brianza\",661 => \"Besano\",662 => \"Besate\",663 => \"Besenello\",664 => \"Besenzone\",665 => \"Besnate\",666 => \"Besozzo\",667 => \"Bessude\",668 => \"Bettola\",669 => \"Bettona\",670 => \"Beura Cardezza\",671 => \"Bevagna\",672 => \"Beverino\",673 => \"Bevilacqua\",674 => \"Bezzecca\",675 => \"Biancavilla\",676 => \"Bianchi\",677 => \"Bianco\",678 => \"Biandrate\",679 => \"Biandronno\",680 => \"Bianzano\",681 => \"Bianze'\",682 => \"Bianzone\",683 => \"Biassono\",684 => \"Bibbiano\",685 => \"Bibbiena\",686 => \"Bibbona\",687 => \"Bibiana\",8230 => \"Bibione\",688 => \"Biccari\",689 => \"Bicinicco\",690 => \"Bidoni'\",691 => \"Biella\",8163 => \"Bielmonte\",692 => \"Bienno\",693 => \"Bieno\",694 => \"Bientina\",695 => \"Bigarello\",696 => \"Binago\",697 => \"Binasco\",698 => \"Binetto\",699 => \"Bioglio\",700 => \"Bionaz\",701 => \"Bione\",702 => \"Birori\",703 => \"Bisaccia\",704 => \"Bisacquino\",705 => \"Bisceglie\",706 => \"Bisegna\",707 => \"Bisenti\",708 => \"Bisignano\",709 => \"Bistagno\",710 => \"Bisuschio\",711 => \"Bitetto\",712 => \"Bitonto\",713 => \"Bitritto\",714 => \"Bitti\",715 => \"Bivona\",716 => \"Bivongi\",717 => \"Bizzarone\",718 => \"Bleggio inferiore\",719 => \"Bleggio superiore\",720 => \"Blello\",721 => \"Blera\",722 => \"Blessagno\",723 => \"Blevio\",724 => \"Blufi\",725 => \"Boara Pisani\",726 => \"Bobbio\",727 => \"Bobbio Pellice\",728 => \"Boca\",8501 => \"Bocca di Magra\",729 => \"Bocchigliero\",730 => \"Boccioleto\",731 => \"Bocenago\",732 => \"Bodio Lomnago\",733 => \"Boffalora d'Adda\",734 => \"Boffalora sopra Ticino\",735 => \"Bogliasco\",736 => \"Bognanco\",8287 => \"Bognanco fonti\",737 => \"Bogogno\",738 => \"Boissano\",739 => \"Bojano\",740 => \"Bolano\",741 => \"Bolbeno\",742 => \"Bolgare\",743 => \"Bollate\",744 => \"Bollengo\",745 => \"Bologna\",8476 => \"Bologna Borgo Panigale\",746 => \"Bolognano\",747 => \"Bolognetta\",748 => \"Bolognola\",749 => \"Bolotana\",750 => \"Bolsena\",751 => \"Boltiere\",8505 => \"Bolzaneto\",752 => \"Bolzano\",753 => \"Bolzano novarese\",754 => \"Bolzano vicentino\",755 => \"Bomarzo\",756 => \"Bomba\",757 => \"Bompensiere\",758 => \"Bompietro\",759 => \"Bomporto\",760 => \"Bonarcado\",761 => \"Bonassola\",762 => \"Bonate sopra\",763 => \"Bonate sotto\",764 => \"Bonavigo\",765 => \"Bondeno\",766 => \"Bondo\",767 => \"Bondone\",768 => \"Bonea\",769 => \"Bonefro\",770 => \"Bonemerse\",771 => \"Bonifati\",772 => \"Bonito\",773 => \"Bonnanaro\",774 => \"Bono\",775 => \"Bonorva\",776 => \"Bonvicino\",777 => \"Borbona\",778 => \"Borca di cadore\",779 => \"Bordano\",780 => \"Bordighera\",781 => \"Bordolano\",782 => \"Bore\",783 => \"Boretto\",784 => \"Borgarello\",785 => \"Borgaro torinese\",786 => \"Borgetto\",787 => \"Borghetto d'arroscia\",788 => \"Borghetto di borbera\",789 => \"Borghetto di vara\",790 => \"Borghetto lodigiano\",791 => \"Borghetto Santo Spirito\",792 => \"Borghi\",793 => \"Borgia\",794 => \"Borgiallo\",795 => \"Borgio Verezzi\",796 => \"Borgo a Mozzano\",797 => \"Borgo d'Ale\",798 => \"Borgo di Terzo\",8159 => \"Borgo d`Ale\",799 => \"Borgo Pace\",800 => \"Borgo Priolo\",801 => \"Borgo San Dalmazzo\",802 => \"Borgo San Giacomo\",803 => \"Borgo San Giovanni\",804 => \"Borgo San Lorenzo\",805 => \"Borgo San Martino\",806 => \"Borgo San Siro\",807 => \"Borgo Ticino\",808 => \"Borgo Tossignano\",809 => \"Borgo Val di Taro\",810 => \"Borgo Valsugana\",811 => \"Borgo Velino\",812 => \"Borgo Vercelli\",813 => \"Borgoforte\",814 => \"Borgofranco d'Ivrea\",815 => \"Borgofranco sul Po\",816 => \"Borgolavezzaro\",817 => \"Borgomale\",818 => \"Borgomanero\",819 => \"Borgomaro\",820 => \"Borgomasino\",821 => \"Borgone susa\",822 => \"Borgonovo val tidone\",823 => \"Borgoratto alessandrino\",824 => \"Borgoratto mormorolo\",825 => \"Borgoricco\",826 => \"Borgorose\",827 => \"Borgosatollo\",828 => \"Borgosesia\",829 => \"Bormida\",830 => \"Bormio\",8334 => \"Bormio 2000\",8335 => \"Bormio 3000\",831 => \"Bornasco\",832 => \"Borno\",833 => \"Boroneddu\",834 => \"Borore\",835 => \"Borrello\",836 => \"Borriana\",837 => \"Borso del Grappa\",838 => \"Bortigali\",839 => \"Bortigiadas\",840 => \"Borutta\",841 => \"Borzonasca\",842 => \"Bosa\",843 => \"Bosaro\",844 => \"Boschi Sant'Anna\",845 => \"Bosco Chiesanuova\",846 => \"Bosco Marengo\",847 => \"Bosconero\",848 => \"Boscoreale\",849 => \"Boscotrecase\",850 => \"Bosentino\",851 => \"Bosia\",852 => \"Bosio\",853 => \"Bosisio Parini\",854 => \"Bosnasco\",855 => \"Bossico\",856 => \"Bossolasco\",857 => \"Botricello\",858 => \"Botrugno\",859 => \"Bottanuco\",860 => \"Botticino\",861 => \"Bottidda\",8655 => \"Bourg San Bernard\",862 => \"Bova\",863 => \"Bova marina\",864 => \"Bovalino\",865 => \"Bovegno\",866 => \"Boves\",867 => \"Bovezzo\",868 => \"Boville Ernica\",869 => \"Bovino\",870 => \"Bovisio Masciago\",871 => \"Bovolenta\",872 => \"Bovolone\",873 => \"Bozzole\",874 => \"Bozzolo\",875 => \"Bra\",876 => \"Bracca\",877 => \"Bracciano\",878 => \"Bracigliano\",879 => \"Braies\",880 => \"Brallo di Pregola\",881 => \"Brancaleone\",882 => \"Brandico\",883 => \"Brandizzo\",884 => \"Branzi\",885 => \"Braone\",8740 => \"Bratto\",886 => \"Brebbia\",887 => \"Breda di Piave\",888 => \"Bregano\",889 => \"Breganze\",890 => \"Bregnano\",891 => \"Breguzzo\",892 => \"Breia\",8724 => \"Breithorn\",893 => \"Brembate\",894 => \"Brembate di sopra\",895 => \"Brembilla\",896 => \"Brembio\",897 => \"Breme\",898 => \"Brendola\",899 => \"Brenna\",900 => \"Brennero\",901 => \"Breno\",902 => \"Brenta\",903 => \"Brentino Belluno\",904 => \"Brentonico\",905 => \"Brenzone\",906 => \"Brescello\",907 => \"Brescia\",8547 => \"Brescia Montichiari\",908 => \"Bresimo\",909 => \"Bressana Bottarone\",910 => \"Bressanone\",911 => \"Bressanvido\",912 => \"Bresso\",8226 => \"Breuil-Cervinia\",913 => \"Brez\",914 => \"Brezzo di Bedero\",915 => \"Briaglia\",916 => \"Briatico\",917 => \"Bricherasio\",918 => \"Brienno\",919 => \"Brienza\",920 => \"Briga alta\",921 => \"Briga novarese\",923 => \"Brignano Frascata\",922 => \"Brignano Gera d'Adda\",924 => \"Brindisi\",8358 => \"Brindisi montagna\",8549 => \"Brindisi Papola Casale\",926 => \"Brinzio\",927 => \"Briona\",928 => \"Brione\",929 => \"Brione\",930 => \"Briosco\",931 => \"Brisighella\",932 => \"Brissago valtravaglia\",933 => \"Brissogne\",934 => \"Brittoli\",935 => \"Brivio\",936 => \"Broccostella\",937 => \"Brogliano\",938 => \"Brognaturo\",939 => \"Brolo\",940 => \"Brondello\",941 => \"Broni\",942 => \"Bronte\",943 => \"Bronzolo\",944 => \"Brossasco\",945 => \"Brosso\",946 => \"Brovello Carpugnino\",947 => \"Brozolo\",948 => \"Brugherio\",949 => \"Brugine\",950 => \"Brugnato\",951 => \"Brugnera\",952 => \"Bruino\",953 => \"Brumano\",954 => \"Brunate\",955 => \"Brunello\",956 => \"Brunico\",957 => \"Bruno\",958 => \"Brusaporto\",959 => \"Brusasco\",960 => \"Brusciano\",961 => \"Brusimpiano\",962 => \"Brusnengo\",963 => \"Brusson\",8645 => \"Brusson 2000 Estoul\",964 => \"Bruzolo\",965 => \"Bruzzano Zeffirio\",966 => \"Bubbiano\",967 => \"Bubbio\",968 => \"Buccheri\",969 => \"Bucchianico\",970 => \"Bucciano\",971 => \"Buccinasco\",972 => \"Buccino\",973 => \"Bucine\",974 => \"Budduso'\",975 => \"Budoia\",976 => \"Budoni\",977 => \"Budrio\",978 => \"Buggerru\",979 => \"Buggiano\",980 => \"Buglio in Monte\",981 => \"Bugnara\",982 => \"Buguggiate\",983 => \"Buia\",984 => \"Bulciago\",985 => \"Bulgarograsso\",986 => \"Bultei\",987 => \"Bulzi\",988 => \"Buonabitacolo\",989 => \"Buonalbergo\",990 => \"Buonconvento\",991 => \"Buonvicino\",992 => \"Burago di Molgora\",993 => \"Burcei\",994 => \"Burgio\",995 => \"Burgos\",996 => \"Buriasco\",997 => \"Burolo\",998 => \"Buronzo\",8483 => \"Burrino\",999 => \"Busachi\",1000 => \"Busalla\",1001 => \"Busana\",1002 => \"Busano\",1003 => \"Busca\",1004 => \"Buscate\",1005 => \"Buscemi\",1006 => \"Buseto Palizzolo\",1007 => \"Busnago\",1008 => \"Bussero\",1009 => \"Busseto\",1010 => \"Bussi sul Tirino\",1011 => \"Busso\",1012 => \"Bussolengo\",1013 => \"Bussoleno\",1014 => \"Busto Arsizio\",1015 => \"Busto Garolfo\",1016 => \"Butera\",1017 => \"Buti\",1018 => \"Buttapietra\",1019 => \"Buttigliera alta\",1020 => \"Buttigliera d'Asti\",1021 => \"Buttrio\",1022 => \"Ca' d'Andrea\",1023 => \"Cabella ligure\",1024 => \"Cabiate\",1025 => \"Cabras\",1026 => \"Caccamo\",1027 => \"Caccuri\",1028 => \"Cadegliano Viconago\",1029 => \"Cadelbosco di sopra\",1030 => \"Cadeo\",1031 => \"Caderzone\",8566 => \"Cadipietra\",1032 => \"Cadoneghe\",1033 => \"Cadorago\",1034 => \"Cadrezzate\",1035 => \"Caerano di San Marco\",1036 => \"Cafasse\",1037 => \"Caggiano\",1038 => \"Cagli\",1039 => \"Cagliari\",8500 => \"Cagliari Elmas\",1040 => \"Caglio\",1041 => \"Cagnano Amiterno\",1042 => \"Cagnano Varano\",1043 => \"Cagno\",1044 => \"Cagno'\",1045 => \"Caianello\",1046 => \"Caiazzo\",1047 => \"Caines\",1048 => \"Caino\",1049 => \"Caiolo\",1050 => \"Cairano\",1051 => \"Cairate\",1052 => \"Cairo Montenotte\",1053 => \"Caivano\",8168 => \"Cala Gonone\",1054 => \"Calabritto\",1055 => \"Calalzo di cadore\",1056 => \"Calamandrana\",1057 => \"Calamonaci\",1058 => \"Calangianus\",1059 => \"Calanna\",1060 => \"Calasca Castiglione\",1061 => \"Calascibetta\",1062 => \"Calascio\",1063 => \"Calasetta\",1064 => \"Calatabiano\",1065 => \"Calatafimi\",1066 => \"Calavino\",1067 => \"Calcata\",1068 => \"Calceranica al lago\",1069 => \"Calci\",8424 => \"Calciano\",1071 => \"Calcinaia\",1072 => \"Calcinate\",1073 => \"Calcinato\",1074 => \"Calcio\",1075 => \"Calco\",1076 => \"Caldaro sulla strada del vino\",1077 => \"Caldarola\",1078 => \"Calderara di Reno\",1079 => \"Caldes\",1080 => \"Caldiero\",1081 => \"Caldogno\",1082 => \"Caldonazzo\",1083 => \"Calendasco\",8614 => \"Calenella\",1084 => \"Calenzano\",1085 => \"Calestano\",1086 => \"Calice al Cornoviglio\",1087 => \"Calice ligure\",8692 => \"California di Lesmo\",1088 => \"Calimera\",1089 => \"Calitri\",1090 => \"Calizzano\",1091 => \"Callabiana\",1092 => \"Calliano\",1093 => \"Calliano\",1094 => \"Calolziocorte\",1095 => \"Calopezzati\",1096 => \"Calosso\",1097 => \"Caloveto\",1098 => \"Caltabellotta\",1099 => \"Caltagirone\",1100 => \"Caltanissetta\",1101 => \"Caltavuturo\",1102 => \"Caltignaga\",1103 => \"Calto\",1104 => \"Caltrano\",1105 => \"Calusco d'Adda\",1106 => \"Caluso\",1107 => \"Calvagese della Riviera\",1108 => \"Calvanico\",1109 => \"Calvatone\",8406 => \"Calvello\",1111 => \"Calvene\",1112 => \"Calvenzano\",8373 => \"Calvera\",1114 => \"Calvi\",1115 => \"Calvi dell'Umbria\",1116 => \"Calvi risorta\",1117 => \"Calvignano\",1118 => \"Calvignasco\",1119 => \"Calvisano\",1120 => \"Calvizzano\",1121 => \"Camagna monferrato\",1122 => \"Camaiore\",1123 => \"Camairago\",1124 => \"Camandona\",1125 => \"Camastra\",1126 => \"Cambiago\",1127 => \"Cambiano\",1128 => \"Cambiasca\",1129 => \"Camburzano\",1130 => \"Camerana\",1131 => \"Camerano\",1132 => \"Camerano Casasco\",1133 => \"Camerata Cornello\",1134 => \"Camerata Nuova\",1135 => \"Camerata picena\",1136 => \"Cameri\",1137 => \"Camerino\",1138 => \"Camerota\",1139 => \"Camigliano\",8119 => \"Camigliatello silano\",1140 => \"Caminata\",1141 => \"Camini\",1142 => \"Camino\",1143 => \"Camino al Tagliamento\",1144 => \"Camisano\",1145 => \"Camisano vicentino\",1146 => \"Cammarata\",1147 => \"Camo\",1148 => \"Camogli\",1149 => \"Campagna\",1150 => \"Campagna Lupia\",1151 => \"Campagnano di Roma\",1152 => \"Campagnatico\",1153 => \"Campagnola cremasca\",1154 => \"Campagnola emilia\",1155 => \"Campana\",1156 => \"Camparada\",1157 => \"Campegine\",1158 => \"Campello sul Clitunno\",1159 => \"Campertogno\",1160 => \"Campi Bisenzio\",1161 => \"Campi salentina\",1162 => \"Campiglia cervo\",1163 => \"Campiglia dei Berici\",1164 => \"Campiglia marittima\",1165 => \"Campiglione Fenile\",8127 => \"Campigna\",1166 => \"Campione d'Italia\",1167 => \"Campitello di Fassa\",8155 => \"Campitello matese\",1168 => \"Campli\",1169 => \"Campo calabro\",8754 => \"Campo Carlo Magno\",8134 => \"Campo Catino\",8610 => \"Campo Cecina\",1170 => \"Campo di Giove\",1171 => \"Campo di Trens\",8345 => \"Campo Felice\",8101 => \"Campo imperatore\",1172 => \"Campo ligure\",1173 => \"Campo nell'Elba\",1174 => \"Campo San Martino\",8135 => \"Campo Staffi\",8644 => \"Campo Tenese\",1175 => \"Campo Tures\",1176 => \"Campobasso\",1177 => \"Campobello di Licata\",1178 => \"Campobello di Mazara\",1179 => \"Campochiaro\",1180 => \"Campodarsego\",1181 => \"Campodenno\",8357 => \"Campodimele\",1183 => \"Campodipietra\",1184 => \"Campodolcino\",1185 => \"Campodoro\",1186 => \"Campofelice di Fitalia\",1187 => \"Campofelice di Roccella\",1188 => \"Campofilone\",1189 => \"Campofiorito\",1190 => \"Campoformido\",1191 => \"Campofranco\",1192 => \"Campogalliano\",1193 => \"Campolattaro\",1194 => \"Campoli Appennino\",1195 => \"Campoli del Monte Taburno\",1196 => \"Campolieto\",1197 => \"Campolongo al Torre\",1198 => \"Campolongo Maggiore\",1199 => \"Campolongo sul Brenta\",8391 => \"Campomaggiore\",1201 => \"Campomarino\",1202 => \"Campomorone\",1203 => \"Camponogara\",1204 => \"Campora\",1205 => \"Camporeale\",1206 => \"Camporgiano\",1207 => \"Camporosso\",1208 => \"Camporotondo di Fiastrone\",1209 => \"Camporotondo etneo\",1210 => \"Camposampiero\",1211 => \"Camposano\",1212 => \"Camposanto\",1213 => \"Campospinoso\",1214 => \"Campotosto\",1215 => \"Camugnano\",1216 => \"Canal San Bovo\",1217 => \"Canale\",1218 => \"Canale d'Agordo\",1219 => \"Canale Monterano\",1220 => \"Canaro\",1221 => \"Canazei\",8407 => \"Cancellara\",1223 => \"Cancello ed Arnone\",1224 => \"Canda\",1225 => \"Candela\",8468 => \"Candela casello\",1226 => \"Candelo\",1227 => \"Candia canavese\",1228 => \"Candia lomellina\",1229 => \"Candiana\",1230 => \"Candida\",1231 => \"Candidoni\",1232 => \"Candiolo\",1233 => \"Canegrate\",1234 => \"Canelli\",1235 => \"Canepina\",1236 => \"Caneva\",8562 => \"Canevare di Fanano\",1237 => \"Canevino\",1238 => \"Canicatti'\",1239 => \"Canicattini Bagni\",1240 => \"Canino\",1241 => \"Canischio\",1242 => \"Canistro\",1243 => \"Canna\",1244 => \"Cannalonga\",1245 => \"Cannara\",1246 => \"Cannero riviera\",1247 => \"Canneto pavese\",1248 => \"Canneto sull'Oglio\",8588 => \"Cannigione\",1249 => \"Cannobio\",1250 => \"Cannole\",1251 => \"Canolo\",1252 => \"Canonica d'Adda\",1253 => \"Canosa di Puglia\",1254 => \"Canosa sannita\",1255 => \"Canosio\",1256 => \"Canossa\",1257 => \"Cansano\",1258 => \"Cantagallo\",1259 => \"Cantalice\",1260 => \"Cantalupa\",1261 => \"Cantalupo in Sabina\",1262 => \"Cantalupo ligure\",1263 => \"Cantalupo nel Sannio\",1264 => \"Cantarana\",1265 => \"Cantello\",1266 => \"Canterano\",1267 => \"Cantiano\",1268 => \"Cantoira\",1269 => \"Cantu'\",1270 => \"Canzano\",1271 => \"Canzo\",1272 => \"Caorle\",1273 => \"Caorso\",1274 => \"Capaccio\",1275 => \"Capaci\",1276 => \"Capalbio\",8242 => \"Capanna Margherita\",8297 => \"Capanne di Sillano\",1277 => \"Capannoli\",1278 => \"Capannori\",1279 => \"Capena\",1280 => \"Capergnanica\",1281 => \"Capestrano\",1282 => \"Capiago Intimiano\",1283 => \"Capistrano\",1284 => \"Capistrello\",1285 => \"Capitignano\",1286 => \"Capizzi\",1287 => \"Capizzone\",8609 => \"Capo Bellavista\",8113 => \"Capo Colonna\",1288 => \"Capo d'Orlando\",1289 => \"Capo di Ponte\",8676 => \"Capo Mele\",8607 => \"Capo Palinuro\",8112 => \"Capo Rizzuto\",1290 => \"Capodimonte\",1291 => \"Capodrise\",1292 => \"Capoliveri\",1293 => \"Capolona\",1294 => \"Caponago\",1295 => \"Caporciano\",1296 => \"Caposele\",1297 => \"Capoterra\",1298 => \"Capovalle\",1299 => \"Cappadocia\",1300 => \"Cappella Cantone\",1301 => \"Cappella de' Picenardi\",1302 => \"Cappella Maggiore\",1303 => \"Cappelle sul Tavo\",1304 => \"Capracotta\",1305 => \"Capraia e Limite\",1306 => \"Capraia isola\",1307 => \"Capralba\",1308 => \"Capranica\",1309 => \"Capranica Prenestina\",1310 => \"Caprarica di Lecce\",1311 => \"Caprarola\",1312 => \"Caprauna\",1313 => \"Caprese Michelangelo\",1314 => \"Caprezzo\",1315 => \"Capri\",1316 => \"Capri Leone\",1317 => \"Capriana\",1318 => \"Capriano del Colle\",1319 => \"Capriata d'Orba\",1320 => \"Capriate San Gervasio\",1321 => \"Capriati a Volturno\",1322 => \"Caprie\",1323 => \"Capriglia irpina\",1324 => \"Capriglio\",1325 => \"Caprile\",1326 => \"Caprino bergamasco\",1327 => \"Caprino veronese\",1328 => \"Capriolo\",1329 => \"Capriva del Friuli\",1330 => \"Capua\",1331 => \"Capurso\",1332 => \"Caraffa del Bianco\",1333 => \"Caraffa di Catanzaro\",1334 => \"Caraglio\",1335 => \"Caramagna Piemonte\",1336 => \"Caramanico terme\",1337 => \"Carano\",1338 => \"Carapelle\",1339 => \"Carapelle Calvisio\",1340 => \"Carasco\",1341 => \"Carassai\",1342 => \"Carate brianza\",1343 => \"Carate Urio\",1344 => \"Caravaggio\",1345 => \"Caravate\",1346 => \"Caravino\",1347 => \"Caravonica\",1348 => \"Carbognano\",1349 => \"Carbonara al Ticino\",1350 => \"Carbonara di Nola\",1351 => \"Carbonara di Po\",1352 => \"Carbonara Scrivia\",1353 => \"Carbonate\",8374 => \"Carbone\",1355 => \"Carbonera\",1356 => \"Carbonia\",1357 => \"Carcare\",1358 => \"Carceri\",1359 => \"Carcoforo\",1360 => \"Cardano al Campo\",1361 => \"Carde'\",1362 => \"Cardedu\",1363 => \"Cardeto\",1364 => \"Cardinale\",1365 => \"Cardito\",1366 => \"Careggine\",1367 => \"Carema\",1368 => \"Carenno\",1369 => \"Carentino\",1370 => \"Careri\",1371 => \"Caresana\",1372 => \"Caresanablot\",8625 => \"Carezza al lago\",1373 => \"Carezzano\",1374 => \"Carfizzi\",1375 => \"Cargeghe\",1376 => \"Cariati\",1377 => \"Carife\",1378 => \"Carignano\",1379 => \"Carimate\",1380 => \"Carinaro\",1381 => \"Carini\",1382 => \"Carinola\",1383 => \"Carisio\",1384 => \"Carisolo\",1385 => \"Carlantino\",1386 => \"Carlazzo\",1387 => \"Carlentini\",1388 => \"Carlino\",1389 => \"Carloforte\",1390 => \"Carlopoli\",1391 => \"Carmagnola\",1392 => \"Carmiano\",1393 => \"Carmignano\",1394 => \"Carmignano di Brenta\",1395 => \"Carnago\",1396 => \"Carnate\",1397 => \"Carobbio degli Angeli\",1398 => \"Carolei\",1399 => \"Carona\",8541 => \"Carona Carisole\",1400 => \"Caronia\",1401 => \"Caronno Pertusella\",1402 => \"Caronno varesino\",8253 => \"Carosello 3000\",1403 => \"Carosino\",1404 => \"Carovigno\",1405 => \"Carovilli\",1406 => \"Carpaneto piacentino\",1407 => \"Carpanzano\",1408 => \"Carpasio\",1409 => \"Carpegna\",1410 => \"Carpenedolo\",1411 => \"Carpeneto\",1412 => \"Carpi\",1413 => \"Carpiano\",1414 => \"Carpignano salentino\",1415 => \"Carpignano Sesia\",1416 => \"Carpineti\",1417 => \"Carpineto della Nora\",1418 => \"Carpineto romano\",1419 => \"Carpineto Sinello\",1420 => \"Carpino\",1421 => \"Carpinone\",1422 => \"Carrara\",1423 => \"Carre'\",1424 => \"Carrega ligure\",1425 => \"Carro\",1426 => \"Carrodano\",1427 => \"Carrosio\",1428 => \"Carru'\",1429 => \"Carsoli\",1430 => \"Cartigliano\",1431 => \"Cartignano\",1432 => \"Cartoceto\",1433 => \"Cartosio\",1434 => \"Cartura\",1435 => \"Carugate\",1436 => \"Carugo\",1437 => \"Carunchio\",1438 => \"Carvico\",1439 => \"Carzano\",1440 => \"Casabona\",1441 => \"Casacalenda\",1442 => \"Casacanditella\",1443 => \"Casagiove\",1444 => \"Casal Cermelli\",1445 => \"Casal di Principe\",1446 => \"Casal Velino\",1447 => \"Casalanguida\",1448 => \"Casalattico\",8648 => \"Casalavera\",1449 => \"Casalbeltrame\",1450 => \"Casalbordino\",1451 => \"Casalbore\",1452 => \"Casalborgone\",1453 => \"Casalbuono\",1454 => \"Casalbuttano ed Uniti\",1455 => \"Casalciprano\",1456 => \"Casalduni\",1457 => \"Casale Corte Cerro\",1458 => \"Casale cremasco Vidolasco\",1459 => \"Casale di Scodosia\",1460 => \"Casale Litta\",1461 => \"Casale marittimo\",1462 => \"Casale monferrato\",1463 => \"Casale sul Sile\",1464 => \"Casalecchio di Reno\",1465 => \"Casaleggio Boiro\",1466 => \"Casaleggio Novara\",1467 => \"Casaleone\",1468 => \"Casaletto Ceredano\",1469 => \"Casaletto di sopra\",1470 => \"Casaletto lodigiano\",1471 => \"Casaletto Spartano\",1472 => \"Casaletto Vaprio\",1473 => \"Casalfiumanese\",1474 => \"Casalgrande\",1475 => \"Casalgrasso\",1476 => \"Casalincontrada\",1477 => \"Casalino\",1478 => \"Casalmaggiore\",1479 => \"Casalmaiocco\",1480 => \"Casalmorano\",1481 => \"Casalmoro\",1482 => \"Casalnoceto\",1483 => \"Casalnuovo di Napoli\",1484 => \"Casalnuovo Monterotaro\",1485 => \"Casaloldo\",1486 => \"Casalpusterlengo\",1487 => \"Casalromano\",1488 => \"Casalserugo\",1489 => \"Casaluce\",1490 => \"Casalvecchio di Puglia\",1491 => \"Casalvecchio siculo\",1492 => \"Casalvieri\",1493 => \"Casalvolone\",1494 => \"Casalzuigno\",1495 => \"Casamarciano\",1496 => \"Casamassima\",1497 => \"Casamicciola terme\",1498 => \"Casandrino\",1499 => \"Casanova Elvo\",1500 => \"Casanova Lerrone\",1501 => \"Casanova Lonati\",1502 => \"Casape\",1503 => \"Casapesenna\",1504 => \"Casapinta\",1505 => \"Casaprota\",1506 => \"Casapulla\",1507 => \"Casarano\",1508 => \"Casargo\",1509 => \"Casarile\",1510 => \"Casarsa della Delizia\",1511 => \"Casarza ligure\",1512 => \"Casasco\",1513 => \"Casasco d'Intelvi\",1514 => \"Casatenovo\",1515 => \"Casatisma\",1516 => \"Casavatore\",1517 => \"Casazza\",8160 => \"Cascate del Toce\",1518 => \"Cascia\",1519 => \"Casciago\",1520 => \"Casciana terme\",1521 => \"Cascina\",1522 => \"Cascinette d'Ivrea\",1523 => \"Casei Gerola\",1524 => \"Caselette\",1525 => \"Casella\",1526 => \"Caselle in Pittari\",1527 => \"Caselle Landi\",1528 => \"Caselle Lurani\",1529 => \"Caselle torinese\",1530 => \"Caserta\",1531 => \"Casier\",1532 => \"Casignana\",1533 => \"Casina\",1534 => \"Casirate d'Adda\",1535 => \"Caslino d'Erba\",1536 => \"Casnate con Bernate\",1537 => \"Casnigo\",1538 => \"Casola di Napoli\",1539 => \"Casola in lunigiana\",1540 => \"Casola valsenio\",1541 => \"Casole Bruzio\",1542 => \"Casole d'Elsa\",1543 => \"Casoli\",1544 => \"Casorate Primo\",1545 => \"Casorate Sempione\",1546 => \"Casorezzo\",1547 => \"Casoria\",1548 => \"Casorzo\",1549 => \"Casperia\",1550 => \"Caspoggio\",1551 => \"Cassacco\",1552 => \"Cassago brianza\",1553 => \"Cassano allo Ionio\",1554 => \"Cassano d'Adda\",1555 => \"Cassano delle murge\",1556 => \"Cassano irpino\",1557 => \"Cassano Magnago\",1558 => \"Cassano Spinola\",1559 => \"Cassano valcuvia\",1560 => \"Cassaro\",1561 => \"Cassiglio\",1562 => \"Cassina de' Pecchi\",1563 => \"Cassina Rizzardi\",1564 => \"Cassina valsassina\",1565 => \"Cassinasco\",1566 => \"Cassine\",1567 => \"Cassinelle\",1568 => \"Cassinetta di Lugagnano\",1569 => \"Cassino\",1570 => \"Cassola\",1571 => \"Cassolnovo\",1572 => \"Castagnaro\",1573 => \"Castagneto Carducci\",1574 => \"Castagneto po\",1575 => \"Castagnito\",1576 => \"Castagnole delle Lanze\",1577 => \"Castagnole monferrato\",1578 => \"Castagnole Piemonte\",1579 => \"Castana\",1580 => \"Castano Primo\",1581 => \"Casteggio\",1582 => \"Castegnato\",1583 => \"Castegnero\",1584 => \"Castel Baronia\",1585 => \"Castel Boglione\",1586 => \"Castel bolognese\",1587 => \"Castel Campagnano\",1588 => \"Castel Castagna\",1589 => \"Castel Colonna\",1590 => \"Castel Condino\",1591 => \"Castel d'Aiano\",1592 => \"Castel d'Ario\",1593 => \"Castel d'Azzano\",1594 => \"Castel del Giudice\",1595 => \"Castel del monte\",1596 => \"Castel del piano\",1597 => \"Castel del rio\",1598 => \"Castel di Casio\",1599 => \"Castel di Ieri\",1600 => \"Castel di Iudica\",1601 => \"Castel di Lama\",1602 => \"Castel di Lucio\",1603 => \"Castel di Sangro\",1604 => \"Castel di Sasso\",1605 => \"Castel di Tora\",1606 => \"Castel Focognano\",1607 => \"Castel frentano\",1608 => \"Castel Gabbiano\",1609 => \"Castel Gandolfo\",1610 => \"Castel Giorgio\",1611 => \"Castel Goffredo\",1612 => \"Castel Guelfo di Bologna\",1613 => \"Castel Madama\",1614 => \"Castel Maggiore\",1615 => \"Castel Mella\",1616 => \"Castel Morrone\",1617 => \"Castel Ritaldi\",1618 => \"Castel Rocchero\",1619 => \"Castel Rozzone\",1620 => \"Castel San Giorgio\",1621 => \"Castel San Giovanni\",1622 => \"Castel San Lorenzo\",1623 => \"Castel San Niccolo'\",1624 => \"Castel San Pietro romano\",1625 => \"Castel San Pietro terme\",1626 => \"Castel San Vincenzo\",1627 => \"Castel Sant'Angelo\",1628 => \"Castel Sant'Elia\",1629 => \"Castel Viscardo\",1630 => \"Castel Vittorio\",1631 => \"Castel volturno\",1632 => \"Castelbaldo\",1633 => \"Castelbelforte\",1634 => \"Castelbellino\",1635 => \"Castelbello Ciardes\",1636 => \"Castelbianco\",1637 => \"Castelbottaccio\",1638 => \"Castelbuono\",1639 => \"Castelcivita\",1640 => \"Castelcovati\",1641 => \"Castelcucco\",1642 => \"Casteldaccia\",1643 => \"Casteldelci\",1644 => \"Casteldelfino\",1645 => \"Casteldidone\",1646 => \"Castelfidardo\",1647 => \"Castelfiorentino\",1648 => \"Castelfondo\",1649 => \"Castelforte\",1650 => \"Castelfranci\",1651 => \"Castelfranco di sopra\",1652 => \"Castelfranco di sotto\",1653 => \"Castelfranco Emilia\",1654 => \"Castelfranco in Miscano\",1655 => \"Castelfranco Veneto\",1656 => \"Castelgomberto\",8385 => \"Castelgrande\",1658 => \"Castelguglielmo\",1659 => \"Castelguidone\",1660 => \"Castell'alfero\",1661 => \"Castell'arquato\",1662 => \"Castell'azzara\",1663 => \"Castell'umberto\",1664 => \"Castellabate\",1665 => \"Castellafiume\",1666 => \"Castellalto\",1667 => \"Castellammare del Golfo\",1668 => \"Castellammare di Stabia\",1669 => \"Castellamonte\",1670 => \"Castellana Grotte\",1671 => \"Castellana sicula\",1672 => \"Castellaneta\",1673 => \"Castellania\",1674 => \"Castellanza\",1675 => \"Castellar\",1676 => \"Castellar Guidobono\",1677 => \"Castellarano\",1678 => \"Castellaro\",1679 => \"Castellazzo Bormida\",1680 => \"Castellazzo novarese\",1681 => \"Castelleone\",1682 => \"Castelleone di Suasa\",1683 => \"Castellero\",1684 => \"Castelletto Cervo\",1685 => \"Castelletto d'Erro\",1686 => \"Castelletto d'Orba\",1687 => \"Castelletto di Branduzzo\",1688 => \"Castelletto Merli\",1689 => \"Castelletto Molina\",1690 => \"Castelletto monferrato\",1691 => \"Castelletto sopra Ticino\",1692 => \"Castelletto Stura\",1693 => \"Castelletto Uzzone\",1694 => \"Castelli\",1695 => \"Castelli Calepio\",1696 => \"Castellina in chianti\",1697 => \"Castellina marittima\",1698 => \"Castellinaldo\",1699 => \"Castellino del Biferno\",1700 => \"Castellino Tanaro\",1701 => \"Castelliri\",1702 => \"Castello Cabiaglio\",1703 => \"Castello d'Agogna\",1704 => \"Castello d'Argile\",1705 => \"Castello del matese\",1706 => \"Castello dell'Acqua\",1707 => \"Castello di Annone\",1708 => \"Castello di brianza\",1709 => \"Castello di Cisterna\",1710 => \"Castello di Godego\",1711 => \"Castello di Serravalle\",1712 => \"Castello Lavazzo\",1714 => \"Castello Molina di Fiemme\",1713 => \"Castello tesino\",1715 => \"Castellucchio\",8219 => \"Castelluccio\",1716 => \"Castelluccio dei Sauri\",8395 => \"Castelluccio inferiore\",8359 => \"Castelluccio superiore\",1719 => \"Castelluccio valmaggiore\",8452 => \"Castelmadama casello\",1720 => \"Castelmagno\",1721 => \"Castelmarte\",1722 => \"Castelmassa\",1723 => \"Castelmauro\",8363 => \"Castelmezzano\",1725 => \"Castelmola\",1726 => \"Castelnovetto\",1727 => \"Castelnovo Bariano\",1728 => \"Castelnovo del Friuli\",1729 => \"Castelnovo di sotto\",8124 => \"Castelnovo ne' Monti\",1731 => \"Castelnuovo\",1732 => \"Castelnuovo Belbo\",1733 => \"Castelnuovo Berardenga\",1734 => \"Castelnuovo bocca d'Adda\",1735 => \"Castelnuovo Bormida\",1736 => \"Castelnuovo Bozzente\",1737 => \"Castelnuovo Calcea\",1738 => \"Castelnuovo cilento\",1739 => \"Castelnuovo del Garda\",1740 => \"Castelnuovo della daunia\",1741 => \"Castelnuovo di Ceva\",1742 => \"Castelnuovo di Conza\",1743 => \"Castelnuovo di Farfa\",1744 => \"Castelnuovo di Garfagnana\",1745 => \"Castelnuovo di Porto\",1746 => \"Castelnuovo di val di Cecina\",1747 => \"Castelnuovo Don Bosco\",1748 => \"Castelnuovo Magra\",1749 => \"Castelnuovo Nigra\",1750 => \"Castelnuovo Parano\",1751 => \"Castelnuovo Rangone\",1752 => \"Castelnuovo Scrivia\",1753 => \"Castelpagano\",1754 => \"Castelpetroso\",1755 => \"Castelpizzuto\",1756 => \"Castelplanio\",1757 => \"Castelpoto\",1758 => \"Castelraimondo\",1759 => \"Castelrotto\",1760 => \"Castelsantangelo sul Nera\",8378 => \"Castelsaraceno\",1762 => \"Castelsardo\",1763 => \"Castelseprio\",1764 => \"Castelsilano\",1765 => \"Castelspina\",1766 => \"Casteltermini\",1767 => \"Castelveccana\",1768 => \"Castelvecchio Calvisio\",1769 => \"Castelvecchio di Rocca Barbena\",1770 => \"Castelvecchio Subequo\",1771 => \"Castelvenere\",1772 => \"Castelverde\",1773 => \"Castelverrino\",1774 => \"Castelvetere in val fortore\",1775 => \"Castelvetere sul Calore\",1776 => \"Castelvetrano\",1777 => \"Castelvetro di Modena\",1778 => \"Castelvetro piacentino\",1779 => \"Castelvisconti\",1780 => \"Castenaso\",1781 => \"Castenedolo\",1782 => \"Castiadas\",1783 => \"Castiglion Fibocchi\",1784 => \"Castiglion fiorentino\",8193 => \"Castiglioncello\",1785 => \"Castiglione a Casauria\",1786 => \"Castiglione chiavarese\",1787 => \"Castiglione cosentino\",1788 => \"Castiglione d'Adda\",1789 => \"Castiglione d'Intelvi\",1790 => \"Castiglione d'Orcia\",1791 => \"Castiglione dei Pepoli\",1792 => \"Castiglione del Genovesi\",1793 => \"Castiglione del Lago\",1794 => \"Castiglione della Pescaia\",1795 => \"Castiglione delle Stiviere\",1796 => \"Castiglione di garfagnana\",1797 => \"Castiglione di Sicilia\",1798 => \"Castiglione Falletto\",1799 => \"Castiglione in teverina\",1800 => \"Castiglione Messer Marino\",1801 => \"Castiglione Messer Raimondo\",1802 => \"Castiglione Olona\",1803 => \"Castiglione Tinella\",1804 => \"Castiglione torinese\",1805 => \"Castignano\",1806 => \"Castilenti\",1807 => \"Castino\",1808 => \"Castione Andevenno\",1809 => \"Castione della Presolana\",1810 => \"Castions di Strada\",1811 => \"Castiraga Vidardo\",1812 => \"Casto\",1813 => \"Castorano\",8723 => \"Castore\",1814 => \"Castrezzato\",1815 => \"Castri di Lecce\",1816 => \"Castrignano de' Greci\",1817 => \"Castrignano del Capo\",1818 => \"Castro\",1819 => \"Castro\",1820 => \"Castro dei Volsci\",8167 => \"Castro Marina\",1821 => \"Castrocaro terme e terra del Sole\",1822 => \"Castrocielo\",1823 => \"Castrofilippo\",1824 => \"Castrolibero\",1825 => \"Castronno\",1826 => \"Castronuovo di Sant'Andrea\",1827 => \"Castronuovo di Sicilia\",1828 => \"Castropignano\",1829 => \"Castroreale\",1830 => \"Castroregio\",1831 => \"Castrovillari\",1832 => \"Catania\",8273 => \"Catania Fontanarossa\",1833 => \"Catanzaro\",1834 => \"Catenanuova\",1835 => \"Catignano\",8281 => \"Catinaccio\",1836 => \"Cattolica\",1837 => \"Cattolica Eraclea\",1838 => \"Caulonia\",8673 => \"Caulonia Marina\",1839 => \"Cautano\",1840 => \"Cava de' Tirreni\",1841 => \"Cava manara\",1842 => \"Cavacurta\",1843 => \"Cavaglia'\",1844 => \"Cavaglietto\",1845 => \"Cavaglio d'Agogna\",1846 => \"Cavaglio Spoccia\",1847 => \"Cavagnolo\",1848 => \"Cavaion veronese\",1849 => \"Cavalese\",1850 => \"Cavallasca\",1851 => \"Cavallerleone\",1852 => \"Cavallermaggiore\",1853 => \"Cavallino\",8657 => \"Cavallino\",1854 => \"Cavallino treporti\",1855 => \"Cavallirio\",1856 => \"Cavareno\",1857 => \"Cavargna\",1858 => \"Cavaria con Premezzo\",1859 => \"Cavarzere\",1860 => \"Cavaso del Tomba\",1861 => \"Cavasso nuovo\",1862 => \"Cavatore\",1863 => \"Cavazzo carnico\",1864 => \"Cave\",1865 => \"Cavedago\",1866 => \"Cavedine\",1867 => \"Cavenago d'Adda\",1868 => \"Cavenago di brianza\",1869 => \"Cavernago\",1870 => \"Cavezzo\",1871 => \"Cavizzana\",1872 => \"Cavour\",1873 => \"Cavriago\",1874 => \"Cavriana\",1875 => \"Cavriglia\",1876 => \"Cazzago Brabbia\",1877 => \"Cazzago San Martino\",1878 => \"Cazzano di Tramigna\",1879 => \"Cazzano Sant'Andrea\",1880 => \"Ceccano\",1881 => \"Cecima\",1882 => \"Cecina\",1883 => \"Cedegolo\",1884 => \"Cedrasco\",1885 => \"Cefala' Diana\",1886 => \"Cefalu'\",1887 => \"Ceggia\",1888 => \"Ceglie Messapica\",1889 => \"Celano\",1890 => \"Celenza sul Trigno\",1891 => \"Celenza valfortore\",1892 => \"Celico\",1893 => \"Cella dati\",1894 => \"Cella monte\",1895 => \"Cellamare\",1896 => \"Cellara\",1897 => \"Cellarengo\",1898 => \"Cellatica\",1899 => \"Celle di Bulgheria\",1900 => \"Celle di Macra\",1901 => \"Celle di San Vito\",1902 => \"Celle Enomondo\",1903 => \"Celle ligure\",1904 => \"Celleno\",1905 => \"Cellere\",1906 => \"Cellino Attanasio\",1907 => \"Cellino San Marco\",1908 => \"Cellio\",1909 => \"Cellole\",1910 => \"Cembra\",1911 => \"Cenadi\",1912 => \"Cenate sopra\",1913 => \"Cenate sotto\",1914 => \"Cencenighe Agordino\",1915 => \"Cene\",1916 => \"Ceneselli\",1917 => \"Cengio\",1918 => \"Centa San Nicolo'\",1919 => \"Centallo\",1920 => \"Cento\",1921 => \"Centola\",1922 => \"Centrache\",1923 => \"Centuripe\",1924 => \"Cepagatti\",1925 => \"Ceppaloni\",1926 => \"Ceppo Morelli\",1927 => \"Ceprano\",1928 => \"Cerami\",1929 => \"Ceranesi\",1930 => \"Cerano\",1931 => \"Cerano d'intelvi\",1932 => \"Ceranova\",1933 => \"Ceraso\",1934 => \"Cercemaggiore\",1935 => \"Cercenasco\",1936 => \"Cercepiccola\",1937 => \"Cerchiara di Calabria\",1938 => \"Cerchio\",1939 => \"Cercino\",1940 => \"Cercivento\",1941 => \"Cercola\",1942 => \"Cerda\",1943 => \"Cerea\",1944 => \"Ceregnano\",1945 => \"Cerenzia\",1946 => \"Ceres\",1947 => \"Ceresara\",1948 => \"Cereseto\",1949 => \"Ceresole Alba\",1950 => \"Ceresole reale\",1951 => \"Cerete\",1952 => \"Ceretto lomellina\",1953 => \"Cergnago\",1954 => \"Ceriale\",1955 => \"Ceriana\",1956 => \"Ceriano Laghetto\",1957 => \"Cerignale\",1958 => \"Cerignola\",1959 => \"Cerisano\",1960 => \"Cermenate\",1961 => \"Cermes\",1962 => \"Cermignano\",1963 => \"Cernobbio\",1964 => \"Cernusco lombardone\",1965 => \"Cernusco sul Naviglio\",1966 => \"Cerreto Castello\",1967 => \"Cerreto d'Asti\",1968 => \"Cerreto d'Esi\",1969 => \"Cerreto di Spoleto\",1970 => \"Cerreto Grue\",1971 => \"Cerreto Guidi\",1972 => \"Cerreto langhe\",1973 => \"Cerreto laziale\",1974 => \"Cerreto sannita\",1975 => \"Cerrina monferrato\",1976 => \"Cerrione\",1977 => \"Cerro al Lambro\",1978 => \"Cerro al Volturno\",1979 => \"Cerro maggiore\",1980 => \"Cerro Tanaro\",1981 => \"Cerro veronese\",8396 => \"Cersosimo\",1983 => \"Certaldo\",1984 => \"Certosa di Pavia\",1985 => \"Cerva\",1986 => \"Cervara di Roma\",1987 => \"Cervarese Santa Croce\",1988 => \"Cervaro\",1989 => \"Cervasca\",1990 => \"Cervatto\",1991 => \"Cerveno\",1992 => \"Cervere\",1993 => \"Cervesina\",1994 => \"Cerveteri\",1995 => \"Cervia\",1996 => \"Cervicati\",1997 => \"Cervignano d'Adda\",1998 => \"Cervignano del Friuli\",1999 => \"Cervinara\",2000 => \"Cervino\",2001 => \"Cervo\",2002 => \"Cerzeto\",2003 => \"Cesa\",2004 => \"Cesana brianza\",2005 => \"Cesana torinese\",2006 => \"Cesano Boscone\",2007 => \"Cesano Maderno\",2008 => \"Cesara\",2009 => \"Cesaro'\",2010 => \"Cesate\",2011 => \"Cesena\",2012 => \"Cesenatico\",2013 => \"Cesinali\",2014 => \"Cesio\",2015 => \"Cesiomaggiore\",2016 => \"Cessalto\",2017 => \"Cessaniti\",2018 => \"Cessapalombo\",2019 => \"Cessole\",2020 => \"Cetara\",2021 => \"Ceto\",2022 => \"Cetona\",2023 => \"Cetraro\",2024 => \"Ceva\",8721 => \"Cevedale\",2025 => \"Cevo\",2026 => \"Challand Saint Anselme\",2027 => \"Challand Saint Victor\",2028 => \"Chambave\",2029 => \"Chamois\",8255 => \"Chamole`\",2030 => \"Champdepraz\",8225 => \"Champoluc\",2031 => \"Champorcher\",8331 => \"Champorcher Cimetta Rossa\",8330 => \"Champorcher Laris\",2032 => \"Charvensod\",2033 => \"Chatillon\",2034 => \"Cherasco\",2035 => \"Cheremule\",8668 => \"Chesal\",2036 => \"Chialamberto\",2037 => \"Chiampo\",2038 => \"Chianche\",2039 => \"Chianciano terme\",2040 => \"Chianni\",2041 => \"Chianocco\",2042 => \"Chiaramonte Gulfi\",2043 => \"Chiaramonti\",2044 => \"Chiarano\",2045 => \"Chiaravalle\",2046 => \"Chiaravalle centrale\",8151 => \"Chiareggio\",2047 => \"Chiari\",2048 => \"Chiaromonte\",8432 => \"Chiasso\",2049 => \"Chiauci\",2050 => \"Chiavari\",2051 => \"Chiavenna\",2052 => \"Chiaverano\",2053 => \"Chienes\",2054 => \"Chieri\",2055 => \"Chies d'Alpago\",2056 => \"Chiesa in valmalenco\",2057 => \"Chiesanuova\",2058 => \"Chiesina uzzanese\",2059 => \"Chieti\",8319 => \"Chieti Scalo\",2060 => \"Chieuti\",2061 => \"Chieve\",2062 => \"Chignolo d'Isola\",2063 => \"Chignolo Po\",2064 => \"Chioggia\",2065 => \"Chiomonte\",2066 => \"Chions\",2067 => \"Chiopris Viscone\",2068 => \"Chitignano\",2069 => \"Chiuduno\",2070 => \"Chiuppano\",2071 => \"Chiuro\",2072 => \"Chiusa\",2073 => \"Chiusa di Pesio\",2074 => \"Chiusa di San Michele\",2075 => \"Chiusa Sclafani\",2076 => \"Chiusaforte\",2077 => \"Chiusanico\",2078 => \"Chiusano d'Asti\",2079 => \"Chiusano di San Domenico\",2080 => \"Chiusavecchia\",2081 => \"Chiusdino\",2082 => \"Chiusi\",2083 => \"Chiusi della Verna\",2084 => \"Chivasso\",8515 => \"Ciampac Alba\",2085 => \"Ciampino\",2086 => \"Cianciana\",2087 => \"Cibiana di cadore\",2088 => \"Cicagna\",2089 => \"Cicala\",2090 => \"Cicciano\",2091 => \"Cicerale\",2092 => \"Ciciliano\",2093 => \"Cicognolo\",2094 => \"Ciconio\",2095 => \"Cigliano\",2096 => \"Ciglie'\",2097 => \"Cigognola\",2098 => \"Cigole\",2099 => \"Cilavegna\",8340 => \"Cima Durand\",8590 => \"Cima Pisciadu'\",8764 => \"Cima Plose\",8703 => \"Cima Portavescovo\",8282 => \"Cima Sole\",2100 => \"Cimadolmo\",2101 => \"Cimbergo\",8332 => \"Cime Bianche\",2102 => \"Cimego\",2103 => \"Cimina'\",2104 => \"Ciminna\",2105 => \"Cimitile\",2106 => \"Cimolais\",8433 => \"Cimoncino\",2107 => \"Cimone\",2108 => \"Cinaglio\",2109 => \"Cineto romano\",2110 => \"Cingia de' Botti\",2111 => \"Cingoli\",2112 => \"Cinigiano\",2113 => \"Cinisello Balsamo\",2114 => \"Cinisi\",2115 => \"Cino\",2116 => \"Cinquefrondi\",2117 => \"Cintano\",2118 => \"Cinte tesino\",2119 => \"Cinto Caomaggiore\",2120 => \"Cinto Euganeo\",2121 => \"Cinzano\",2122 => \"Ciorlano\",2123 => \"Cipressa\",2124 => \"Circello\",2125 => \"Cirie'\",2126 => \"Cirigliano\",2127 => \"Cirimido\",2128 => \"Ciro'\",2129 => \"Ciro' marina\",2130 => \"Cis\",2131 => \"Cisano bergamasco\",2132 => \"Cisano sul Neva\",2133 => \"Ciserano\",2134 => \"Cislago\",2135 => \"Cisliano\",2136 => \"Cismon del Grappa\",2137 => \"Cison di valmarino\",2138 => \"Cissone\",2139 => \"Cisterna d'Asti\",2140 => \"Cisterna di Latina\",2141 => \"Cisternino\",2142 => \"Citerna\",8142 => \"Città del Vaticano\",2143 => \"Citta' della Pieve\",2144 => \"Citta' di Castello\",2145 => \"Citta' Sant'Angelo\",2146 => \"Cittadella\",2147 => \"Cittaducale\",2148 => \"Cittanova\",2149 => \"Cittareale\",2150 => \"Cittiglio\",2151 => \"Civate\",2152 => \"Civenna\",2153 => \"Civezza\",2154 => \"Civezzano\",2155 => \"Civiasco\",2156 => \"Cividale del Friuli\",2157 => \"Cividate al piano\",2158 => \"Cividate camuno\",2159 => \"Civita\",2160 => \"Civita Castellana\",2161 => \"Civita d'Antino\",2162 => \"Civitacampomarano\",2163 => \"Civitaluparella\",2164 => \"Civitanova del sannio\",2165 => \"Civitanova Marche\",8356 => \"Civitaquana\",2167 => \"Civitavecchia\",2168 => \"Civitella Alfedena\",2169 => \"Civitella Casanova\",2170 => \"Civitella d'Agliano\",2171 => \"Civitella del Tronto\",2172 => \"Civitella di Romagna\",2173 => \"Civitella in val di Chiana\",2174 => \"Civitella Messer Raimondo\",2175 => \"Civitella Paganico\",2176 => \"Civitella Roveto\",2177 => \"Civitella San Paolo\",2178 => \"Civo\",2179 => \"Claino con osteno\",2180 => \"Claut\",2181 => \"Clauzetto\",2182 => \"Clavesana\",2183 => \"Claviere\",2184 => \"Cles\",2185 => \"Cleto\",2186 => \"Clivio\",2187 => \"Cloz\",2188 => \"Clusone\",2189 => \"Coassolo torinese\",2190 => \"Coazze\",2191 => \"Coazzolo\",2192 => \"Coccaglio\",2193 => \"Cocconato\",2194 => \"Cocquio Trevisago\",2195 => \"Cocullo\",2196 => \"Codevigo\",2197 => \"Codevilla\",2198 => \"Codigoro\",2199 => \"Codogne'\",2200 => \"Codogno\",2201 => \"Codroipo\",2202 => \"Codrongianos\",2203 => \"Coggiola\",2204 => \"Cogliate\",2205 => \"Cogne\",8654 => \"Cogne Lillaz\",2206 => \"Cogoleto\",2207 => \"Cogollo del Cengio\",5049 => \"Cogolo\",2208 => \"Cogorno\",8354 => \"Col de Joux\",8604 => \"Col Indes\",2209 => \"Colazza\",2210 => \"Colbordolo\",2211 => \"Colere\",2212 => \"Colfelice\",8217 => \"Colfiorito\",8761 => \"Colfosco\",2213 => \"Coli\",2214 => \"Colico\",2215 => \"Collagna\",2216 => \"Collalto sabino\",2217 => \"Collarmele\",2218 => \"Collazzone\",8249 => \"Colle Bettaforca\",2219 => \"Colle Brianza\",2220 => \"Colle d'Anchise\",8687 => \"Colle del Gran San Bernardo\",8688 => \"Colle del Moncenisio\",8686 => \"Colle del Piccolo San Bernardo\",8481 => \"Colle del Prel\",2221 => \"Colle di Tora\",2222 => \"Colle di val d'Elsa\",2223 => \"Colle San Magno\",2224 => \"Colle sannita\",2225 => \"Colle Santa Lucia\",8246 => \"Colle Sarezza\",2226 => \"Colle Umberto\",2227 => \"Collebeato\",2228 => \"Collecchio\",2229 => \"Collecorvino\",2230 => \"Colledara\",8453 => \"Colledara casello\",2231 => \"Colledimacine\",2232 => \"Colledimezzo\",2233 => \"Colleferro\",2234 => \"Collegiove\",2235 => \"Collegno\",2236 => \"Collelongo\",2237 => \"Collepardo\",2238 => \"Collepasso\",2239 => \"Collepietro\",2240 => \"Colleretto castelnuovo\",2241 => \"Colleretto Giacosa\",2242 => \"Collesalvetti\",2243 => \"Collesano\",2244 => \"Colletorto\",2245 => \"Collevecchio\",2246 => \"Colli a volturno\",2247 => \"Colli del Tronto\",2248 => \"Colli sul Velino\",2249 => \"Colliano\",2250 => \"Collinas\",2251 => \"Collio\",2252 => \"Collobiano\",2253 => \"Colloredo di monte Albano\",2254 => \"Colmurano\",2255 => \"Colobraro\",2256 => \"Cologna veneta\",2257 => \"Cologne\",2258 => \"Cologno al Serio\",2259 => \"Cologno monzese\",2260 => \"Colognola ai Colli\",2261 => \"Colonna\",2262 => \"Colonnella\",2263 => \"Colonno\",2264 => \"Colorina\",2265 => \"Colorno\",2266 => \"Colosimi\",2267 => \"Colturano\",2268 => \"Colzate\",2269 => \"Comabbio\",2270 => \"Comacchio\",2271 => \"Comano\",2272 => \"Comazzo\",2273 => \"Comeglians\",2274 => \"Comelico superiore\",2275 => \"Comerio\",2276 => \"Comezzano Cizzago\",2277 => \"Comignago\",2278 => \"Comiso\",2279 => \"Comitini\",2280 => \"Comiziano\",2281 => \"Commessaggio\",2282 => \"Commezzadura\",2283 => \"Como\",2284 => \"Compiano\",8711 => \"Comprensorio Cimone\",2285 => \"Comun nuovo\",2286 => \"Comunanza\",2287 => \"Cona\",2288 => \"Conca Casale\",2289 => \"Conca dei Marini\",2290 => \"Conca della Campania\",2291 => \"Concamarise\",2292 => \"Concei\",2293 => \"Concerviano\",2294 => \"Concesio\",2295 => \"Conco\",2296 => \"Concordia Sagittaria\",2297 => \"Concordia sulla Secchia\",2298 => \"Concorezzo\",2299 => \"Condino\",2300 => \"Condofuri\",8689 => \"Condofuri Marina\",2301 => \"Condove\",2302 => \"Condro'\",2303 => \"Conegliano\",2304 => \"Confienza\",2305 => \"Configni\",2306 => \"Conflenti\",2307 => \"Coniolo\",2308 => \"Conselice\",2309 => \"Conselve\",2310 => \"Consiglio di Rumo\",2311 => \"Contessa Entellina\",2312 => \"Contigliano\",2313 => \"Contrada\",2314 => \"Controguerra\",2315 => \"Controne\",2316 => \"Contursi terme\",2317 => \"Conversano\",2318 => \"Conza della Campania\",2319 => \"Conzano\",2320 => \"Copertino\",2321 => \"Copiano\",2322 => \"Copparo\",2323 => \"Corana\",2324 => \"Corato\",2325 => \"Corbara\",2326 => \"Corbetta\",2327 => \"Corbola\",2328 => \"Corchiano\",2329 => \"Corciano\",2330 => \"Cordenons\",2331 => \"Cordignano\",2332 => \"Cordovado\",2333 => \"Coredo\",2334 => \"Coreglia Antelminelli\",2335 => \"Coreglia ligure\",2336 => \"Coreno Ausonio\",2337 => \"Corfinio\",2338 => \"Cori\",2339 => \"Coriano\",2340 => \"Corigliano calabro\",8110 => \"Corigliano Calabro Marina\",2341 => \"Corigliano d'Otranto\",2342 => \"Corinaldo\",2343 => \"Corio\",2344 => \"Corleone\",2345 => \"Corleto monforte\",2346 => \"Corleto Perticara\",2347 => \"Cormano\",2348 => \"Cormons\",2349 => \"Corna imagna\",2350 => \"Cornalba\",2351 => \"Cornale\",2352 => \"Cornaredo\",2353 => \"Cornate d'Adda\",2354 => \"Cornedo all'Isarco\",2355 => \"Cornedo vicentino\",2356 => \"Cornegliano laudense\",2357 => \"Corneliano d'Alba\",2358 => \"Corniglio\",8537 => \"Corno alle Scale\",8353 => \"Corno del Renon\",2359 => \"Corno di Rosazzo\",2360 => \"Corno Giovine\",2361 => \"Cornovecchio\",2362 => \"Cornuda\",2363 => \"Correggio\",2364 => \"Correzzana\",2365 => \"Correzzola\",2366 => \"Corrido\",2367 => \"Corridonia\",2368 => \"Corropoli\",2369 => \"Corsano\",2370 => \"Corsico\",2371 => \"Corsione\",2372 => \"Cortaccia sulla strada del vino\",2373 => \"Cortale\",2374 => \"Cortandone\",2375 => \"Cortanze\",2376 => \"Cortazzone\",2377 => \"Corte brugnatella\",2378 => \"Corte de' Cortesi con Cignone\",2379 => \"Corte de' Frati\",2380 => \"Corte Franca\",2381 => \"Corte Palasio\",2382 => \"Cortemaggiore\",2383 => \"Cortemilia\",2384 => \"Corteno Golgi\",2385 => \"Cortenova\",2386 => \"Cortenuova\",2387 => \"Corteolona\",2388 => \"Cortiglione\",2389 => \"Cortina d'Ampezzo\",2390 => \"Cortina sulla strada del vino\",2391 => \"Cortino\",2392 => \"Cortona\",2393 => \"Corvara\",2394 => \"Corvara in Badia\",2395 => \"Corvino san Quirico\",2396 => \"Corzano\",2397 => \"Coseano\",2398 => \"Cosenza\",2399 => \"Cosio di Arroscia\",2400 => \"Cosio valtellino\",2401 => \"Cosoleto\",2402 => \"Cossano belbo\",2403 => \"Cossano canavese\",2404 => \"Cossato\",2405 => \"Cosseria\",2406 => \"Cossignano\",2407 => \"Cossogno\",2408 => \"Cossoine\",2409 => \"Cossombrato\",2410 => \"Costa de' Nobili\",2411 => \"Costa di Mezzate\",2412 => \"Costa di Rovigo\",2413 => \"Costa di serina\",2414 => \"Costa masnaga\",8177 => \"Costa Rei\",2415 => \"Costa valle imagna\",2416 => \"Costa Vescovato\",2417 => \"Costa Volpino\",2418 => \"Costabissara\",2419 => \"Costacciaro\",2420 => \"Costanzana\",2421 => \"Costarainera\",2422 => \"Costermano\",2423 => \"Costigliole d'Asti\",2424 => \"Costigliole Saluzzo\",2425 => \"Cotignola\",2426 => \"Cotronei\",2427 => \"Cottanello\",8256 => \"Couis 2\",2428 => \"Courmayeur\",2429 => \"Covo\",2430 => \"Cozzo\",8382 => \"Craco\",2432 => \"Crandola valsassina\",2433 => \"Cravagliana\",2434 => \"Cravanzana\",2435 => \"Craveggia\",2436 => \"Creazzo\",2437 => \"Crecchio\",2438 => \"Credaro\",2439 => \"Credera Rubbiano\",2440 => \"Crema\",2441 => \"Cremella\",2442 => \"Cremenaga\",2443 => \"Cremeno\",2444 => \"Cremia\",2445 => \"Cremolino\",2446 => \"Cremona\",2447 => \"Cremosano\",2448 => \"Crescentino\",2449 => \"Crespadoro\",2450 => \"Crespano del Grappa\",2451 => \"Crespellano\",2452 => \"Crespiatica\",2453 => \"Crespina\",2454 => \"Crespino\",2455 => \"Cressa\",8247 => \"Crest\",8741 => \"Cresta Youla\",8646 => \"Crevacol\",2456 => \"Crevacuore\",2457 => \"Crevalcore\",2458 => \"Crevoladossola\",2459 => \"Crispano\",2460 => \"Crispiano\",2461 => \"Crissolo\",8355 => \"Crissolo Pian delle Regine\",2462 => \"Crocefieschi\",2463 => \"Crocetta del Montello\",2464 => \"Crodo\",2465 => \"Crognaleto\",2466 => \"Cropalati\",2467 => \"Cropani\",2468 => \"Crosa\",2469 => \"Crosia\",2470 => \"Crosio della valle\",2471 => \"Crotone\",8552 => \"Crotone Sant'Anna\",2472 => \"Crotta d'Adda\",2473 => \"Crova\",2474 => \"Croviana\",2475 => \"Crucoli\",2476 => \"Cuasso al monte\",2477 => \"Cuccaro monferrato\",2478 => \"Cuccaro Vetere\",2479 => \"Cucciago\",2480 => \"Cuceglio\",2481 => \"Cuggiono\",2482 => \"Cugliate-fabiasco\",2483 => \"Cuglieri\",2484 => \"Cugnoli\",8718 => \"Cuma\",2485 => \"Cumiana\",2486 => \"Cumignano sul Naviglio\",2487 => \"Cunardo\",2488 => \"Cuneo\",8553 => \"Cuneo Levaldigi\",2489 => \"Cunevo\",2490 => \"Cunico\",2491 => \"Cuorgne'\",2492 => \"Cupello\",2493 => \"Cupra marittima\",2494 => \"Cupramontana\",2495 => \"Cura carpignano\",2496 => \"Curcuris\",2497 => \"Cureggio\",2498 => \"Curiglia con Monteviasco\",2499 => \"Curinga\",2500 => \"Curino\",2501 => \"Curno\",2502 => \"Curon Venosta\",2503 => \"Cursi\",2504 => \"Cursolo orasso\",2505 => \"Curtarolo\",2506 => \"Curtatone\",2507 => \"Curti\",2508 => \"Cusago\",2509 => \"Cusano milanino\",2510 => \"Cusano Mutri\",2511 => \"Cusino\",2512 => \"Cusio\",2513 => \"Custonaci\",2514 => \"Cutigliano\",2515 => \"Cutro\",2516 => \"Cutrofiano\",2517 => \"Cuveglio\",2518 => \"Cuvio\",2519 => \"Daiano\",2520 => \"Dairago\",2521 => \"Dalmine\",2522 => \"Dambel\",2523 => \"Danta di cadore\",2524 => \"Daone\",2525 => \"Dare'\",2526 => \"Darfo Boario terme\",2527 => \"Dasa'\",2528 => \"Davagna\",2529 => \"Daverio\",2530 => \"Davoli\",2531 => \"Dazio\",2532 => \"Decimomannu\",2533 => \"Decimoputzu\",2534 => \"Decollatura\",2535 => \"Dego\",2536 => \"Deiva marina\",2537 => \"Delebio\",2538 => \"Delia\",2539 => \"Delianuova\",2540 => \"Deliceto\",2541 => \"Dello\",2542 => \"Demonte\",2543 => \"Denice\",2544 => \"Denno\",2545 => \"Dernice\",2546 => \"Derovere\",2547 => \"Deruta\",2548 => \"Dervio\",2549 => \"Desana\",2550 => \"Desenzano del Garda\",2551 => \"Desio\",2552 => \"Desulo\",2553 => \"Diamante\",2554 => \"Diano arentino\",2555 => \"Diano castello\",2556 => \"Diano d'Alba\",2557 => \"Diano marina\",2558 => \"Diano San Pietro\",2559 => \"Dicomano\",2560 => \"Dignano\",2561 => \"Dimaro\",2562 => \"Dinami\",2563 => \"Dipignano\",2564 => \"Diso\",2565 => \"Divignano\",2566 => \"Dizzasco\",2567 => \"Dobbiaco\",2568 => \"Doberdo' del lago\",8628 => \"Doganaccia\",2569 => \"Dogliani\",2570 => \"Dogliola\",2571 => \"Dogna\",2572 => \"Dolce'\",2573 => \"Dolceacqua\",2574 => \"Dolcedo\",2575 => \"Dolegna del collio\",2576 => \"Dolianova\",2577 => \"Dolo\",8616 => \"Dolonne\",2578 => \"Dolzago\",2579 => \"Domanico\",2580 => \"Domaso\",2581 => \"Domegge di cadore\",2582 => \"Domicella\",2583 => \"Domodossola\",2584 => \"Domus de Maria\",2585 => \"Domusnovas\",2586 => \"Don\",2587 => \"Donato\",2588 => \"Dongo\",2589 => \"Donnas\",2590 => \"Donori'\",2591 => \"Dorgali\",2592 => \"Dorio\",2593 => \"Dormelletto\",2594 => \"Dorno\",2595 => \"Dorsino\",2596 => \"Dorzano\",2597 => \"Dosolo\",2598 => \"Dossena\",2599 => \"Dosso del liro\",8323 => \"Dosso Pasò\",2600 => \"Doues\",2601 => \"Dovadola\",2602 => \"Dovera\",2603 => \"Dozza\",2604 => \"Dragoni\",2605 => \"Drapia\",2606 => \"Drena\",2607 => \"Drenchia\",2608 => \"Dresano\",2609 => \"Drezzo\",2610 => \"Drizzona\",2611 => \"Dro\",2612 => \"Dronero\",2613 => \"Druento\",2614 => \"Druogno\",2615 => \"Dualchi\",2616 => \"Dubino\",2617 => \"Due carrare\",2618 => \"Dueville\",2619 => \"Dugenta\",2620 => \"Duino aurisina\",2621 => \"Dumenza\",2622 => \"Duno\",2623 => \"Durazzano\",2624 => \"Duronia\",2625 => \"Dusino San Michele\",2626 => \"Eboli\",2627 => \"Edolo\",2628 => \"Egna\",2629 => \"Elice\",2630 => \"Elini\",2631 => \"Ello\",2632 => \"Elmas\",2633 => \"Elva\",2634 => \"Emarese\",2635 => \"Empoli\",2636 => \"Endine gaiano\",2637 => \"Enego\",2638 => \"Enemonzo\",2639 => \"Enna\",2640 => \"Entracque\",2641 => \"Entratico\",8222 => \"Entreves\",2642 => \"Envie\",8397 => \"Episcopia\",2644 => \"Eraclea\",2645 => \"Erba\",2646 => \"Erbe'\",2647 => \"Erbezzo\",2648 => \"Erbusco\",2649 => \"Erchie\",2650 => \"Ercolano\",8531 => \"Eremo di Camaldoli\",8606 => \"Eremo di Carpegna\",2651 => \"Erice\",2652 => \"Erli\",2653 => \"Erto e casso\",2654 => \"Erula\",2655 => \"Erve\",2656 => \"Esanatoglia\",2657 => \"Escalaplano\",2658 => \"Escolca\",2659 => \"Esine\",2660 => \"Esino lario\",2661 => \"Esperia\",2662 => \"Esporlatu\",2663 => \"Este\",2664 => \"Esterzili\",2665 => \"Etroubles\",2666 => \"Eupilio\",2667 => \"Exilles\",2668 => \"Fabbrica Curone\",2669 => \"Fabbriche di vallico\",2670 => \"Fabbrico\",2671 => \"Fabriano\",2672 => \"Fabrica di Roma\",2673 => \"Fabrizia\",2674 => \"Fabro\",8458 => \"Fabro casello\",2675 => \"Faedis\",2676 => \"Faedo\",2677 => \"Faedo valtellino\",2678 => \"Faenza\",2679 => \"Faeto\",2680 => \"Fagagna\",2681 => \"Faggeto lario\",2682 => \"Faggiano\",2683 => \"Fagnano alto\",2684 => \"Fagnano castello\",2685 => \"Fagnano olona\",2686 => \"Fai della paganella\",2687 => \"Faicchio\",2688 => \"Falcade\",2689 => \"Falciano del massico\",2690 => \"Falconara albanese\",2691 => \"Falconara marittima\",2692 => \"Falcone\",2693 => \"Faleria\",2694 => \"Falerna\",8116 => \"Falerna Marina\",2695 => \"Falerone\",2696 => \"Fallo\",2697 => \"Falmenta\",2698 => \"Faloppio\",2699 => \"Falvaterra\",2700 => \"Falzes\",2701 => \"Fanano\",2702 => \"Fanna\",2703 => \"Fano\",2704 => \"Fano adriano\",2705 => \"Fara Filiorum Petri\",2706 => \"Fara gera d'Adda\",2707 => \"Fara in sabina\",2708 => \"Fara novarese\",2709 => \"Fara Olivana con Sola\",2710 => \"Fara San Martino\",2711 => \"Fara vicentino\",8360 => \"Fardella\",2713 => \"Farigliano\",2714 => \"Farindola\",2715 => \"Farini\",2716 => \"Farnese\",2717 => \"Farra d'alpago\",2718 => \"Farra d'Isonzo\",2719 => \"Farra di soligo\",2720 => \"Fasano\",2721 => \"Fascia\",2722 => \"Fauglia\",2723 => \"Faule\",2724 => \"Favale di malvaro\",2725 => \"Favara\",2726 => \"Faver\",2727 => \"Favignana\",2728 => \"Favria\",2729 => \"Feisoglio\",2730 => \"Feletto\",2731 => \"Felino\",2732 => \"Felitto\",2733 => \"Felizzano\",2734 => \"Felonica\",2735 => \"Feltre\",2736 => \"Fenegro'\",2737 => \"Fenestrelle\",2738 => \"Fenis\",2739 => \"Ferentillo\",2740 => \"Ferentino\",2741 => \"Ferla\",2742 => \"Fermignano\",2743 => \"Fermo\",2744 => \"Ferno\",2745 => \"Feroleto Antico\",2746 => \"Feroleto della chiesa\",8370 => \"Ferrandina\",2748 => \"Ferrara\",2749 => \"Ferrara di monte Baldo\",2750 => \"Ferrazzano\",2751 => \"Ferrera di Varese\",2752 => \"Ferrera Erbognone\",2753 => \"Ferrere\",2754 => \"Ferriere\",2755 => \"Ferruzzano\",2756 => \"Fiamignano\",2757 => \"Fiano\",2758 => \"Fiano romano\",2759 => \"Fiastra\",2760 => \"Fiave'\",2761 => \"Ficarazzi\",2762 => \"Ficarolo\",2763 => \"Ficarra\",2764 => \"Ficulle\",2765 => \"Fidenza\",2766 => \"Fie' allo Sciliar\",2767 => \"Fiera di primiero\",2768 => \"Fierozzo\",2769 => \"Fiesco\",2770 => \"Fiesole\",2771 => \"Fiesse\",2772 => \"Fiesso d'Artico\",2773 => \"Fiesso Umbertiano\",2774 => \"Figino Serenza\",2775 => \"Figline valdarno\",2776 => \"Figline Vegliaturo\",2777 => \"Filacciano\",2778 => \"Filadelfia\",2779 => \"Filago\",2780 => \"Filandari\",2781 => \"Filattiera\",2782 => \"Filettino\",2783 => \"Filetto\",8392 => \"Filiano\",2785 => \"Filighera\",2786 => \"Filignano\",2787 => \"Filogaso\",2788 => \"Filottrano\",2789 => \"Finale emilia\",2790 => \"Finale ligure\",2791 => \"Fino del monte\",2792 => \"Fino Mornasco\",2793 => \"Fiorano al Serio\",2794 => \"Fiorano canavese\",2795 => \"Fiorano modenese\",2796 => \"Fiordimonte\",2797 => \"Fiorenzuola d'arda\",2798 => \"Firenze\",8270 => \"Firenze Peretola\",2799 => \"Firenzuola\",2800 => \"Firmo\",2801 => \"Fisciano\",2802 => \"Fiuggi\",2803 => \"Fiumalbo\",2804 => \"Fiumara\",8489 => \"Fiumata\",2805 => \"Fiume veneto\",2806 => \"Fiumedinisi\",2807 => \"Fiumefreddo Bruzio\",2808 => \"Fiumefreddo di Sicilia\",2809 => \"Fiumicello\",2810 => \"Fiumicino\",2811 => \"Fiuminata\",2812 => \"Fivizzano\",2813 => \"Flaibano\",2814 => \"Flavon\",2815 => \"Flero\",2816 => \"Floresta\",2817 => \"Floridia\",2818 => \"Florinas\",2819 => \"Flumeri\",2820 => \"Fluminimaggiore\",2821 => \"Flussio\",2822 => \"Fobello\",2823 => \"Foggia\",2824 => \"Foglianise\",2825 => \"Fogliano redipuglia\",2826 => \"Foglizzo\",2827 => \"Foiano della chiana\",2828 => \"Foiano di val fortore\",2829 => \"Folgaria\",8202 => \"Folgarida\",2830 => \"Folignano\",2831 => \"Foligno\",2832 => \"Follina\",2833 => \"Follo\",2834 => \"Follonica\",2835 => \"Fombio\",2836 => \"Fondachelli Fantina\",2837 => \"Fondi\",2838 => \"Fondo\",2839 => \"Fonni\",2840 => \"Fontainemore\",2841 => \"Fontana liri\",2842 => \"Fontanafredda\",2843 => \"Fontanarosa\",8185 => \"Fontane Bianche\",2844 => \"Fontanelice\",2845 => \"Fontanella\",2846 => \"Fontanellato\",2847 => \"Fontanelle\",2848 => \"Fontaneto d'Agogna\",2849 => \"Fontanetto po\",2850 => \"Fontanigorda\",2851 => \"Fontanile\",2852 => \"Fontaniva\",2853 => \"Fonte\",8643 => \"Fonte Cerreto\",2854 => \"Fonte Nuova\",2855 => \"Fontecchio\",2856 => \"Fontechiari\",2857 => \"Fontegreca\",2858 => \"Fonteno\",2859 => \"Fontevivo\",2860 => \"Fonzaso\",2861 => \"Foppolo\",8540 => \"Foppolo IV Baita\",2862 => \"Forano\",2863 => \"Force\",2864 => \"Forchia\",2865 => \"Forcola\",2866 => \"Fordongianus\",2867 => \"Forenza\",2868 => \"Foresto sparso\",2869 => \"Forgaria nel friuli\",2870 => \"Forino\",2871 => \"Forio\",8551 => \"Forlì Ridolfi\",2872 => \"Forli'\",2873 => \"Forli' del sannio\",2874 => \"Forlimpopoli\",2875 => \"Formazza\",2876 => \"Formello\",2877 => \"Formia\",2878 => \"Formicola\",2879 => \"Formigara\",2880 => \"Formigine\",2881 => \"Formigliana\",2882 => \"Formignana\",2883 => \"Fornace\",2884 => \"Fornelli\",2885 => \"Forni Avoltri\",2886 => \"Forni di sopra\",2887 => \"Forni di sotto\",8161 => \"Forno Alpi Graie\",2888 => \"Forno canavese\",2889 => \"Forno di Zoldo\",2890 => \"Fornovo di Taro\",2891 => \"Fornovo San Giovanni\",2892 => \"Forte dei marmi\",2893 => \"Fortezza\",2894 => \"Fortunago\",2895 => \"Forza d'Agro'\",2896 => \"Fosciandora\",8435 => \"Fosdinovo\",2898 => \"Fossa\",2899 => \"Fossacesia\",2900 => \"Fossalta di Piave\",2901 => \"Fossalta di Portogruaro\",2902 => \"Fossalto\",2903 => \"Fossano\",2904 => \"Fossato di vico\",2905 => \"Fossato serralta\",2906 => \"Fosso'\",2907 => \"Fossombrone\",2908 => \"Foza\",2909 => \"Frabosa soprana\",2910 => \"Frabosa sottana\",2911 => \"Fraconalto\",2912 => \"Fragagnano\",2913 => \"Fragneto l'abate\",2914 => \"Fragneto monforte\",2915 => \"Fraine\",2916 => \"Framura\",2917 => \"Francavilla al mare\",2918 => \"Francavilla angitola\",2919 => \"Francavilla bisio\",2920 => \"Francavilla d'ete\",2921 => \"Francavilla di Sicilia\",2922 => \"Francavilla fontana\",8380 => \"Francavilla in sinni\",2924 => \"Francavilla marittima\",2925 => \"Francica\",2926 => \"Francofonte\",2927 => \"Francolise\",2928 => \"Frascaro\",2929 => \"Frascarolo\",2930 => \"Frascati\",2931 => \"Frascineto\",2932 => \"Frassilongo\",2933 => \"Frassinelle polesine\",2934 => \"Frassinello monferrato\",2935 => \"Frassineto po\",2936 => \"Frassinetto\",2937 => \"Frassino\",2938 => \"Frassinoro\",2939 => \"Frasso sabino\",2940 => \"Frasso telesino\",2941 => \"Fratta polesine\",2942 => \"Fratta todina\",2943 => \"Frattamaggiore\",2944 => \"Frattaminore\",2945 => \"Fratte rosa\",2946 => \"Frazzano'\",8137 => \"Fregene\",2947 => \"Fregona\",8667 => \"Frejusia\",2948 => \"Fresagrandinaria\",2949 => \"Fresonara\",2950 => \"Frigento\",2951 => \"Frignano\",2952 => \"Frinco\",2953 => \"Frisa\",2954 => \"Frisanco\",2955 => \"Front\",8153 => \"Frontignano\",2956 => \"Frontino\",2957 => \"Frontone\",8751 => \"Frontone - Monte Catria\",2958 => \"Frosinone\",8464 => \"Frosinone casello\",2959 => \"Frosolone\",2960 => \"Frossasco\",2961 => \"Frugarolo\",2962 => \"Fubine\",2963 => \"Fucecchio\",2964 => \"Fuipiano valle imagna\",2965 => \"Fumane\",2966 => \"Fumone\",2967 => \"Funes\",2968 => \"Furci\",2969 => \"Furci siculo\",2970 => \"Furnari\",2971 => \"Furore\",2972 => \"Furtei\",2973 => \"Fuscaldo\",2974 => \"Fusignano\",2975 => \"Fusine\",8702 => \"Fusine di Zoldo\",8131 => \"Fusine in Valromana\",2976 => \"Futani\",2977 => \"Gabbioneta binanuova\",2978 => \"Gabiano\",2979 => \"Gabicce mare\",8252 => \"Gabiet\",2980 => \"Gaby\",2981 => \"Gadesco Pieve Delmona\",2982 => \"Gadoni\",2983 => \"Gaeta\",2984 => \"Gaggi\",2985 => \"Gaggiano\",2986 => \"Gaggio montano\",2987 => \"Gaglianico\",2988 => \"Gagliano aterno\",2989 => \"Gagliano castelferrato\",2990 => \"Gagliano del capo\",2991 => \"Gagliato\",2992 => \"Gagliole\",2993 => \"Gaiarine\",2994 => \"Gaiba\",2995 => \"Gaiola\",2996 => \"Gaiole in chianti\",2997 => \"Gairo\",2998 => \"Gais\",2999 => \"Galati Mamertino\",3000 => \"Galatina\",3001 => \"Galatone\",3002 => \"Galatro\",3003 => \"Galbiate\",3004 => \"Galeata\",3005 => \"Galgagnano\",3006 => \"Gallarate\",3007 => \"Gallese\",3008 => \"Galliate\",3009 => \"Galliate lombardo\",3010 => \"Galliavola\",3011 => \"Gallicano\",3012 => \"Gallicano nel Lazio\",8364 => \"Gallicchio\",3014 => \"Galliera\",3015 => \"Galliera veneta\",3016 => \"Gallinaro\",3017 => \"Gallio\",3018 => \"Gallipoli\",3019 => \"Gallo matese\",3020 => \"Gallodoro\",3021 => \"Galluccio\",8315 => \"Galluzzo\",3022 => \"Galtelli\",3023 => \"Galzignano terme\",3024 => \"Gamalero\",3025 => \"Gambara\",3026 => \"Gambarana\",8105 => \"Gambarie\",3027 => \"Gambasca\",3028 => \"Gambassi terme\",3029 => \"Gambatesa\",3030 => \"Gambellara\",3031 => \"Gamberale\",3032 => \"Gambettola\",3033 => \"Gambolo'\",3034 => \"Gambugliano\",3035 => \"Gandellino\",3036 => \"Gandino\",3037 => \"Gandosso\",3038 => \"Gangi\",8425 => \"Garaguso\",3040 => \"Garbagna\",3041 => \"Garbagna novarese\",3042 => \"Garbagnate milanese\",3043 => \"Garbagnate monastero\",3044 => \"Garda\",3045 => \"Gardone riviera\",3046 => \"Gardone val trompia\",3047 => \"Garessio\",8349 => \"Garessio 2000\",3048 => \"Gargallo\",3049 => \"Gargazzone\",3050 => \"Gargnano\",3051 => \"Garlasco\",3052 => \"Garlate\",3053 => \"Garlenda\",3054 => \"Garniga\",3055 => \"Garzeno\",3056 => \"Garzigliana\",3057 => \"Gasperina\",3058 => \"Gassino torinese\",3059 => \"Gattatico\",3060 => \"Gatteo\",3061 => \"Gattico\",3062 => \"Gattinara\",3063 => \"Gavardo\",3064 => \"Gavazzana\",3065 => \"Gavello\",3066 => \"Gaverina terme\",3067 => \"Gavi\",3068 => \"Gavignano\",3069 => \"Gavirate\",3070 => \"Gavoi\",3071 => \"Gavorrano\",3072 => \"Gazoldo degli ippoliti\",3073 => \"Gazzada schianno\",3074 => \"Gazzaniga\",3075 => \"Gazzo\",3076 => \"Gazzo veronese\",3077 => \"Gazzola\",3078 => \"Gazzuolo\",3079 => \"Gela\",3080 => \"Gemmano\",3081 => \"Gemona del friuli\",3082 => \"Gemonio\",3083 => \"Genazzano\",3084 => \"Genga\",3085 => \"Genivolta\",3086 => \"Genola\",3087 => \"Genoni\",3088 => \"Genova\",8506 => \"Genova Nervi\",8276 => \"Genova Sestri\",3089 => \"Genuri\",3090 => \"Genzano di lucania\",3091 => \"Genzano di roma\",3092 => \"Genzone\",3093 => \"Gera lario\",3094 => \"Gerace\",3095 => \"Geraci siculo\",3096 => \"Gerano\",8176 => \"Geremeas\",3097 => \"Gerenzago\",3098 => \"Gerenzano\",3099 => \"Gergei\",3100 => \"Germagnano\",3101 => \"Germagno\",3102 => \"Germasino\",3103 => \"Germignaga\",8303 => \"Gerno di Lesmo\",3104 => \"Gerocarne\",3105 => \"Gerola alta\",3106 => \"Gerosa\",3107 => \"Gerre de'caprioli\",3108 => \"Gesico\",3109 => \"Gessate\",3110 => \"Gessopalena\",3111 => \"Gesturi\",3112 => \"Gesualdo\",3113 => \"Ghedi\",3114 => \"Ghemme\",8236 => \"Ghiacciaio Presena\",3115 => \"Ghiffa\",3116 => \"Ghilarza\",3117 => \"Ghisalba\",3118 => \"Ghislarengo\",3119 => \"Giacciano con baruchella\",3120 => \"Giaglione\",3121 => \"Gianico\",3122 => \"Giano dell'umbria\",3123 => \"Giano vetusto\",3124 => \"Giardinello\",3125 => \"Giardini Naxos\",3126 => \"Giarole\",3127 => \"Giarratana\",3128 => \"Giarre\",3129 => \"Giave\",3130 => \"Giaveno\",3131 => \"Giavera del montello\",3132 => \"Giba\",3133 => \"Gibellina\",3134 => \"Gifflenga\",3135 => \"Giffone\",3136 => \"Giffoni sei casali\",3137 => \"Giffoni valle piana\",3380 => \"Giglio castello\",3138 => \"Gignese\",3139 => \"Gignod\",3140 => \"Gildone\",3141 => \"Gimigliano\",8403 => \"Ginestra\",3143 => \"Ginestra degli schiavoni\",8430 => \"Ginosa\",3145 => \"Gioi\",3146 => \"Gioia dei marsi\",3147 => \"Gioia del colle\",3148 => \"Gioia sannitica\",3149 => \"Gioia tauro\",3150 => \"Gioiosa ionica\",3151 => \"Gioiosa marea\",3152 => \"Giove\",3153 => \"Giovinazzo\",3154 => \"Giovo\",3155 => \"Girasole\",3156 => \"Girifalco\",3157 => \"Gironico\",3158 => \"Gissi\",3159 => \"Giuggianello\",3160 => \"Giugliano in campania\",3161 => \"Giuliana\",3162 => \"Giuliano di roma\",3163 => \"Giuliano teatino\",3164 => \"Giulianova\",3165 => \"Giuncugnano\",3166 => \"Giungano\",3167 => \"Giurdignano\",3168 => \"Giussago\",3169 => \"Giussano\",3170 => \"Giustenice\",3171 => \"Giustino\",3172 => \"Giusvalla\",3173 => \"Givoletto\",3174 => \"Gizzeria\",3175 => \"Glorenza\",3176 => \"Godega di sant'urbano\",3177 => \"Godiasco\",3178 => \"Godrano\",3179 => \"Goito\",3180 => \"Golasecca\",3181 => \"Golferenzo\",3182 => \"Golfo aranci\",3183 => \"Gombito\",3184 => \"Gonars\",3185 => \"Goni\",3186 => \"Gonnesa\",3187 => \"Gonnoscodina\",3188 => \"Gonnosfanadiga\",3189 => \"Gonnosno'\",3190 => \"Gonnostramatza\",3191 => \"Gonzaga\",3192 => \"Gordona\",3193 => \"Gorga\",3194 => \"Gorgo al monticano\",3195 => \"Gorgoglione\",3196 => \"Gorgonzola\",3197 => \"Goriano sicoli\",3198 => \"Gorizia\",3199 => \"Gorla maggiore\",3200 => \"Gorla minore\",3201 => \"Gorlago\",3202 => \"Gorle\",3203 => \"Gornate olona\",3204 => \"Gorno\",3205 => \"Goro\",3206 => \"Gorreto\",3207 => \"Gorzegno\",3208 => \"Gosaldo\",3209 => \"Gossolengo\",3210 => \"Gottasecca\",3211 => \"Gottolengo\",3212 => \"Govone\",3213 => \"Gozzano\",3214 => \"Gradara\",3215 => \"Gradisca d'isonzo\",3216 => \"Grado\",3217 => \"Gradoli\",3218 => \"Graffignana\",3219 => \"Graffignano\",3220 => \"Graglia\",3221 => \"Gragnano\",3222 => \"Gragnano trebbiense\",3223 => \"Grammichele\",8485 => \"Gran Paradiso\",3224 => \"Grana\",3225 => \"Granaglione\",3226 => \"Granarolo dell'emilia\",3227 => \"Grancona\",8728 => \"Grand Combin\",8327 => \"Grand Crot\",3228 => \"Grandate\",3229 => \"Grandola ed uniti\",3230 => \"Graniti\",3231 => \"Granozzo con monticello\",3232 => \"Grantola\",3233 => \"Grantorto\",3234 => \"Granze\",8371 => \"Grassano\",8504 => \"Grassina\",3236 => \"Grassobbio\",3237 => \"Gratteri\",3238 => \"Grauno\",3239 => \"Gravedona\",3240 => \"Gravellona lomellina\",3241 => \"Gravellona toce\",3242 => \"Gravere\",3243 => \"Gravina di Catania\",3244 => \"Gravina in puglia\",3245 => \"Grazzanise\",3246 => \"Grazzano badoglio\",3247 => \"Greccio\",3248 => \"Greci\",3249 => \"Greggio\",3250 => \"Gremiasco\",3251 => \"Gressan\",3252 => \"Gressoney la trinite'\",3253 => \"Gressoney saint jean\",3254 => \"Greve in chianti\",3255 => \"Grezzago\",3256 => \"Grezzana\",3257 => \"Griante\",3258 => \"Gricignano di aversa\",8733 => \"Grigna\",3259 => \"Grignasco\",3260 => \"Grigno\",3261 => \"Grimacco\",3262 => \"Grimaldi\",3263 => \"Grinzane cavour\",3264 => \"Grisignano di zocco\",3265 => \"Grisolia\",8520 => \"Grivola\",3266 => \"Grizzana morandi\",3267 => \"Grognardo\",3268 => \"Gromo\",3269 => \"Grondona\",3270 => \"Grone\",3271 => \"Grontardo\",3272 => \"Gropello cairoli\",3273 => \"Gropparello\",3274 => \"Groscavallo\",3275 => \"Grosio\",3276 => \"Grosotto\",3277 => \"Grosseto\",3278 => \"Grosso\",3279 => \"Grottaferrata\",3280 => \"Grottaglie\",3281 => \"Grottaminarda\",3282 => \"Grottammare\",3283 => \"Grottazzolina\",3284 => \"Grotte\",3285 => \"Grotte di castro\",3286 => \"Grotteria\",3287 => \"Grottole\",3288 => \"Grottolella\",3289 => \"Gruaro\",3290 => \"Grugliasco\",3291 => \"Grumello cremonese ed uniti\",3292 => \"Grumello del monte\",8414 => \"Grumento nova\",3294 => \"Grumes\",3295 => \"Grumo appula\",3296 => \"Grumo nevano\",3297 => \"Grumolo delle abbadesse\",3298 => \"Guagnano\",3299 => \"Gualdo\",3300 => \"Gualdo Cattaneo\",3301 => \"Gualdo tadino\",3302 => \"Gualtieri\",3303 => \"Gualtieri sicamino'\",3304 => \"Guamaggiore\",3305 => \"Guanzate\",3306 => \"Guarcino\",3307 => \"Guarda veneta\",3308 => \"Guardabosone\",3309 => \"Guardamiglio\",3310 => \"Guardavalle\",3311 => \"Guardea\",3312 => \"Guardia lombardi\",8365 => \"Guardia perticara\",3314 => \"Guardia piemontese\",3315 => \"Guardia sanframondi\",3316 => \"Guardiagrele\",3317 => \"Guardialfiera\",3318 => \"Guardiaregia\",3319 => \"Guardistallo\",3320 => \"Guarene\",3321 => \"Guasila\",3322 => \"Guastalla\",3323 => \"Guazzora\",3324 => \"Gubbio\",3325 => \"Gudo visconti\",3326 => \"Guglionesi\",3327 => \"Guidizzolo\",8508 => \"Guidonia\",3328 => \"Guidonia montecelio\",3329 => \"Guiglia\",3330 => \"Guilmi\",3331 => \"Gurro\",3332 => \"Guspini\",3333 => \"Gussago\",3334 => \"Gussola\",3335 => \"Hone\",8587 => \"I Prati\",3336 => \"Idro\",3337 => \"Iglesias\",3338 => \"Igliano\",3339 => \"Ilbono\",3340 => \"Illasi\",3341 => \"Illorai\",3342 => \"Imbersago\",3343 => \"Imer\",3344 => \"Imola\",3345 => \"Imperia\",3346 => \"Impruneta\",3347 => \"Inarzo\",3348 => \"Incisa in val d'arno\",3349 => \"Incisa scapaccino\",3350 => \"Incudine\",3351 => \"Induno olona\",3352 => \"Ingria\",3353 => \"Intragna\",3354 => \"Introbio\",3355 => \"Introd\",3356 => \"Introdacqua\",3357 => \"Introzzo\",3358 => \"Inverigo\",3359 => \"Inverno e monteleone\",3360 => \"Inverso pinasca\",3361 => \"Inveruno\",3362 => \"Invorio\",3363 => \"Inzago\",3364 => \"Ionadi\",3365 => \"Irgoli\",3366 => \"Irma\",3367 => \"Irsina\",3368 => \"Isasca\",3369 => \"Isca sullo ionio\",3370 => \"Ischia\",3371 => \"Ischia di castro\",3372 => \"Ischitella\",3373 => \"Iseo\",3374 => \"Isera\",3375 => \"Isernia\",3376 => \"Isili\",3377 => \"Isnello\",8742 => \"Isola Albarella\",3378 => \"Isola d'asti\",3379 => \"Isola del cantone\",8190 => \"Isola del Giglio\",3381 => \"Isola del gran sasso d'italia\",3382 => \"Isola del liri\",3383 => \"Isola del piano\",3384 => \"Isola della scala\",3385 => \"Isola delle femmine\",3386 => \"Isola di capo rizzuto\",3387 => \"Isola di fondra\",8671 => \"Isola di Giannutri\",3388 => \"Isola dovarese\",3389 => \"Isola rizza\",8173 => \"Isola Rossa\",8183 => \"Isola Salina\",3390 => \"Isola sant'antonio\",3391 => \"Isola vicentina\",3392 => \"Isolabella\",3393 => \"Isolabona\",3394 => \"Isole tremiti\",3395 => \"Isorella\",3396 => \"Ispani\",3397 => \"Ispica\",3398 => \"Ispra\",3399 => \"Issiglio\",3400 => \"Issime\",3401 => \"Isso\",3402 => \"Issogne\",3403 => \"Istrana\",3404 => \"Itala\",3405 => \"Itri\",3406 => \"Ittireddu\",3407 => \"Ittiri\",3408 => \"Ivano fracena\",3409 => \"Ivrea\",3410 => \"Izano\",3411 => \"Jacurso\",3412 => \"Jelsi\",3413 => \"Jenne\",3414 => \"Jerago con Orago\",3415 => \"Jerzu\",3416 => \"Jesi\",3417 => \"Jesolo\",3418 => \"Jolanda di Savoia\",3419 => \"Joppolo\",3420 => \"Joppolo Giancaxio\",3421 => \"Jovencan\",8568 => \"Klausberg\",3422 => \"L'Aquila\",3423 => \"La Cassa\",8227 => \"La Lechere\",3424 => \"La Loggia\",3425 => \"La Maddalena\",3426 => \"La Magdeleine\",3427 => \"La Morra\",8617 => \"La Palud\",3428 => \"La Salle\",3429 => \"La Spezia\",3430 => \"La Thuile\",3431 => \"La Valle\",3432 => \"La Valle Agordina\",8762 => \"La Villa\",3433 => \"Labico\",3434 => \"Labro\",3435 => \"Lacchiarella\",3436 => \"Lacco ameno\",3437 => \"Lacedonia\",8245 => \"Laceno\",3438 => \"Laces\",3439 => \"Laconi\",3440 => \"Ladispoli\",8571 => \"Ladurno\",3441 => \"Laerru\",3442 => \"Laganadi\",3443 => \"Laghi\",3444 => \"Laglio\",3445 => \"Lagnasco\",3446 => \"Lago\",3447 => \"Lagonegro\",3448 => \"Lagosanto\",3449 => \"Lagundo\",3450 => \"Laigueglia\",3451 => \"Lainate\",3452 => \"Laino\",3453 => \"Laino borgo\",3454 => \"Laino castello\",3455 => \"Laion\",3456 => \"Laives\",3457 => \"Lajatico\",3458 => \"Lallio\",3459 => \"Lama dei peligni\",3460 => \"Lama mocogno\",3461 => \"Lambrugo\",8477 => \"Lamezia Santa Eufemia\",3462 => \"Lamezia terme\",3463 => \"Lamon\",8179 => \"Lampedusa\",3464 => \"Lampedusa e linosa\",3465 => \"Lamporecchio\",3466 => \"Lamporo\",3467 => \"Lana\",3468 => \"Lanciano\",8467 => \"Lanciano casello\",3469 => \"Landiona\",3470 => \"Landriano\",3471 => \"Langhirano\",3472 => \"Langosco\",3473 => \"Lanusei\",3474 => \"Lanuvio\",3475 => \"Lanzada\",3476 => \"Lanzo d'intelvi\",3477 => \"Lanzo torinese\",3478 => \"Lapedona\",3479 => \"Lapio\",3480 => \"Lappano\",3481 => \"Larciano\",3482 => \"Lardaro\",3483 => \"Lardirago\",3484 => \"Lari\",3485 => \"Lariano\",3486 => \"Larino\",3487 => \"Las plassas\",3488 => \"Lasa\",3489 => \"Lascari\",3490 => \"Lasino\",3491 => \"Lasnigo\",3492 => \"Lastebasse\",3493 => \"Lastra a signa\",3494 => \"Latera\",3495 => \"Laterina\",3496 => \"Laterza\",3497 => \"Latiano\",3498 => \"Latina\",3499 => \"Latisana\",3500 => \"Latronico\",3501 => \"Lattarico\",3502 => \"Lauco\",3503 => \"Laureana cilento\",3504 => \"Laureana di borrello\",3505 => \"Lauregno\",3506 => \"Laurenzana\",3507 => \"Lauria\",3508 => \"Lauriano\",3509 => \"Laurino\",3510 => \"Laurito\",3511 => \"Lauro\",3512 => \"Lavagna\",3513 => \"Lavagno\",3514 => \"Lavarone\",3515 => \"Lavello\",3516 => \"Lavena ponte tresa\",3517 => \"Laveno mombello\",3518 => \"Lavenone\",3519 => \"Laviano\",8695 => \"Lavinio\",3520 => \"Lavis\",3521 => \"Lazise\",3522 => \"Lazzate\",8434 => \"Le polle\",3523 => \"Lecce\",3524 => \"Lecce nei marsi\",3525 => \"Lecco\",3526 => \"Leffe\",3527 => \"Leggiuno\",3528 => \"Legnago\",3529 => \"Legnano\",3530 => \"Legnaro\",3531 => \"Lei\",3532 => \"Leini\",3533 => \"Leivi\",3534 => \"Lemie\",3535 => \"Lendinara\",3536 => \"Leni\",3537 => \"Lenna\",3538 => \"Lenno\",3539 => \"Leno\",3540 => \"Lenola\",3541 => \"Lenta\",3542 => \"Lentate sul seveso\",3543 => \"Lentella\",3544 => \"Lentiai\",3545 => \"Lentini\",3546 => \"Leonessa\",3547 => \"Leonforte\",3548 => \"Leporano\",3549 => \"Lequile\",3550 => \"Lequio berria\",3551 => \"Lequio tanaro\",3552 => \"Lercara friddi\",3553 => \"Lerici\",3554 => \"Lerma\",8250 => \"Les Suches\",3555 => \"Lesa\",3556 => \"Lesegno\",3557 => \"Lesignano de 'bagni\",3558 => \"Lesina\",3559 => \"Lesmo\",3560 => \"Lessolo\",3561 => \"Lessona\",3562 => \"Lestizza\",3563 => \"Letino\",3564 => \"Letojanni\",3565 => \"Lettere\",3566 => \"Lettomanoppello\",3567 => \"Lettopalena\",3568 => \"Levanto\",3569 => \"Levate\",3570 => \"Leverano\",3571 => \"Levice\",3572 => \"Levico terme\",3573 => \"Levone\",3574 => \"Lezzeno\",3575 => \"Liberi\",3576 => \"Librizzi\",3577 => \"Licata\",3578 => \"Licciana nardi\",3579 => \"Licenza\",3580 => \"Licodia eubea\",8442 => \"Lido degli Estensi\",8441 => \"Lido delle Nazioni\",8200 => \"Lido di Camaiore\",8136 => \"Lido di Ostia\",8746 => \"Lido di Volano\",8594 => \"Lido Marini\",3581 => \"Lierna\",3582 => \"Lignana\",3583 => \"Lignano sabbiadoro\",3584 => \"Ligonchio\",3585 => \"Ligosullo\",3586 => \"Lillianes\",3587 => \"Limana\",3588 => \"Limatola\",3589 => \"Limbadi\",3590 => \"Limbiate\",3591 => \"Limena\",3592 => \"Limido comasco\",3593 => \"Limina\",3594 => \"Limone piemonte\",3595 => \"Limone sul garda\",3596 => \"Limosano\",3597 => \"Linarolo\",3598 => \"Linguaglossa\",8180 => \"Linosa\",3599 => \"Lioni\",3600 => \"Lipari\",3601 => \"Lipomo\",3602 => \"Lirio\",3603 => \"Liscate\",3604 => \"Liscia\",3605 => \"Lisciano niccone\",3606 => \"Lisignago\",3607 => \"Lisio\",3608 => \"Lissone\",3609 => \"Liveri\",3610 => \"Livigno\",3611 => \"Livinallongo del col di lana\",3613 => \"Livo\",3612 => \"Livo\",3614 => \"Livorno\",3615 => \"Livorno ferraris\",3616 => \"Livraga\",3617 => \"Lizzanello\",3618 => \"Lizzano\",3619 => \"Lizzano in belvedere\",8300 => \"Lizzola\",3620 => \"Loano\",3621 => \"Loazzolo\",3622 => \"Locana\",3623 => \"Locate di triulzi\",3624 => \"Locate varesino\",3625 => \"Locatello\",3626 => \"Loceri\",3627 => \"Locorotondo\",3628 => \"Locri\",3629 => \"Loculi\",3630 => \"Lode'\",3631 => \"Lodi\",3632 => \"Lodi vecchio\",3633 => \"Lodine\",3634 => \"Lodrino\",3635 => \"Lograto\",3636 => \"Loiano\",8748 => \"Loiano RFI\",3637 => \"Loiri porto san paolo\",3638 => \"Lomagna\",3639 => \"Lomaso\",3640 => \"Lomazzo\",3641 => \"Lombardore\",3642 => \"Lombriasco\",3643 => \"Lomello\",3644 => \"Lona lases\",3645 => \"Lonate ceppino\",3646 => \"Lonate pozzolo\",3647 => \"Lonato\",3648 => \"Londa\",3649 => \"Longano\",3650 => \"Longare\",3651 => \"Longarone\",3652 => \"Longhena\",3653 => \"Longi\",3654 => \"Longiano\",3655 => \"Longobardi\",3656 => \"Longobucco\",3657 => \"Longone al segrino\",3658 => \"Longone sabino\",3659 => \"Lonigo\",3660 => \"Loranze'\",3661 => \"Loreggia\",3662 => \"Loreglia\",3663 => \"Lorenzago di cadore\",3664 => \"Lorenzana\",3665 => \"Loreo\",3666 => \"Loreto\",3667 => \"Loreto aprutino\",3668 => \"Loria\",8523 => \"Lorica\",3669 => \"Loro ciuffenna\",3670 => \"Loro piceno\",3671 => \"Lorsica\",3672 => \"Losine\",3673 => \"Lotzorai\",3674 => \"Lovere\",3675 => \"Lovero\",3676 => \"Lozio\",3677 => \"Lozza\",3678 => \"Lozzo atestino\",3679 => \"Lozzo di cadore\",3680 => \"Lozzolo\",3681 => \"Lu\",3682 => \"Lubriano\",3683 => \"Lucca\",3684 => \"Lucca sicula\",3685 => \"Lucera\",3686 => \"Lucignano\",3687 => \"Lucinasco\",3688 => \"Lucito\",3689 => \"Luco dei marsi\",3690 => \"Lucoli\",3691 => \"Lugagnano val d'arda\",3692 => \"Lugnacco\",3693 => \"Lugnano in teverina\",3694 => \"Lugo\",3695 => \"Lugo di vicenza\",3696 => \"Luino\",3697 => \"Luisago\",3698 => \"Lula\",3699 => \"Lumarzo\",3700 => \"Lumezzane\",3701 => \"Lunamatrona\",3702 => \"Lunano\",3703 => \"Lungavilla\",3704 => \"Lungro\",3705 => \"Luogosano\",3706 => \"Luogosanto\",3707 => \"Lupara\",3708 => \"Lurago d'erba\",3709 => \"Lurago marinone\",3710 => \"Lurano\",3711 => \"Luras\",3712 => \"Lurate caccivio\",3713 => \"Lusciano\",8636 => \"Lusentino\",3714 => \"Luserna\",3715 => \"Luserna san giovanni\",3716 => \"Lusernetta\",3717 => \"Lusevera\",3718 => \"Lusia\",3719 => \"Lusiana\",3720 => \"Lusiglie'\",3721 => \"Luson\",3722 => \"Lustra\",8572 => \"Lutago\",3723 => \"Luvinate\",3724 => \"Luzzana\",3725 => \"Luzzara\",3726 => \"Luzzi\",8447 => \"L`Aquila est\",8446 => \"L`Aquila ovest\",3727 => \"Maccagno\",3728 => \"Maccastorna\",3729 => \"Macchia d'isernia\",3730 => \"Macchia valfortore\",3731 => \"Macchiagodena\",3732 => \"Macello\",3733 => \"Macerata\",3734 => \"Macerata campania\",3735 => \"Macerata feltria\",3736 => \"Macherio\",3737 => \"Maclodio\",3738 => \"Macomer\",3739 => \"Macra\",3740 => \"Macugnaga\",3741 => \"Maddaloni\",3742 => \"Madesimo\",3743 => \"Madignano\",3744 => \"Madone\",3745 => \"Madonna del sasso\",8201 => \"Madonna di Campiglio\",3746 => \"Maenza\",3747 => \"Mafalda\",3748 => \"Magasa\",3749 => \"Magenta\",3750 => \"Maggiora\",3751 => \"Magherno\",3752 => \"Magione\",3753 => \"Magisano\",3754 => \"Magliano alfieri\",3755 => \"Magliano alpi\",8461 => \"Magliano casello\",3756 => \"Magliano de' marsi\",3757 => \"Magliano di tenna\",3758 => \"Magliano in toscana\",3759 => \"Magliano romano\",3760 => \"Magliano sabina\",3761 => \"Magliano vetere\",3762 => \"Maglie\",3763 => \"Magliolo\",3764 => \"Maglione\",3765 => \"Magnacavallo\",3766 => \"Magnago\",3767 => \"Magnano\",3768 => \"Magnano in riviera\",8322 => \"Magnolta\",3769 => \"Magomadas\",3770 => \"Magre' sulla strada del vino\",3771 => \"Magreglio\",3772 => \"Maida\",3773 => \"Maiera'\",3774 => \"Maierato\",3775 => \"Maiolati spontini\",3776 => \"Maiolo\",3777 => \"Maiori\",3778 => \"Mairago\",3779 => \"Mairano\",3780 => \"Maissana\",3781 => \"Majano\",3782 => \"Malagnino\",3783 => \"Malalbergo\",3784 => \"Malborghetto valbruna\",3785 => \"Malcesine\",3786 => \"Male'\",3787 => \"Malegno\",3788 => \"Maleo\",3789 => \"Malesco\",3790 => \"Maletto\",3791 => \"Malfa\",8229 => \"Malga Ciapela\",8333 => \"Malga Polzone\",8661 => \"Malga San Giorgio\",3792 => \"Malgesso\",3793 => \"Malgrate\",3794 => \"Malito\",3795 => \"Mallare\",3796 => \"Malles Venosta\",3797 => \"Malnate\",3798 => \"Malo\",3799 => \"Malonno\",3800 => \"Malosco\",3801 => \"Maltignano\",3802 => \"Malvagna\",3803 => \"Malvicino\",3804 => \"Malvito\",3805 => \"Mammola\",3806 => \"Mamoiada\",3807 => \"Manciano\",3808 => \"Mandanici\",3809 => \"Mandas\",3810 => \"Mandatoriccio\",3811 => \"Mandela\",3812 => \"Mandello del lario\",3813 => \"Mandello vitta\",3814 => \"Manduria\",3815 => \"Manerba del garda\",3816 => \"Manerbio\",3817 => \"Manfredonia\",3818 => \"Mango\",3819 => \"Mangone\",3820 => \"Maniace\",3821 => \"Maniago\",3822 => \"Manocalzati\",3823 => \"Manoppello\",3824 => \"Mansue'\",3825 => \"Manta\",3826 => \"Mantello\",3827 => \"Mantova\",8129 => \"Manzano\",3829 => \"Manziana\",3830 => \"Mapello\",3831 => \"Mara\",3832 => \"Maracalagonis\",3833 => \"Maranello\",3834 => \"Marano di napoli\",3835 => \"Marano di valpolicella\",3836 => \"Marano equo\",3837 => \"Marano lagunare\",3838 => \"Marano marchesato\",3839 => \"Marano principato\",3840 => \"Marano sul panaro\",3841 => \"Marano ticino\",3842 => \"Marano vicentino\",3843 => \"Maranzana\",3844 => \"Maratea\",3845 => \"Marcallo con Casone\",3846 => \"Marcaria\",3847 => \"Marcedusa\",3848 => \"Marcellina\",3849 => \"Marcellinara\",3850 => \"Marcetelli\",3851 => \"Marcheno\",3852 => \"Marchirolo\",3853 => \"Marciana\",3854 => \"Marciana marina\",3855 => \"Marcianise\",3856 => \"Marciano della chiana\",3857 => \"Marcignago\",3858 => \"Marcon\",3859 => \"Marebbe\",8478 => \"Marene\",3861 => \"Mareno di piave\",3862 => \"Marentino\",3863 => \"Maretto\",3864 => \"Margarita\",3865 => \"Margherita di savoia\",3866 => \"Margno\",3867 => \"Mariana mantovana\",3868 => \"Mariano comense\",3869 => \"Mariano del friuli\",3870 => \"Marianopoli\",3871 => \"Mariglianella\",3872 => \"Marigliano\",8291 => \"Marilleva\",8490 => \"Marina di Arbus\",8599 => \"Marina di Camerota\",8582 => \"Marina di Campo\",8111 => \"Marina di Cariati\",8118 => \"Marina di Cetraro\",8175 => \"Marina di Gairo\",8164 => \"Marina di Ginosa\",3873 => \"Marina di gioiosa ionica\",8166 => \"Marina di Leuca\",8184 => \"Marina di Modica\",8156 => \"Marina di montenero\",8165 => \"Marina di Ostuni\",8186 => \"Marina di Palma\",8141 => \"Marina di Pescia Romana\",8591 => \"Marina di Pescoluse\",8298 => \"Marina di Pietrasanta\",8128 => \"Marina di Ravenna\",8174 => \"Marina di Sorso\",8188 => \"Marinella\",3874 => \"Marineo\",3875 => \"Marino\",3876 => \"Marlengo\",3877 => \"Marliana\",3878 => \"Marmentino\",3879 => \"Marmirolo\",8205 => \"Marmolada\",3880 => \"Marmora\",3881 => \"Marnate\",3882 => \"Marone\",3883 => \"Maropati\",3884 => \"Marostica\",8154 => \"Marotta\",3885 => \"Marradi\",3886 => \"Marrubiu\",3887 => \"Marsaglia\",3888 => \"Marsala\",3889 => \"Marsciano\",3890 => \"Marsico nuovo\",3891 => \"Marsicovetere\",3892 => \"Marta\",3893 => \"Martano\",3894 => \"Martellago\",3895 => \"Martello\",3896 => \"Martignacco\",3897 => \"Martignana di po\",3898 => \"Martignano\",3899 => \"Martina franca\",3900 => \"Martinengo\",3901 => \"Martiniana po\",3902 => \"Martinsicuro\",3903 => \"Martirano\",3904 => \"Martirano lombardo\",3905 => \"Martis\",3906 => \"Martone\",3907 => \"Marudo\",3908 => \"Maruggio\",3909 => \"Marzabotto\",3910 => \"Marzano\",3911 => \"Marzano appio\",3912 => \"Marzano di nola\",3913 => \"Marzi\",3914 => \"Marzio\",3915 => \"Masainas\",3916 => \"Masate\",3917 => \"Mascali\",3918 => \"Mascalucia\",3919 => \"Maschito\",3920 => \"Masciago primo\",3921 => \"Maser\",3922 => \"Masera\",3923 => \"Masera' di Padova\",3924 => \"Maserada sul piave\",3925 => \"Masi\",3926 => \"Masi torello\",3927 => \"Masio\",3928 => \"Maslianico\",8216 => \"Maso Corto\",3929 => \"Mason vicentino\",3930 => \"Masone\",3931 => \"Massa\",3932 => \"Massa d'albe\",3933 => \"Massa di somma\",3934 => \"Massa e cozzile\",3935 => \"Massa fermana\",3936 => \"Massa fiscaglia\",3937 => \"Massa lombarda\",3938 => \"Massa lubrense\",3939 => \"Massa marittima\",3940 => \"Massa martana\",3941 => \"Massafra\",3942 => \"Massalengo\",3943 => \"Massanzago\",3944 => \"Massarosa\",3945 => \"Massazza\",3946 => \"Massello\",3947 => \"Masserano\",3948 => \"Massignano\",3949 => \"Massimeno\",3950 => \"Massimino\",3951 => \"Massino visconti\",3952 => \"Massiola\",3953 => \"Masullas\",3954 => \"Matelica\",3955 => \"Matera\",3956 => \"Mathi\",3957 => \"Matino\",3958 => \"Matrice\",3959 => \"Mattie\",3960 => \"Mattinata\",3961 => \"Mazara del vallo\",3962 => \"Mazzano\",3963 => \"Mazzano romano\",3964 => \"Mazzarino\",3965 => \"Mazzarra' sant'andrea\",3966 => \"Mazzarrone\",3967 => \"Mazze'\",3968 => \"Mazzin\",3969 => \"Mazzo di valtellina\",3970 => \"Meana di susa\",3971 => \"Meana sardo\",3972 => \"Meda\",3973 => \"Mede\",3974 => \"Medea\",3975 => \"Medesano\",3976 => \"Medicina\",3977 => \"Mediglia\",3978 => \"Medolago\",3979 => \"Medole\",3980 => \"Medolla\",3981 => \"Meduna di livenza\",3982 => \"Meduno\",3983 => \"Megliadino san fidenzio\",3984 => \"Megliadino san vitale\",3985 => \"Meina\",3986 => \"Mel\",3987 => \"Melara\",3988 => \"Melazzo\",8443 => \"Meldola\",3990 => \"Mele\",3991 => \"Melegnano\",3992 => \"Melendugno\",3993 => \"Meleti\",8666 => \"Melezet\",3994 => \"Melfi\",3995 => \"Melicucca'\",3996 => \"Melicucco\",3997 => \"Melilli\",3998 => \"Melissa\",3999 => \"Melissano\",4000 => \"Melito di napoli\",4001 => \"Melito di porto salvo\",4002 => \"Melito irpino\",4003 => \"Melizzano\",4004 => \"Melle\",4005 => \"Mello\",4006 => \"Melpignano\",4007 => \"Meltina\",4008 => \"Melzo\",4009 => \"Menaggio\",4010 => \"Menarola\",4011 => \"Menconico\",4012 => \"Mendatica\",4013 => \"Mendicino\",4014 => \"Menfi\",4015 => \"Mentana\",4016 => \"Meolo\",4017 => \"Merana\",4018 => \"Merano\",8351 => \"Merano 2000\",4019 => \"Merate\",4020 => \"Mercallo\",4021 => \"Mercatello sul metauro\",4022 => \"Mercatino conca\",8437 => \"Mercato\",4023 => \"Mercato san severino\",4024 => \"Mercato saraceno\",4025 => \"Mercenasco\",4026 => \"Mercogliano\",4027 => \"Mereto di tomba\",4028 => \"Mergo\",4029 => \"Mergozzo\",4030 => \"Meri'\",4031 => \"Merlara\",4032 => \"Merlino\",4033 => \"Merone\",4034 => \"Mesagne\",4035 => \"Mese\",4036 => \"Mesenzana\",4037 => \"Mesero\",4038 => \"Mesola\",4039 => \"Mesoraca\",4040 => \"Messina\",4041 => \"Mestrino\",4042 => \"Meta\",8104 => \"Metaponto\",4043 => \"Meugliano\",4044 => \"Mezzago\",4045 => \"Mezzana\",4046 => \"Mezzana bigli\",4047 => \"Mezzana mortigliengo\",4048 => \"Mezzana rabattone\",4049 => \"Mezzane di sotto\",4050 => \"Mezzanego\",4051 => \"Mezzani\",4052 => \"Mezzanino\",4053 => \"Mezzano\",4054 => \"Mezzegra\",4055 => \"Mezzenile\",4056 => \"Mezzocorona\",4057 => \"Mezzojuso\",4058 => \"Mezzoldo\",4059 => \"Mezzolombardo\",4060 => \"Mezzomerico\",8524 => \"MI Olgettina\",8526 => \"MI Primaticcio\",8527 => \"MI Silla\",8525 => \"MI Zama\",4061 => \"Miagliano\",4062 => \"Miane\",4063 => \"Miasino\",4064 => \"Miazzina\",4065 => \"Micigliano\",4066 => \"Miggiano\",4067 => \"Miglianico\",4068 => \"Migliarino\",4069 => \"Migliaro\",4070 => \"Miglierina\",4071 => \"Miglionico\",4072 => \"Mignanego\",4073 => \"Mignano monte lungo\",4074 => \"Milano\",8495 => \"Milano Linate\",8496 => \"Milano Malpensa\",8240 => \"Milano marittima\",4075 => \"Milazzo\",4076 => \"Milena\",4077 => \"Mileto\",4078 => \"Milis\",4079 => \"Militello in val di catania\",4080 => \"Militello rosmarino\",4081 => \"Millesimo\",4082 => \"Milo\",4083 => \"Milzano\",4084 => \"Mineo\",4085 => \"Minerbe\",4086 => \"Minerbio\",4087 => \"Minervino di lecce\",4088 => \"Minervino murge\",4089 => \"Minori\",4090 => \"Minturno\",4091 => \"Minucciano\",4092 => \"Mioglia\",4093 => \"Mira\",4094 => \"Mirabella eclano\",4095 => \"Mirabella imbaccari\",4096 => \"Mirabello\",4097 => \"Mirabello monferrato\",4098 => \"Mirabello sannitico\",4099 => \"Miradolo terme\",4100 => \"Miranda\",4101 => \"Mirandola\",4102 => \"Mirano\",4103 => \"Mirto\",4104 => \"Misano adriatico\",4105 => \"Misano di gera d'adda\",4106 => \"Misilmeri\",4107 => \"Misinto\",4108 => \"Missaglia\",8416 => \"Missanello\",4110 => \"Misterbianco\",4111 => \"Mistretta\",8623 => \"Misurina\",4112 => \"Moasca\",4113 => \"Moconesi\",4114 => \"Modena\",4115 => \"Modica\",4116 => \"Modigliana\",4117 => \"Modolo\",4118 => \"Modugno\",4119 => \"Moena\",4120 => \"Moggio\",4121 => \"Moggio udinese\",4122 => \"Moglia\",4123 => \"Mogliano\",4124 => \"Mogliano veneto\",4125 => \"Mogorella\",4126 => \"Mogoro\",4127 => \"Moiano\",8615 => \"Moie\",4128 => \"Moimacco\",4129 => \"Moio Alcantara\",4130 => \"Moio de'calvi\",4131 => \"Moio della civitella\",4132 => \"Moiola\",4133 => \"Mola di bari\",4134 => \"Molare\",4135 => \"Molazzana\",4136 => \"Molfetta\",4137 => \"Molina aterno\",4138 => \"Molina di ledro\",4139 => \"Molinara\",4140 => \"Molinella\",4141 => \"Molini di triora\",4142 => \"Molino dei torti\",4143 => \"Molise\",4144 => \"Moliterno\",4145 => \"Mollia\",4146 => \"Molochio\",4147 => \"Molteno\",4148 => \"Moltrasio\",4149 => \"Molvena\",4150 => \"Molveno\",4151 => \"Mombaldone\",4152 => \"Mombarcaro\",4153 => \"Mombaroccio\",4154 => \"Mombaruzzo\",4155 => \"Mombasiglio\",4156 => \"Mombello di torino\",4157 => \"Mombello monferrato\",4158 => \"Mombercelli\",4159 => \"Momo\",4160 => \"Mompantero\",4161 => \"Mompeo\",4162 => \"Momperone\",4163 => \"Monacilioni\",4164 => \"Monale\",4165 => \"Monasterace\",4166 => \"Monastero bormida\",4167 => \"Monastero di lanzo\",4168 => \"Monastero di vasco\",4169 => \"Monasterolo casotto\",4170 => \"Monasterolo del castello\",4171 => \"Monasterolo di savigliano\",4172 => \"Monastier di treviso\",4173 => \"Monastir\",4174 => \"Moncalieri\",4175 => \"Moncalvo\",4176 => \"Moncenisio\",4177 => \"Moncestino\",4178 => \"Monchiero\",4179 => \"Monchio delle corti\",4180 => \"Monclassico\",4181 => \"Moncrivello\",8649 => \"Moncucco\",4182 => \"Moncucco torinese\",4183 => \"Mondaino\",4184 => \"Mondavio\",4185 => \"Mondolfo\",4186 => \"Mondovi'\",4187 => \"Mondragone\",4188 => \"Moneglia\",8143 => \"Monesi\",4189 => \"Monesiglio\",4190 => \"Monfalcone\",4191 => \"Monforte d'alba\",4192 => \"Monforte san giorgio\",4193 => \"Monfumo\",4194 => \"Mongardino\",4195 => \"Monghidoro\",4196 => \"Mongiana\",4197 => \"Mongiardino ligure\",8637 => \"Monginevro Montgenevre\",4198 => \"Mongiuffi melia\",4199 => \"Mongrando\",4200 => \"Mongrassano\",4201 => \"Monguelfo\",4202 => \"Monguzzo\",4203 => \"Moniga del garda\",4204 => \"Monleale\",4205 => \"Monno\",4206 => \"Monopoli\",4207 => \"Monreale\",4208 => \"Monrupino\",4209 => \"Monsampietro morico\",4210 => \"Monsampolo del tronto\",4211 => \"Monsano\",4212 => \"Monselice\",4213 => \"Monserrato\",4214 => \"Monsummano terme\",4215 => \"Monta'\",4216 => \"Montabone\",4217 => \"Montacuto\",4218 => \"Montafia\",4219 => \"Montagano\",4220 => \"Montagna\",4221 => \"Montagna in valtellina\",8301 => \"Montagnana\",4223 => \"Montagnareale\",4224 => \"Montagne\",4225 => \"Montaguto\",4226 => \"Montaione\",4227 => \"Montalbano Elicona\",4228 => \"Montalbano jonico\",4229 => \"Montalcino\",4230 => \"Montaldeo\",4231 => \"Montaldo bormida\",4232 => \"Montaldo di mondovi'\",4233 => \"Montaldo roero\",4234 => \"Montaldo scarampi\",4235 => \"Montaldo torinese\",4236 => \"Montale\",4237 => \"Montalenghe\",4238 => \"Montallegro\",4239 => \"Montalto delle marche\",4240 => \"Montalto di castro\",4241 => \"Montalto dora\",4242 => \"Montalto ligure\",4243 => \"Montalto pavese\",4244 => \"Montalto uffugo\",4245 => \"Montanaro\",4246 => \"Montanaso lombardo\",4247 => \"Montanera\",4248 => \"Montano antilia\",4249 => \"Montano lucino\",4250 => \"Montappone\",4251 => \"Montaquila\",4252 => \"Montasola\",4253 => \"Montauro\",4254 => \"Montazzoli\",8738 => \"Monte Alben\",8350 => \"Monte Amiata\",4255 => \"Monte Argentario\",8696 => \"Monte Avena\",8660 => \"Monte Baldo\",8251 => \"Monte Belvedere\",8720 => \"Monte Bianco\",8292 => \"Monte Bondone\",8757 => \"Monte Caio\",8149 => \"Monte Campione\",4256 => \"Monte Castello di Vibio\",4257 => \"Monte Cavallo\",4258 => \"Monte Cerignone\",8722 => \"Monte Cervino\",8533 => \"Monte Cimone\",4259 => \"Monte Colombo\",8658 => \"Monte Cornizzolo\",4260 => \"Monte Cremasco\",4261 => \"Monte di Malo\",4262 => \"Monte di Procida\",8581 => \"Monte Elmo\",8701 => \"Monte Faloria\",4263 => \"Monte Giberto\",8486 => \"Monte Gomito\",8232 => \"Monte Grappa\",4264 => \"Monte Isola\",8735 => \"Monte Legnone\",8631 => \"Monte Livata\",8574 => \"Monte Lussari\",8484 => \"Monte Malanotte\",4265 => \"Monte Marenzo\",8611 => \"Monte Matajur\",8732 => \"Monte Matto\",8266 => \"Monte Moro\",8697 => \"Monte Mucrone\",8619 => \"Monte Pigna\",8288 => \"Monte Pora Base\",8310 => \"Monte Pora Cima\",4266 => \"Monte Porzio\",4267 => \"Monte Porzio Catone\",8608 => \"Monte Prata\",8320 => \"Monte Pratello\",4268 => \"Monte Rinaldo\",4269 => \"Monte Roberto\",4270 => \"Monte Romano\",4271 => \"Monte San Biagio\",4272 => \"Monte San Giacomo\",4273 => \"Monte San Giovanni Campano\",4274 => \"Monte San Giovanni in Sabina\",4275 => \"Monte San Giusto\",4276 => \"Monte San Martino\",4277 => \"Monte San Pietrangeli\",4278 => \"Monte San Pietro\",8538 => \"Monte San Primo\",4279 => \"Monte San Savino\",8652 => \"Monte San Vigilio\",4280 => \"Monte San Vito\",4281 => \"Monte Sant'Angelo\",4282 => \"Monte Santa Maria Tiberina\",8570 => \"Monte Scuro\",8278 => \"Monte Spinale\",4283 => \"Monte Urano\",8758 => \"Monte Ventasso\",4284 => \"Monte Vidon Combatte\",4285 => \"Monte Vidon Corrado\",8729 => \"Monte Volturino\",8346 => \"Monte Zoncolan\",4286 => \"Montebello della Battaglia\",4287 => \"Montebello di Bertona\",4288 => \"Montebello Ionico\",4289 => \"Montebello sul Sangro\",4290 => \"Montebello Vicentino\",4291 => \"Montebelluna\",4292 => \"Montebruno\",4293 => \"Montebuono\",4294 => \"Montecalvo in Foglia\",4295 => \"Montecalvo Irpino\",4296 => \"Montecalvo Versiggia\",4297 => \"Montecarlo\",4298 => \"Montecarotto\",4299 => \"Montecassiano\",4300 => \"Montecastello\",4301 => \"Montecastrilli\",4303 => \"Montecatini terme\",4302 => \"Montecatini Val di Cecina\",4304 => \"Montecchia di Crosara\",4305 => \"Montecchio\",4306 => \"Montecchio Emilia\",4307 => \"Montecchio Maggiore\",4308 => \"Montecchio Precalcino\",4309 => \"Montechiaro d'Acqui\",4310 => \"Montechiaro d'Asti\",4311 => \"Montechiarugolo\",4312 => \"Monteciccardo\",4313 => \"Montecilfone\",4314 => \"Montecompatri\",4315 => \"Montecopiolo\",4316 => \"Montecorice\",4317 => \"Montecorvino Pugliano\",4318 => \"Montecorvino Rovella\",4319 => \"Montecosaro\",4320 => \"Montecrestese\",4321 => \"Montecreto\",4322 => \"Montedinove\",4323 => \"Montedoro\",4324 => \"Montefalcione\",4325 => \"Montefalco\",4326 => \"Montefalcone Appennino\",4327 => \"Montefalcone di Val Fortore\",4328 => \"Montefalcone nel Sannio\",4329 => \"Montefano\",4330 => \"Montefelcino\",4331 => \"Monteferrante\",4332 => \"Montefiascone\",4333 => \"Montefino\",4334 => \"Montefiore conca\",4335 => \"Montefiore dell'Aso\",4336 => \"Montefiorino\",4337 => \"Monteflavio\",4338 => \"Monteforte Cilento\",4339 => \"Monteforte d'Alpone\",4340 => \"Monteforte Irpino\",4341 => \"Montefortino\",4342 => \"Montefranco\",4343 => \"Montefredane\",4344 => \"Montefusco\",4345 => \"Montegabbione\",4346 => \"Montegalda\",4347 => \"Montegaldella\",4348 => \"Montegallo\",4349 => \"Montegioco\",4350 => \"Montegiordano\",4351 => \"Montegiorgio\",4352 => \"Montegranaro\",4353 => \"Montegridolfo\",4354 => \"Montegrimano\",4355 => \"Montegrino valtravaglia\",4356 => \"Montegrosso d'Asti\",4357 => \"Montegrosso pian latte\",4358 => \"Montegrotto terme\",4359 => \"Monteiasi\",4360 => \"Montelabbate\",4361 => \"Montelanico\",4362 => \"Montelapiano\",4363 => \"Monteleone d'orvieto\",4364 => \"Monteleone di fermo\",4365 => \"Monteleone di puglia\",4366 => \"Monteleone di spoleto\",4367 => \"Monteleone rocca doria\",4368 => \"Monteleone sabino\",4369 => \"Montelepre\",4370 => \"Montelibretti\",4371 => \"Montella\",4372 => \"Montello\",4373 => \"Montelongo\",4374 => \"Montelparo\",4375 => \"Montelupo albese\",4376 => \"Montelupo fiorentino\",4377 => \"Montelupone\",4378 => \"Montemaggiore al metauro\",4379 => \"Montemaggiore belsito\",4380 => \"Montemagno\",4381 => \"Montemale di cuneo\",4382 => \"Montemarano\",4383 => \"Montemarciano\",4384 => \"Montemarzino\",4385 => \"Montemesola\",4386 => \"Montemezzo\",4387 => \"Montemignaio\",4388 => \"Montemiletto\",8401 => \"Montemilone\",4390 => \"Montemitro\",4391 => \"Montemonaco\",4392 => \"Montemurlo\",8408 => \"Montemurro\",4394 => \"Montenars\",4395 => \"Montenero di bisaccia\",4396 => \"Montenero sabino\",4397 => \"Montenero val cocchiara\",4398 => \"Montenerodomo\",4399 => \"Monteodorisio\",4400 => \"Montepaone\",4401 => \"Monteparano\",8296 => \"Montepiano\",4402 => \"Monteprandone\",4403 => \"Montepulciano\",4404 => \"Monterado\",4405 => \"Monterchi\",4406 => \"Montereale\",4407 => \"Montereale valcellina\",4408 => \"Monterenzio\",4409 => \"Monteriggioni\",4410 => \"Monteroduni\",4411 => \"Monteroni d'arbia\",4412 => \"Monteroni di lecce\",4413 => \"Monterosi\",4414 => \"Monterosso al mare\",4415 => \"Monterosso almo\",4416 => \"Monterosso calabro\",4417 => \"Monterosso grana\",4418 => \"Monterotondo\",4419 => \"Monterotondo marittimo\",4420 => \"Monterubbiano\",4421 => \"Montesano salentino\",4422 => \"Montesano sulla marcellana\",4423 => \"Montesarchio\",8389 => \"Montescaglioso\",4425 => \"Montescano\",4426 => \"Montescheno\",4427 => \"Montescudaio\",4428 => \"Montescudo\",4429 => \"Montese\",4430 => \"Montesegale\",4431 => \"Montesilvano\",8491 => \"Montesilvano Marina\",4432 => \"Montespertoli\",1730 => \"Montespluga\",4433 => \"Monteu da Po\",4434 => \"Monteu roero\",4435 => \"Montevago\",4436 => \"Montevarchi\",4437 => \"Montevecchia\",4438 => \"Monteveglio\",4439 => \"Monteverde\",4440 => \"Monteverdi marittimo\",8589 => \"Montevergine\",4441 => \"Monteviale\",4442 => \"Montezemolo\",4443 => \"Monti\",4444 => \"Montiano\",4445 => \"Monticelli brusati\",4446 => \"Monticelli d'ongina\",4447 => \"Monticelli pavese\",4448 => \"Monticello brianza\",4449 => \"Monticello conte otto\",4450 => \"Monticello d'alba\",4451 => \"Montichiari\",4452 => \"Monticiano\",4453 => \"Montieri\",4454 => \"Montiglio monferrato\",4455 => \"Montignoso\",4456 => \"Montirone\",4457 => \"Montjovet\",4458 => \"Montodine\",4459 => \"Montoggio\",4460 => \"Montone\",4461 => \"Montopoli di sabina\",4462 => \"Montopoli in val d'arno\",4463 => \"Montorfano\",4464 => \"Montorio al vomano\",4465 => \"Montorio nei frentani\",4466 => \"Montorio romano\",4467 => \"Montoro inferiore\",4468 => \"Montoro superiore\",4469 => \"Montorso vicentino\",4470 => \"Montottone\",4471 => \"Montresta\",4472 => \"Montu' beccaria\",8326 => \"Montzeuc\",4473 => \"Monvalle\",8726 => \"Monviso\",4474 => \"Monza\",4475 => \"Monzambano\",4476 => \"Monzuno\",4477 => \"Morano calabro\",4478 => \"Morano sul Po\",4479 => \"Moransengo\",4480 => \"Moraro\",4481 => \"Morazzone\",4482 => \"Morbegno\",4483 => \"Morbello\",4484 => \"Morciano di leuca\",4485 => \"Morciano di romagna\",4486 => \"Morcone\",4487 => \"Mordano\",8262 => \"Morel\",4488 => \"Morengo\",4489 => \"Mores\",4490 => \"Moresco\",4491 => \"Moretta\",4492 => \"Morfasso\",4493 => \"Morgano\",8717 => \"Morgantina\",4494 => \"Morgex\",4495 => \"Morgongiori\",4496 => \"Mori\",4497 => \"Moriago della battaglia\",4498 => \"Moricone\",4499 => \"Morigerati\",4500 => \"Morimondo\",4501 => \"Morino\",4502 => \"Moriondo torinese\",4503 => \"Morlupo\",4504 => \"Mormanno\",4505 => \"Mornago\",4506 => \"Mornese\",4507 => \"Mornico al serio\",4508 => \"Mornico losana\",4509 => \"Morolo\",4510 => \"Morozzo\",4511 => \"Morra de sanctis\",4512 => \"Morro d'alba\",4513 => \"Morro d'oro\",4514 => \"Morro reatino\",4515 => \"Morrone del sannio\",4516 => \"Morrovalle\",4517 => \"Morsano al tagliamento\",4518 => \"Morsasco\",4519 => \"Mortara\",4520 => \"Mortegliano\",4521 => \"Morterone\",4522 => \"Moruzzo\",4523 => \"Moscazzano\",4524 => \"Moschiano\",4525 => \"Mosciano sant'angelo\",4526 => \"Moscufo\",4527 => \"Moso in Passiria\",4528 => \"Mossa\",4529 => \"Mossano\",4530 => \"Mosso Santa Maria\",4531 => \"Motta baluffi\",4532 => \"Motta Camastra\",4533 => \"Motta d'affermo\",4534 => \"Motta de' conti\",4535 => \"Motta di livenza\",4536 => \"Motta montecorvino\",4537 => \"Motta san giovanni\",4538 => \"Motta sant'anastasia\",4539 => \"Motta santa lucia\",4540 => \"Motta visconti\",4541 => \"Mottafollone\",4542 => \"Mottalciata\",8621 => \"Mottarone\",4543 => \"Motteggiana\",4544 => \"Mottola\",8254 => \"Mottolino\",4545 => \"Mozzagrogna\",4546 => \"Mozzanica\",4547 => \"Mozzate\",4548 => \"Mozzecane\",4549 => \"Mozzo\",4550 => \"Muccia\",4551 => \"Muggia\",4552 => \"Muggio'\",4553 => \"Mugnano del cardinale\",4554 => \"Mugnano di napoli\",4555 => \"Mulazzano\",4556 => \"Mulazzo\",4557 => \"Mura\",4558 => \"Muravera\",4559 => \"Murazzano\",4560 => \"Murello\",4561 => \"Murialdo\",4562 => \"Murisengo\",4563 => \"Murlo\",4564 => \"Muro leccese\",4565 => \"Muro lucano\",4566 => \"Muros\",4567 => \"Muscoline\",4568 => \"Musei\",4569 => \"Musile di piave\",4570 => \"Musso\",4571 => \"Mussolente\",4572 => \"Mussomeli\",4573 => \"Muzzana del turgnano\",4574 => \"Muzzano\",4575 => \"Nago torbole\",4576 => \"Nalles\",4577 => \"Nanno\",4578 => \"Nanto\",4579 => \"Napoli\",8498 => \"Napoli Capodichino\",4580 => \"Narbolia\",4581 => \"Narcao\",4582 => \"Nardo'\",4583 => \"Nardodipace\",4584 => \"Narni\",4585 => \"Naro\",4586 => \"Narzole\",4587 => \"Nasino\",4588 => \"Naso\",4589 => \"Naturno\",4590 => \"Nave\",4591 => \"Nave san rocco\",4592 => \"Navelli\",4593 => \"Naz Sciaves\",4594 => \"Nazzano\",4595 => \"Ne\",4596 => \"Nebbiuno\",4597 => \"Negrar\",4598 => \"Neirone\",4599 => \"Neive\",4600 => \"Nembro\",4601 => \"Nemi\",8381 => \"Nemoli\",4603 => \"Neoneli\",4604 => \"Nepi\",4605 => \"Nereto\",4606 => \"Nerola\",4607 => \"Nervesa della battaglia\",4608 => \"Nerviano\",4609 => \"Nespolo\",4610 => \"Nesso\",4611 => \"Netro\",4612 => \"Nettuno\",4613 => \"Neviano\",4614 => \"Neviano degli arduini\",4615 => \"Neviglie\",4616 => \"Niardo\",4617 => \"Nibbiano\",4618 => \"Nibbiola\",4619 => \"Nibionno\",4620 => \"Nichelino\",4621 => \"Nicolosi\",4622 => \"Nicorvo\",4623 => \"Nicosia\",4624 => \"Nicotera\",8117 => \"Nicotera Marina\",4625 => \"Niella belbo\",8475 => \"Niella Tanaro\",4627 => \"Nimis\",4628 => \"Niscemi\",4629 => \"Nissoria\",4630 => \"Nizza di sicilia\",4631 => \"Nizza monferrato\",4632 => \"Noale\",4633 => \"Noasca\",4634 => \"Nocara\",4635 => \"Nocciano\",4636 => \"Nocera inferiore\",4637 => \"Nocera superiore\",4638 => \"Nocera terinese\",4639 => \"Nocera umbra\",4640 => \"Noceto\",4641 => \"Noci\",4642 => \"Nociglia\",8375 => \"Noepoli\",4644 => \"Nogara\",4645 => \"Nogaredo\",4646 => \"Nogarole rocca\",4647 => \"Nogarole vicentino\",4648 => \"Noicattaro\",4649 => \"Nola\",4650 => \"Nole\",4651 => \"Noli\",4652 => \"Nomaglio\",4653 => \"Nomi\",4654 => \"Nonantola\",4655 => \"None\",4656 => \"Nonio\",4657 => \"Noragugume\",4658 => \"Norbello\",4659 => \"Norcia\",4660 => \"Norma\",4661 => \"Nosate\",4662 => \"Notaresco\",4663 => \"Noto\",4664 => \"Nova Levante\",4665 => \"Nova milanese\",4666 => \"Nova Ponente\",8428 => \"Nova siri\",4668 => \"Novafeltria\",4669 => \"Novaledo\",4670 => \"Novalesa\",4671 => \"Novara\",4672 => \"Novara di Sicilia\",4673 => \"Novate mezzola\",4674 => \"Novate milanese\",4675 => \"Nove\",4676 => \"Novedrate\",4677 => \"Novellara\",4678 => \"Novello\",4679 => \"Noventa di piave\",4680 => \"Noventa padovana\",4681 => \"Noventa vicentina\",4682 => \"Novi di modena\",4683 => \"Novi ligure\",4684 => \"Novi velia\",4685 => \"Noviglio\",4686 => \"Novoli\",4687 => \"Nucetto\",4688 => \"Nughedu di san nicolo'\",4689 => \"Nughedu santa vittoria\",4690 => \"Nule\",4691 => \"Nulvi\",4692 => \"Numana\",4693 => \"Nuoro\",4694 => \"Nurachi\",4695 => \"Nuragus\",4696 => \"Nurallao\",4697 => \"Nuraminis\",4698 => \"Nureci\",4699 => \"Nurri\",4700 => \"Nus\",4701 => \"Nusco\",4702 => \"Nuvolento\",4703 => \"Nuvolera\",4704 => \"Nuxis\",8260 => \"Obereggen\",4705 => \"Occhieppo inferiore\",4706 => \"Occhieppo superiore\",4707 => \"Occhiobello\",4708 => \"Occimiano\",4709 => \"Ocre\",4710 => \"Odalengo grande\",4711 => \"Odalengo piccolo\",4712 => \"Oderzo\",4713 => \"Odolo\",4714 => \"Ofena\",4715 => \"Offagna\",4716 => \"Offanengo\",4717 => \"Offida\",4718 => \"Offlaga\",4719 => \"Oggebbio\",4720 => \"Oggiona con santo stefano\",4721 => \"Oggiono\",4722 => \"Oglianico\",4723 => \"Ogliastro cilento\",4724 => \"Olbia\",8470 => \"Olbia Costa Smeralda\",4725 => \"Olcenengo\",4726 => \"Oldenico\",4727 => \"Oleggio\",4728 => \"Oleggio castello\",4729 => \"Olevano di lomellina\",4730 => \"Olevano romano\",4731 => \"Olevano sul tusciano\",4732 => \"Olgiate comasco\",4733 => \"Olgiate molgora\",4734 => \"Olgiate olona\",4735 => \"Olginate\",4736 => \"Oliena\",4737 => \"Oliva gessi\",4738 => \"Olivadi\",4739 => \"Oliveri\",4740 => \"Oliveto citra\",4741 => \"Oliveto lario\",8426 => \"Oliveto lucano\",4743 => \"Olivetta san michele\",4744 => \"Olivola\",4745 => \"Ollastra simaxis\",4746 => \"Ollolai\",4747 => \"Ollomont\",4748 => \"Olmedo\",4749 => \"Olmeneta\",4750 => \"Olmo al brembo\",4751 => \"Olmo gentile\",4752 => \"Oltre il colle\",4753 => \"Oltressenda alta\",4754 => \"Oltrona di san mamette\",4755 => \"Olzai\",4756 => \"Ome\",4757 => \"Omegna\",4758 => \"Omignano\",4759 => \"Onani\",4760 => \"Onano\",4761 => \"Oncino\",8283 => \"Oneglia\",4762 => \"Oneta\",4763 => \"Onifai\",4764 => \"Oniferi\",8664 => \"Onna\",4765 => \"Ono san pietro\",4766 => \"Onore\",4767 => \"Onzo\",4768 => \"Opera\",4769 => \"Opi\",4770 => \"Oppeano\",8409 => \"Oppido lucano\",4772 => \"Oppido mamertina\",4773 => \"Ora\",4774 => \"Orani\",4775 => \"Oratino\",4776 => \"Orbassano\",4777 => \"Orbetello\",4778 => \"Orciano di pesaro\",4779 => \"Orciano pisano\",4780 => \"Orco feglino\",4781 => \"Ordona\",4782 => \"Orero\",4783 => \"Orgiano\",4784 => \"Orgosolo\",4785 => \"Oria\",4786 => \"Oricola\",4787 => \"Origgio\",4788 => \"Orino\",4789 => \"Orio al serio\",4790 => \"Orio canavese\",4791 => \"Orio litta\",4792 => \"Oriolo\",4793 => \"Oriolo romano\",4794 => \"Oristano\",4795 => \"Ormea\",4796 => \"Ormelle\",4797 => \"Ornago\",4798 => \"Ornavasso\",4799 => \"Ornica\",8348 => \"Oropa\",8169 => \"Orosei\",4801 => \"Orotelli\",4802 => \"Orria\",4803 => \"Orroli\",4804 => \"Orsago\",4805 => \"Orsara bormida\",4806 => \"Orsara di puglia\",4807 => \"Orsenigo\",4808 => \"Orsogna\",4809 => \"Orsomarso\",4810 => \"Orta di atella\",4811 => \"Orta nova\",4812 => \"Orta san giulio\",4813 => \"Ortacesus\",4814 => \"Orte\",8460 => \"Orte casello\",4815 => \"Ortelle\",4816 => \"Ortezzano\",4817 => \"Ortignano raggiolo\",4818 => \"Ortisei\",8725 => \"Ortles\",4819 => \"Ortona\",4820 => \"Ortona dei marsi\",4821 => \"Ortonovo\",4822 => \"Ortovero\",4823 => \"Ortucchio\",4824 => \"Ortueri\",4825 => \"Orune\",4826 => \"Orvieto\",8459 => \"Orvieto casello\",4827 => \"Orvinio\",4828 => \"Orzinuovi\",4829 => \"Orzivecchi\",4830 => \"Osasco\",4831 => \"Osasio\",4832 => \"Oschiri\",4833 => \"Osidda\",4834 => \"Osiglia\",4835 => \"Osilo\",4836 => \"Osimo\",4837 => \"Osini\",4838 => \"Osio sopra\",4839 => \"Osio sotto\",4840 => \"Osmate\",4841 => \"Osnago\",8465 => \"Osoppo\",4843 => \"Ospedaletti\",4844 => \"Ospedaletto\",4845 => \"Ospedaletto d'alpinolo\",4846 => \"Ospedaletto euganeo\",4847 => \"Ospedaletto lodigiano\",4848 => \"Ospitale di cadore\",4849 => \"Ospitaletto\",4850 => \"Ossago lodigiano\",4851 => \"Ossana\",4852 => \"Ossi\",4853 => \"Ossimo\",4854 => \"Ossona\",4855 => \"Ossuccio\",4856 => \"Ostana\",4857 => \"Ostellato\",4858 => \"Ostiano\",4859 => \"Ostiglia\",4860 => \"Ostra\",4861 => \"Ostra vetere\",4862 => \"Ostuni\",4863 => \"Otranto\",4864 => \"Otricoli\",4865 => \"Ottana\",4866 => \"Ottati\",4867 => \"Ottaviano\",4868 => \"Ottiglio\",4869 => \"Ottobiano\",4870 => \"Ottone\",4871 => \"Oulx\",4872 => \"Ovada\",4873 => \"Ovaro\",4874 => \"Oviglio\",4875 => \"Ovindoli\",4876 => \"Ovodda\",4877 => \"Oyace\",4878 => \"Ozegna\",4879 => \"Ozieri\",4880 => \"Ozzano dell'emilia\",4881 => \"Ozzano monferrato\",4882 => \"Ozzero\",4883 => \"Pabillonis\",4884 => \"Pace del mela\",4885 => \"Paceco\",4886 => \"Pacentro\",4887 => \"Pachino\",4888 => \"Paciano\",4889 => \"Padenghe sul garda\",4890 => \"Padergnone\",4891 => \"Paderna\",4892 => \"Paderno d'adda\",4893 => \"Paderno del grappa\",4894 => \"Paderno dugnano\",4895 => \"Paderno franciacorta\",4896 => \"Paderno ponchielli\",4897 => \"Padova\",4898 => \"Padria\",4899 => \"Padru\",4900 => \"Padula\",4901 => \"Paduli\",4902 => \"Paesana\",4903 => \"Paese\",8713 => \"Paestum\",8203 => \"Paganella\",4904 => \"Pagani\",8663 => \"Paganica\",4905 => \"Paganico\",4906 => \"Pagazzano\",4907 => \"Pagliara\",4908 => \"Paglieta\",4909 => \"Pagnacco\",4910 => \"Pagno\",4911 => \"Pagnona\",4912 => \"Pago del vallo di lauro\",4913 => \"Pago veiano\",4914 => \"Paisco loveno\",4915 => \"Paitone\",4916 => \"Paladina\",8534 => \"Palafavera\",4917 => \"Palagano\",4918 => \"Palagianello\",4919 => \"Palagiano\",4920 => \"Palagonia\",4921 => \"Palaia\",4922 => \"Palanzano\",4923 => \"Palata\",4924 => \"Palau\",4925 => \"Palazzago\",4926 => \"Palazzo adriano\",4927 => \"Palazzo canavese\",4928 => \"Palazzo pignano\",4929 => \"Palazzo san gervasio\",4930 => \"Palazzolo acreide\",4931 => \"Palazzolo dello stella\",4932 => \"Palazzolo sull'Oglio\",4933 => \"Palazzolo vercellese\",4934 => \"Palazzuolo sul senio\",4935 => \"Palena\",4936 => \"Palermiti\",4937 => \"Palermo\",8575 => \"Palermo Boccadifalco\",8272 => \"Palermo Punta Raisi\",4938 => \"Palestrina\",4939 => \"Palestro\",4940 => \"Paliano\",8121 => \"Palinuro\",4941 => \"Palizzi\",8108 => \"Palizzi Marina\",4942 => \"Pallagorio\",4943 => \"Pallanzeno\",4944 => \"Pallare\",4945 => \"Palma campania\",4946 => \"Palma di montechiaro\",4947 => \"Palmanova\",4948 => \"Palmariggi\",4949 => \"Palmas arborea\",4950 => \"Palmi\",4951 => \"Palmiano\",4952 => \"Palmoli\",4953 => \"Palo del colle\",4954 => \"Palombara sabina\",4955 => \"Palombaro\",4956 => \"Palomonte\",4957 => \"Palosco\",4958 => \"Palu'\",4959 => \"Palu' del fersina\",4960 => \"Paludi\",4961 => \"Paluzza\",4962 => \"Pamparato\",8257 => \"Pampeago\",8753 => \"Panarotta\",4963 => \"Pancalieri\",8261 => \"Pancani\",4964 => \"Pancarana\",4965 => \"Panchia'\",4966 => \"Pandino\",4967 => \"Panettieri\",4968 => \"Panicale\",4969 => \"Pannarano\",4970 => \"Panni\",4971 => \"Pantelleria\",4972 => \"Pantigliate\",4973 => \"Paola\",4974 => \"Paolisi\",4975 => \"Papasidero\",4976 => \"Papozze\",4977 => \"Parabiago\",4978 => \"Parabita\",4979 => \"Paratico\",4980 => \"Parcines\",4981 => \"Pare'\",4982 => \"Parella\",4983 => \"Parenti\",4984 => \"Parete\",4985 => \"Pareto\",4986 => \"Parghelia\",4987 => \"Parlasco\",4988 => \"Parma\",8554 => \"Parma Verdi\",4989 => \"Parodi ligure\",4990 => \"Paroldo\",4991 => \"Parolise\",4992 => \"Parona\",4993 => \"Parrano\",4994 => \"Parre\",4995 => \"Partanna\",4996 => \"Partinico\",4997 => \"Paruzzaro\",4998 => \"Parzanica\",4999 => \"Pasian di prato\",5000 => \"Pasiano di pordenone\",5001 => \"Paspardo\",5002 => \"Passerano Marmorito\",5003 => \"Passignano sul trasimeno\",5004 => \"Passirano\",8613 => \"Passo Bernina\",8760 => \"Passo Campolongo\",8329 => \"Passo Costalunga\",8618 => \"Passo dei Salati\",8207 => \"Passo del Brennero\",8577 => \"Passo del Brocon\",8627 => \"Passo del Cerreto\",8147 => \"Passo del Foscagno\",8308 => \"Passo del Lupo\",8206 => \"Passo del Rombo\",8150 => \"Passo del Tonale\",8196 => \"Passo della Cisa\",8235 => \"Passo della Consuma\",8290 => \"Passo della Presolana\",8659 => \"Passo delle Fittanze\",8145 => \"Passo dello Stelvio\",8213 => \"Passo di Resia\",8752 => \"Passo di Vezzena\",8328 => \"Passo Fedaia\",8759 => \"Passo Gardena\",8277 => \"Passo Groste'\",8756 => \"Passo Lanciano\",8280 => \"Passo Pordoi\",8626 => \"Passo Pramollo\",8210 => \"Passo Rolle\",8279 => \"Passo San Pellegrino\",8325 => \"Passo Sella\",5005 => \"Pastena\",5006 => \"Pastorano\",5007 => \"Pastrengo\",5008 => \"Pasturana\",5009 => \"Pasturo\",8417 => \"Paterno\",5011 => \"Paterno calabro\",5012 => \"Paterno'\",5013 => \"Paternopoli\",5014 => \"Patrica\",5015 => \"Pattada\",5016 => \"Patti\",5017 => \"Patu'\",5018 => \"Pau\",5019 => \"Paularo\",5020 => \"Pauli arbarei\",5021 => \"Paulilatino\",5022 => \"Paullo\",5023 => \"Paupisi\",5024 => \"Pavarolo\",5025 => \"Pavia\",5026 => \"Pavia di udine\",5027 => \"Pavone canavese\",5028 => \"Pavone del mella\",5029 => \"Pavullo nel frignano\",5030 => \"Pazzano\",5031 => \"Peccioli\",5032 => \"Pecco\",5033 => \"Pecetto di valenza\",5034 => \"Pecetto torinese\",5035 => \"Pecorara\",5036 => \"Pedace\",5037 => \"Pedara\",5038 => \"Pedaso\",5039 => \"Pedavena\",5040 => \"Pedemonte\",5041 => \"Pederobba\",5042 => \"Pedesina\",5043 => \"Pedivigliano\",8473 => \"Pedraces\",5044 => \"Pedrengo\",5045 => \"Peglio\",5046 => \"Peglio\",5047 => \"Pegognaga\",5048 => \"Peia\",8665 => \"Pejo\",5050 => \"Pelago\",5051 => \"Pella\",5052 => \"Pellegrino parmense\",5053 => \"Pellezzano\",5054 => \"Pellio intelvi\",5055 => \"Pellizzano\",5056 => \"Pelugo\",5057 => \"Penango\",5058 => \"Penna in teverina\",5059 => \"Penna san giovanni\",5060 => \"Penna sant'andrea\",5061 => \"Pennabilli\",5062 => \"Pennadomo\",5063 => \"Pennapiedimonte\",5064 => \"Penne\",8208 => \"Pennes\",5065 => \"Pentone\",5066 => \"Perano\",5067 => \"Perarolo di cadore\",5068 => \"Perca\",5069 => \"Percile\",5070 => \"Perdasdefogu\",5071 => \"Perdaxius\",5072 => \"Perdifumo\",5073 => \"Perego\",5074 => \"Pereto\",5075 => \"Perfugas\",5076 => \"Pergine valdarno\",5077 => \"Pergine valsugana\",5078 => \"Pergola\",5079 => \"Perinaldo\",5080 => \"Perito\",5081 => \"Perledo\",5082 => \"Perletto\",5083 => \"Perlo\",5084 => \"Perloz\",5085 => \"Pernumia\",5086 => \"Pero\",5087 => \"Perosa argentina\",5088 => \"Perosa canavese\",5089 => \"Perrero\",5090 => \"Persico dosimo\",5091 => \"Pertengo\",5092 => \"Pertica alta\",5093 => \"Pertica bassa\",8586 => \"Perticara di Novafeltria\",5094 => \"Pertosa\",5095 => \"Pertusio\",5096 => \"Perugia\",8555 => \"Perugia Sant'Egidio\",5097 => \"Pesaro\",5098 => \"Pescaglia\",5099 => \"Pescantina\",5100 => \"Pescara\",8275 => \"Pescara Liberi\",5101 => \"Pescarolo ed uniti\",5102 => \"Pescasseroli\",5103 => \"Pescate\",8312 => \"Pescegallo\",5104 => \"Pesche\",5105 => \"Peschici\",5106 => \"Peschiera borromeo\",5107 => \"Peschiera del garda\",5108 => \"Pescia\",5109 => \"Pescina\",8454 => \"Pescina casello\",5110 => \"Pesco sannita\",5111 => \"Pescocostanzo\",5112 => \"Pescolanciano\",5113 => \"Pescopagano\",5114 => \"Pescopennataro\",5115 => \"Pescorocchiano\",5116 => \"Pescosansonesco\",5117 => \"Pescosolido\",5118 => \"Pessano con Bornago\",5119 => \"Pessina cremonese\",5120 => \"Pessinetto\",5121 => \"Petacciato\",5122 => \"Petilia policastro\",5123 => \"Petina\",5124 => \"Petralia soprana\",5125 => \"Petralia sottana\",5126 => \"Petrella salto\",5127 => \"Petrella tifernina\",5128 => \"Petriano\",5129 => \"Petriolo\",5130 => \"Petritoli\",5131 => \"Petrizzi\",5132 => \"Petrona'\",5133 => \"Petrosino\",5134 => \"Petruro irpino\",5135 => \"Pettenasco\",5136 => \"Pettinengo\",5137 => \"Pettineo\",5138 => \"Pettoranello del molise\",5139 => \"Pettorano sul gizio\",5140 => \"Pettorazza grimani\",5141 => \"Peveragno\",5142 => \"Pezzana\",5143 => \"Pezzaze\",5144 => \"Pezzolo valle uzzone\",5145 => \"Piacenza\",5146 => \"Piacenza d'adige\",5147 => \"Piadena\",5148 => \"Piagge\",5149 => \"Piaggine\",8706 => \"Piamprato\",5150 => \"Pian camuno\",8309 => \"Pian Cavallaro\",8233 => \"Pian del Cansiglio\",8642 => \"Pian del Frais\",8705 => \"Pian della Mussa\",8634 => \"Pian delle Betulle\",5151 => \"Pian di sco'\",8712 => \"Pian di Sole\",5152 => \"Piana crixia\",5153 => \"Piana degli albanesi\",8653 => \"Piana di Marcesina\",5154 => \"Piana di monte verna\",8305 => \"Pianalunga\",5155 => \"Piancastagnaio\",8516 => \"Piancavallo\",5156 => \"Piancogno\",5157 => \"Piandimeleto\",5158 => \"Piane crati\",8561 => \"Piane di Mocogno\",5159 => \"Pianella\",5160 => \"Pianello del lario\",5161 => \"Pianello val tidone\",5162 => \"Pianengo\",5163 => \"Pianezza\",5164 => \"Pianezze\",5165 => \"Pianfei\",8605 => \"Piani d'Erna\",8517 => \"Piani di Artavaggio\",8234 => \"Piani di Bobbio\",5166 => \"Pianico\",5167 => \"Pianiga\",8314 => \"Piano del Voglio\",5168 => \"Piano di Sorrento\",8630 => \"Piano Provenzana\",5169 => \"Pianopoli\",5170 => \"Pianoro\",5171 => \"Piansano\",5172 => \"Piantedo\",5173 => \"Piario\",5174 => \"Piasco\",5175 => \"Piateda\",5176 => \"Piatto\",5177 => \"Piazza al serchio\",5178 => \"Piazza armerina\",5179 => \"Piazza brembana\",5180 => \"Piazzatorre\",5181 => \"Piazzola sul brenta\",5182 => \"Piazzolo\",5183 => \"Picciano\",5184 => \"Picerno\",5185 => \"Picinisco\",5186 => \"Pico\",5187 => \"Piea\",5188 => \"Piedicavallo\",8218 => \"Piediluco\",5189 => \"Piedimonte etneo\",5190 => \"Piedimonte matese\",5191 => \"Piedimonte san germano\",5192 => \"Piedimulera\",5193 => \"Piegaro\",5194 => \"Pienza\",5195 => \"Pieranica\",5196 => \"Pietra de'giorgi\",5197 => \"Pietra ligure\",5198 => \"Pietra marazzi\",5199 => \"Pietrabbondante\",5200 => \"Pietrabruna\",5201 => \"Pietracamela\",5202 => \"Pietracatella\",5203 => \"Pietracupa\",5204 => \"Pietradefusi\",5205 => \"Pietraferrazzana\",5206 => \"Pietrafitta\",5207 => \"Pietragalla\",5208 => \"Pietralunga\",5209 => \"Pietramelara\",5210 => \"Pietramontecorvino\",5211 => \"Pietranico\",5212 => \"Pietrapaola\",5213 => \"Pietrapertosa\",5214 => \"Pietraperzia\",5215 => \"Pietraporzio\",5216 => \"Pietraroja\",5217 => \"Pietrarubbia\",5218 => \"Pietrasanta\",5219 => \"Pietrastornina\",5220 => \"Pietravairano\",5221 => \"Pietrelcina\",5222 => \"Pieve a nievole\",5223 => \"Pieve albignola\",5224 => \"Pieve d'alpago\",5225 => \"Pieve d'olmi\",5226 => \"Pieve del cairo\",5227 => \"Pieve di bono\",5228 => \"Pieve di cadore\",5229 => \"Pieve di cento\",5230 => \"Pieve di coriano\",5231 => \"Pieve di ledro\",5232 => \"Pieve di soligo\",5233 => \"Pieve di teco\",5234 => \"Pieve emanuele\",5235 => \"Pieve fissiraga\",5236 => \"Pieve fosciana\",5237 => \"Pieve ligure\",5238 => \"Pieve porto morone\",5239 => \"Pieve san giacomo\",5240 => \"Pieve santo stefano\",5241 => \"Pieve tesino\",5242 => \"Pieve torina\",5243 => \"Pieve vergonte\",5244 => \"Pievebovigliana\",5245 => \"Pievepelago\",5246 => \"Piglio\",5247 => \"Pigna\",5248 => \"Pignataro interamna\",5249 => \"Pignataro maggiore\",5250 => \"Pignola\",5251 => \"Pignone\",5252 => \"Pigra\",5253 => \"Pila\",8221 => \"Pila\",5254 => \"Pimentel\",5255 => \"Pimonte\",5256 => \"Pinarolo po\",5257 => \"Pinasca\",5258 => \"Pincara\",5259 => \"Pinerolo\",5260 => \"Pineto\",5261 => \"Pino d'asti\",5262 => \"Pino sulla sponda del lago magg.\",5263 => \"Pino torinese\",5264 => \"Pinzano al tagliamento\",5265 => \"Pinzolo\",5266 => \"Piobbico\",5267 => \"Piobesi d'alba\",5268 => \"Piobesi torinese\",5269 => \"Piode\",5270 => \"Pioltello\",5271 => \"Piombino\",5272 => \"Piombino dese\",5273 => \"Pioraco\",5274 => \"Piossasco\",5275 => \"Piova' massaia\",5276 => \"Piove di sacco\",5277 => \"Piovene rocchette\",5278 => \"Piovera\",5279 => \"Piozzano\",5280 => \"Piozzo\",5281 => \"Piraino\",5282 => \"Pisa\",8518 => \"Pisa San Giusto\",5283 => \"Pisano\",5284 => \"Piscina\",5285 => \"Piscinas\",5286 => \"Pisciotta\",5287 => \"Pisogne\",5288 => \"Pisoniano\",5289 => \"Pisticci\",5290 => \"Pistoia\",5291 => \"Piteglio\",5292 => \"Pitigliano\",5293 => \"Piubega\",5294 => \"Piuro\",5295 => \"Piverone\",5296 => \"Pizzale\",5297 => \"Pizzighettone\",5298 => \"Pizzo\",8737 => \"Pizzo Arera\",8727 => \"Pizzo Bernina\",8736 => \"Pizzo dei Tre Signori\",8739 => \"Pizzo della Presolana\",5299 => \"Pizzoferrato\",5300 => \"Pizzoli\",5301 => \"Pizzone\",5302 => \"Pizzoni\",5303 => \"Placanica\",8342 => \"Plaghera\",8685 => \"Plain Maison\",8324 => \"Plain Mason\",8337 => \"Plan\",8469 => \"Plan Boè\",8633 => \"Plan Checrouit\",8204 => \"Plan de Corones\",8576 => \"Plan in Passiria\",5304 => \"Plataci\",5305 => \"Platania\",8241 => \"Plateau Rosa\",5306 => \"Plati'\",5307 => \"Plaus\",5308 => \"Plesio\",5309 => \"Ploaghe\",5310 => \"Plodio\",8569 => \"Plose\",5311 => \"Pocapaglia\",5312 => \"Pocenia\",5313 => \"Podenzana\",5314 => \"Podenzano\",5315 => \"Pofi\",5316 => \"Poggiardo\",5317 => \"Poggibonsi\",5318 => \"Poggio a caiano\",5319 => \"Poggio berni\",5320 => \"Poggio bustone\",5321 => \"Poggio catino\",5322 => \"Poggio imperiale\",5323 => \"Poggio mirteto\",5324 => \"Poggio moiano\",5325 => \"Poggio nativo\",5326 => \"Poggio picenze\",5327 => \"Poggio renatico\",5328 => \"Poggio rusco\",5329 => \"Poggio san lorenzo\",5330 => \"Poggio san marcello\",5331 => \"Poggio san vicino\",5332 => \"Poggio sannita\",5333 => \"Poggiodomo\",5334 => \"Poggiofiorito\",5335 => \"Poggiomarino\",5336 => \"Poggioreale\",5337 => \"Poggiorsini\",5338 => \"Poggiridenti\",5339 => \"Pogliano milanese\",8339 => \"Pogliola\",5340 => \"Pognana lario\",5341 => \"Pognano\",5342 => \"Pogno\",5343 => \"Poiana maggiore\",5344 => \"Poirino\",5345 => \"Polaveno\",5346 => \"Polcenigo\",5347 => \"Polesella\",5348 => \"Polesine parmense\",5349 => \"Poli\",5350 => \"Polia\",5351 => \"Policoro\",5352 => \"Polignano a mare\",5353 => \"Polinago\",5354 => \"Polino\",5355 => \"Polistena\",5356 => \"Polizzi generosa\",5357 => \"Polla\",5358 => \"Pollein\",5359 => \"Pollena trocchia\",5360 => \"Pollenza\",5361 => \"Pollica\",5362 => \"Pollina\",5363 => \"Pollone\",5364 => \"Pollutri\",5365 => \"Polonghera\",5366 => \"Polpenazze del garda\",8650 => \"Polsa San Valentino\",5367 => \"Polverara\",5368 => \"Polverigi\",5369 => \"Pomarance\",5370 => \"Pomaretto\",8384 => \"Pomarico\",5372 => \"Pomaro monferrato\",5373 => \"Pomarolo\",5374 => \"Pombia\",5375 => \"Pomezia\",5376 => \"Pomigliano d'arco\",5377 => \"Pompei\",5378 => \"Pompeiana\",5379 => \"Pompiano\",5380 => \"Pomponesco\",5381 => \"Pompu\",5382 => \"Poncarale\",5383 => \"Ponderano\",5384 => \"Ponna\",5385 => \"Ponsacco\",5386 => \"Ponso\",8220 => \"Pont\",5389 => \"Pont canavese\",5427 => \"Pont Saint Martin\",5387 => \"Pontassieve\",5388 => \"Pontboset\",5390 => \"Ponte\",5391 => \"Ponte buggianese\",5392 => \"Ponte dell'olio\",5393 => \"Ponte di legno\",5394 => \"Ponte di piave\",5395 => \"Ponte Gardena\",5396 => \"Ponte in valtellina\",5397 => \"Ponte lambro\",5398 => \"Ponte nelle alpi\",5399 => \"Ponte nizza\",5400 => \"Ponte nossa\",5401 => \"Ponte San Nicolo'\",5402 => \"Ponte San Pietro\",5403 => \"Pontebba\",5404 => \"Pontecagnano faiano\",5405 => \"Pontecchio polesine\",5406 => \"Pontechianale\",5407 => \"Pontecorvo\",5408 => \"Pontecurone\",5409 => \"Pontedassio\",5410 => \"Pontedera\",5411 => \"Pontelandolfo\",5412 => \"Pontelatone\",5413 => \"Pontelongo\",5414 => \"Pontenure\",5415 => \"Ponteranica\",5416 => \"Pontestura\",5417 => \"Pontevico\",5418 => \"Pontey\",5419 => \"Ponti\",5420 => \"Ponti sul mincio\",5421 => \"Pontida\",5422 => \"Pontinia\",5423 => \"Pontinvrea\",5424 => \"Pontirolo nuovo\",5425 => \"Pontoglio\",5426 => \"Pontremoli\",5428 => \"Ponza\",5429 => \"Ponzano di fermo\",8462 => \"Ponzano galleria\",5430 => \"Ponzano monferrato\",5431 => \"Ponzano romano\",5432 => \"Ponzano veneto\",5433 => \"Ponzone\",5434 => \"Popoli\",5435 => \"Poppi\",8192 => \"Populonia\",5436 => \"Porano\",5437 => \"Porcari\",5438 => \"Porcia\",5439 => \"Pordenone\",5440 => \"Porlezza\",5441 => \"Pornassio\",5442 => \"Porpetto\",5443 => \"Porretta terme\",5444 => \"Portacomaro\",5445 => \"Portalbera\",5446 => \"Porte\",5447 => \"Portici\",5448 => \"Portico di caserta\",5449 => \"Portico e san benedetto\",5450 => \"Portigliola\",8294 => \"Porto Alabe\",5451 => \"Porto azzurro\",5452 => \"Porto ceresio\",8528 => \"Porto Cervo\",5453 => \"Porto cesareo\",8295 => \"Porto Conte\",8612 => \"Porto Corsini\",5454 => \"Porto empedocle\",8669 => \"Porto Ercole\",8743 => \"Porto Levante\",5455 => \"Porto mantovano\",8178 => \"Porto Pino\",5456 => \"Porto recanati\",8529 => \"Porto Rotondo\",5457 => \"Porto san giorgio\",5458 => \"Porto sant'elpidio\",8670 => \"Porto Santo Stefano\",5459 => \"Porto tolle\",5460 => \"Porto torres\",5461 => \"Porto valtravaglia\",5462 => \"Porto viro\",8172 => \"Portobello di Gallura\",5463 => \"Portobuffole'\",5464 => \"Portocannone\",5465 => \"Portoferraio\",5466 => \"Portofino\",5467 => \"Portogruaro\",5468 => \"Portomaggiore\",5469 => \"Portopalo di capo passero\",8171 => \"Portorotondo\",5470 => \"Portoscuso\",5471 => \"Portovenere\",5472 => \"Portula\",5473 => \"Posada\",5474 => \"Posina\",5475 => \"Positano\",5476 => \"Possagno\",5477 => \"Posta\",5478 => \"Posta fibreno\",5479 => \"Postal\",5480 => \"Postalesio\",5481 => \"Postiglione\",5482 => \"Postua\",5483 => \"Potenza\",5484 => \"Potenza picena\",5485 => \"Pove del grappa\",5486 => \"Povegliano\",5487 => \"Povegliano veronese\",5488 => \"Poviglio\",5489 => \"Povoletto\",5490 => \"Pozza di fassa\",5491 => \"Pozzaglia sabino\",5492 => \"Pozzaglio ed uniti\",5493 => \"Pozzallo\",5494 => \"Pozzilli\",5495 => \"Pozzo d'adda\",5496 => \"Pozzol groppo\",5497 => \"Pozzolengo\",5498 => \"Pozzoleone\",5499 => \"Pozzolo formigaro\",5500 => \"Pozzomaggiore\",5501 => \"Pozzonovo\",5502 => \"Pozzuoli\",5503 => \"Pozzuolo del friuli\",5504 => \"Pozzuolo martesana\",8693 => \"Pra Catinat\",5505 => \"Pradalunga\",5506 => \"Pradamano\",5507 => \"Pradleves\",5508 => \"Pragelato\",5509 => \"Praia a mare\",5510 => \"Praiano\",5511 => \"Pralboino\",5512 => \"Prali\",5513 => \"Pralormo\",5514 => \"Pralungo\",5515 => \"Pramaggiore\",5516 => \"Pramollo\",5517 => \"Prarolo\",5518 => \"Prarostino\",5519 => \"Prasco\",5520 => \"Prascorsano\",5521 => \"Praso\",5522 => \"Prata camportaccio\",5523 => \"Prata d'ansidonia\",5524 => \"Prata di pordenone\",5525 => \"Prata di principato ultra\",5526 => \"Prata sannita\",5527 => \"Pratella\",8102 => \"Prati di Tivo\",8694 => \"Pratica di Mare\",5528 => \"Pratiglione\",5529 => \"Prato\",5530 => \"Prato allo Stelvio\",5531 => \"Prato carnico\",8157 => \"Prato Nevoso\",5532 => \"Prato sesia\",8560 => \"Prato Spilla\",5533 => \"Pratola peligna\",5534 => \"Pratola serra\",5535 => \"Pratovecchio\",5536 => \"Pravisdomini\",5537 => \"Pray\",5538 => \"Prazzo\",5539 => \"Pre' Saint Didier\",5540 => \"Precenicco\",5541 => \"Preci\",5542 => \"Predappio\",5543 => \"Predazzo\",5544 => \"Predoi\",5545 => \"Predore\",5546 => \"Predosa\",5547 => \"Preganziol\",5548 => \"Pregnana milanese\",5549 => \"Prela'\",5550 => \"Premana\",5551 => \"Premariacco\",5552 => \"Premeno\",5553 => \"Premia\",5554 => \"Premilcuore\",5555 => \"Premolo\",5556 => \"Premosello chiovenda\",5557 => \"Preone\",5558 => \"Preore\",5559 => \"Prepotto\",8578 => \"Presanella\",5560 => \"Preseglie\",5561 => \"Presenzano\",5562 => \"Presezzo\",5563 => \"Presicce\",5564 => \"Pressana\",5565 => \"Prestine\",5566 => \"Pretoro\",5567 => \"Prevalle\",5568 => \"Prezza\",5569 => \"Prezzo\",5570 => \"Priero\",5571 => \"Prignano cilento\",5572 => \"Prignano sulla secchia\",5573 => \"Primaluna\",5574 => \"Priocca\",5575 => \"Priola\",5576 => \"Priolo gargallo\",5577 => \"Priverno\",5578 => \"Prizzi\",5579 => \"Proceno\",5580 => \"Procida\",5581 => \"Propata\",5582 => \"Proserpio\",5583 => \"Prossedi\",5584 => \"Provaglio d'iseo\",5585 => \"Provaglio val sabbia\",5586 => \"Proves\",5587 => \"Provvidenti\",8189 => \"Prunetta\",5588 => \"Prunetto\",5589 => \"Puegnago sul garda\",5590 => \"Puglianello\",5591 => \"Pula\",5592 => \"Pulfero\",5593 => \"Pulsano\",5594 => \"Pumenengo\",8584 => \"Punta Ala\",8708 => \"Punta Ban\",8564 => \"Punta Helbronner\",8306 => \"Punta Indren\",8107 => \"Punta Stilo\",5595 => \"Puos d'alpago\",5596 => \"Pusiano\",5597 => \"Putifigari\",5598 => \"Putignano\",5599 => \"Quadrelle\",5600 => \"Quadri\",5601 => \"Quagliuzzo\",5602 => \"Qualiano\",5603 => \"Quaranti\",5604 => \"Quaregna\",5605 => \"Quargnento\",5606 => \"Quarna sopra\",5607 => \"Quarna sotto\",5608 => \"Quarona\",5609 => \"Quarrata\",5610 => \"Quart\",5611 => \"Quarto\",5612 => \"Quarto d'altino\",5613 => \"Quartu sant'elena\",5614 => \"Quartucciu\",5615 => \"Quassolo\",5616 => \"Quattordio\",5617 => \"Quattro castella\",5618 => \"Quero\",5619 => \"Quiliano\",5620 => \"Quincinetto\",5621 => \"Quindici\",5622 => \"Quingentole\",5623 => \"Quintano\",5624 => \"Quinto di treviso\",5625 => \"Quinto vercellese\",5626 => \"Quinto vicentino\",5627 => \"Quinzano d'oglio\",5628 => \"Quistello\",5629 => \"Quittengo\",5630 => \"Rabbi\",5631 => \"Racale\",5632 => \"Racalmuto\",5633 => \"Racconigi\",5634 => \"Raccuja\",5635 => \"Racines\",8352 => \"Racines Giovo\",5636 => \"Radda in chianti\",5637 => \"Raddusa\",5638 => \"Radicofani\",5639 => \"Radicondoli\",5640 => \"Raffadali\",5641 => \"Ragalna\",5642 => \"Ragogna\",5643 => \"Ragoli\",5644 => \"Ragusa\",5645 => \"Raiano\",5646 => \"Ramacca\",5647 => \"Ramiseto\",5648 => \"Ramponio verna\",5649 => \"Rancio valcuvia\",5650 => \"Ranco\",5651 => \"Randazzo\",5652 => \"Ranica\",5653 => \"Ranzanico\",5654 => \"Ranzo\",5655 => \"Rapagnano\",5656 => \"Rapallo\",5657 => \"Rapino\",5658 => \"Rapolano terme\",8394 => \"Rapolla\",5660 => \"Rapone\",5661 => \"Rassa\",5662 => \"Rasun Anterselva\",5663 => \"Rasura\",5664 => \"Ravanusa\",5665 => \"Ravarino\",5666 => \"Ravascletto\",5667 => \"Ravello\",5668 => \"Ravenna\",5669 => \"Raveo\",5670 => \"Raviscanina\",5671 => \"Re\",5672 => \"Rea\",5673 => \"Realmonte\",5674 => \"Reana del roiale\",5675 => \"Reano\",5676 => \"Recale\",5677 => \"Recanati\",5678 => \"Recco\",5679 => \"Recetto\",8639 => \"Recoaro Mille\",5680 => \"Recoaro Terme\",5681 => \"Redavalle\",5682 => \"Redondesco\",5683 => \"Refrancore\",5684 => \"Refrontolo\",5685 => \"Regalbuto\",5686 => \"Reggello\",8542 => \"Reggio Aeroporto dello Stretto\",5687 => \"Reggio Calabria\",5688 => \"Reggio Emilia\",5689 => \"Reggiolo\",5690 => \"Reino\",5691 => \"Reitano\",5692 => \"Remanzacco\",5693 => \"Remedello\",5694 => \"Renate\",5695 => \"Rende\",5696 => \"Renon\",5697 => \"Resana\",5698 => \"Rescaldina\",8734 => \"Resegone\",5699 => \"Resia\",5700 => \"Resiutta\",5701 => \"Resuttano\",5702 => \"Retorbido\",5703 => \"Revello\",5704 => \"Revere\",5705 => \"Revigliasco d'asti\",5706 => \"Revine lago\",5707 => \"Revo'\",5708 => \"Rezzago\",5709 => \"Rezzato\",5710 => \"Rezzo\",5711 => \"Rezzoaglio\",5712 => \"Rhemes Notre Dame\",5713 => \"Rhemes Saint Georges\",5714 => \"Rho\",5715 => \"Riace\",8106 => \"Riace Marina\",5716 => \"Rialto\",5717 => \"Riano\",5718 => \"Riardo\",5719 => \"Ribera\",5720 => \"Ribordone\",5721 => \"Ricadi\",5722 => \"Ricaldone\",5723 => \"Riccia\",5724 => \"Riccione\",5725 => \"Ricco' del golfo di spezia\",5726 => \"Ricengo\",5727 => \"Ricigliano\",5728 => \"Riese pio x\",5729 => \"Riesi\",5730 => \"Rieti\",5731 => \"Rifiano\",5732 => \"Rifreddo\",8691 => \"Rifugio Boffalora Ticino\",8244 => \"Rifugio Calvi Laghi Gemelli\",8684 => \"Rifugio Chivasso - Colle del Nivolet\",8678 => \"Rifugio Curò\",8679 => \"Rifugio laghi Gemelli\",8731 => \"Rifugio Livio Bianco\",8681 => \"Rifugio Mezzalama\",8682 => \"Rifugio Quintino Sella\",8629 => \"Rifugio Sapienza\",8683 => \"Rifugio Torino\",8680 => \"Rifugio Viviani\",5733 => \"Rignano flaminio\",5734 => \"Rignano garganico\",5735 => \"Rignano sull'arno\",5736 => \"Rigolato\",5737 => \"Rima san giuseppe\",5738 => \"Rimasco\",5739 => \"Rimella\",5740 => \"Rimini\",8546 => \"Rimini Miramare\",5741 => \"Rio di Pusteria\",5742 => \"Rio marina\",5743 => \"Rio nell'elba\",5744 => \"Rio saliceto\",5745 => \"Riofreddo\",5746 => \"Riola sardo\",5747 => \"Riolo terme\",5748 => \"Riolunato\",5749 => \"Riomaggiore\",5750 => \"Rionero in vulture\",5751 => \"Rionero sannitico\",8503 => \"Rioveggio\",5752 => \"Ripa teatina\",5753 => \"Ripabottoni\",8404 => \"Ripacandida\",5755 => \"Ripalimosani\",5756 => \"Ripalta arpina\",5757 => \"Ripalta cremasca\",5758 => \"Ripalta guerina\",5759 => \"Riparbella\",5760 => \"Ripatransone\",5761 => \"Ripe\",5762 => \"Ripe san ginesio\",5763 => \"Ripi\",5764 => \"Riposto\",5765 => \"Rittana\",5766 => \"Riva del garda\",5767 => \"Riva di solto\",8579 => \"Riva di Tures\",5768 => \"Riva ligure\",5769 => \"Riva presso chieri\",5770 => \"Riva valdobbia\",5771 => \"Rivalba\",5772 => \"Rivalta bormida\",5773 => \"Rivalta di torino\",5774 => \"Rivamonte agordino\",5775 => \"Rivanazzano\",5776 => \"Rivara\",5777 => \"Rivarolo canavese\",5778 => \"Rivarolo del re ed uniti\",5779 => \"Rivarolo mantovano\",5780 => \"Rivarone\",5781 => \"Rivarossa\",5782 => \"Rive\",5783 => \"Rive d'arcano\",8398 => \"Rivello\",5785 => \"Rivergaro\",5786 => \"Rivignano\",5787 => \"Rivisondoli\",5788 => \"Rivodutri\",5789 => \"Rivoli\",8436 => \"Rivoli veronese\",5791 => \"Rivolta d'adda\",5792 => \"Rizziconi\",5793 => \"Ro\",5794 => \"Roana\",5795 => \"Roaschia\",5796 => \"Roascio\",5797 => \"Roasio\",5798 => \"Roatto\",5799 => \"Robassomero\",5800 => \"Robbiate\",5801 => \"Robbio\",5802 => \"Robecchetto con Induno\",5803 => \"Robecco d'oglio\",5804 => \"Robecco pavese\",5805 => \"Robecco sul naviglio\",5806 => \"Robella\",5807 => \"Robilante\",5808 => \"Roburent\",5809 => \"Rocca canavese\",5810 => \"Rocca Canterano\",5811 => \"Rocca Ciglie'\",5812 => \"Rocca d'Arazzo\",5813 => \"Rocca d'Arce\",5814 => \"Rocca d'Evandro\",5815 => \"Rocca de' Baldi\",5816 => \"Rocca de' Giorgi\",5817 => \"Rocca di Botte\",5818 => \"Rocca di Cambio\",5819 => \"Rocca di Cave\",5820 => \"Rocca di Mezzo\",5821 => \"Rocca di Neto\",5822 => \"Rocca di Papa\",5823 => \"Rocca Grimalda\",5824 => \"Rocca Imperiale\",8115 => \"Rocca Imperiale Marina\",5825 => \"Rocca Massima\",5826 => \"Rocca Pia\",5827 => \"Rocca Pietore\",5828 => \"Rocca Priora\",5829 => \"Rocca San Casciano\",5830 => \"Rocca San Felice\",5831 => \"Rocca San Giovanni\",5832 => \"Rocca Santa Maria\",5833 => \"Rocca Santo Stefano\",5834 => \"Rocca Sinibalda\",5835 => \"Rocca Susella\",5836 => \"Roccabascerana\",5837 => \"Roccabernarda\",5838 => \"Roccabianca\",5839 => \"Roccabruna\",8535 => \"Roccacaramanico\",5840 => \"Roccacasale\",5841 => \"Roccadaspide\",5842 => \"Roccafiorita\",5843 => \"Roccafluvione\",5844 => \"Roccaforte del greco\",5845 => \"Roccaforte ligure\",5846 => \"Roccaforte mondovi'\",5847 => \"Roccaforzata\",5848 => \"Roccafranca\",5849 => \"Roccagiovine\",5850 => \"Roccagloriosa\",5851 => \"Roccagorga\",5852 => \"Roccalbegna\",5853 => \"Roccalumera\",5854 => \"Roccamandolfi\",5855 => \"Roccamena\",5856 => \"Roccamonfina\",5857 => \"Roccamontepiano\",5858 => \"Roccamorice\",8418 => \"Roccanova\",5860 => \"Roccantica\",5861 => \"Roccapalumba\",5862 => \"Roccapiemonte\",5863 => \"Roccarainola\",5864 => \"Roccaraso\",5865 => \"Roccaromana\",5866 => \"Roccascalegna\",5867 => \"Roccasecca\",5868 => \"Roccasecca dei volsci\",5869 => \"Roccasicura\",5870 => \"Roccasparvera\",5871 => \"Roccaspinalveti\",5872 => \"Roccastrada\",5873 => \"Roccavaldina\",5874 => \"Roccaverano\",5875 => \"Roccavignale\",5876 => \"Roccavione\",5877 => \"Roccavivara\",5878 => \"Roccella ionica\",5879 => \"Roccella valdemone\",5880 => \"Rocchetta a volturno\",5881 => \"Rocchetta belbo\",5882 => \"Rocchetta di vara\",5883 => \"Rocchetta e croce\",5884 => \"Rocchetta ligure\",5885 => \"Rocchetta nervina\",5886 => \"Rocchetta palafea\",5887 => \"Rocchetta sant'antonio\",5888 => \"Rocchetta tanaro\",5889 => \"Rodano\",5890 => \"Roddi\",5891 => \"Roddino\",5892 => \"Rodello\",5893 => \"Rodengo\",5894 => \"Rodengo-saiano\",5895 => \"Rodero\",5896 => \"Rodi garganico\",5897 => \"Rodi' milici\",5898 => \"Rodigo\",5899 => \"Roe' volciano\",5900 => \"Rofrano\",5901 => \"Rogeno\",5902 => \"Roggiano gravina\",5903 => \"Roghudi\",5904 => \"Rogliano\",5905 => \"Rognano\",5906 => \"Rogno\",5907 => \"Rogolo\",5908 => \"Roiate\",5909 => \"Roio del sangro\",5910 => \"Roisan\",5911 => \"Roletto\",5912 => \"Rolo\",5913 => \"Roma\",8545 => \"Roma Ciampino\",8499 => \"Roma Fiumicino\",5914 => \"Romagnano al monte\",5915 => \"Romagnano sesia\",5916 => \"Romagnese\",5917 => \"Romallo\",5918 => \"Romana\",5919 => \"Romanengo\",5920 => \"Romano canavese\",5921 => \"Romano d'ezzelino\",5922 => \"Romano di lombardia\",5923 => \"Romans d'isonzo\",5924 => \"Rombiolo\",5925 => \"Romeno\",5926 => \"Romentino\",5927 => \"Rometta\",5928 => \"Ronago\",5929 => \"Ronca'\",5930 => \"Roncade\",5931 => \"Roncadelle\",5932 => \"Roncaro\",5933 => \"Roncegno\",5934 => \"Roncello\",5935 => \"Ronchi dei legionari\",5936 => \"Ronchi valsugana\",5937 => \"Ronchis\",5938 => \"Ronciglione\",5939 => \"Ronco all'adige\",8231 => \"Ronco all`Adige\",5940 => \"Ronco biellese\",5941 => \"Ronco briantino\",5942 => \"Ronco canavese\",5943 => \"Ronco scrivia\",5944 => \"Roncobello\",5945 => \"Roncoferraro\",5946 => \"Roncofreddo\",5947 => \"Roncola\",5948 => \"Roncone\",5949 => \"Rondanina\",5950 => \"Rondissone\",5951 => \"Ronsecco\",5952 => \"Ronzo chienis\",5953 => \"Ronzone\",5954 => \"Roppolo\",5955 => \"Rora'\",5956 => \"Rosa'\",5957 => \"Rosarno\",5958 => \"Rosasco\",5959 => \"Rosate\",5960 => \"Rosazza\",5961 => \"Rosciano\",5962 => \"Roscigno\",5963 => \"Rose\",5964 => \"Rosello\",5965 => \"Roseto capo spulico\",8439 => \"Roseto casello\",5966 => \"Roseto degli abruzzi\",5967 => \"Roseto valfortore\",5968 => \"Rosignano marittimo\",5969 => \"Rosignano monferrato\",8195 => \"Rosignano Solvay\",5970 => \"Rosolina\",8744 => \"Rosolina mare\",5971 => \"Rosolini\",8704 => \"Rosone\",5972 => \"Rosora\",5973 => \"Rossa\",5974 => \"Rossana\",5975 => \"Rossano\",8109 => \"Rossano Calabro Marina\",5976 => \"Rossano veneto\",8431 => \"Rossera\",5977 => \"Rossiglione\",5978 => \"Rosta\",5979 => \"Rota d'imagna\",5980 => \"Rota greca\",5981 => \"Rotella\",5982 => \"Rotello\",8429 => \"Rotonda\",5984 => \"Rotondella\",5985 => \"Rotondi\",5986 => \"Rottofreno\",5987 => \"Rotzo\",5988 => \"Roure\",5989 => \"Rovagnate\",5990 => \"Rovasenda\",5991 => \"Rovato\",5992 => \"Rovegno\",5993 => \"Rovellasca\",5994 => \"Rovello porro\",5995 => \"Roverbella\",5996 => \"Roverchiara\",5997 => \"Rovere' della luna\",5998 => \"Rovere' veronese\",5999 => \"Roveredo di gua'\",6000 => \"Roveredo in piano\",6001 => \"Rovereto\",6002 => \"Rovescala\",6003 => \"Rovetta\",6004 => \"Roviano\",6005 => \"Rovigo\",6006 => \"Rovito\",6007 => \"Rovolon\",6008 => \"Rozzano\",6009 => \"Rubano\",6010 => \"Rubiana\",6011 => \"Rubiera\",8632 => \"Rucas\",6012 => \"Ruda\",6013 => \"Rudiano\",6014 => \"Rueglio\",6015 => \"Ruffano\",6016 => \"Ruffia\",6017 => \"Ruffre'\",6018 => \"Rufina\",6019 => \"Ruinas\",6020 => \"Ruino\",6021 => \"Rumo\",8366 => \"Ruoti\",6023 => \"Russi\",6024 => \"Rutigliano\",6025 => \"Rutino\",6026 => \"Ruviano\",8393 => \"Ruvo del monte\",6028 => \"Ruvo di Puglia\",6029 => \"Sabaudia\",6030 => \"Sabbia\",6031 => \"Sabbio chiese\",6032 => \"Sabbioneta\",6033 => \"Sacco\",6034 => \"Saccolongo\",6035 => \"Sacile\",8700 => \"Sacra di San Michele\",6036 => \"Sacrofano\",6037 => \"Sadali\",6038 => \"Sagama\",6039 => \"Sagliano micca\",6040 => \"Sagrado\",6041 => \"Sagron mis\",8602 => \"Saint Barthelemy\",6042 => \"Saint Christophe\",6043 => \"Saint Denis\",8304 => \"Saint Jacques\",6044 => \"Saint Marcel\",6045 => \"Saint Nicolas\",6046 => \"Saint Oyen Flassin\",6047 => \"Saint Pierre\",6048 => \"Saint Rhemy en Bosses\",6049 => \"Saint Vincent\",6050 => \"Sala Baganza\",6051 => \"Sala Biellese\",6052 => \"Sala Bolognese\",6053 => \"Sala Comacina\",6054 => \"Sala Consilina\",6055 => \"Sala Monferrato\",8372 => \"Salandra\",6057 => \"Salaparuta\",6058 => \"Salara\",6059 => \"Salasco\",6060 => \"Salassa\",6061 => \"Salbertrand\",6062 => \"Salcedo\",6063 => \"Salcito\",6064 => \"Sale\",6065 => \"Sale delle Langhe\",6066 => \"Sale Marasino\",6067 => \"Sale San Giovanni\",6068 => \"Salemi\",6069 => \"Salento\",6070 => \"Salerano Canavese\",6071 => \"Salerano sul Lambro\",6072 => \"Salerno\",6073 => \"Saletto\",6074 => \"Salgareda\",6075 => \"Sali Vercellese\",6076 => \"Salice Salentino\",6077 => \"Saliceto\",6078 => \"Salisano\",6079 => \"Salizzole\",6080 => \"Salle\",6081 => \"Salmour\",6082 => \"Salo'\",6083 => \"Salorno\",6084 => \"Salsomaggiore Terme\",6085 => \"Saltara\",6086 => \"Saltrio\",6087 => \"Saludecio\",6088 => \"Saluggia\",6089 => \"Salussola\",6090 => \"Saluzzo\",6091 => \"Salve\",6092 => \"Salvirola\",6093 => \"Salvitelle\",6094 => \"Salza di Pinerolo\",6095 => \"Salza Irpina\",6096 => \"Salzano\",6097 => \"Samarate\",6098 => \"Samassi\",6099 => \"Samatzai\",6100 => \"Sambuca di Sicilia\",6101 => \"Sambuca Pistoiese\",6102 => \"Sambuci\",6103 => \"Sambuco\",6104 => \"Sammichele di Bari\",6105 => \"Samo\",6106 => \"Samolaco\",6107 => \"Samone\",6108 => \"Samone\",6109 => \"Sampeyre\",6110 => \"Samugheo\",6111 => \"San Bartolomeo al Mare\",6112 => \"San Bartolomeo in Galdo\",6113 => \"San Bartolomeo Val Cavargna\",6114 => \"San Basile\",6115 => \"San Basilio\",6116 => \"San Bassano\",6117 => \"San Bellino\",6118 => \"San Benedetto Belbo\",6119 => \"San Benedetto dei Marsi\",6120 => \"San Benedetto del Tronto\",8126 => \"San Benedetto in Alpe\",6121 => \"San Benedetto in Perillis\",6122 => \"San Benedetto Po\",6123 => \"San Benedetto Ullano\",6124 => \"San Benedetto val di Sambro\",6125 => \"San Benigno Canavese\",8641 => \"San Bernardino\",6126 => \"San Bernardino Verbano\",6127 => \"San Biagio della Cima\",6128 => \"San Biagio di Callalta\",6129 => \"San Biagio Platani\",6130 => \"San Biagio Saracinisco\",6131 => \"San Biase\",6132 => \"San Bonifacio\",6133 => \"San Buono\",6134 => \"San Calogero\",6135 => \"San Candido\",6136 => \"San Canzian d'Isonzo\",6137 => \"San Carlo Canavese\",6138 => \"San Casciano dei Bagni\",6139 => \"San Casciano in Val di Pesa\",6140 => \"San Cassiano\",8624 => \"San Cassiano in Badia\",6141 => \"San Cataldo\",6142 => \"San Cesareo\",6143 => \"San Cesario di Lecce\",6144 => \"San Cesario sul Panaro\",8367 => \"San Chirico Nuovo\",6146 => \"San Chirico Raparo\",6147 => \"San Cipirello\",6148 => \"San Cipriano d'Aversa\",6149 => \"San Cipriano Picentino\",6150 => \"San Cipriano Po\",6151 => \"San Clemente\",6152 => \"San Colombano al Lambro\",6153 => \"San Colombano Belmonte\",6154 => \"San Colombano Certenoli\",8622 => \"San Colombano Valdidentro\",6155 => \"San Cono\",6156 => \"San Cosmo Albanese\",8376 => \"San Costantino Albanese\",6158 => \"San Costantino Calabro\",6159 => \"San Costanzo\",6160 => \"San Cristoforo\",6161 => \"San Damiano al Colle\",6162 => \"San Damiano d'Asti\",6163 => \"San Damiano Macra\",6164 => \"San Daniele del Friuli\",6165 => \"San Daniele Po\",6166 => \"San Demetrio Corone\",6167 => \"San Demetrio ne' Vestini\",6168 => \"San Didero\",8556 => \"San Domenico di Varzo\",6169 => \"San Dona' di Piave\",6170 => \"San Donaci\",6171 => \"San Donato di Lecce\",6172 => \"San Donato di Ninea\",6173 => \"San Donato Milanese\",6174 => \"San Donato Val di Comino\",6175 => \"San Dorligo della Valle\",6176 => \"San Fedele Intelvi\",6177 => \"San Fele\",6178 => \"San Felice a Cancello\",6179 => \"San Felice Circeo\",6180 => \"San Felice del Benaco\",6181 => \"San Felice del Molise\",6182 => \"San Felice sul Panaro\",6183 => \"San Ferdinando\",6184 => \"San Ferdinando di Puglia\",6185 => \"San Fermo della Battaglia\",6186 => \"San Fili\",6187 => \"San Filippo del mela\",6188 => \"San Fior\",6189 => \"San Fiorano\",6190 => \"San Floriano del collio\",6191 => \"San Floro\",6192 => \"San Francesco al campo\",6193 => \"San Fratello\",8690 => \"San Galgano\",6194 => \"San Gavino monreale\",6195 => \"San Gemini\",6196 => \"San Genesio Atesino\",6197 => \"San Genesio ed uniti\",6198 => \"San Gennaro vesuviano\",6199 => \"San Germano chisone\",6200 => \"San Germano dei berici\",6201 => \"San Germano vercellese\",6202 => \"San Gervasio bresciano\",6203 => \"San Giacomo degli schiavoni\",6204 => \"San Giacomo delle segnate\",8620 => \"San Giacomo di Roburent\",6205 => \"San Giacomo filippo\",6206 => \"San Giacomo vercellese\",6207 => \"San Gillio\",6208 => \"San Gimignano\",6209 => \"San Ginesio\",6210 => \"San Giorgio a cremano\",6211 => \"San Giorgio a liri\",6212 => \"San Giorgio albanese\",6213 => \"San Giorgio canavese\",6214 => \"San Giorgio del sannio\",6215 => \"San Giorgio della richinvelda\",6216 => \"San Giorgio delle Pertiche\",6217 => \"San Giorgio di lomellina\",6218 => \"San Giorgio di mantova\",6219 => \"San Giorgio di nogaro\",6220 => \"San Giorgio di pesaro\",6221 => \"San Giorgio di piano\",6222 => \"San Giorgio in bosco\",6223 => \"San Giorgio ionico\",6224 => \"San Giorgio la molara\",6225 => \"San Giorgio lucano\",6226 => \"San Giorgio monferrato\",6227 => \"San Giorgio morgeto\",6228 => \"San Giorgio piacentino\",6229 => \"San Giorgio scarampi\",6230 => \"San Giorgio su Legnano\",6231 => \"San Giorio di susa\",6232 => \"San Giovanni a piro\",6233 => \"San Giovanni al natisone\",6234 => \"San Giovanni bianco\",6235 => \"San Giovanni d'asso\",6236 => \"San Giovanni del dosso\",6237 => \"San Giovanni di gerace\",6238 => \"San Giovanni gemini\",6239 => \"San Giovanni ilarione\",6240 => \"San Giovanni in croce\",6241 => \"San Giovanni in fiore\",6242 => \"San Giovanni in galdo\",6243 => \"San Giovanni in marignano\",6244 => \"San Giovanni in persiceto\",8567 => \"San Giovanni in val Aurina\",6245 => \"San Giovanni incarico\",6246 => \"San Giovanni la punta\",6247 => \"San Giovanni lipioni\",6248 => \"San Giovanni lupatoto\",6249 => \"San Giovanni rotondo\",6250 => \"San Giovanni suergiu\",6251 => \"San Giovanni teatino\",6252 => \"San Giovanni valdarno\",6253 => \"San Giuliano del sannio\",6254 => \"San Giuliano di Puglia\",6255 => \"San Giuliano milanese\",6256 => \"San Giuliano terme\",6257 => \"San Giuseppe jato\",6258 => \"San Giuseppe vesuviano\",6259 => \"San Giustino\",6260 => \"San Giusto canavese\",6261 => \"San Godenzo\",6262 => \"San Gregorio d'ippona\",6263 => \"San Gregorio da sassola\",6264 => \"San Gregorio di Catania\",6265 => \"San Gregorio Magno\",6266 => \"San Gregorio Matese\",6267 => \"San Gregorio nelle Alpi\",6268 => \"San Lazzaro di Savena\",6269 => \"San Leo\",6270 => \"San Leonardo\",6271 => \"San Leonardo in Passiria\",8580 => \"San Leone\",6272 => \"San Leucio del Sannio\",6273 => \"San Lorenzello\",6274 => \"San Lorenzo\",6275 => \"San Lorenzo al mare\",6276 => \"San Lorenzo Bellizzi\",6277 => \"San Lorenzo del vallo\",6278 => \"San Lorenzo di Sebato\",6279 => \"San Lorenzo in Banale\",6280 => \"San Lorenzo in campo\",6281 => \"San Lorenzo isontino\",6282 => \"San Lorenzo Maggiore\",6283 => \"San Lorenzo Nuovo\",6284 => \"San Luca\",6285 => \"San Lucido\",6286 => \"San Lupo\",6287 => \"San Mango d'Aquino\",6288 => \"San Mango Piemonte\",6289 => \"San Mango sul Calore\",6290 => \"San Marcellino\",6291 => \"San Marcello\",6292 => \"San Marcello pistoiese\",6293 => \"San Marco argentano\",6294 => \"San Marco d'Alunzio\",6295 => \"San Marco dei Cavoti\",6296 => \"San Marco Evangelista\",6297 => \"San Marco in Lamis\",6298 => \"San Marco la Catola\",8152 => \"San Marino\",6299 => \"San Martino al Tagliamento\",6300 => \"San Martino Alfieri\",6301 => \"San Martino Buon Albergo\",6302 => \"San Martino Canavese\",6303 => \"San Martino d'Agri\",6304 => \"San Martino dall'argine\",6305 => \"San Martino del lago\",8209 => \"San Martino di Castrozza\",6306 => \"San Martino di Finita\",6307 => \"San Martino di Lupari\",6308 => \"San Martino di venezze\",8410 => \"San Martino d`agri\",6309 => \"San Martino in Badia\",6310 => \"San Martino in Passiria\",6311 => \"San Martino in pensilis\",6312 => \"San Martino in rio\",6313 => \"San Martino in strada\",6314 => \"San Martino sannita\",6315 => \"San Martino siccomario\",6316 => \"San Martino sulla marrucina\",6317 => \"San Martino valle caudina\",6318 => \"San Marzano di San Giuseppe\",6319 => \"San Marzano oliveto\",6320 => \"San Marzano sul Sarno\",6321 => \"San Massimo\",6322 => \"San Maurizio canavese\",6323 => \"San Maurizio d'opaglio\",6324 => \"San Mauro castelverde\",6325 => \"San Mauro cilento\",6326 => \"San Mauro di saline\",8427 => \"San Mauro forte\",6328 => \"San Mauro la bruca\",6329 => \"San Mauro marchesato\",6330 => \"San Mauro Pascoli\",6331 => \"San Mauro torinese\",6332 => \"San Michele al Tagliamento\",6333 => \"San Michele all'Adige\",6334 => \"San Michele di ganzaria\",6335 => \"San Michele di serino\",6336 => \"San Michele Mondovi'\",6337 => \"San Michele salentino\",6338 => \"San Miniato\",6339 => \"San Nazario\",6340 => \"San Nazzaro\",6341 => \"San Nazzaro Sesia\",6342 => \"San Nazzaro val cavargna\",6343 => \"San Nicola arcella\",6344 => \"San Nicola baronia\",6345 => \"San Nicola da crissa\",6346 => \"San Nicola dell'alto\",6347 => \"San Nicola la strada\",6348 => \"San nicola manfredi\",6349 => \"San nicolo' d'arcidano\",6350 => \"San nicolo' di comelico\",6351 => \"San Nicolo' Gerrei\",6352 => \"San Pancrazio\",6353 => \"San Pancrazio salentino\",6354 => \"San Paolo\",8361 => \"San Paolo albanese\",6356 => \"San Paolo bel sito\",6357 => \"San Paolo cervo\",6358 => \"San Paolo d'argon\",6359 => \"San Paolo di civitate\",6360 => \"San Paolo di Jesi\",6361 => \"San Paolo solbrito\",6362 => \"San Pellegrino terme\",6363 => \"San Pier d'isonzo\",6364 => \"San Pier niceto\",6365 => \"San Piero a sieve\",6366 => \"San Piero Patti\",6367 => \"San Pietro a maida\",6368 => \"San Pietro al Natisone\",6369 => \"San Pietro al Tanagro\",6370 => \"San Pietro apostolo\",6371 => \"San Pietro avellana\",6372 => \"San Pietro clarenza\",6373 => \"San Pietro di cadore\",6374 => \"San Pietro di carida'\",6375 => \"San Pietro di feletto\",6376 => \"San Pietro di morubio\",6377 => \"San Pietro in Amantea\",6378 => \"San Pietro in cariano\",6379 => \"San Pietro in casale\",6380 => \"San Pietro in cerro\",6381 => \"San Pietro in gu\",6382 => \"San Pietro in guarano\",6383 => \"San Pietro in lama\",6384 => \"San Pietro infine\",6385 => \"San Pietro mosezzo\",6386 => \"San Pietro mussolino\",6387 => \"San Pietro val lemina\",6388 => \"San Pietro vernotico\",6389 => \"San Pietro Viminario\",6390 => \"San Pio delle camere\",6391 => \"San Polo d'enza\",6392 => \"San Polo dei cavalieri\",6393 => \"San Polo di Piave\",6394 => \"San Polo matese\",6395 => \"San Ponso\",6396 => \"San Possidonio\",6397 => \"San Potito sannitico\",6398 => \"San Potito ultra\",6399 => \"San Prisco\",6400 => \"San Procopio\",6401 => \"San Prospero\",6402 => \"San Quirico d'orcia\",8199 => \"San Quirico d`Orcia\",6403 => \"San Quirino\",6404 => \"San Raffaele cimena\",6405 => \"San Roberto\",6406 => \"San Rocco al porto\",6407 => \"San Romano in garfagnana\",6408 => \"San Rufo\",6409 => \"San Salvatore di fitalia\",6410 => \"San Salvatore Monferrato\",6411 => \"San Salvatore Telesino\",6412 => \"San Salvo\",8103 => \"San Salvo Marina\",6413 => \"San Sebastiano al Vesuvio\",6414 => \"San Sebastiano Curone\",6415 => \"San Sebastiano da Po\",6416 => \"San Secondo di Pinerolo\",6417 => \"San Secondo Parmense\",6418 => \"San Severino Lucano\",6419 => \"San Severino Marche\",6420 => \"San Severo\",8347 => \"San Sicario di Cesana\",8289 => \"San Simone\",8539 => \"San Simone Baita del Camoscio\",6421 => \"San Siro\",6422 => \"San Sossio Baronia\",6423 => \"San Sostene\",6424 => \"San Sosti\",6425 => \"San Sperate\",6426 => \"San Tammaro\",6427 => \"San Teodoro\",8170 => \"San Teodoro\",6429 => \"San Tomaso agordino\",8212 => \"San Valentino alla Muta\",6430 => \"San Valentino in abruzzo citeriore\",6431 => \"San Valentino torio\",6432 => \"San Venanzo\",6433 => \"San Vendemiano\",6434 => \"San Vero milis\",6435 => \"San Vincenzo\",6436 => \"San Vincenzo la costa\",6437 => \"San Vincenzo valle roveto\",6438 => \"San Vitaliano\",8293 => \"San Vito\",6440 => \"San Vito al tagliamento\",6441 => \"San Vito al torre\",6442 => \"San Vito chietino\",6443 => \"San Vito dei normanni\",6444 => \"San Vito di cadore\",6445 => \"San Vito di fagagna\",6446 => \"San Vito di leguzzano\",6447 => \"San Vito lo capo\",6448 => \"San Vito romano\",6449 => \"San Vito sullo ionio\",6450 => \"San Vittore del lazio\",6451 => \"San Vittore Olona\",6452 => \"San Zeno di montagna\",6453 => \"San Zeno naviglio\",6454 => \"San Zenone al lambro\",6455 => \"San Zenone al po\",6456 => \"San Zenone degli ezzelini\",6457 => \"Sanarica\",6458 => \"Sandigliano\",6459 => \"Sandrigo\",6460 => \"Sanfre'\",6461 => \"Sanfront\",6462 => \"Sangano\",6463 => \"Sangiano\",6464 => \"Sangineto\",6465 => \"Sanguinetto\",6466 => \"Sanluri\",6467 => \"Sannazzaro de' Burgondi\",6468 => \"Sannicandro di bari\",6469 => \"Sannicandro garganico\",6470 => \"Sannicola\",6471 => \"Sanremo\",6472 => \"Sansepolcro\",6473 => \"Sant'Agapito\",6474 => \"Sant'Agata bolognese\",6475 => \"Sant'Agata de' goti\",6476 => \"Sant'Agata del bianco\",6477 => \"Sant'Agata di esaro\",6478 => \"Sant'Agata di Militello\",6479 => \"Sant'Agata di Puglia\",6480 => \"Sant'Agata feltria\",6481 => \"Sant'Agata fossili\",6482 => \"Sant'Agata li battiati\",6483 => \"Sant'Agata sul Santerno\",6484 => \"Sant'Agnello\",6485 => \"Sant'Agostino\",6486 => \"Sant'Albano stura\",6487 => \"Sant'Alessio con vialone\",6488 => \"Sant'Alessio in aspromonte\",6489 => \"Sant'Alessio siculo\",6490 => \"Sant'Alfio\",6491 => \"Sant'Ambrogio di Torino\",6492 => \"Sant'Ambrogio di valpolicella\",6493 => \"Sant'Ambrogio sul garigliano\",6494 => \"Sant'Anastasia\",6495 => \"Sant'Anatolia di narco\",6496 => \"Sant'Andrea apostolo dello ionio\",6497 => \"Sant'Andrea del garigliano\",6498 => \"Sant'Andrea di conza\",6499 => \"Sant'Andrea Frius\",8763 => \"Sant'Andrea in Monte\",6500 => \"Sant'Angelo a cupolo\",6501 => \"Sant'Angelo a fasanella\",6502 => \"Sant'Angelo a scala\",6503 => \"Sant'Angelo all'esca\",6504 => \"Sant'Angelo d'alife\",6505 => \"Sant'Angelo dei lombardi\",6506 => \"Sant'Angelo del pesco\",6507 => \"Sant'Angelo di brolo\",6508 => \"Sant'Angelo di Piove di Sacco\",6509 => \"Sant'Angelo in lizzola\",6510 => \"Sant'Angelo in pontano\",6511 => \"Sant'Angelo in vado\",6512 => \"Sant'Angelo le fratte\",6513 => \"Sant'Angelo limosano\",6514 => \"Sant'Angelo lodigiano\",6515 => \"Sant'Angelo lomellina\",6516 => \"Sant'Angelo muxaro\",6517 => \"Sant'Angelo romano\",6518 => \"Sant'Anna Arresi\",6519 => \"Sant'Anna d'Alfaedo\",8730 => \"Sant'Anna di Valdieri\",8698 => \"Sant'Anna di Vinadio\",8563 => \"Sant'Anna Pelago\",6520 => \"Sant'Antimo\",6521 => \"Sant'Antioco\",6522 => \"Sant'Antonino di Susa\",6523 => \"Sant'Antonio Abate\",6524 => \"Sant'Antonio di gallura\",6525 => \"Sant'Apollinare\",6526 => \"Sant'Arcangelo\",6527 => \"Sant'Arcangelo trimonte\",6528 => \"Sant'Arpino\",6529 => \"Sant'Arsenio\",6530 => \"Sant'Egidio alla vibrata\",6531 => \"Sant'Egidio del monte Albino\",6532 => \"Sant'Elena\",6533 => \"Sant'Elena sannita\",6534 => \"Sant'Elia a pianisi\",6535 => \"Sant'Elia fiumerapido\",6536 => \"Sant'Elpidio a mare\",6537 => \"Sant'Eufemia a maiella\",6538 => \"Sant'Eufemia d'Aspromonte\",6539 => \"Sant'Eusanio del Sangro\",6540 => \"Sant'Eusanio forconese\",6541 => \"Sant'Ilario d'Enza\",6542 => \"Sant'Ilario dello Ionio\",6543 => \"Sant'Ippolito\",6544 => \"Sant'Olcese\",6545 => \"Sant'Omero\",6546 => \"Sant'Omobono imagna\",6547 => \"Sant'Onofrio\",6548 => \"Sant'Oreste\",6549 => \"Sant'Orsola terme\",6550 => \"Sant'Urbano\",6551 => \"Santa Brigida\",6552 => \"Santa Caterina albanese\",6553 => \"Santa Caterina dello ionio\",8144 => \"Santa Caterina Valfurva\",6554 => \"Santa Caterina villarmosa\",6555 => \"Santa Cesarea terme\",6556 => \"Santa Cristina d'Aspromonte\",6557 => \"Santa Cristina e Bissone\",6558 => \"Santa Cristina gela\",6559 => \"Santa Cristina Valgardena\",6560 => \"Santa Croce camerina\",6561 => \"Santa Croce del sannio\",6562 => \"Santa Croce di Magliano\",6563 => \"Santa Croce sull'Arno\",6564 => \"Santa Domenica talao\",6565 => \"Santa Domenica Vittoria\",6566 => \"Santa Elisabetta\",6567 => \"Santa Fiora\",6568 => \"Santa Flavia\",6569 => \"Santa Giuletta\",6570 => \"Santa Giusta\",6571 => \"Santa Giustina\",6572 => \"Santa Giustina in Colle\",6573 => \"Santa Luce\",6574 => \"Santa Lucia del Mela\",6575 => \"Santa Lucia di Piave\",6576 => \"Santa Lucia di serino\",6577 => \"Santa Margherita d'adige\",6578 => \"Santa Margherita di belice\",6579 => \"Santa Margherita di staffora\",8285 => \"Santa Margherita Ligure\",6581 => \"Santa Maria a monte\",6582 => \"Santa Maria a vico\",6583 => \"Santa Maria Capua Vetere\",6584 => \"Santa Maria coghinas\",6585 => \"Santa Maria del cedro\",6586 => \"Santa Maria del Molise\",6587 => \"Santa Maria della Versa\",8122 => \"Santa Maria di Castellabate\",6588 => \"Santa Maria di Licodia\",6589 => \"Santa Maria di sala\",6590 => \"Santa Maria Hoe'\",6591 => \"Santa Maria imbaro\",6592 => \"Santa Maria la carita'\",6593 => \"Santa Maria la fossa\",6594 => \"Santa Maria la longa\",6595 => \"Santa Maria Maggiore\",6596 => \"Santa Maria Nuova\",6597 => \"Santa Marina\",6598 => \"Santa Marina salina\",6599 => \"Santa Marinella\",6600 => \"Santa Ninfa\",6601 => \"Santa Paolina\",6602 => \"Santa Severina\",6603 => \"Santa Sofia\",6604 => \"Santa Sofia d'Epiro\",6605 => \"Santa Teresa di Riva\",6606 => \"Santa Teresa gallura\",6607 => \"Santa Venerina\",6608 => \"Santa Vittoria d'Alba\",6609 => \"Santa Vittoria in matenano\",6610 => \"Santadi\",6611 => \"Santarcangelo di Romagna\",6612 => \"Sante marie\",6613 => \"Santena\",6614 => \"Santeramo in colle\",6615 => \"Santhia'\",6616 => \"Santi Cosma e Damiano\",6617 => \"Santo Stefano al mare\",6618 => \"Santo Stefano Belbo\",6619 => \"Santo Stefano d'Aveto\",6620 => \"Santo Stefano del sole\",6621 => \"Santo Stefano di Cadore\",6622 => \"Santo Stefano di Camastra\",6623 => \"Santo Stefano di Magra\",6624 => \"Santo Stefano di Rogliano\",6625 => \"Santo Stefano di Sessanio\",6626 => \"Santo Stefano in Aspromonte\",6627 => \"Santo Stefano lodigiano\",6628 => \"Santo Stefano quisquina\",6629 => \"Santo Stefano roero\",6630 => \"Santo Stefano Ticino\",6631 => \"Santo Stino di Livenza\",6632 => \"Santomenna\",6633 => \"Santopadre\",6634 => \"Santorso\",6635 => \"Santu Lussurgiu\",8419 => \"Sant`Angelo le fratte\",6636 => \"Sanza\",6637 => \"Sanzeno\",6638 => \"Saonara\",6639 => \"Saponara\",6640 => \"Sappada\",6641 => \"Sapri\",6642 => \"Saracena\",6643 => \"Saracinesco\",6644 => \"Sarcedo\",8377 => \"Sarconi\",6646 => \"Sardara\",6647 => \"Sardigliano\",6648 => \"Sarego\",6649 => \"Sarentino\",6650 => \"Sarezzano\",6651 => \"Sarezzo\",6652 => \"Sarmato\",6653 => \"Sarmede\",6654 => \"Sarnano\",6655 => \"Sarnico\",6656 => \"Sarno\",6657 => \"Sarnonico\",6658 => \"Saronno\",6659 => \"Sarre\",6660 => \"Sarroch\",6661 => \"Sarsina\",6662 => \"Sarteano\",6663 => \"Sartirana lomellina\",6664 => \"Sarule\",6665 => \"Sarzana\",6666 => \"Sassano\",6667 => \"Sassari\",6668 => \"Sassello\",6669 => \"Sassetta\",6670 => \"Sassinoro\",8387 => \"Sasso di castalda\",6672 => \"Sasso marconi\",6673 => \"Sassocorvaro\",6674 => \"Sassofeltrio\",6675 => \"Sassoferrato\",8656 => \"Sassotetto\",6676 => \"Sassuolo\",6677 => \"Satriano\",8420 => \"Satriano di Lucania\",6679 => \"Sauris\",6680 => \"Sauze d'Oulx\",6681 => \"Sauze di Cesana\",6682 => \"Sava\",6683 => \"Savelli\",6684 => \"Saviano\",6685 => \"Savigliano\",6686 => \"Savignano irpino\",6687 => \"Savignano sul Panaro\",6688 => \"Savignano sul Rubicone\",6689 => \"Savigno\",6690 => \"Savignone\",6691 => \"Saviore dell'Adamello\",6692 => \"Savoca\",6693 => \"Savogna\",6694 => \"Savogna d'Isonzo\",8411 => \"Savoia di Lucania\",6696 => \"Savona\",6697 => \"Scafa\",6698 => \"Scafati\",6699 => \"Scagnello\",6700 => \"Scala\",6701 => \"Scala coeli\",6702 => \"Scaldasole\",6703 => \"Scalea\",6704 => \"Scalenghe\",6705 => \"Scaletta Zanclea\",6706 => \"Scampitella\",6707 => \"Scandale\",6708 => \"Scandiano\",6709 => \"Scandicci\",6710 => \"Scandolara ravara\",6711 => \"Scandolara ripa d'Oglio\",6712 => \"Scandriglia\",6713 => \"Scanno\",6714 => \"Scano di montiferro\",6715 => \"Scansano\",6716 => \"Scanzano jonico\",6717 => \"Scanzorosciate\",6718 => \"Scapoli\",8120 => \"Scario\",6719 => \"Scarlino\",6720 => \"Scarmagno\",6721 => \"Scarnafigi\",6722 => \"Scarperia\",8139 => \"Scauri\",6723 => \"Scena\",6724 => \"Scerni\",6725 => \"Scheggia e pascelupo\",6726 => \"Scheggino\",6727 => \"Schiavi di Abruzzo\",6728 => \"Schiavon\",8456 => \"Schiavonea di Corigliano\",6729 => \"Schignano\",6730 => \"Schilpario\",6731 => \"Schio\",6732 => \"Schivenoglia\",6733 => \"Sciacca\",6734 => \"Sciara\",6735 => \"Scicli\",6736 => \"Scido\",6737 => \"Scigliano\",6738 => \"Scilla\",6739 => \"Scillato\",6740 => \"Sciolze\",6741 => \"Scisciano\",6742 => \"Sclafani bagni\",6743 => \"Scontrone\",6744 => \"Scopa\",6745 => \"Scopello\",6746 => \"Scoppito\",6747 => \"Scordia\",6748 => \"Scorrano\",6749 => \"Scorze'\",6750 => \"Scurcola marsicana\",6751 => \"Scurelle\",6752 => \"Scurzolengo\",6753 => \"Seborga\",6754 => \"Secinaro\",6755 => \"Secli'\",8336 => \"Secondino\",6756 => \"Secugnago\",6757 => \"Sedegliano\",6758 => \"Sedico\",6759 => \"Sedilo\",6760 => \"Sedini\",6761 => \"Sedriano\",6762 => \"Sedrina\",6763 => \"Sefro\",6764 => \"Segariu\",8714 => \"Segesta\",6765 => \"Seggiano\",6766 => \"Segni\",6767 => \"Segonzano\",6768 => \"Segrate\",6769 => \"Segusino\",6770 => \"Selargius\",6771 => \"Selci\",6772 => \"Selegas\",8715 => \"Selinunte\",8130 => \"Sella Nevea\",6773 => \"Sellano\",8651 => \"Sellata Arioso\",6774 => \"Sellero\",8238 => \"Selletta\",6775 => \"Sellia\",6776 => \"Sellia marina\",6777 => \"Selva dei Molini\",6778 => \"Selva di Cadore\",6779 => \"Selva di Progno\",6780 => \"Selva di Val Gardena\",6781 => \"Selvazzano dentro\",6782 => \"Selve marcone\",6783 => \"Selvino\",6784 => \"Semestene\",6785 => \"Semiana\",6786 => \"Seminara\",6787 => \"Semproniano\",6788 => \"Senago\",6789 => \"Senale San Felice\",6790 => \"Senales\",6791 => \"Seneghe\",6792 => \"Senerchia\",6793 => \"Seniga\",6794 => \"Senigallia\",6795 => \"Senis\",6796 => \"Senise\",6797 => \"Senna comasco\",6798 => \"Senna lodigiana\",6799 => \"Sennariolo\",6800 => \"Sennori\",6801 => \"Senorbi'\",6802 => \"Sepino\",6803 => \"Seppiana\",6804 => \"Sequals\",6805 => \"Seravezza\",6806 => \"Serdiana\",6807 => \"Seregno\",6808 => \"Seren del grappa\",6809 => \"Sergnano\",6810 => \"Seriate\",6811 => \"Serina\",6812 => \"Serino\",6813 => \"Serle\",6814 => \"Sermide\",6815 => \"Sermoneta\",6816 => \"Sernaglia della Battaglia\",6817 => \"Sernio\",6818 => \"Serole\",6819 => \"Serra d'aiello\",6820 => \"Serra de'conti\",6821 => \"Serra pedace\",6822 => \"Serra ricco'\",6823 => \"Serra San Bruno\",6824 => \"Serra San Quirico\",6825 => \"Serra Sant'Abbondio\",6826 => \"Serracapriola\",6827 => \"Serradifalco\",6828 => \"Serralunga d'Alba\",6829 => \"Serralunga di Crea\",6830 => \"Serramanna\",6831 => \"Serramazzoni\",6832 => \"Serramezzana\",6833 => \"Serramonacesca\",6834 => \"Serrapetrona\",6835 => \"Serrara fontana\",6836 => \"Serrastretta\",6837 => \"Serrata\",6838 => \"Serravalle a po\",6839 => \"Serravalle di chienti\",6840 => \"Serravalle langhe\",6841 => \"Serravalle pistoiese\",6842 => \"Serravalle Scrivia\",6843 => \"Serravalle Sesia\",6844 => \"Serre\",6845 => \"Serrenti\",6846 => \"Serri\",6847 => \"Serrone\",6848 => \"Serrungarina\",6849 => \"Sersale\",6850 => \"Servigliano\",6851 => \"Sessa aurunca\",6852 => \"Sessa cilento\",6853 => \"Sessame\",6854 => \"Sessano del Molise\",6855 => \"Sesta godano\",6856 => \"Sestino\",6857 => \"Sesto\",6858 => \"Sesto al reghena\",6859 => \"Sesto calende\",8709 => \"Sesto Calende Alta\",6860 => \"Sesto campano\",6861 => \"Sesto ed Uniti\",6862 => \"Sesto fiorentino\",6863 => \"Sesto San Giovanni\",6864 => \"Sestola\",6865 => \"Sestri levante\",6866 => \"Sestriere\",6867 => \"Sestu\",6868 => \"Settala\",8316 => \"Settebagni\",6869 => \"Settefrati\",6870 => \"Settime\",6871 => \"Settimo milanese\",6872 => \"Settimo rottaro\",6873 => \"Settimo San Pietro\",6874 => \"Settimo torinese\",6875 => \"Settimo vittone\",6876 => \"Settingiano\",6877 => \"Setzu\",6878 => \"Seui\",6879 => \"Seulo\",6880 => \"Seveso\",6881 => \"Sezzadio\",6882 => \"Sezze\",6883 => \"Sfruz\",6884 => \"Sgonico\",6885 => \"Sgurgola\",6886 => \"Siamaggiore\",6887 => \"Siamanna\",6888 => \"Siano\",6889 => \"Siapiccia\",8114 => \"Sibari\",6890 => \"Sicignano degli Alburni\",6891 => \"Siculiana\",6892 => \"Siddi\",6893 => \"Siderno\",6894 => \"Siena\",6895 => \"Sigillo\",6896 => \"Signa\",8603 => \"Sigonella\",6897 => \"Silandro\",6898 => \"Silanus\",6899 => \"Silea\",6900 => \"Siligo\",6901 => \"Siliqua\",6902 => \"Silius\",6903 => \"Sillano\",6904 => \"Sillavengo\",6905 => \"Silvano d'orba\",6906 => \"Silvano pietra\",6907 => \"Silvi\",6908 => \"Simala\",6909 => \"Simaxis\",6910 => \"Simbario\",6911 => \"Simeri crichi\",6912 => \"Sinagra\",6913 => \"Sinalunga\",6914 => \"Sindia\",6915 => \"Sini\",6916 => \"Sinio\",6917 => \"Siniscola\",6918 => \"Sinnai\",6919 => \"Sinopoli\",6920 => \"Siracusa\",6921 => \"Sirignano\",6922 => \"Siris\",6923 => \"Sirmione\",8457 => \"Sirolo\",6925 => \"Sirone\",6926 => \"Siror\",6927 => \"Sirtori\",6928 => \"Sissa\",8492 => \"Sistiana\",6929 => \"Siurgus donigala\",6930 => \"Siziano\",6931 => \"Sizzano\",8258 => \"Ski center Latemar\",6932 => \"Sluderno\",6933 => \"Smarano\",6934 => \"Smerillo\",6935 => \"Soave\",8341 => \"Sobretta Vallalpe\",6936 => \"Socchieve\",6937 => \"Soddi\",6938 => \"Sogliano al rubicone\",6939 => \"Sogliano Cavour\",6940 => \"Soglio\",6941 => \"Soiano del lago\",6942 => \"Solagna\",6943 => \"Solarino\",6944 => \"Solaro\",6945 => \"Solarolo\",6946 => \"Solarolo Rainerio\",6947 => \"Solarussa\",6948 => \"Solbiate\",6949 => \"Solbiate Arno\",6950 => \"Solbiate Olona\",8307 => \"Solda\",6951 => \"Soldano\",6952 => \"Soleminis\",6953 => \"Solero\",6954 => \"Solesino\",6955 => \"Soleto\",6956 => \"Solferino\",6957 => \"Soliera\",6958 => \"Solignano\",6959 => \"Solofra\",6960 => \"Solonghello\",6961 => \"Solopaca\",6962 => \"Solto collina\",6963 => \"Solza\",6964 => \"Somaglia\",6965 => \"Somano\",6966 => \"Somma lombardo\",6967 => \"Somma vesuviana\",6968 => \"Sommacampagna\",6969 => \"Sommariva del bosco\",6970 => \"Sommariva Perno\",6971 => \"Sommatino\",6972 => \"Sommo\",6973 => \"Sona\",6974 => \"Soncino\",6975 => \"Sondalo\",6976 => \"Sondrio\",6977 => \"Songavazzo\",6978 => \"Sonico\",6979 => \"Sonnino\",6980 => \"Soprana\",6981 => \"Sora\",6982 => \"Soraga\",6983 => \"Soragna\",6984 => \"Sorano\",6985 => \"Sorbo San Basile\",6986 => \"Sorbo Serpico\",6987 => \"Sorbolo\",6988 => \"Sordevolo\",6989 => \"Sordio\",6990 => \"Soresina\",6991 => \"Sorga'\",6992 => \"Sorgono\",6993 => \"Sori\",6994 => \"Sorianello\",6995 => \"Soriano calabro\",6996 => \"Soriano nel cimino\",6997 => \"Sorico\",6998 => \"Soriso\",6999 => \"Sorisole\",7000 => \"Sormano\",7001 => \"Sorradile\",7002 => \"Sorrento\",7003 => \"Sorso\",7004 => \"Sortino\",7005 => \"Sospiro\",7006 => \"Sospirolo\",7007 => \"Sossano\",7008 => \"Sostegno\",7009 => \"Sotto il monte Giovanni XXIII\",8747 => \"Sottomarina\",7010 => \"Sover\",7011 => \"Soverato\",7012 => \"Sovere\",7013 => \"Soveria mannelli\",7014 => \"Soveria simeri\",7015 => \"Soverzene\",7016 => \"Sovicille\",7017 => \"Sovico\",7018 => \"Sovizzo\",7019 => \"Sovramonte\",7020 => \"Sozzago\",7021 => \"Spadafora\",7022 => \"Spadola\",7023 => \"Sparanise\",7024 => \"Sparone\",7025 => \"Specchia\",7026 => \"Spello\",8585 => \"Spelonga\",7027 => \"Spera\",7028 => \"Sperlinga\",7029 => \"Sperlonga\",7030 => \"Sperone\",7031 => \"Spessa\",7032 => \"Spezzano albanese\",7033 => \"Spezzano della Sila\",7034 => \"Spezzano piccolo\",7035 => \"Spiazzo\",7036 => \"Spigno monferrato\",7037 => \"Spigno saturnia\",7038 => \"Spilamberto\",7039 => \"Spilimbergo\",7040 => \"Spilinga\",7041 => \"Spinadesco\",7042 => \"Spinazzola\",7043 => \"Spinea\",7044 => \"Spineda\",7045 => \"Spinete\",7046 => \"Spineto Scrivia\",7047 => \"Spinetoli\",7048 => \"Spino d'Adda\",7049 => \"Spinone al lago\",8421 => \"Spinoso\",7051 => \"Spirano\",7052 => \"Spoleto\",7053 => \"Spoltore\",7054 => \"Spongano\",7055 => \"Spormaggiore\",7056 => \"Sporminore\",7057 => \"Spotorno\",7058 => \"Spresiano\",7059 => \"Spriana\",7060 => \"Squillace\",7061 => \"Squinzano\",8248 => \"Staffal\",7062 => \"Staffolo\",7063 => \"Stagno lombardo\",7064 => \"Staiti\",7065 => \"Staletti\",7066 => \"Stanghella\",7067 => \"Staranzano\",7068 => \"Statte\",7069 => \"Stazzano\",7070 => \"Stazzema\",7071 => \"Stazzona\",7072 => \"Stefanaconi\",7073 => \"Stella\",7074 => \"Stella cilento\",7075 => \"Stellanello\",7076 => \"Stelvio\",7077 => \"Stenico\",7078 => \"Sternatia\",7079 => \"Stezzano\",7080 => \"Stia\",7081 => \"Stienta\",7082 => \"Stigliano\",7083 => \"Stignano\",7084 => \"Stilo\",7085 => \"Stimigliano\",7086 => \"Stintino\",7087 => \"Stio\",7088 => \"Stornara\",7089 => \"Stornarella\",7090 => \"Storo\",7091 => \"Stra\",7092 => \"Stradella\",7093 => \"Strambinello\",7094 => \"Strambino\",7095 => \"Strangolagalli\",7096 => \"Stregna\",7097 => \"Strembo\",7098 => \"Stresa\",7099 => \"Strevi\",7100 => \"Striano\",7101 => \"Strigno\",8182 => \"Stromboli\",7102 => \"Strona\",7103 => \"Stroncone\",7104 => \"Strongoli\",7105 => \"Stroppiana\",7106 => \"Stroppo\",7107 => \"Strozza\",8493 => \"Stupizza\",7108 => \"Sturno\",7109 => \"Suardi\",7110 => \"Subbiano\",7111 => \"Subiaco\",7112 => \"Succivo\",7113 => \"Sueglio\",7114 => \"Suelli\",7115 => \"Suello\",7116 => \"Suisio\",7117 => \"Sulbiate\",7118 => \"Sulmona\",7119 => \"Sulzano\",7120 => \"Sumirago\",7121 => \"Summonte\",7122 => \"Suni\",7123 => \"Suno\",7124 => \"Supersano\",7125 => \"Supino\",7126 => \"Surano\",7127 => \"Surbo\",7128 => \"Susa\",7129 => \"Susegana\",7130 => \"Sustinente\",7131 => \"Sutera\",7132 => \"Sutri\",7133 => \"Sutrio\",7134 => \"Suvereto\",7135 => \"Suzzara\",7136 => \"Taceno\",7137 => \"Tadasuni\",7138 => \"Taggia\",7139 => \"Tagliacozzo\",8450 => \"Tagliacozzo casello\",7140 => \"Taglio di po\",7141 => \"Tagliolo monferrato\",7142 => \"Taibon agordino\",7143 => \"Taino\",7144 => \"Taio\",7145 => \"Taipana\",7146 => \"Talamello\",7147 => \"Talamona\",8299 => \"Talamone\",7148 => \"Talana\",7149 => \"Taleggio\",7150 => \"Talla\",7151 => \"Talmassons\",7152 => \"Tambre\",7153 => \"Taormina\",7154 => \"Tapogliano\",7155 => \"Tarano\",7156 => \"Taranta peligna\",7157 => \"Tarantasca\",7158 => \"Taranto\",8550 => \"Taranto M. A. Grottaglie\",7159 => \"Tarcento\",7160 => \"Tarquinia\",8140 => \"Tarquinia Lido\",7161 => \"Tarsia\",7162 => \"Tartano\",7163 => \"Tarvisio\",8466 => \"Tarvisio casello\",7164 => \"Tarzo\",7165 => \"Tassarolo\",7166 => \"Tassullo\",7167 => \"Taurano\",7168 => \"Taurasi\",7169 => \"Taurianova\",7170 => \"Taurisano\",7171 => \"Tavagnacco\",7172 => \"Tavagnasco\",7173 => \"Tavarnelle val di pesa\",7174 => \"Tavazzano con villavesco\",7175 => \"Tavenna\",7176 => \"Taverna\",7177 => \"Tavernerio\",7178 => \"Tavernola bergamasca\",7179 => \"Tavernole sul Mella\",7180 => \"Taviano\",7181 => \"Tavigliano\",7182 => \"Tavoleto\",7183 => \"Tavullia\",8362 => \"Teana\",7185 => \"Teano\",7186 => \"Teggiano\",7187 => \"Teglio\",7188 => \"Teglio veneto\",7189 => \"Telese terme\",7190 => \"Telgate\",7191 => \"Telti\",7192 => \"Telve\",7193 => \"Telve di sopra\",7194 => \"Tempio Pausania\",7195 => \"Temu'\",7196 => \"Tenna\",7197 => \"Tenno\",7198 => \"Teolo\",7199 => \"Teor\",7200 => \"Teora\",7201 => \"Teramo\",8449 => \"Teramo Val Vomano\",7202 => \"Terdobbiate\",7203 => \"Terelle\",7204 => \"Terento\",7205 => \"Terenzo\",7206 => \"Tergu\",7207 => \"Terlago\",7208 => \"Terlano\",7209 => \"Terlizzi\",8158 => \"Terme di Lurisia\",7210 => \"Terme vigliatore\",7211 => \"Termeno sulla strada del vino\",7212 => \"Termini imerese\",8133 => \"Terminillo\",7213 => \"Termoli\",7214 => \"Ternate\",7215 => \"Ternengo\",7216 => \"Terni\",7217 => \"Terno d'isola\",7218 => \"Terracina\",7219 => \"Terragnolo\",7220 => \"Terralba\",7221 => \"Terranova da Sibari\",7222 => \"Terranova dei passerini\",8379 => \"Terranova di Pollino\",7224 => \"Terranova Sappo Minulio\",7225 => \"Terranuova bracciolini\",7226 => \"Terrasini\",7227 => \"Terrassa padovana\",7228 => \"Terravecchia\",7229 => \"Terrazzo\",7230 => \"Terres\",7231 => \"Terricciola\",7232 => \"Terruggia\",7233 => \"Tertenia\",7234 => \"Terzigno\",7235 => \"Terzo\",7236 => \"Terzo d'Aquileia\",7237 => \"Terzolas\",7238 => \"Terzorio\",7239 => \"Tesero\",7240 => \"Tesimo\",7241 => \"Tessennano\",7242 => \"Testico\",7243 => \"Teti\",7244 => \"Teulada\",7245 => \"Teverola\",7246 => \"Tezze sul Brenta\",8716 => \"Tharros\",7247 => \"Thiene\",7248 => \"Thiesi\",7249 => \"Tiana\",7250 => \"Tiarno di sopra\",7251 => \"Tiarno di sotto\",7252 => \"Ticengo\",7253 => \"Ticineto\",7254 => \"Tiggiano\",7255 => \"Tiglieto\",7256 => \"Tigliole\",7257 => \"Tignale\",7258 => \"Tinnura\",7259 => \"Tione degli Abruzzi\",7260 => \"Tione di Trento\",7261 => \"Tirano\",7262 => \"Tires\",7263 => \"Tiriolo\",7264 => \"Tirolo\",8194 => \"Tirrenia\",8719 => \"Tiscali\",7265 => \"Tissi\",8422 => \"Tito\",7267 => \"Tivoli\",8451 => \"Tivoli casello\",7268 => \"Tizzano val Parma\",7269 => \"Toano\",7270 => \"Tocco caudio\",7271 => \"Tocco da Casauria\",7272 => \"Toceno\",7273 => \"Todi\",7274 => \"Toffia\",7275 => \"Toirano\",7276 => \"Tolentino\",7277 => \"Tolfa\",7278 => \"Tollegno\",7279 => \"Tollo\",7280 => \"Tolmezzo\",8423 => \"Tolve\",7282 => \"Tombolo\",7283 => \"Ton\",7284 => \"Tonadico\",7285 => \"Tonara\",7286 => \"Tonco\",7287 => \"Tonengo\",7288 => \"Tonezza del Cimone\",7289 => \"Tora e piccilli\",8132 => \"Torano\",7290 => \"Torano castello\",7291 => \"Torano nuovo\",7292 => \"Torbole casaglia\",7293 => \"Torcegno\",7294 => \"Torchiara\",7295 => \"Torchiarolo\",7296 => \"Torella dei lombardi\",7297 => \"Torella del sannio\",7298 => \"Torgiano\",7299 => \"Torgnon\",7300 => \"Torino\",8271 => \"Torino Caselle\",7301 => \"Torino di Sangro\",8494 => \"Torino di Sangro Marina\",7302 => \"Toritto\",7303 => \"Torlino Vimercati\",7304 => \"Tornaco\",7305 => \"Tornareccio\",7306 => \"Tornata\",7307 => \"Tornimparte\",8445 => \"Tornimparte casello\",7308 => \"Torno\",7309 => \"Tornolo\",7310 => \"Toro\",7311 => \"Torpe'\",7312 => \"Torraca\",7313 => \"Torralba\",7314 => \"Torrazza coste\",7315 => \"Torrazza Piemonte\",7316 => \"Torrazzo\",7317 => \"Torre Annunziata\",7318 => \"Torre Beretti e Castellaro\",7319 => \"Torre boldone\",7320 => \"Torre bormida\",7321 => \"Torre cajetani\",7322 => \"Torre canavese\",7323 => \"Torre d'arese\",7324 => \"Torre d'isola\",7325 => \"Torre de' passeri\",7326 => \"Torre de'busi\",7327 => \"Torre de'negri\",7328 => \"Torre de'picenardi\",7329 => \"Torre de'roveri\",7330 => \"Torre del greco\",7331 => \"Torre di mosto\",7332 => \"Torre di ruggiero\",7333 => \"Torre di Santa Maria\",7334 => \"Torre le nocelle\",7335 => \"Torre mondovi'\",7336 => \"Torre orsaia\",8592 => \"Torre Pali\",7337 => \"Torre pallavicina\",7338 => \"Torre pellice\",7339 => \"Torre San Giorgio\",8596 => \"Torre San Giovanni\",8595 => \"Torre San Gregorio\",7340 => \"Torre San Patrizio\",7341 => \"Torre Santa Susanna\",8593 => \"Torre Vado\",7342 => \"Torreano\",7343 => \"Torrebelvicino\",7344 => \"Torrebruna\",7345 => \"Torrecuso\",7346 => \"Torreglia\",7347 => \"Torregrotta\",7348 => \"Torremaggiore\",7349 => \"Torrenova\",7350 => \"Torresina\",7351 => \"Torretta\",7352 => \"Torrevecchia pia\",7353 => \"Torrevecchia teatina\",7354 => \"Torri del benaco\",7355 => \"Torri di quartesolo\",7356 => \"Torri in sabina\",7357 => \"Torriana\",7358 => \"Torrice\",7359 => \"Torricella\",7360 => \"Torricella del pizzo\",7361 => \"Torricella in sabina\",7362 => \"Torricella peligna\",7363 => \"Torricella sicura\",7364 => \"Torricella verzate\",7365 => \"Torriglia\",7366 => \"Torrile\",7367 => \"Torrioni\",7368 => \"Torrita di Siena\",7369 => \"Torrita tiberina\",7370 => \"Tortoli'\",7371 => \"Tortona\",7372 => \"Tortora\",7373 => \"Tortorella\",7374 => \"Tortoreto\",8601 => \"Tortoreto lido\",7375 => \"Tortorici\",8138 => \"Torvaianica\",7376 => \"Torviscosa\",7377 => \"Toscolano maderno\",7378 => \"Tossicia\",7379 => \"Tovo di Sant'Agata\",7380 => \"Tovo San Giacomo\",7381 => \"Trabia\",7382 => \"Tradate\",8214 => \"Trafoi\",7383 => \"Tramatza\",7384 => \"Trambileno\",7385 => \"Tramonti\",7386 => \"Tramonti di sopra\",7387 => \"Tramonti di sotto\",8412 => \"Tramutola\",7389 => \"Trana\",7390 => \"Trani\",7391 => \"Transacqua\",7392 => \"Traona\",7393 => \"Trapani\",8544 => \"Trapani Birgi\",7394 => \"Trappeto\",7395 => \"Trarego Viggiona\",7396 => \"Trasacco\",7397 => \"Trasaghis\",7398 => \"Trasquera\",7399 => \"Tratalias\",7400 => \"Trausella\",7401 => \"Travaco' siccomario\",7402 => \"Travagliato\",7403 => \"Travedona monate\",7404 => \"Traversella\",7405 => \"Traversetolo\",7406 => \"Traves\",7407 => \"Travesio\",7408 => \"Travo\",8187 => \"Tre fontane\",7409 => \"Trebaseleghe\",7410 => \"Trebisacce\",7411 => \"Trecasali\",7412 => \"Trecase\",7413 => \"Trecastagni\",7414 => \"Trecate\",7415 => \"Trecchina\",7416 => \"Trecenta\",7417 => \"Tredozio\",7418 => \"Treglio\",7419 => \"Tregnago\",7420 => \"Treia\",7421 => \"Treiso\",7422 => \"Tremenico\",7423 => \"Tremestieri etneo\",7424 => \"Tremezzo\",7425 => \"Tremosine\",7426 => \"Trenta\",7427 => \"Trentinara\",7428 => \"Trento\",7429 => \"Trentola-ducenta\",7430 => \"Trenzano\",8146 => \"Trepalle\",7431 => \"Treppo carnico\",7432 => \"Treppo grande\",7433 => \"Trepuzzi\",7434 => \"Trequanda\",7435 => \"Tres\",7436 => \"Tresana\",7437 => \"Trescore balneario\",7438 => \"Trescore cremasco\",7439 => \"Tresigallo\",7440 => \"Tresivio\",7441 => \"Tresnuraghes\",7442 => \"Trevenzuolo\",7443 => \"Trevi\",7444 => \"Trevi nel lazio\",7445 => \"Trevico\",7446 => \"Treviglio\",7447 => \"Trevignano\",7448 => \"Trevignano romano\",7449 => \"Treville\",7450 => \"Treviolo\",7451 => \"Treviso\",7452 => \"Treviso bresciano\",8543 => \"Treviso Sant'Angelo\",7453 => \"Trezzano rosa\",7454 => \"Trezzano sul Naviglio\",7455 => \"Trezzo sull'Adda\",7456 => \"Trezzo Tinella\",7457 => \"Trezzone\",7458 => \"Tribano\",7459 => \"Tribiano\",7460 => \"Tribogna\",7461 => \"Tricarico\",7462 => \"Tricase\",8597 => \"Tricase porto\",7463 => \"Tricerro\",7464 => \"Tricesimo\",7465 => \"Trichiana\",7466 => \"Triei\",7467 => \"Trieste\",8472 => \"Trieste Ronchi dei Legionari\",7468 => \"Triggiano\",7469 => \"Trigolo\",7470 => \"Trinita d'Agultu e Vignola\",7471 => \"Trinita'\",7472 => \"Trinitapoli\",7473 => \"Trino\",7474 => \"Triora\",7475 => \"Tripi\",7476 => \"Trisobbio\",7477 => \"Trissino\",7478 => \"Triuggio\",7479 => \"Trivento\",7480 => \"Trivero\",7481 => \"Trivigliano\",7482 => \"Trivignano udinese\",8413 => \"Trivigno\",7484 => \"Trivolzio\",7485 => \"Trodena\",7486 => \"Trofarello\",7487 => \"Troia\",7488 => \"Troina\",7489 => \"Tromello\",7490 => \"Trontano\",7491 => \"Tronzano lago maggiore\",7492 => \"Tronzano vercellese\",7493 => \"Tropea\",7494 => \"Trovo\",7495 => \"Truccazzano\",7496 => \"Tubre\",7497 => \"Tuenno\",7498 => \"Tufara\",7499 => \"Tufillo\",7500 => \"Tufino\",7501 => \"Tufo\",7502 => \"Tuglie\",7503 => \"Tuili\",7504 => \"Tula\",7505 => \"Tuoro sul trasimeno\",7506 => \"Turania\",7507 => \"Turano lodigiano\",7508 => \"Turate\",7509 => \"Turbigo\",7510 => \"Turi\",7511 => \"Turri\",7512 => \"Turriaco\",7513 => \"Turrivalignani\",8390 => \"Tursi\",7515 => \"Tusa\",7516 => \"Tuscania\",7517 => \"Ubiale Clanezzo\",7518 => \"Uboldo\",7519 => \"Ucria\",7520 => \"Udine\",7521 => \"Ugento\",7522 => \"Uggiano la chiesa\",7523 => \"Uggiate trevano\",7524 => \"Ula' Tirso\",7525 => \"Ulassai\",7526 => \"Ultimo\",7527 => \"Umbertide\",7528 => \"Umbriatico\",7529 => \"Urago d'Oglio\",7530 => \"Uras\",7531 => \"Urbana\",7532 => \"Urbania\",7533 => \"Urbe\",7534 => \"Urbino\",7535 => \"Urbisaglia\",7536 => \"Urgnano\",7537 => \"Uri\",7538 => \"Ururi\",7539 => \"Urzulei\",7540 => \"Uscio\",7541 => \"Usellus\",7542 => \"Usini\",7543 => \"Usmate Velate\",7544 => \"Ussana\",7545 => \"Ussaramanna\",7546 => \"Ussassai\",7547 => \"Usseaux\",7548 => \"Usseglio\",7549 => \"Ussita\",7550 => \"Ustica\",7551 => \"Uta\",7552 => \"Uzzano\",7553 => \"Vaccarizzo albanese\",7554 => \"Vacone\",7555 => \"Vacri\",7556 => \"Vadena\",7557 => \"Vado ligure\",7558 => \"Vagli sotto\",7559 => \"Vaglia\",8388 => \"Vaglio Basilicata\",7561 => \"Vaglio serra\",7562 => \"Vaiano\",7563 => \"Vaiano cremasco\",7564 => \"Vaie\",7565 => \"Vailate\",7566 => \"Vairano Patenora\",7567 => \"Vajont\",8511 => \"Val Canale\",7568 => \"Val della torre\",8243 => \"Val di Lei\",8237 => \"Val di Luce\",7569 => \"Val di nizza\",8440 => \"Val di Sangro casello\",7570 => \"Val di vizze\",8223 => \"Val Ferret\",8521 => \"Val Grauson\",7571 => \"Val Masino\",7572 => \"Val Rezzo\",8215 => \"Val Senales\",8522 => \"Val Urtier\",8224 => \"Val Veny\",7573 => \"Valbondione\",7574 => \"Valbrembo\",7575 => \"Valbrevenna\",7576 => \"Valbrona\",8311 => \"Valcava\",7577 => \"Valda\",7578 => \"Valdagno\",7579 => \"Valdaora\",7580 => \"Valdastico\",7581 => \"Valdengo\",7582 => \"Valderice\",7583 => \"Valdidentro\",7584 => \"Valdieri\",7585 => \"Valdina\",7586 => \"Valdisotto\",7587 => \"Valdobbiadene\",7588 => \"Valduggia\",7589 => \"Valeggio\",7590 => \"Valeggio sul Mincio\",7591 => \"Valentano\",7592 => \"Valenza\",7593 => \"Valenzano\",7594 => \"Valera fratta\",7595 => \"Valfabbrica\",7596 => \"Valfenera\",7597 => \"Valfloriana\",7598 => \"Valfurva\",7599 => \"Valganna\",7600 => \"Valgioie\",7601 => \"Valgoglio\",7602 => \"Valgrana\",7603 => \"Valgreghentino\",7604 => \"Valgrisenche\",7605 => \"Valguarnera caropepe\",8344 => \"Valico Citerna\",8510 => \"Valico dei Giovi\",8318 => \"Valico di Monforte\",8509 => \"Valico di Montemiletto\",8507 => \"Valico di Scampitella\",7606 => \"Vallada agordina\",7607 => \"Vallanzengo\",7608 => \"Vallarsa\",7609 => \"Vallata\",7610 => \"Valle agricola\",7611 => \"Valle Aurina\",7612 => \"Valle castellana\",8444 => \"Valle del salto\",7613 => \"Valle dell'Angelo\",7614 => \"Valle di Cadore\",7615 => \"Valle di Casies\",7616 => \"Valle di maddaloni\",7617 => \"Valle lomellina\",7618 => \"Valle mosso\",7619 => \"Valle salimbene\",7620 => \"Valle San Nicolao\",7621 => \"Vallebona\",7622 => \"Vallecorsa\",7623 => \"Vallecrosia\",7624 => \"Valledolmo\",7625 => \"Valledoria\",7626 => \"Vallefiorita\",7627 => \"Vallelonga\",7628 => \"Vallelunga pratameno\",7629 => \"Vallemaio\",7630 => \"Vallepietra\",7631 => \"Vallerano\",7632 => \"Vallermosa\",7633 => \"Vallerotonda\",7634 => \"Vallesaccarda\",8749 => \"Valletta\",7635 => \"Valleve\",7636 => \"Valli del Pasubio\",7637 => \"Vallinfreda\",7638 => \"Vallio terme\",7639 => \"Vallo della Lucania\",7640 => \"Vallo di Nera\",7641 => \"Vallo torinese\",8191 => \"Vallombrosa\",8471 => \"Vallon\",7642 => \"Valloriate\",7643 => \"Valmacca\",7644 => \"Valmadrera\",7645 => \"Valmala\",8313 => \"Valmasino\",7646 => \"Valmontone\",7647 => \"Valmorea\",7648 => \"Valmozzola\",7649 => \"Valnegra\",7650 => \"Valpelline\",7651 => \"Valperga\",7652 => \"Valprato Soana\",7653 => \"Valsavarenche\",7654 => \"Valsecca\",7655 => \"Valsinni\",7656 => \"Valsolda\",7657 => \"Valstagna\",7658 => \"Valstrona\",7659 => \"Valtopina\",7660 => \"Valtorta\",8148 => \"Valtorta impianti\",7661 => \"Valtournenche\",7662 => \"Valva\",7663 => \"Valvasone\",7664 => \"Valverde\",7665 => \"Valverde\",7666 => \"Valvestino\",7667 => \"Vandoies\",7668 => \"Vanzaghello\",7669 => \"Vanzago\",7670 => \"Vanzone con San Carlo\",7671 => \"Vaprio d'Adda\",7672 => \"Vaprio d'Agogna\",7673 => \"Varallo\",7674 => \"Varallo Pombia\",7675 => \"Varano Borghi\",7676 => \"Varano de' Melegari\",7677 => \"Varapodio\",7678 => \"Varazze\",8600 => \"Varcaturo\",7679 => \"Varco sabino\",7680 => \"Varedo\",7681 => \"Varena\",7682 => \"Varenna\",7683 => \"Varese\",7684 => \"Varese ligure\",8284 => \"Varigotti\",7685 => \"Varisella\",7686 => \"Varmo\",7687 => \"Varna\",7688 => \"Varsi\",7689 => \"Varzi\",7690 => \"Varzo\",7691 => \"Vas\",7692 => \"Vasanello\",7693 => \"Vasia\",7694 => \"Vasto\",7695 => \"Vastogirardi\",7696 => \"Vattaro\",7697 => \"Vauda canavese\",7698 => \"Vazzano\",7699 => \"Vazzola\",7700 => \"Vecchiano\",7701 => \"Vedano al Lambro\",7702 => \"Vedano Olona\",7703 => \"Veddasca\",7704 => \"Vedelago\",7705 => \"Vedeseta\",7706 => \"Veduggio con Colzano\",7707 => \"Veggiano\",7708 => \"Veglie\",7709 => \"Veglio\",7710 => \"Vejano\",7711 => \"Veleso\",7712 => \"Velezzo lomellina\",8530 => \"Vellano\",7713 => \"Velletri\",7714 => \"Vellezzo Bellini\",7715 => \"Velo d'Astico\",7716 => \"Velo veronese\",7717 => \"Velturno\",7718 => \"Venafro\",7719 => \"Venaria\",7720 => \"Venarotta\",7721 => \"Venasca\",7722 => \"Venaus\",7723 => \"Vendone\",7724 => \"Vendrogno\",7725 => \"Venegono inferiore\",7726 => \"Venegono superiore\",7727 => \"Venetico\",7728 => \"Venezia\",8502 => \"Venezia Mestre\",8268 => \"Venezia Tessera\",7729 => \"Veniano\",7730 => \"Venosa\",7731 => \"Venticano\",7732 => \"Ventimiglia\",7733 => \"Ventimiglia di Sicilia\",7734 => \"Ventotene\",7735 => \"Venzone\",7736 => \"Verano\",7737 => \"Verano brianza\",7738 => \"Verbania\",7739 => \"Verbicaro\",7740 => \"Vercana\",7741 => \"Verceia\",7742 => \"Vercelli\",7743 => \"Vercurago\",7744 => \"Verdellino\",7745 => \"Verdello\",7746 => \"Verderio inferiore\",7747 => \"Verderio superiore\",7748 => \"Verduno\",7749 => \"Vergato\",7750 => \"Vergemoli\",7751 => \"Verghereto\",7752 => \"Vergiate\",7753 => \"Vermezzo\",7754 => \"Vermiglio\",8583 => \"Vernago\",7755 => \"Vernante\",7756 => \"Vernasca\",7757 => \"Vernate\",7758 => \"Vernazza\",7759 => \"Vernio\",7760 => \"Vernole\",7761 => \"Verolanuova\",7762 => \"Verolavecchia\",7763 => \"Verolengo\",7764 => \"Veroli\",7765 => \"Verona\",8269 => \"Verona Villafranca\",7766 => \"Veronella\",7767 => \"Verrayes\",7768 => \"Verres\",7769 => \"Verretto\",7770 => \"Verrone\",7771 => \"Verrua po\",7772 => \"Verrua Savoia\",7773 => \"Vertemate con Minoprio\",7774 => \"Vertova\",7775 => \"Verucchio\",7776 => \"Veruno\",7777 => \"Vervio\",7778 => \"Vervo'\",7779 => \"Verzegnis\",7780 => \"Verzino\",7781 => \"Verzuolo\",7782 => \"Vescovana\",7783 => \"Vescovato\",7784 => \"Vesime\",7785 => \"Vespolate\",7786 => \"Vessalico\",7787 => \"Vestenanova\",7788 => \"Vestigne'\",7789 => \"Vestone\",7790 => \"Vestreno\",7791 => \"Vetralla\",7792 => \"Vetto\",7793 => \"Vezza d'Alba\",7794 => \"Vezza d'Oglio\",7795 => \"Vezzano\",7796 => \"Vezzano ligure\",7797 => \"Vezzano sul crostolo\",7798 => \"Vezzi portio\",8317 => \"Vezzo\",7799 => \"Viadana\",7800 => \"Viadanica\",7801 => \"Viagrande\",7802 => \"Viale\",7803 => \"Vialfre'\",7804 => \"Viano\",7805 => \"Viareggio\",7806 => \"Viarigi\",8674 => \"Vibo Marina\",7807 => \"Vibo Valentia\",7808 => \"Vibonati\",7809 => \"Vicalvi\",7810 => \"Vicari\",7811 => \"Vicchio\",7812 => \"Vicenza\",7813 => \"Vico canavese\",7814 => \"Vico del Gargano\",7815 => \"Vico Equense\",7816 => \"Vico nel Lazio\",7817 => \"Vicoforte\",7818 => \"Vicoli\",7819 => \"Vicolungo\",7820 => \"Vicopisano\",7821 => \"Vicovaro\",7822 => \"Viddalba\",7823 => \"Vidigulfo\",7824 => \"Vidor\",7825 => \"Vidracco\",7826 => \"Vieste\",7827 => \"Vietri di Potenza\",7828 => \"Vietri sul mare\",7829 => \"Viganella\",7830 => \"Vigano San Martino\",7831 => \"Vigano'\",7832 => \"Vigarano Mainarda\",7833 => \"Vigasio\",7834 => \"Vigevano\",7835 => \"Viggianello\",7836 => \"Viggiano\",7837 => \"Viggiu'\",7838 => \"Vighizzolo d'Este\",7839 => \"Vigliano biellese\",7840 => \"Vigliano d'Asti\",7841 => \"Vignale monferrato\",7842 => \"Vignanello\",7843 => \"Vignate\",8125 => \"Vignola\",7845 => \"Vignola Falesina\",7846 => \"Vignole Borbera\",7847 => \"Vignolo\",7848 => \"Vignone\",8514 => \"Vigo Ciampedie\",7849 => \"Vigo di Cadore\",7850 => \"Vigo di Fassa\",7851 => \"Vigo Rendena\",7852 => \"Vigodarzere\",7853 => \"Vigolo\",7854 => \"Vigolo Vattaro\",7855 => \"Vigolzone\",7856 => \"Vigone\",7857 => \"Vigonovo\",7858 => \"Vigonza\",7859 => \"Viguzzolo\",7860 => \"Villa agnedo\",7861 => \"Villa bartolomea\",7862 => \"Villa basilica\",7863 => \"Villa biscossi\",7864 => \"Villa carcina\",7865 => \"Villa castelli\",7866 => \"Villa celiera\",7867 => \"Villa collemandina\",7868 => \"Villa cortese\",7869 => \"Villa d'Adda\",7870 => \"Villa d'Alme'\",7871 => \"Villa d'Ogna\",7872 => \"Villa del bosco\",7873 => \"Villa del conte\",7874 => \"Villa di briano\",7875 => \"Villa di Chiavenna\",7876 => \"Villa di Serio\",7877 => \"Villa di Tirano\",7878 => \"Villa Estense\",7879 => \"Villa Faraldi\",7880 => \"Villa Guardia\",7881 => \"Villa Lagarina\",7882 => \"Villa Latina\",7883 => \"Villa Literno\",7884 => \"Villa minozzo\",7885 => \"Villa poma\",7886 => \"Villa rendena\",7887 => \"Villa San Giovanni\",7888 => \"Villa San Giovanni in Tuscia\",7889 => \"Villa San Pietro\",7890 => \"Villa San Secondo\",7891 => \"Villa Sant'Angelo\",7892 => \"Villa Sant'Antonio\",7893 => \"Villa Santa Lucia\",7894 => \"Villa Santa Lucia degli Abruzzi\",7895 => \"Villa Santa Maria\",7896 => \"Villa Santina\",7897 => \"Villa Santo Stefano\",7898 => \"Villa verde\",7899 => \"Villa vicentina\",7900 => \"Villabassa\",7901 => \"Villabate\",7902 => \"Villachiara\",7903 => \"Villacidro\",7904 => \"Villadeati\",7905 => \"Villadose\",7906 => \"Villadossola\",7907 => \"Villafalletto\",7908 => \"Villafranca d'Asti\",7909 => \"Villafranca di Verona\",7910 => \"Villafranca in Lunigiana\",7911 => \"Villafranca padovana\",7912 => \"Villafranca Piemonte\",7913 => \"Villafranca sicula\",7914 => \"Villafranca tirrena\",7915 => \"Villafrati\",7916 => \"Villaga\",7917 => \"Villagrande Strisaili\",7918 => \"Villalago\",7919 => \"Villalba\",7920 => \"Villalfonsina\",7921 => \"Villalvernia\",7922 => \"Villamagna\",7923 => \"Villamaina\",7924 => \"Villamar\",7925 => \"Villamarzana\",7926 => \"Villamassargia\",7927 => \"Villamiroglio\",7928 => \"Villandro\",7929 => \"Villanova biellese\",7930 => \"Villanova canavese\",7931 => \"Villanova d'Albenga\",7932 => \"Villanova d'Ardenghi\",7933 => \"Villanova d'Asti\",7934 => \"Villanova del Battista\",7935 => \"Villanova del Ghebbo\",7936 => \"Villanova del Sillaro\",7937 => \"Villanova di Camposampiero\",7938 => \"Villanova marchesana\",7939 => \"Villanova Mondovi'\",7940 => \"Villanova Monferrato\",7941 => \"Villanova Monteleone\",7942 => \"Villanova solaro\",7943 => \"Villanova sull'Arda\",7944 => \"Villanova Truschedu\",7945 => \"Villanova Tulo\",7946 => \"Villanovaforru\",7947 => \"Villanovafranca\",7948 => \"Villanterio\",7949 => \"Villanuova sul Clisi\",7950 => \"Villaperuccio\",7951 => \"Villapiana\",7952 => \"Villaputzu\",7953 => \"Villar dora\",7954 => \"Villar focchiardo\",7955 => \"Villar pellice\",7956 => \"Villar Perosa\",7957 => \"Villar San Costanzo\",7958 => \"Villarbasse\",7959 => \"Villarboit\",7960 => \"Villareggia\",7961 => \"Villaricca\",7962 => \"Villaromagnano\",7963 => \"Villarosa\",7964 => \"Villasalto\",7965 => \"Villasanta\",7966 => \"Villasimius\",7967 => \"Villasor\",7968 => \"Villaspeciosa\",7969 => \"Villastellone\",7970 => \"Villata\",7971 => \"Villaurbana\",7972 => \"Villavallelonga\",7973 => \"Villaverla\",7974 => \"Villeneuve\",7975 => \"Villesse\",7976 => \"Villetta Barrea\",7977 => \"Villette\",7978 => \"Villimpenta\",7979 => \"Villongo\",7980 => \"Villorba\",7981 => \"Vilminore di scalve\",7982 => \"Vimercate\",7983 => \"Vimodrone\",7984 => \"Vinadio\",7985 => \"Vinchiaturo\",7986 => \"Vinchio\",7987 => \"Vinci\",7988 => \"Vinovo\",7989 => \"Vinzaglio\",7990 => \"Viola\",7991 => \"Vione\",7992 => \"Vipiteno\",7993 => \"Virgilio\",7994 => \"Virle Piemonte\",7995 => \"Visano\",7996 => \"Vische\",7997 => \"Visciano\",7998 => \"Visco\",7999 => \"Visone\",8000 => \"Visso\",8001 => \"Vistarino\",8002 => \"Vistrorio\",8003 => \"Vita\",8004 => \"Viterbo\",8005 => \"Viticuso\",8006 => \"Vito d'Asio\",8007 => \"Vitorchiano\",8008 => \"Vittoria\",8009 => \"Vittorio Veneto\",8010 => \"Vittorito\",8011 => \"Vittuone\",8012 => \"Vitulano\",8013 => \"Vitulazio\",8014 => \"Viu'\",8015 => \"Vivaro\",8016 => \"Vivaro romano\",8017 => \"Viverone\",8018 => \"Vizzini\",8019 => \"Vizzola Ticino\",8020 => \"Vizzolo Predabissi\",8021 => \"Vo'\",8022 => \"Vobarno\",8023 => \"Vobbia\",8024 => \"Vocca\",8025 => \"Vodo cadore\",8026 => \"Voghera\",8027 => \"Voghiera\",8028 => \"Vogogna\",8029 => \"Volano\",8030 => \"Volla\",8031 => \"Volongo\",8032 => \"Volpago del montello\",8033 => \"Volpara\",8034 => \"Volpedo\",8035 => \"Volpeglino\",8036 => \"Volpiano\",8037 => \"Volta mantovana\",8038 => \"Voltaggio\",8039 => \"Voltago agordino\",8040 => \"Volterra\",8041 => \"Voltido\",8042 => \"Volturara Appula\",8043 => \"Volturara irpina\",8044 => \"Volturino\",8045 => \"Volvera\",8046 => \"Vottignasco\",8181 => \"Vulcano Porto\",8047 => \"Zaccanopoli\",8048 => \"Zafferana etnea\",8049 => \"Zagarise\",8050 => \"Zagarolo\",8051 => \"Zambana\",8707 => \"Zambla\",8052 => \"Zambrone\",8053 => \"Zandobbio\",8054 => \"Zane'\",8055 => \"Zanica\",8056 => \"Zapponeta\",8057 => \"Zavattarello\",8058 => \"Zeccone\",8059 => \"Zeddiani\",8060 => \"Zelbio\",8061 => \"Zelo Buon Persico\",8062 => \"Zelo Surrigone\",8063 => \"Zeme\",8064 => \"Zenevredo\",8065 => \"Zenson di Piave\",8066 => \"Zerba\",8067 => \"Zerbo\",8068 => \"Zerbolo'\",8069 => \"Zerfaliu\",8070 => \"Zeri\",8071 => \"Zermeghedo\",8072 => \"Zero Branco\",8073 => \"Zevio\",8455 => \"Ziano di Fiemme\",8075 => \"Ziano piacentino\",8076 => \"Zibello\",8077 => \"Zibido San Giacomo\",8078 => \"Zignago\",8079 => \"Zimella\",8080 => \"Zimone\",8081 => \"Zinasco\",8082 => \"Zoagli\",8083 => \"Zocca\",8084 => \"Zogno\",8085 => \"Zola Predosa\",8086 => \"Zoldo alto\",8087 => \"Zollino\",8088 => \"Zone\",8089 => \"Zoppe' di cadore\",8090 => \"Zoppola\",8091 => \"Zovencedo\",8092 => \"Zubiena\",8093 => \"Zuccarello\",8094 => \"Zuclo\",8095 => \"Zugliano\",8096 => \"Zuglio\",8097 => \"Zumaglia\",8098 => \"Zumpano\",8099 => \"Zungoli\",8100 => \"Zungri\");\n\t$return = '<br/><a href=\"https://www.3bmeteo.com'.strtolower($trebi_url_locs[$idloc]).'\" style=\"font-size:10px;\">Meteo '.$trebi_locs[$idloc].'</a>';\n\treturn $return;\n}", "function parse_request() {\n\t$location_args = array( 'restrict_by_country' => false );\n\n\t// If a precise location is known, use a GET request. The values here should come from the `location` key of the result of a POST request.\n\tif ( isset( $_GET['latitude'], $_GET['longitude'] ) ) {\n\t\t$location_args['latitude'] = $_GET['latitude'];\n\t\t$location_args['longitude'] = $_GET['longitude'];\n\t}\n\n\tif ( isset( $_GET['country'] ) ) {\n\t\t$location_args['country'] = $_GET['country'];\n\t\t$location_args['restrict_by_country'] = true;\n\t}\n\n\t// If a precise location is not known, create a POST request with a bunch of data which can be used to determine a precise location for future GET requests.\n\tif ( isset( $_POST['location_data'] ) ) {\n\t\t$location_args = $_POST['location_data'];\n\t}\n\n\t// Simplified parameters for lookup by location (city) name, with optional timezone and locale params for extra context.\n\tif ( isset( $_REQUEST['location'] ) ) {\n\t\t$location_args['location_name'] = trim( $_REQUEST['location'] );\n\t}\n\n\tif ( isset( $_REQUEST['timezone'] ) ) {\n\t\t$location_args['timezone'] = $_REQUEST['timezone'];\n\t}\n\n\tif ( isset( $_REQUEST['locale'] ) ) {\n\t\t$location_args['locale'] = $_REQUEST['locale'];\n\t}\n\n\tif ( isset( $_REQUEST['ip'] ) ) {\n\t\t/*\n\t\t * In local development environments, the IP sent by the Events widget will typically be\n\t\t * private. In those cases, we can use the web server's IP address, which should be the same\n\t\t * as the dev's browser IP.\n\t\t */\n\t\t$public_ip = filter_var(\n\t\t\t$_REQUEST['ip'],\n\t\t\tFILTER_VALIDATE_IP,\n\t\t\tFILTER_FLAG_IPV4 | FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE\n\t\t);\n\n\t\t$location_args['ip'] = $public_ip ? $public_ip : $_SERVER['REMOTE_ADDR'];\n\t}\n\n\treturn $location_args;\n}", "public function locations($params)\r\n {\r\n \t$_query = array('page' => isset($params['page']) ? $params['page'] : 1);\r\n\r\n return $this->curl_execute($method = 'locations', $_query);\r\n }", "function google_maps_link($lat, $lon){\n return \"<a target=_blank href='https://www.google.com/maps/search/$lat,$lon?hl=es&source=opensearch'>$lat, $lon</a>\";\n }", "protected function getDebugUrl()\n\t{\n\t\treturn implode( ' ', \\Sifo\\CLBootstrap::$command_line_params );\n\t}", "public function givecoordonerplsunom()\r\n {\r\n $request = $this->_bdd->query(\"SELECT gps.`id`, gps.id_bateau, gps.latitude, gps.longitude, bateau.nom FROM gps, bateau WHERE gps.id_bateau = bateau.id ORDER BY `gps`.`id` DESC\");\r\n while ($data = $request->fetch()) {\r\n $modf = \"modifcordoner.php?modfBateau=\" . $data[\"id_bateau\"];\r\n $supr = \"admin.php?suprBateau=\" . $data[\"id\"];\r\n?>\r\n <tr>\r\n <td><?=$data['id']?></td>\r\n <td><?= $data['id_bateau']?></td>\r\n <td>\r\n <a href=\"#\"><?= $data['nom']?></a>\r\n </td>\r\n \r\n <td><?= $data['latitude'] ?></td>\r\n <td><?=$data['longitude']?></td>\r\n <td>\r\n <a href=\"<?=$modf?>\" class=\"settings\" title=\"modifier\" data-toggle=\"tooltip\"><i class=\"material-icons\">&#xE8B8;</i></a>\r\n <a href=\"<?=$supr?>\" class=\"delete\" title=\"supprimer\" data-toggle=\"tooltip\"><i class=\"material-icons\">&#xE5C9;</i></a>\r\n </td>\r\n </tr>\r\n<?php\r\n }\r\n }", "private function getLocation()\n {\n $this->location = null;\n \n if ($this->fingerprint !== null && $this->end_point !== null) {\n $this->location = $this->end_point.$this->fingerprint;\n } else {\n $info = $this->getPost();\n \n if (isset($info['Location']) === true) {\n $this->fingerprint = str_replace($this->end_point, '', $info['Location']);\n $this->location = $info['Location'];\n }\n }\n \n return $this->location;\n }", "function google_map_get_coordinates( $address, $force_refresh = false ) {\n\t$address_hash = md5( $address );\n\t$coordinates = get_transient( $address_hash );\n\tif ($force_refresh || $coordinates === false) {\n\t\t$args = array( 'address' => urlencode( $address ), 'sensor' => 'false', 'key' => 'AIzaSyA4-ZxE3QqrSWpnwsjSke4Bs5DDN1LeFB0' );\n\t\t$url = add_query_arg( $args, 'https://maps.googleapis.com/maps/api/geocode/json' );\n\t\t// var_dump($url);\n\t\t$response \t= wp_remote_get( $url );\n\t\tif( is_wp_error( $response ) )\n\t\t\treturn;\n\t\t$data = wp_remote_retrieve_body( $response );\n\t\tif( is_wp_error( $data ) )\n\t\t\treturn;\n\t\tif ( $response['response']['code'] == 200 ) {\n\t\t\t// var_dump($data);\n\t\t\t$data = json_decode( $data );\n\t\t\tif ( $data->status === 'OK' ) {\n\t\t\t\t$coordinates = $data->results[0]->geometry->location;\n\t\t\t\t$cache_value['lat'] \t= $coordinates->lat;\n\t\t\t\t$cache_value['lng'] \t= $coordinates->lng;\n\t\t\t\t$cache_value['address'] = (string) $data->results[0]->formatted_address;\n\t\t\t\t// // cache coordinates for 3 months\n\t\t\t\t// set_transient($address_hash, $cache_value, 3600*24*30*3);\n\t\t\t\t// $data = $cache_value;\n\t\t\t\t// var_dump($data->status);\n\t\t\t} elseif ( $data->status === 'ZERO_RESULTS' ) {\n\t\t\t\treturn __( 'No location for the address.', 'aletheme' );\n\t\t\t} elseif( $data->status === 'INVALID_REQUEST' ) {\n\t\t\t\treturn __( 'Bad request. Did you enter an address name?', 'aletheme' );\n\t\t\t} else {\n\t\t\t\treturn ($data->status);\n\t\t\t\t// return __( 'Error, please check if you have entered the shortcode correctly.', 'aletheme' );\n\t\t\t}\n\t\t} else {\n\t\t\treturn __( 'Can\\'t connect Google API.', 'aletheme' );\n\t\t}\n\t} else {\n\t\t// return cached results\n\t\t$data = $coordinates;\n\t}\n\t// return (array) $data;\n\t$coords = array();\n\t// var_dump($data);\n\t// print(\"<pre>\".print_r($data,true).\"</pre>\");\n\t// var_dump($data->results[0]->geometry->location->lat);\n\t$coords['lat'] = $data->results[0]->geometry->location->lat;\n\t$coords['lng'] = $data->results[0]->geometry->location->lng;\n\t// var_dump($data->results[0]->geometry->location->lng);\n\treturn $coords;\n}", "function add_rewrite_endpoint($name, $places, $query_var = \\true)\n {\n }", "public function is_correct_location() {\r\n\t\treturn true;\r\n\t}", "abstract public function coordinates();", "function location_query_arg( $link ) {\r\n\r\n\tif (isset($_GET['location']) && $_GET['location']) :\r\n\r\n\t\t$location = wp_strip_all_tags($_GET['location']);\r\n\t\t$link = add_query_arg('location', urlencode( utf8_uri_encode( $location ) ), $link);\r\n\r\n\tendif;\r\n\r\n\treturn $link;\r\n}", "public function testPointStoreRouteNoAuth()\n {\n $response = $this\n ->from('/city/' . $this->city->id . '/point/create')\n ->post('/city/' . $this->city->id . '/point/store', [\n 'desc' => 'foo',\n 'latitude' => '42',\n 'longitude' => '13'\n ]);\n\n $response\n ->assertRedirect('/login')\n ->assertStatus(302);\n\n $this->assertDatabaseMissing('points', ['desc' => 'foo']);\n }", "private function log_url($args) {\n\n\t\t@preg_match('/((\\d+).(\\d+).(\\d+).(\\d+))/', $args[1], $ip);\n\t\t@$ip = $ip[0];\n\t\tmysql_query(\"INSERT INTO log SET source='$ip', destination='$args[0]'\");\n\n\t}", "function captureLocation() {\n global $connect, $latitude, $longitude;\n $statement = mysqli_prepare($connect, \"INSERT INTO locationTest (lat, lng) VALUES (?, ?)\");\n mysqli_stmt_bind_param($statement, \"ss\", $latitude, $longitude);\n mysqli_stmt_execute($statement);\n mysqli_stmt_close($statement); \n }", "public function prepare_getVillaLocation($params)\n\t{\n\t\t$xml_string = \"strVillaID=\".$params['strVillaID'].\"\";\n\t\treturn $xml_string;\n\t}", "public function testLatLongRoutesUpdatesXmlDatabaseWithNewLatitudeAndLongitudes() {\n $res = $this->client->request('GET', '/reuseDB');\n $this->assertEquals(200, $res->getStatusCode());\n $this->assertEquals(\"OK\", $res->getReasonPhrase());\n $this->validateContentType($res);\n $startReuseDb = (string) $res->getBody();\n\n // Make the call to the route\n $res = $this->client->request('GET', '/setLatLongs');\n $this->assertEquals(200, $res->getStatusCode());\n $this->assertEquals(\"OK\", $res->getReasonPhrase());\n\n // Get a new copy of the xml db\n $res = $this->client->request('GET', '/reuseDB');\n $this->assertEquals(200, $res->getStatusCode());\n $this->assertEquals(\"OK\", $res->getReasonPhrase());\n $this->validateContentType($res);\n $newReuseDb = (string) $res->getBody();\n\n // Verify the new xml DB is different from the old XML DB\n $this->assertXmlStringNotEqualsXmlString($startReuseDb, $newReuseDb);\n\n // Verify that test data exists in the xml document and has a latitude and longitude\n $reuseXML = new SimpleXMLElement($newReuseDb);\n foreach ($this->locIDs as $id) {\n\n // get the business matching the \n $location = $reuseXML->xpath(\"/reuse/BusinessList/business[id = $id]\");\n $this->assertNotFalse($location);\n \n // get the value of the latitude and longitude\n $lat = $location[0]->xpath(\"contact_info/latlong/latitude\");\n $long = $location[0]->xpath(\"contact_info/latlong/latitude\");\n\n // make sure there are good latitude and longitude values stored\n $this->assertStringMatchesFormat(\"%f\", (string) $lat[0]);\n $this->assertStringMatchesFormat(\"%f\", (string) $long[0]);\n }\n }", "public function test_make_coordinates_1()\n {\n $coord = \"-120\";\n $dd = \\SimpleMappr\\Mappr::makeCoordinates($coord);\n $this->assertEquals($dd[0], null);\n $this->assertEquals($dd[1], null);\n }", "function get_route($my_location){\n $route_start = $my_location[0];\n $route_end = $my_location[1];\n\n $loc_api_key = AIzaSyBFuL6yafR8BuhdbzupDAcorVH4sAO2YpE;\n //$route_url = \"https://maps.googleapis.com/maps/api/directions/json?origin=\".$route_start.\"&destination=\".$route_end.\"&key=\".$loc_api_key.\"&alternatives=true\"; this is for detours\n $route_url = \"https://maps.googleapis.com/maps/api/directions/json?origin=\".$route_start.\"&destination=\".$route_end.\"&key=\".$loc_api_key;\n\n if (!function_exists('curl_init')){\n die('Can\\'t find cURL module'); \n }\n\n $chRD = curl_init(); //RD = Route Directions\n\n if (!$chRD){\n die('Couldn\\'t initialize a cURL module'); \n }\n\n curl_setopt($chRD, CURLOPT_URL, $route_url);\n curl_setopt($chRD, CURLOPT_RETURNTRANSFER, TRUE);\n \n $dataRD = curl_exec($chRD);\n curl_close($chRD);\n\n $routes = json_decode($dataRD);\n\n return $routes;\n}", "function url($location) {\n\techo getAbsolutePath() . $location;\n}", "protected function pixelPageView() {\n\t\t$url = $GLOBALS['ccttsUrl'] .'cctts_inc/ajax/ccReg.php';\n\t\t$paramsArr = array('method=pixelPageView');\n\t\tforeach ($this->ccttsParams as $key => $val)\n\t\t\t$paramsArr[] = \"$key=$val\";\n\t\t\n\t\t$paramsStr = implode('&', $paramsArr);\n\t\t$result = $this->curlIt($url, $paramsStr);\n\t}", "function getdirections_locations_bylatlon($fromlocs, $fromlatlon, $tolocs, $tolatlon, $width='', $height='') {\n return getdirections_locations($fromlocs, $fromlatlon, $tolocs, $tolatlon, $width, $height);\n}", "function whereabouts_addmap_fetch_location_go() {\n\n // Get auth code\n\t$auth_code = get_option( 'whereabouts_swarm_auth_code' );\n\n // Check if file path is set and exists\n if ( isset( $auth_code ) AND ! empty( $auth_code ) ) {\n\n\t\t$url = 'https://api.foursquare.com/v2/users/self/checkins?oauth_token='.$auth_code.'&v=20140806&locale=en&limit=1';\n\n\t\t$response = wp_remote_get( $url );\n\n\t\tif ( is_wp_error( $response ) ) {\n\n\t\t\t$error_messages = $response->get_error_messages();\n\t\t\tforeach( $error_messages as $message ) {\n\t\t\t\techo '<span class=\"error\">' . implode( $error_messages, '<br />' ) . '<br />Maybe the <a href=\"http://where.abouts.io/faq/\">FAQs</a> are helpful?</span>';\n\t\t\t}\n\n\t\t}\n\t\telse {\n \n \t$obj = json_decode( $response['body'] );\n\n\t\t\tif ( isset( $obj->meta->code ) AND $obj->meta->code == 200 ) {\n\n\t\t\t\t$current_location = $obj->response->checkins->items[0];\n\n\t\t\t\tupdate_option( 'whereabouts_swarm_current_location', $current_location );\n\n\t\t\t\treturn '<span class=\"updated\">' . __( 'You current location was updated successfully.', 'whereabouts-swarm' ) . '</span>';\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn '<span class=\"error\">' . __( '<strong>Error:</strong> The data received from Swarm could not be processed. Please check our <a href=\"https://where.abouts.io/faq\">FAQs</a> for details. ', 'whereabouts-swarm' ) . '</span>';\n\t\t\t}\n\t\t}\n\t}\n}", "function getGoogleRoute($point1, $point2){\n //Reference: https://developers.google.com/maps/documentation/roads/snap\n \n $apiKey = getenv(\"GOOGLE_ROADS_API\");\n $pointStr = \"{$point1[0]},{$point1[1]}|{$point2[0]},{$point2[1]}\";\n $url = \"https://roads.googleapis.com/v1/snapToRoads?path={$pointStr}&interpolate=true&key={$apiKey}\";\n \n $result = file_get_contents($url);\n if ($result === FALSE || empty($result)) { \n echo \"Nothing returned from Google Roads API\";\n $result = FALSE;\n }\n //echo $result;\n return $result;\n}", "public function locationTrackAction(){\n\t // Get the Request parameters\n\t\t$params = $this->getRequest()->getParams();\n\t\t$secretkey = $this->secretkey;\n\t\t$db = $this->db;\n\t\t// Genaral Information of the user login details\n\t\t$appkey\t= isset($params['appkey'])?$params['appkey']:\"\" ;\n\t\t$LoginID\t= isset($params['LoginID'])?$params['LoginID']:\"\";\n\t\t$device_id\t= isset($params['device_id'])?$params['device_id']:\"\";\n\t\t$lat\t= isset($params['lat'])?$params['lat']:\"\";\n\t\t$long\t= isset($params['long'])?$params['long']:\"\";\n\t\t$offline_sink_datetime\t= isset($params['offline_sink_datetime'])?$params['offline_sink_datetime']:\"\";\n\t\t$curr_date\t= isset($params['curr_date'])?$params['curr_date']:\"\";\n\t\t$error_code = 1;\n\t\t$succes = FALSE;\n\n\t\ttry{\n\n\t\t\t$db->beginTransaction();\n\t\t\tif($secretkey != $appkey){\n\t\t\t\tthrow new Exception(\"Invalid request.\");\n\t\t\t}\t\n\t\t\tif(!$LoginID || !$device_id || !$lat || !$long){\n\t\t\t\tthrow new Exception(\"Required parameter missing.\");\n\t\t\t}\t\t\t\n\t\t\t$user = new Application_Model_Users();\n\t\t\t$alldata = $user->getUserDataByLoginId($LoginID);\n\t\t\t$count = count($alldata);\n\t\t\tif(!empty($alldata['LoginID']) != $LoginID)\n\t\t\t{\n\t\t\t\tthrow new Exception('Invalid user.');\n\t\t\t}\n\t\t\tif(strtoupper($alldata['StaffStatus']) != 'AC'){\n\t\t\t\tthrow new Exception('Your account is not active.');\n\t\t\t}\t\n\n\t\t\t\n\n\t\t\t$StaffName = $alldata['StaffName'];\n\t\t\t$insert = array();\n\t\t\t$insert['mob_user_staff_code'] = $alldata['LoginID'];\n\t\t\t$insert['lat'] = $lat;\n\t\t\t$insert['longitude'] = $long;\n\t\t\t$insert['add_date_time'] = $offline_sink_datetime;\n\t\t\t$insertId = $user->insertLocationTrackByStaffCode($insert);\n\n\t\t\t// update user table\n\n\t\t\tif($alldata['live_on_date'] != $curr_date){\n\t\t\t\t$update['Current_latitude'] = $lat;\n\t\t\t\t$update['Current_longitude'] = $long; \n\t\t\t\t$update['live_on_date'] = $curr_date;\n\t\t\t\t$user->updateSingleTableData('logi_field_users',$update,'LoginID',$alldata['LoginID']);\n\t\t\t}\t\n\n\t\t\t$db->commit();\n\t\t\t$succes = TRUE;\t\n\t\t}\n\n\t\tcatch(Exception $e){\n\n\t\t\t//Rollback transaction\n\n\t\t\t$db->rollBack();\n\t\t\t$error= $e->getMessage();\n\t\t}\n\t\tif($succes == TRUE ){\n\t\t\techo json_encode(array(\"error_code\"=>'0', 'response_string'=>'Location track added successfully.'));\n\t\t\texit;\n\t\t}\n\n\t\telse{\n\t\t\techo json_encode(array(\"error_code\"=>$error_code, 'response_string'=>$error ));\n\t\t\texit;\n\t\t}\n\n\t}", "function getLocation(){ return $this->_Location;}", "function wpcom_vip_disable_geolocation_output() {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n}", "public function prepare_getVillaMap($params)\n\t{\n\t\t$xml_string = \"strVillaURL=\".$params['strVillaURL'].\"\";\n\t\treturn $xml_string;\n\t}", "function getCoordinates($address){\r\n\t$key = \"AIzaSyA2PDrfTTbXNZKOn15K-VbWgLfdTevM3qw\";\r\n\t$url = \"https://maps.googleapis.com/maps/api/geocode/json?address=\".urlencode($address).\"&sensor=false&key=\".$key;\r\n\t$json = file_get_contents($url);\r\n\t$results = json_decode($json, true);\r\n\r\n\t$stack = array();\r\n\t$status = $results['status'];\r\n\tif ($status == \"OK\") {\r\n\t\t$lat = $results['results']['0']['geometry']['location']['lat'];\r\n\t\tarray_push($stack, $lat);\r\n\t\t$lng = $results['results']['0']['geometry']['location']['lng'];\r\n\t\tarray_push($stack, $lng);\r\n\t}\r\n\telse{\r\n\t\techo \"ERREUR DE GOOGLE GEOCODE API\";\r\n\t\t$incase = array();\r\n\t\tarray_push($stack, 48.853396);\r\n\t\tarray_push($stack, 2.348779);\r\n\t\treturn $incase;\r\n\t}\r\n\t\r\n\treturn $stack;\r\n}", "private function filterCoord( Coord $coord ): bool {\n\t\tif ( !$this->bbox && $coord->distance > $this->radius ) {\n\t\t\treturn false;\n\t\t}\n\t\t// Only one globe is supported for search, this is future-proof\n\t\tif ( $coord->globe != $this->coord->globe ) {\n\t\t\treturn false;\n\t\t}\n\t\tif ( isset( $this->params['maxdim'] ) && $coord->dim > $this->params['maxdim'] ) {\n\t\t\treturn false;\n\t\t}\n\t\t// @phan-suppress-next-line PhanTypeArraySuspiciousNullable $params always set here\n\t\t$primary = $this->params['primary'];\n\t\tif ( ( $primary == 'primary' && !$coord->primary )\n\t\t\t|| ( $primary == 'secondary' && $coord->primary )\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "function setDebug(){\n if(isset($_GET['debug']) && $_GET['debug']==\"true\"){\n return true;\n }\n return false;\n }", "function _location($rec){\n\t\treturn array(\n\t\t\t'id' => $rec['zip'],\n\t\t\t'city' => $rec['city'],\n\t\t\t'geolocation' => sprintf('%s,%s',trim($rec['latitude']),trim($rec['longitude'])),\n\t\t\t'latitude' => $rec['latitude'],\n\t\t\t'longitude' => $rec['longitude'],\n\t\t\t'postal' => $rec['zip'],\n\t\t\t'state' => $rec['state'],\n\t\t\t'county' => $rec['county'],\n\t\t\t'country' => $rec['country'],\n\t\t);\n\t}", "function maps_actual_url($url, $uriapp = NULL){\n //Elimino el primer caracter si es igual a \"/\"\n if(substr($url, 0, 1) == \"/\"){\n $url= substr($url, 1);\n } \n //Separa la url pasada y la uri en partes para poder analizarlas\n $partes_url= explode(\"/\", $url);\n \n //Saco de la uri actual los parametros\n $uri_explode= explode(\"?\", URIAPP);\n if($uriapp != NULL){\n $uri_explode= explode(\"?\", $uriapp);\n }\n $uri_front= $uri_explode[0];\n //Separo la uri actual\n $partes_uri_actual= explode(\"/\", $uri_front); \n $mapea= TRUE; \n //Analiza que url-uri tiene mas elementos\n if(count($partes_url) >= count($partes_uri_actual)){\n //Si el tamano de la url es igual o mayor que la uri actual uso el for recorriendo las partes de la url\n $count_partes_uri= count($partes_url);\n for($i= 0; $i < $count_partes_uri; $i++) {\n if(count($partes_uri_actual) >= ($i + 1)){\n //Si hay un * no me importa que viene despues, mapea todo, no deberia haber nada despues\n if($partes_url[$i] != \"*\"){\n $pos_ocurrencia= strpos($partes_url[$i], \"*\");\n if($pos_ocurrencia != FALSE){\n $parte_url= explode(\"*\", $partes_url[$i]);\n $parte_url= $parte_url[0];\n if(strlen($partes_uri_actual[$i]) >= strlen($parte_url)){\n $parte_uri_actual= substr($partes_uri_actual[$i], 0, strlen($parte_url));\n if($parte_url == $parte_uri_actual){\n break;\n }\n else{\n $mapea= FALSE;\n break;\n }\n }\n else{\n $mapea= FALSE;\n break;\n }\n }\n //Si alguna esta vacia no compara el mapeo con () y voy directo a la comparacion\n if(empty($partes_url[$i]) || empty($partes_uri_actual[$i])){\n //Si no coinciden las partes no mapean\n if($partes_url[$i] != $partes_uri_actual[$i]){\n $mapea= FALSE;\n break;\n }\n }\n else{\n //Si la parte de la uri empieza con ( y termina con ) puede ir cualquier string ahi por lo que pasa directamente esta parte de la validacion\n if(! ($partes_url[$i]{0} == \"(\" and $partes_url[$i]{strlen($partes_url[$i]) -1} == \")\")){\n //Si no contiene ( y ) debe mapear\n //Si no coinciden las partes no mapean\n if($partes_url[$i] != $partes_uri_actual[$i]){\n $mapea= FALSE;\n break;\n }\n }\n }\n }\n else{\n break;\n }\n }\n else{\n //La uri actual no tiene mas partes y no hay coincidencia completa\n $mapea= FALSE;\n break;\n }\n } \n }\n else{\n //Si el tamano de la url pasada es menor que la uri uso el for recorriendo las partes de la uri\n $count_partes_uri_actual= count($partes_uri_actual);\n for($i= 0; $i < $count_partes_uri_actual; $i++){\n if(count($partes_url) >= ($i + 1)){ \n //Si hay un * no me importa que viene despues, mapea todo, no deberia haber nada despues\n if($partes_url[$i] != \"*\"){\n $pos_ocurrencia= strpos($partes_url[$i], \"*\");\n if($pos_ocurrencia != FALSE){\n $parte_url= explode(\"*\", $partes_url[$i]);\n $parte_url= $parte_url[0];\n if(strlen($partes_uri_actual[$i]) >= strlen($parte_url)){\n $parte_uri_actual= substr($partes_uri_actual[$i], 0, strlen($parte_url));\n if($parte_url == $parte_uri_actual){\n break;\n }\n else{\n $mapea= FALSE;\n break;\n }\n }\n else{\n $mapea= FALSE;\n break;\n }\n }\n //Si alguna esta vacia no compara el mapeo con () y voy directo a la comparacion\n if(empty($partes_url[$i]) || empty($partes_uri_actual[$i])){\n //Si no coinciden las partes no mapean\n if($partes_url[$i] != $partes_uri_actual[$i]){\n $mapea= FALSE;\n break;\n }\n }\n else{\n //Si la parte de la uri empieza con ( y termina con ) puede ir cualquier string ahi por lo que pasa directamente esta parte de la validacion\n if(! ($partes_url[$i]{0} == \"(\" and $partes_url[$i]{strlen($partes_url[$i]) -1} == \")\")){\n //Si no contiene ( y ) debe mapear \n //Si no coinciden las partes no mapean\n if($partes_url[$i] != $partes_uri_actual[$i]){\n $mapea= FALSE;\n break;\n }\n }\n }\n }\n else{\n break;\n }\n }\n else{\n //La url pasada no tiene mas partes y no hay coincidencia completa\n $mapea= FALSE;\n break;\n }\n }\n } \n return $mapea;\n }", "public function show_map() {\n $restaurant_location = Restaurant::where('id',$_POST['restaurant_id'])->first();\n $html = view('admin.restaurants.map-address')->with('restaurant_location', $restaurant_location)->render();\n if ($html) {\n $res_array = array(\n 'msg' => 'success',\n 'response' => $html,\n );\n echo json_encode($res_array);\n exit;\n } \n }", "private function cleanParams(){\n $brokenUrl = explode(\"&\", iWeb::currentUrl());\n unset($brokenUrl[0]);\n $brokenUrl = array_values($brokenUrl);\n foreach ($brokenUrl as $param){\n $paramaters = explode(\"=\",$param);\n $this->params[$paramaters[0]] = $paramaters[1];\n }\n\n }", "function create_Map($coordsTmp,$name) {\n\t\t\n\t\t\t\t// default atts\n\t\t\t\t\t$attr = shortcode_atts(array(\t\n\t\t\t\t\t\t\t\t\t'lat' => '57.700662', \n\t\t\t\t\t\t\t\t\t'lon' => '11.972609',\n\t\t\t\t\t\t\t\t\t'id' => 'map',\n\t\t\t\t\t\t\t\t\t'z' => '14',\n\t\t\t\t\t\t\t\t\t'w' => '530',\n\t\t\t\t\t\t\t\t\t'h' => '450',\n\t\t\t\t\t\t\t\t\t'maptype' => 'ROADMAP',\n\t\t\t\t\t\t\t\t\t'marker' => $coordsTmp\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t), $attr);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$map = '\n\t\t\t\t<div id=\"map\" style=\"width:530px;height:450px;border:1px solid gray;\"></div><br>\n\t\t\t\t\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\tvar infowindow = null;\n\t\t\t\tvar latlng=new google.maps.LatLng(57.700662,11.972609);\n\t\t\t\t\tvar latlngw = new google.maps.LatLng(' . $attr['lat'] . ', ' . $attr['lon'] . ');\n\t\t\t\t\tvar myOptions = {\n\t\t\t\t\t\tzoom: 13,\n\t\t\t\t\t\tcenter: latlng,\n\t\t\t\t\t\tmapTypeId: google.maps.MapTypeId.' . $attr['maptype'] . '\n\t\t\t\t\t};\n\t\t\t\t\tvar map = new google.maps.Map(document.getElementById(\"map\"),myOptions);';\n\t\t\n\t\t\t\t $map .=' var sites = [';\n\t\t\t\t\t\t//marker: show if address is not specified\n\t\t\t\t\t\tif ($attr['marker'] != ''){\n\t\t\t\t\t\t\t$markers = explode(\"|\",$attr['marker']);\n\t\t\t\t\t\t\tfor($i = 0;$i < count($markers);$i ++){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$markerTmp=$markers[$i];\n\t\t\t\t\t\t\t\t$marker= explode(\",\",$markerTmp);\n\t\t\t\t\t\t\t\t\tif (count($marker)>3) { \n\t\t\t\t\t\t\t\t\t$markerTmp2 .='['.$marker[0].',' .$marker[1].',\\'' . $marker[2] . '\\',\\'' . $marker[3] . '\\'],';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$markerTmp2 .='['.$marker[0].',' .$marker[1].',\\'' . $marker[2] . '\\',null],';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t }\n\t \n\t\t\t\t\t $markerTmp2=substr ($markerTmp2,0,strlen ( $markerTmp2 )-1);\n\t\t\t\t\t $map .=$markerTmp2;\n\t\t\t\t\t $map .='];';\n\t\t\t\t\t $map .='';\n\t\t\t\t\t $map .=' for (var i = 0; i < sites.length; i++) {';\n\t\t\t\t\t $map .=' var site = sites[i];';\n\t\t\t\t\t $map .=' var siteLatLng = new google.maps.LatLng(site[0], site[1]);';\t\n\t\t\t\t\t $map .=' var markerimage = site[3];';\n\t\t\t\t\t \n\t\t\t\t\t $map .=' var marker = new google.maps.Marker({';\n\t\t\t\t\t $map .=' position: siteLatLng, ';\n\t\t\t\t\t $map .=' map: map,title:\"'.$addr.'\",';\n\t\t\t\t\t $map .=' icon: markerimage,';\n\t\t\t\t\t $map .=' html: \"Hello dude\" }); \n\t\t\t\t\t \n\t\t\t\t\t var infowindow = new google.maps.InfoWindow({\n\t\t\t\t\t\t\tcontent: \"Hello dude\"\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\tvar marker3 = new google.maps.Marker({\n\t\t\t\t\t\t\t\tposition: latlng,\n\t\t\t\t\t\t\t\tmap: map,\n\t\t\t\t\t\t\t\ttitle:\"Uluru (Ayers Rock)\"\n\t\t\t\t\t\t});\n\n\t\t\t\t\t \n\t\t\t\t\t\t\t\tgoogle.maps.event.addListener(marker3, \"click\", function () {\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tinfowindow.open(map,marker3);\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t;}\n\t\t\t\t\t\t\t\t</script>';\n\t\t\t\t\t\treturn $map;\n\t\t\t\t\t}", "function getCoords(){\n\tglobal $conn;\n\t$numargs = func_num_args();\n\t/* all foi */\n\tif ($numargs == 0){\n\t\t$result= pg_query($conn,\"SELECT ST_X(geom), ST_Y(geom) FROM feature_of_interest\");\n\t\treturn pg_fetch_all($result);\n\t}\n\t/* one foi */\n\telse\n\t{\n\t\t$foi_id = func_get_arg(0);\n\t\t$result = pg_query($conn,\"SELECT ST_X(geom), ST_Y(geom) \n\t\t\t\tFROM feature_of_interest \n\t\t\t\tWHERE feature_of_interest_id = '$foi_id' \");\n\t\treturn pg_fetch_all($result);\n\t}\n}", "public function test_make_coordinates_4()\n {\n $coord = \"52° 32' 25\\\" N; 89° 40' 31\\\" W\";\n $dd = \\SimpleMappr\\Mappr::makeCoordinates($coord);\n $this->assertEquals($dd[0], 52.540277777778);\n $this->assertEquals($dd[1], -89.675277777778);\n }", "public function getCoordinates();", "public function executeVisu(sfWebRequest $request) {\n $this->forward404Unless($cp_etablissement = Doctrine_Core::getTable('CpEtablissement')->find(array($request->getParameter('cp_etablissement_id'))), sprintf('Object cp_etablissement does not exist (%s).', $request->getParameter('cp_etablissement_id')));\n $this->cp_etablissement = $cp_etablissement;\n\n /*\n * récuprération des informations de la fiche pour centrer la carte GoogleMap\n */\n //utilisation des coordonnées\n\n $val_test = 0;\n if (($cp_etablissement->getCpEtablissementLatitude() != '0.000000000'\n && !is_null($cp_etablissement->getCpEtablissementLatitude())\n && $cp_etablissement->getCpEtablissementLatitude() != '')\n && ($cp_etablissement->getCpEtablissementLongitude() != '0.000000000'\n && !is_null($cp_etablissement->getCpEtablissementLongitude())\n && $cp_etablissement->getCpEtablissementLongitude() != '')) {\n\n $this->gMap = new GMap();\n //récupération de l'adresse du lieu à partir des coordonnées\n // Reverse geocoding of the center of the map\n $geocoded_address = new GMapGeocodedAddress(null);\n $geocoded_address->setLat($cp_etablissement->getCpEtablissementLatitude());\n $geocoded_address->setLng($cp_etablissement->getCpEtablissementLongitude());\n $geocoded_address->reverseGeocode($this->gMap->getGMapClient());\n\n //gestion de l'adresse dans la bulle\n $info_window = new GMapInfoWindow('<div class=\"icon_map\"><b>Addresse:</b><br />' . $geocoded_address->getGeocodedAddress() . '</div>');\n $gMapEvent = new GMapEvent('click', \"get_click_coord\", false);\n $this->gMap->addEvent($gMapEvent);\n $this->gMap->addGlobalVariable('marker', 'null');\n\n $name = '\"' . $cp_etablissement->getCpEtablissementEtablissementNom() . '\"';\n\n $gMapMarker = new GMapMarker($cp_etablissement->getCpEtablissementLatitude(), $cp_etablissement->getCpEtablissementLongitude(), array('title' => $name), 'marker');\n\n $gMapMarker->addHtmlInfoWindow($info_window);\n\n $this->gMap->addMarker($gMapMarker);\n\n $this->gMap->centerAndZoomOnMarkers();\n }\n //utilisation de l'adresse\n elseif ($cp_etablissement->getCpEtablissementAdresse1() != '' && $cp_etablissement->getCpEtablissementCodePostal() != '' && $cp_etablissement->getCpEtablissementVilleId() != '') {\n $depVille = Doctrine_Core::getTable('VilleFr')->find($cp_etablissement->getCpEtablissementVilleId());\n //génération de l'adresse pour GMap\n $adresse = $cp_etablissement->getCpEtablissementAdresse1() . \", \" . $cp_etablissement->getCpEtablissementCodePostal() . \" \" . $depVille['nom_ville'];\n\n $this->gMap = new GMap();\n //récupération de l'adresse du lieu\n $geocoded_address = $this->gMap->geocode($adresse);\n //gestion de l'adresse dans la bulle\n $info_window = new GMapInfoWindow('<div class=\"icon_map\"><b>Addresse:</b><br />' . $adresse . '</div>');\n $gMapEvent = new GMapEvent('click', \"get_click_coord\", false);\n $this->gMap->addEvent($gMapEvent);\n $this->gMap->addGlobalVariable('marker', 'null');\n\n $name = '\"' . $cp_etablissement['cp_etablissement_etablissement_nom'] . '\"';\n\n $gMapMarker = new GMapMarker($geocoded_address->getLat(), $geocoded_address->getLng(), array('title' => $name), 'marker');\n\n $gMapMarker->addHtmlInfoWindow($info_window);\n\n $this->gMap->addMarker($gMapMarker);\n\n $this->gMap->centerAndZoomOnMarkers();\n\n //mise à jour des latitudes et longitudes\n }\n //utilisation de l'adresse de covoiturage plus (definie dans app.yml)\n else {\n $this->gMap = new GMap();\n //récupération de l'adresse de covoiturage plus (definie dans app.yml)\n $geocoded_address = $this->gMap->geocode(sfConfig::get('app_covoiturage_adresse_map'));\n $gMapMarker = new GMapMarker($geocoded_address->getLat(), $geocoded_address->getLng());\n //$gMapMarker->addHtmlInfoWindow('<b>Address:</b><br />'.sfConfig::get('app_covoiturage_adresse_map'));\n $this->gMap->addMarker($gMapMarker);\n\n //$this->gMap->addMarker(new GMapMarker($geocoded_address->getLat(),$geocoded_address->getLng()));\n $this->gMap->centerAndZoomOnMarkers();\n //$val_test = $geocoded_address->getLat().\"-\".$geocoded_address->getLng();\n //$val_test = $gAddress->getRawAddress();\n }\n\n //sélection du layout de popup en cas de demande d'affichage en popup\n if ($request->getParameter('popup') && $request->getParameter('popup') == 1) {\n $this->setLayout('layout-popup');\n\n //indicateur de fenetre en popup pour affichage des boutons adéquats\n $this->popup = 1;\n }\n \n //utilisation d'un indicateur indiquant que'un module est intégré dans un autre moduel\n // (permet d'éviter d'afficher plusieur fois le bouton \"fermer la fenetre\")\n if ($request->getParameter('listeIntegre') && $request->getParameter('listeIntegre') == 1) {\n $this->listeIntegre = 1;\n }\n }", "public function getUserLocation();", "function get_directions( $location ) {\n\treturn directions_base_url . urlencode( str_replace( \"\\n\", ', ', $location->address ) ) // change newlines into comma+space so google maps can process it properly\n\t . '/@' . $location->latitude . ',' . $location->longitude . ',17z/';\n\t// https://www.google.com/maps/dir//6850+Lake+Nona+Blvd,+Orlando,+FL+32827/@28.3676791,-81.2850738,17z/\n}", "function getURL(string $location, array $param = []){\n $base_url = getBaseURL();\n $path = !empty($param) || $location !== \"index\" ? \"{$location}.php\" : \"\";\n if(!empty($param)){\n $query_params = http_build_query($param);\n $path .= \"?{$query_params}\";\n // var_dump($query_params);\n // exit();\n }\n return \"{$base_url}/{$path}\";\n}", "abstract public function addCoord(array $coord);", "public function get_track_loc($id) {\n $request = Requests::where('security_key', $id)->where('is_started', 1)->where('is_completed', 0)->first();\n if ($request) {\n $owner = Owner::where('id', $request->owner_id)->first();\n $user_name = $owner->first_name . \" \" . $owner->last_name;\n $theme = Theme::all();\n $logo = '/image/logo.png';\n $favicon = '/image/favicon.ico';\n foreach ($theme as $themes) {\n $favicon = '/uploads/' . $themes->favicon;\n $logo = '/uploads/' . $themes->logo;\n }\n if ($logo == '/uploads/') {\n $logo = '/image/logo.png';\n }\n if ($favicon == '/uploads/') {\n $favicon = '/image/favicon.ico';\n }\n $app_name = Config::get('app.website_title');\n // walk location\n $start_loc = WalkLocation::where('request_id', $request->id)->first();\n $reqloc = WalkLocation::where('request_id', $request->id)->orderBy('id', 'desc')->first();\n $title = 'Track ' . $user_name;\n\n return Response::json(array('success' => true,\n 'titl' => $title,\n 'logo' => $logo,\n 'favicon' => $favicon,\n 'app_name' => $app_name,\n 'cur_lat' => $reqloc->latitude,\n 'cur_lon' => $reqloc->longitude,\n 'prev_lat' => $start_loc->latitude,\n 'prev_lon' => $start_loc->longitude,\n 'track_id' => $id));\n } else {\n return Redirect::to('/');\n }\n }", "function humanize_point($location) {\n\tglobal $global_mysqli_link;\n\tglobal $protokd_point_start, $protokd_point_finish;\n\tglobal $message_start, $message_finish;\n\tglobal $gmaps_geocode_url, $gmaps_server_key, $maximum_http_response_size;\n\tglobal $cache_geocoding;\n\n\t//location = start, return message start\n\tif ($location == $protokd_point_start) {\n\t\treturn $message_start;\n\t} else if ($location == $protokd_point_finish) {\n\t//location = finish, return message start\n\t\treturn $message_finish;\n\t} else {//selain start atau finish\n\t\t//escape string location untuk dimasukkan ke query sql\n\t\t$location = mysqli_escape_string($global_mysqli_link, $location);\n\n\t\t//cek cache ada dengan key cache_geocoding,value location\n\t\t$cached_geocode = get_from_cache($cache_geocoding, $location);\n\t\t//kalo tidak null, return langsung\n\t\tif (!is_null($cached_geocode)) {\n\t\t\treturn $cached_geocode;\n\t\t} else {//jika null cachenya\n\n\t\t\t// query from google.\n\t\t\t$full_url = \"$gmaps_geocode_url?key=$gmaps_server_key&latlng=$location&sensor=false\";\n\t\t\t$result = file_get_contents($full_url, NULL, NULL, 0, $maximum_http_response_size + 1);\n\t\t\tif ($result == FALSE) {\n\t\t\t\tdie_nice(\"There's an error while reading the geocoding response from $full_url.\");\n\t\t\t}\n\t\t\t// TODO this checking doesn't seem to work.\n\t\t\tif (sizeof($result) > $maximum_http_response_size) {\n\t\t\t\tdie_nice(\"Data returned from $full_url is greater than the maximum.\");\n\t\t\t}\n\t\t\t$json_response = json_decode($result, true);\n\t\t\tif ($json_response == NULL) {\n\t\t\t\tdie_nice(\"Unable to retrieve JSON response from Google geocoding service.\");\n\t\t\t}\n\t\t\t//add sugestion place\n\t\t\tif ($json_response['status'] == 'OK') {\n\t\t\t\t$bestguess = $location;\n\t\t\t\tfor ($i = 0; $i < count($json_response['results']); $i++) {\n\t\t\t\t\tforeach ($json_response['results'][0]['address_components'] as $component) {\n\t\t\t\t\t\tif (in_array('transit_station', $component['types']) || in_array('route', $component['types'])) {\n\t\t\t\t\t\t\tput_to_cache($cache_geocoding, $location, $component['long_name']);\n\t\t\t\t\t\t\treturn $component['long_name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$bestguess = $component['long_name'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlog_error(\"Warning: can't find street name, use best guess $bestguess for $location.\");\n\t\t\t\tput_to_cache($cache_geocoding, $location, $bestguess);\n\t\t\t\treturn $bestguess;\n\t\t\t} else if ($json_response['status'] == 'ZERO_RESULTS') {\n\t\t\t\t// If not found, return the coordinate.\n\t\t\t\tlog_error(\"Warning: can't find coordinate for $location.\");\n\t\t\t\treturn $location;\n\t\t\t} else {\n\t\t\t\tdie_nice(\"Problem while geocoding from Google reverse geocoding: \" . $result);\n\t\t\t}\n\t\t}\n\t}\n}", "private function __geocoords($q,$options = array())\n\t{\n\t\t$data = array();\n\n\t\t//Extract variables to use\n\t\textract($options);\n\t\textract($this->settings[$model->alias]['providers'][$provider]);\n\n\t\t//Add country code to query\n\t\t$q .= ', '.$country_code;\n\n\t\t//Build url\n\t\t$url = String::insert($url,compact('api','q','country_code'));\n\n\t\t//Get data and parse\n\t\tif ($result = $this->connection->get($url)) {\n\t\t\tforeach ($fields as $field => $regex) {\n\t\t\t\tif (preg_match($regex,$result,$match)) {\n\t\t\t\t\tif (!empty($match[1]))\n\t\t\t\t\t\t$data[$field] = $match[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $data;\n\t}" ]
[ "0.5615859", "0.5553344", "0.55347407", "0.54020506", "0.53896165", "0.53784454", "0.53530604", "0.51750964", "0.51146775", "0.50999045", "0.5054732", "0.5023287", "0.501986", "0.50038654", "0.49962163", "0.49820057", "0.49731204", "0.49692267", "0.49692267", "0.496648", "0.49662793", "0.4953131", "0.4950759", "0.49312407", "0.4919486", "0.49079752", "0.48819494", "0.48729303", "0.48179093", "0.4808208", "0.47980255", "0.47951466", "0.47913796", "0.47647727", "0.4757042", "0.47208473", "0.4704351", "0.4698268", "0.4692437", "0.468986", "0.46705118", "0.4664572", "0.4659603", "0.46563184", "0.4639441", "0.46241194", "0.46240917", "0.46238443", "0.46238056", "0.4619943", "0.46190324", "0.46148607", "0.46014932", "0.45980301", "0.45923236", "0.45908895", "0.4584018", "0.45712125", "0.45710564", "0.45676863", "0.4565134", "0.45646778", "0.45623145", "0.4557229", "0.45497715", "0.4544419", "0.45427305", "0.45424783", "0.4536805", "0.45332226", "0.4519633", "0.45109773", "0.45076624", "0.45073795", "0.4507334", "0.4504894", "0.44983467", "0.44978598", "0.44914094", "0.44902012", "0.4481435", "0.44797763", "0.44716102", "0.44714722", "0.44712475", "0.44663787", "0.44651347", "0.44577816", "0.44551286", "0.44522107", "0.4450019", "0.44418147", "0.443774", "0.44367492", "0.44366473", "0.44359055", "0.4431793", "0.44272465", "0.44258866", "0.44251537" ]
0.5457036
3
Construct the basket item
public function __construct($id, $item);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($_name = NULL,$_number = NULL,$_quantity = NULL,$_tax = NULL,$_amount = NULL,$_ebayItemPaymentDetailsItem = NULL,$_promoCode = NULL,$_productCategory = NULL,$_description = NULL,$_itemWeight = NULL,$_itemLength = NULL,$_itemWidth = NULL,$_itemHeight = NULL,$_itemURL = NULL,$_enhancedItemData = NULL,$_itemCategory = NULL)\r\n\t{\r\n\t\tparent::__construct(array('Name'=>$_name,'Number'=>$_number,'Quantity'=>$_quantity,'Tax'=>$_tax,'Amount'=>$_amount,'EbayItemPaymentDetailsItem'=>$_ebayItemPaymentDetailsItem,'PromoCode'=>$_promoCode,'ProductCategory'=>$_productCategory,'Description'=>$_description,'ItemWeight'=>$_itemWeight,'ItemLength'=>$_itemLength,'ItemWidth'=>$_itemWidth,'ItemHeight'=>$_itemHeight,'ItemURL'=>$_itemURL,'EnhancedItemData'=>$_enhancedItemData,'ItemCategory'=>$_itemCategory));\r\n\t}", "public function addBasketItemParams()\n {\n $oBasket = $this->getBasket();\n $oLang = $this->getLang();\n $oRequest = $this->getPayPalRequest();\n\n $iPos = 0;\n foreach ($oBasket->getContents() as $oBasketItem) {\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NAME{$iPos}\", getStr()->html_entity_decode($oBasketItem->getTitle()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_AMT{$iPos}\", $this->_formatFloat($oBasketItem->getUnitPrice()->getPrice()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_QTY{$iPos}\", (int) $oBasketItem->getAmount());\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_ITEMURL{$iPos}\", $oBasketItem->getLink());\n\n $oBasketProduct = $oBasketItem->getArticle();\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NUMBER{$iPos}\", $oBasketProduct->oxarticles__oxartnum->value);\n\n $iPos++;\n }\n\n //adding payment costs as product\n if ($oBasket->getPayPalPaymentCosts() > 0) {\n $sPaymentTitle = $oLang->translateString(\"OEPAYPAL_SURCHARGE\") . \" \" . $oLang->translateString(\"OEPAYPAL_TYPE_OF_PAYMENT\");\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NAME{$iPos}\", $sPaymentTitle);\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_AMT{$iPos}\", $this->_formatFloat($oBasket->getPayPalPaymentCosts()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_QTY{$iPos}\", 1);\n\n $iPos++;\n }\n\n //adding wrapping as product\n if ($oBasket->getPayPalWrappingCosts() > 0) {\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NAME{$iPos}\", $oLang->translateString(\"OEPAYPAL_GIFTWRAPPER\"));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_AMT{$iPos}\", $this->_formatFloat($oBasket->getPayPalWrappingCosts()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_QTY{$iPos}\", 1);\n\n $iPos++;\n }\n\n //adding greeting card as product\n if ($oBasket->getPayPalGiftCardCosts() > 0) {\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NAME{$iPos}\", $oLang->translateString(\"OEPAYPAL_GREETING_CARD\"));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_AMT{$iPos}\", $this->_formatFloat($oBasket->getPayPalGiftCardCosts()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_QTY{$iPos}\", 1);\n\n $iPos++;\n }\n\n //adding trusted shops protection as product\n if ($oBasket->getPayPalTsProtectionCosts() > 0) {\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NAME{$iPos}\", $oLang->translateString(\"OEPAYPAL_TRUSTED_SHOP_PROTECTION\"));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_AMT{$iPos}\", $this->_formatFloat($oBasket->getPayPalTsProtectionCosts()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_QTY{$iPos}\", 1);\n }\n }", "public function getItemBag() {\n $item_classname = $this->getItemClass();\n $item_bag_classname = $this->getItemBagClass();\n $items = new $item_bag_classname();\n $currency = NULL;\n foreach ($this->getPayment()->getLineItems() as $line_item) {\n $item = new $item_classname();\n $item->setPrice($line_item->getAmount());\n $item->setQuantity($line_item->getQuantity());\n $item->setDescription($line_item->getDescription());\n $item->setName($line_item->getName());\n $items->add($item);\n\n $line_item_currency = $line_item->getCurrencyCode();\n\n if ($line_item_currency != $currency) {\n if ($currency != NULL) {\n // This is the second time we are changing the currency which means\n // that our line items have mixed currencies. This ain't gonna work!\n drupal_set_message($this->t('Mixed currencies detected which is not yet supported.'), 'error');\n return new OperationResult(NULL);\n }\n $currency = $line_item_currency;\n }\n }\n $this->setCurrency($currency);\n return $items;\n }", "protected function createItem()\n {\n return $this->_setUpNewNode(\n new Item()\n );\n }", "function _addItem ($quantity, $rate, $weight, $length, $width, $height, $description, $readytoship=0) {\r\n $index = $this->items_qty;\r\n $this->item_quantity[$index] = (string)$quantity;\r\n $this->item_weight[$index] = ( $weight ? (string)$weight : '0' );\r\n $this->item_length[$index] = ( $length ? (string)$length : '0' );\r\n $this->item_width[$index] = ( $width ? (string)$width : '0' );\r\n $this->item_height[$index] = ( $height ? (string)$height : '0' );\r\n $this->item_description[$index] = $description;\r\n $this->item_readytoship[$index] = $readytoship;\r\n $this->items_qty ++;\r\n $this->items_price += $quantity * $rate;\r\n }", "public function __construct(Basket $basket)\n {\n $this->basket = $basket;\n\n }", "public function __construct(Basket $basket)\n {\n $this->basket = $basket;\n\n }", "public function add_item()\n {\n $request = new Types\\AddItemRequestType();\n\n // An user token is required when using the Trading service.\n $request->RequesterCredentials = new Types\\CustomSecurityHeaderType();\n $request->RequesterCredentials->eBayAuthToken = $this->config->item('authToken');\n\n\n // Begin creating the auction item.\n $item = new Types\\ItemType();\n\n $item->DispatchTimeMax = 3;\n /**\n * We want a single quantity auction.\n * Otherwise known as a Chinese auction.\n */\n $item->ListingType = Enums\\ListingTypeCodeType::C_CHINESE;\n $item->Quantity = 1;\n\n $item->ProductListingDetails = new Types\\ProductListingDetailsType();\n $item->ProductListingDetails->ISBN = $ISBN;\n $item->ProductListingDetails->UPC = $UPC;\n $item->ProductListingDetails->EAN = $EAN;\n\n $item->ProductListingDetails->BrandMPN = new DTS\\eBaySDK\\Trading\\Types\\BrandMPNType();\n $item->ProductListingDetails->BrandMPN->Brand = '';\n $item->ProductListingDetails->BrandMPN->MPN = '';\n\n $item->ListingDuration = Enums\\ListingDurationCodeType::C_DAYS_7;\n\n }", "public function createBasketForOrder(OrderModel $order): Basket\n {\n $basket = new Basket();\n $basket->setAmountTotalGross($order->getGrandTotal());\n $basket->setAmountTotalDiscount(abs($order->getDiscountAmount()));\n $basket->setCurrencyCode($order->getOrderCurrencyCode());\n $basket->setOrderId($order->getIncrementId());\n\n if ($order->getShippingAmount() > 0) {\n $basketItem = new BasketItem();\n $basketItem->setAmountNet($order->getShippingAmount());\n $basketItem->setAmountDiscount(abs($order->getShippingDiscountAmount()));\n $basketItem->setAmountGross($order->getShippingInclTax());\n $basketItem->setAmountPerUnit($order->getShippingInclTax());\n $basketItem->setAmountVat($order->getShippingTaxAmount());\n $basketItem->setTitle('Shipment');\n $basketItem->setType(BasketItemTypes::SHIPMENT);\n\n $basket->addBasketItem($basketItem);\n }\n\n foreach ($order->getAllVisibleItems() as $orderItem) {\n /** @var OrderModel\\Item $orderItem */\n\n // getAllVisibleItems() only checks getParentItemId() but it's possible that there is a parent item set\n // without a parent item id.\n if ($orderItem->getParentItem() !== null) {\n continue;\n }\n\n $totalInclTax = $orderItem->getRowTotalInclTax();\n if ($totalInclTax === null) {\n $totalInclTax = $orderItem->getRowTotal();\n }\n\n $basketItem = new BasketItem();\n $basketItem->setAmountNet($orderItem->getRowTotal());\n $basketItem->setAmountDiscount(abs($orderItem->getDiscountAmount()));\n $basketItem->setAmountGross($totalInclTax);\n $basketItem->setAmountPerUnit($orderItem->getPrice());\n $basketItem->setAmountVat($orderItem->getTaxAmount());\n $basketItem->setQuantity($orderItem->getQtyOrdered());\n $basketItem->setTitle($orderItem->getName());\n $basketItem->setType($orderItem->getIsVirtual() ? BasketItemTypes::DIGITAL : BasketItemTypes::GOODS);\n\n $basket->addBasketItem($basketItem);\n }\n\n return $basket;\n }", "public function ITEM($itemid) { $this->__construct($itemid); }", "public function createNewItem();", "function geneshop_add2basket($node, $type) {\n // Verification of the absence of this node in basket.\n if (_geneshop_in_basket($node->nid)) {\n drupal_set_message(t('\"@title\" is already in your basket', array('@title' => $node->title)\n ), 'warning');\n }\n else {\n global $user;\n if ($user->uid == 0 && !drupal_session_started()) {\n // Must initialize sessions for anonymous users.\n drupal_session_start();\n }\n $item = array();\n $sql =<<<SQL\n SELECT *\n FROM chado.gene\n WHERE nid = :nid\nSQL;\n $args = array(':nid' => $node->nid);\n $result = db_query($sql, $args)->fetchObject();\n $vars = get_object_vars ( $result );\n $item['title'] = $result->name;\n $item['content'] = $result->name . \"~\" . $result->coordinate . \"~\" . $result->start . \"~\" . $result->stop . \"~\" . $result->gene_family . \"~\" . $result->description;\n $item['header'] = \"Name~Chromosome~Start~End~Gene family~Description\";\n if (variable_get('geneshop_show_qty', TRUE)) {\n $item['qty'] = 1;\n }\n if (variable_get('geneshop_show_price', FALSE) && ($price = _geneshop_get_price($node))) {\n if ($price <= 0 || !is_numeric($price)\n ) {\n drupal_set_message(t('Sorry, but this product currently unavailable\n for ordering'), 'warning');\n $item = FALSE;\n }\n else {\n if (!isset($_SESSION['basket']['currency'])) {\n $_SESSION['basket']['currency'] = variable_get('geneshop_price_suffix', '');\n }\n if (!isset($_SESSION['basket']['total_sum'])) {\n $_SESSION['basket']['total_sum'] = 0;\n }\n $_SESSION['basket']['total_sum'] += $price;\n $item['price'] = $_SESSION['basket']['store'][$node->nid]['unit_price'] = $price;\n }\n }\n if ($item) {\n $_SESSION['basket']['items'][$node->nid] = $item;\n /*drupal_set_message(t(\"'@title' added in your basket\", array('@title' => $node->title)));*/\n }\n }\n if ($type == 'ajax') {\n $basket_block = geneshop_block_content();\n $commands = array();\n $commands[] = ajax_command_replace(NULL, geneshop_add2basket_link($node->nid));\n $commands[] = ajax_command_replace('#geneshop-ajax-block-content', render($basket_block));\n $output = array('#type' => 'ajax', '#commands' => $commands);\n ajax_deliver($output);\n }\n else {\n // drupal_goto();\n }\n}", "public function additem()\r\n {\r\n $shipping = array( 'ShippingServiceOptions' => array(\r\n\r\n 'ShippingService' => 'UPSGround',\r\n 'ShippingServiceCost' => 0.0,\r\n 'ShippingServiceAdditionalCost' => 0.0,\r\n 'ShippingServicePriority' => 1,\r\n 'ExpeditedService' => false,\r\n\r\n\r\n ),\r\n 'ShippingType' => 'Flat',\r\n );\r\n\r\n $returnPolicy = array(\r\n 'ReturnsAcceptedOption' => 'ReturnsAccepted',\r\n 'RefundOption' => 'MoneyBack',\r\n 'ReturnsWithinOption' => 'Days_30',\r\n 'Description ' =>'If you are not satisfied, return the item for refund.',\r\n 'ShippingCostPaidByOption' => 'Buyer',\r\n );\r\n\r\n $item = array(\r\n 'PrimaryCategory' => array('CategoryID' => 111422), // ok\r\n 'Title' => 'Miechu nowy',\r\n 'Description' => 'Testowy opis',\r\n 'StartPrice' => 100, //\r\n 'BuyItNowPrice' => 500,//\r\n 'ReservePrice' => 400,//\r\n 'Country' => 'US',//\r\n 'Currency' => 'USD',//\r\n 'ListingDuration' => 'Days_7',//\r\n 'PictureDetails' => 'dummy',//\r\n 'Site' => 'US',//\r\n 'Location' => 'San Jose',//\r\n 'PaymentMethods' => 'PayPal',//\r\n 'PayPalEmailAddress' => '[email protected]',//\r\n 'ShippingDetails' => $shipping,//\r\n 'DispatchTimeMax' => 3,//\r\n 'ConditionID' => 1000,//\r\n 'ReturnPolicy' => $returnPolicy,//\r\n\r\n );\r\n\r\n $params = array(\r\n 'Version' => 831,\r\n 'Item' => $item\r\n\r\n\r\n\r\n\r\n\r\n );\r\n $method = 'addItem';\r\n\r\n try{\r\n\r\n $resp = debay::sendRequest($method,$params);\r\n\r\n $this->load->model('ebay/debay');\r\n\r\n\r\n }\r\n catch(Exception $e)\r\n {\r\n echo $e->getMessage();\r\n }\r\n }", "public function add_to_basket_post() {\n $user_id = $this -> post('user_id') ? $this -> post('user_id') : \"\";\n $special_id = $this -> post('special_id') ? $this -> post('special_id') : \"\";\n $product_id = $this -> post('product_id') ? $this -> post('product_id') : \"\";\n $product_count = (int) $this -> post('product_count') ? (int) $this -> post('product_count') : \"1\";\n \n $retailerId = (int) $this->post('retailer_id') ? (int)$this->post('retailer_id') : 0;\n $storeId = (int) $this->post('store_id') ? (int) $this->post('store_id') : 0;\n \n \n $allToAdd = \"No\";\n \n if($storeId > 0 )\n {\n $storeDetails = $this -> basketmodel -> get_store_retailer_details($storeId);\n $storeTypeId = $storeDetails['StoreTypeId'];\n }else{\n # Get user preference\n $user_preference = $this -> usermodel ->get_user_preference($user_id);\n if($user_preference)\n {\n $retailerId = $user_preference['RetailerId'];\n $storeTypeId = $user_preference['StoreTypeId'];\n $storeId = $user_preference['StoreId'];\n }\n }\n \n # Get products StorePrice \n $productStorePrice = $this -> productmodel ->get_product_store_price($product_id,$retailerId,$storeTypeId,$storeId);\n \n if($productStorePrice > 0 )\n {\n $allToAdd = \"Yes\"; \n }\n \n if($allToAdd == \"Yes\")\n {\n $result = $this -> basketmodel -> add_to_basket($special_id, $product_id, $user_id, $product_count);\n\n //$basket_count = $this -> basketmodel -> get_basket_count($user_id);\n $basket_count = $this -> basketmodel -> get_user_basket_count($user_id,$retailerId,$storeId);\n \n if ($result == 'duplicate') {\n $message = \"Product already added to basket\";\n $result = 0;\n }\n else {\n $message = \"Product added to basket successfully\";\n }\n\n if ($result) {\n $retArr['status'] = SUCCESS;\n $retArr['message'] = $message;\n $retArr['basket_count'] = $basket_count;\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n else {\n $retArr['status'] = FAIL;\n $retArr['message'] = $message;\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n \n }else{\n $retArr['status'] = FAIL;\n $retArr['message'] = \"Not allow to add this product.\";\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die; \n }\n }", "function __construct()\n\t{\n\t\t$standard_proteins = array('Grilled chicken', 'Seared steak', 'Caramelized pork belly', 'Fried tofu', 'Seasonal roasted veggies');\n\t\t$standard_toppings = array('Pickles', 'Extra dressing', 'Cheese', 'Fruit', 'Jalapenos', 'Olives');\n\n\t\t$standard_quantities = array(0,1,2,3,4,5,6,7,8);\n\t\t//($name, $description, $price, $quantities, $options, $extras)\n\t\t$items = array(\n\t\t\tnew items('RICE BOWL', 'Brown Rice or White rice, pickled carrot & daikon, mesclun, cilantro, scallions, fried shallots, and soy drizzle.', 8.25, \n\t\t\t $standard_quantities, $standard_proteins, $standard_toppings),\n\t\t\tnew items('NOODLE SALAD', 'Soba or Rice Noodles (GF), carrot, mesclun, cilantro, and red onion.', 9, \n\t\t\t $standard_quantities, $standard_proteins, $standard_toppings),\n\t\t\tnew items('SALAD (GF)', 'A bed of mesclun with carrot, cilantro, red onion, tomatoes, and almonds', 8, \n\t\t\t $standard_quantities, $standard_proteins, $standard_toppings)\n\t\t);\n\n\t\t//$name, $description, $price, $quantities, $flavors, $sizes\n\t\t$standard_drink_sizes = array('Small', 'Medium', 'Large');\n\n\t\t$beverage = array(\n new beverage('RUMBO', 'Almonds and bananas are blended together.', 5.25, $standard_quantities, $standard_drink_sizes),\n new beverage('SUNRISE STAR', 'spinach, broccoli, celery, cucumber, orange, banana, grapefruit, ice.', 6.25, $standard_quantities, $standard_drink_sizes),\n new beverage('SUNSET STAR', 'carrots, strawberries, orange, peach, ice.', 5.25, $standard_quantities, $standard_drink_sizes),\n\t\t\tnew beverage('Banana Nut', 'Almonds and bananas are blended together.', 5.25, $standard_quantities, $standard_drink_sizes),\n new beverage('Mango Tango', 'Strawberries, mango, pineapple, banana.', 5.75, $standard_quantities,\n\t\t\t $standard_drink_sizes),\n new beverage('Island Passion', 'Mango, bananas and peaches delivered with a hint of coconut keeps you coming back to the island.', 6.00, $standard_quantities, $standard_drink_sizes),\n\t\t\t\n\t\t\t);\n\n\t\t$menu = '<h2>Food Menu</h2>';\n\n\t\tforeach ($items as $item){\n\t\t\t$menu .= $item->toFormField();\n\t\t}\n\n\t\t$menu .= '<h2> Juice Menu </h2>';\n\t\tforeach ($beverage as $beverage){\n\t\t\t$menu .= $beverage->toFormField();\n\t\t}\n\n\t\t$this->form = $menu;\n\t\t$this->items = $items;\n\t\t$this->beverage = $beverage;\n\t}", "function __construct($item_id, $item_name, $quantity, $price) {\n $this->item_id = $item_id;\n $this->item_name = $item_name;\n $this->quantity = $quantity;\n $this->price = $price;\n }", "abstract public function add_item();", "public function add_to_basket_new_post() {\n $user_id = $this -> post('user_id') ? $this -> post('user_id') : \"\";\n $special_id = (int) $this -> post('special_id') ? (int) $this -> post('special_id') : 0;\n $product_id = $this -> post('product_id') ? $this -> post('product_id') : \"\";\n $product_count = (int) $this -> post('product_count') ? (int) $this -> post('product_count') : \"1\";\n $addToShoppingList = trim($this -> post('add_to_shopping_list')) ? strtolower($this -> post('add_to_shopping_list')) : \"no\";\n $retailerId = (int) $this->post('retailer_id') ? (int)$this->post('retailer_id') : 0;\n $storeId = (int) $this->post('store_id') ? (int) $this->post('store_id') : 0;\n \n $allToAdd = \"No\";\n $isProductExist = \"No\";\n \n if($storeId > 0 )\n {\n $storeDetails = $this -> basketmodel -> get_store_retailer_details($storeId);\n $storeTypeId = $storeDetails['StoreTypeId'];\n }else{\n # Get user preference\n $user_preference = $this -> usermodel ->get_user_preference($user_id);\n\t\t\t\n if($user_preference)\n {\n $retailerId = $user_preference['RetailerId'];\n $storeTypeId = $user_preference['StoreTypeId'];\n $storeId = $user_preference['StoreId'];\n }\n }\n \n # Get products StorePrice \n $productStorePrice = $this -> productmodel ->get_product_store_price($product_id,$retailerId,$storeTypeId,$storeId);\n \n if($productStorePrice > 0 )\n {\n $allToAdd = \"Yes\"; \n }\n \n if($allToAdd == \"Yes\")\n {\n $result = $this -> basketmodel -> add_to_basket($special_id, $product_id, $user_id, $product_count);\n \n \n # Add to shopping list starts\n if($addToShoppingList == 'yes'){ \n \n # Get shopping list\n $shopping_list = $this -> quickshoppingmodel -> get_list($user_id);\n\n $shopping_list_array = array();\n if (!empty($shopping_list['ShoppingList'])) {\n $shopping_list_array = explode(\",\", $shopping_list['ShoppingList']);\n }\n\n $item_details = array();\n if (!empty($shopping_list_array)) {\n foreach ($shopping_list_array as $item) {\n $item = str_replace('|||', ',', $item);\n $item_array = explode(':::', $item);\n\n $item_array['name'] = $item_array[0];\n $item_array['product_id'] = $item_array[1];\n $item_array['retailer_id'] = $item_array[2];\n $item_array['store_type_id'] = $item_array[3];\n $item_array['store_id'] = $item_array[4];\n \n if( $item_array['product_id'] == $product_id){\n $item_array['count'] = $product_count;\n $isProductExist = \"Yes\";\n }else{\n $item_array['count'] = $item_array[5];\n }\n \n $item_array['bought'] = isset($item_array[6]) ? $item_array[6] : '0';\n\n unset($item_array[0], $item_array[1], $item_array[2], $item_array[3], $item_array[4], $item_array[5], $item_array[6]);\n $item_array['is_special'] = \"0\";\n\n $user_pref_retailer = $this -> basketmodel -> get_user_preferred_retailer($user_id);\n $product = $this -> productmodel -> product_details($item_array['product_id'], $user_pref_retailer -> Id, $user_id,$special_id);\n\n $product_price = $product['store_price'];\n if ($product['SpecialPrice'] > 0) {\n $product_price = $product['SpecialPrice'];\n $item_array['is_special'] = \"1\";\n }\n if ($product['SpecialPrice'] > 0 && $product['SpecialQty'] > 1) {\n $product_price = $product['SpecialPrice'] / $product['SpecialQty'];\n }\n if ($item_array['count'] > 1) {\n $product_price = $product_price * $item_array['count'];\n }\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n\n if ($product_price <= 0) {\n $product_price = '0.00';\n }\n else {\n $product_price = $product_price . '.00';\n }\n $item_array['price'] = $product_price;\n }\n else {\n $product_price = round($product_price, 2);\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n $product_price = $product_price . '.00';\n }\n elseif(strlen($prod_price_arr[1]) === 1){\n $product_price = $prod_price_arr[0].'.'.$prod_price_arr[1].'0';\n }\n $item_array['price'] = $product_price.'';\n }\n\n $item_details[] = $item_array;\n }\n }\n \n # Add new Item\n if( $isProductExist == \"No\" )\n { \n $userPreferrences = $this -> basketmodel -> get_user_preferred_retailer($user_id);\n $productDetails = $this -> productmodel -> product_details($product_id, $userPreferrences -> Id, $user_id,$special_id);\n\n $new_item_array = array ();\n $new_item_array['name'] = $productDetails['ProductName'];\n $new_item_array['product_id'] = $product_id;\n $new_item_array['retailer_id'] = $userPreferrences -> Id;\n $new_item_array['store_type_id'] = $userPreferrences -> StoreTypeId;\n $new_item_array['store_id'] = $userPreferrences -> StoreId;\n $new_item_array['count'] = $product_count;\n $new_item_array['bought'] = '0';\n $new_item_array['is_special'] = '0';\n\n $product_price = $productDetails['store_price'];\n if ($productDetails['SpecialPrice'] > 0) {\n $product_price = $productDetails['SpecialPrice'];\n $new_item_array['is_special'] = \"1\";\n }\n if ($productDetails['SpecialPrice'] > 0 && $productDetails['SpecialQty'] > 0) {\n $product_price = $productDetails['SpecialPrice'] / $productDetails['SpecialQty'];\n }\n if ($new_item_array['count'] > 1) {\n $product_price = $product_price * $new_item_array['count'];\n }\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n if ($product_price <= 0) {\n $product_price = '0.00';\n }\n else {\n $product_price = $product_price . '.00';\n }\n $new_item_array['price'] = $product_price;\n }\n else {\n $product_price = round($product_price, 2);\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n $product_price = $product_price . '.00';\n }\n elseif(strlen($prod_price_arr[1]) === 1){\n $product_price = $prod_price_arr[0].'.'.$prod_price_arr[1].'0';\n }\n $new_item_array['price'] = $product_price.'';\n }\n $item_details[] = $new_item_array;\n }//if( $isProductExist = \"No\" )\n\n $shopping_list_string = '';\n $i = 0;\n foreach($item_details as $singleItem)\n {\n if ($i == 0) {\n $shopping_list_string .= $singleItem['name'] . ':::' . $singleItem['product_id'] . ':::' . $singleItem['retailer_id'] . ':::' . $singleItem['store_type_id'] . ':::' . $singleItem['store_id'] . ':::' . $singleItem['count'] . ':::' . $singleItem['bought'];\n }\n else {\n $shopping_list_string .= ',' . $singleItem['name'] . ':::' . $singleItem['product_id'] . ':::' . $singleItem['retailer_id'] . ':::' . $singleItem['store_type_id'] . ':::' . $singleItem['store_id'] . ':::' . $singleItem['count'] . ':::' . $singleItem['bought'];\n }\n $i++; \n }\n\n $shoppingListData = array(\n 'UserId' => $user_id,\n 'ShoppingList' => $shopping_list_string,\n 'CreatedOn' => date('Y-m-d H:i:s'),\n );\n //Save the user shopping list\n $resultShoppingList = $this -> quickshoppingmodel -> save_list($user_id, $shoppingListData);\n \n } //if($addToShoppingList == 'yes')\n # Add product to shopping list ends\n \n //$basket_count = $this -> basketmodel -> get_basket_count($user_id);\n $basket_count = $this -> basketmodel -> get_user_basket_count($user_id,$retailerId,$storeId);\n \n if ($result == 'duplicate') {\n $message = \"Product already added to basket\";\n $result = 0;\n }\n else {\n $message = \"Product added to basket successfully\";\n }\n\n if ($result) {\n $retArr['status'] = SUCCESS;\n $retArr['message'] = $message;\n $retArr['basket_count'] = $basket_count;\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n else {\n $retArr['status'] = FAIL;\n $retArr['message'] = $message;\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n \n }else{\n $retArr['status'] = FAIL;\n $retArr['message'] = \"Not allow to add this product.\";\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die; \n }\n }", "public function createItem($data);", "public function buildBasketContent()\n {\n $orders = $this->getOrder();\n $basketArray = [];\n\n foreach($orders as $order){\n $portionId = $order['portionId'];\n $portion = Portion::where('id',$portionId)->get();\n $basketArray[] = [['portion'=>$portion], ['units'=> $order['unit']]];\n }\n return $basketArray;\n }", "public function createItem( $preparedItem ) {\n\t}", "private function makeItemPurchase() : void\n {\n $this->item->available = $this->item->available - 1;\n $this->coinService->setCoinCount(\n $this->coinService->getCurrenCoinCount() - $this->item->cost\n );\n $this->item->save();\n }", "public function add()\n {\n $item = new stdClass();\n $item->item_id = null;\n $item->barcode = null;\n $item->price = null;\n $item->stock = null;\n $item->name = null;\n $item->category_id = null;\n $query_category = $this->categorys_m->get();\n $query_unit = $this->units_m->get();\n $unit[null] = '-Pilih-';\n foreach ($query_unit->result() as $u) {\n\n $unit[$u->unit_id] = $u->name;\n };\n $data = [\n 'page' => 'add',\n 'row' => $item,\n 'category' => $query_category,\n 'unit' => $unit,\n 'selectedunit' => null\n ];\n $this->template->load('template', 'product/item/item_add', $data);\n }", "public function create()\n {\n // Not needed cause this is coming from the item listing\n }", "public function shop_item()\n {\n $this->el = new XTemplate($this->temp, $this->path);\n\n // for element that have wrapper and comment\n $this->el->assign('WRAPPER', $this->wrapper);\n $this->el->assign('LINK', $this->link);\n\n // scan all variables when using\n foreach ($this->shop_item as $key => $value) {\n\n // customize if need when more vars in html template *\n $this->el->assign('IMG', $value);\n\n // fixed loop\n $this->el->parse('shop_item');\n }\n\n // fixed out results\n echo $this->el->text('shop_item');\n\n }", "abstract public function createItem($name, $type, $description = '', $bizRule = null, $data = null);", "public function __construct($name, $toppings, $price, $quantity) {\n \n $this->itemName = $name;\n $this->toppingsArr = $toppings;\n $this->itemPrice = $price;\n $this->quantity = $quantity;\n // $this->itemID = $itemID;\n\n }", "public function create(array $data): ChainableItemInterface;", "public function run()\n {\n // CartItem 3 product_id=1,2,3\n CartItem::factory(3)\n ->state(new Sequence(\n ['product_id' => 1],\n ['product_id' => 2],\n ['product_id' => 3],\n ))\n ->for(User::find(1))\n ->create();\n }", "abstract public function makeBlankItem();", "public function buildItem(ItemInterface $item, array $options)\n {\n }", "function setupNewItem()\n {\n $item = array(\n 'id' => null,\n 'pending_id' => null,\n 'content_id' => null,\n 'created' => date( 'Y-m-d H:i:s'),\n 'createdBy' => $_SESSION['isLoggedUID'],\n 'updated' => null,\n 'updatedBy' => null,\n 'status' => 'create',\n 'topic' => null,\n 'subtopic' => null,\n 'heading' => null,\n 'date' => date( 'Y-m-d H:i:s'),\n 'caption' => null,\n 'text' => null,\n 'download_src' => null,\n 'download_name' => null,\n 'images' => array(),\n 'tags' => array(),\n 'terms' => array());\n $_SESSION['cropId'] = null;\n\n return($item);\n }", "public function add_product_to_basket_post() {\n $user_id = $this -> post('user_id') ? $this -> post('user_id') : \"\";\n $special_id = (int) $this -> post('special_id') ? (int) $this -> post('special_id') : 0;\n $product_id = $this -> post('product_id') ? $this -> post('product_id') : \"\";\n $product_count = (int) $this -> post('product_count') ? (int) $this -> post('product_count') : \"1\";\n $addToShoppingList = trim($this -> post('add_to_shopping_list')) ? strtolower($this -> post('add_to_shopping_list')) : \"no\";\n $retailer_id = $this -> post('retailer_id') ? $this -> post('retailer_id') : \"\";\n $store_id = $this -> post('store_id') ? $this -> post('store_id') : \"\";\n $remove_previous = trim($this -> post('remove_previous')) ? trim( strtolower($this -> post('remove_previous'))) : \"no\";\n \n $allToAdd = \"No\";\n $isProductExist = \"No\";\n \n # Get Store details\n $storeDetails = $this -> basketmodel ->get_store_details($store_id);\n if($storeDetails)\n {\n $storeTypeId = $storeDetails['StoreTypeId'];\n \n # Get products StorePrice \n $productStorePrice = $this -> productmodel ->get_product_store_price($product_id,$retailer_id,$storeTypeId,$store_id);\n \n if($productStorePrice > 0 )\n {\n $allToAdd = \"Yes\"; \n }\n }\n \n if($allToAdd == \"Yes\")\n {\n # Remove all products from user's basket\n if( $remove_previous == 'yes')\n {\n $isRemoved = $this -> basketmodel -> remove_user_basket($user_id); \n }\n \n $result = $this -> basketmodel -> add_product_to_basket($special_id, $product_id, $user_id, $product_count,$retailer_id,$store_id);\n \n # Add to shopping list starts\n if($addToShoppingList == 'yes'){ \n \n # Get shopping list\n $shopping_list = $this -> quickshoppingmodel -> get_list($user_id);\n\n $shopping_list_array = array();\n if (!empty($shopping_list['ShoppingList'])) {\n $shopping_list_array = explode(\",\", $shopping_list['ShoppingList']);\n }\n\n $item_details = array();\n if (!empty($shopping_list_array)) {\n foreach ($shopping_list_array as $item) {\n $item = str_replace('|||', ',', $item);\n $item_array = explode(':::', $item);\n\n $item_array['name'] = $item_array[0];\n $item_array['product_id'] = $item_array[1];\n $item_array['retailer_id'] = $item_array[2];\n $item_array['store_type_id'] = $item_array[3];\n $item_array['store_id'] = $item_array[4];\n \n if( $item_array['product_id'] == $product_id){\n $item_array['count'] = $product_count;\n $isProductExist = \"Yes\";\n }else{\n $item_array['count'] = $item_array[5];\n }\n \n $item_array['bought'] = isset($item_array[6]) ? $item_array[6] : '0';\n\n unset($item_array[0], $item_array[1], $item_array[2], $item_array[3], $item_array[4], $item_array[5], $item_array[6]);\n $item_array['is_special'] = \"0\";\n\n $user_pref_retailer = $this -> basketmodel -> get_user_preferred_retailer($user_id);\n $product = $this -> productmodel -> product_details($item_array['product_id'], $user_pref_retailer -> Id, $user_id,$special_id);\n\n $product_price = $product['store_price'];\n if ($product['SpecialPrice'] > 0) {\n $product_price = $product['SpecialPrice'];\n $item_array['is_special'] = \"1\";\n }\n if ($product['SpecialPrice'] > 0 && $product['SpecialQty'] > 1) {\n $product_price = $product['SpecialPrice'] / $product['SpecialQty'];\n }\n if ($item_array['count'] > 1) {\n $product_price = $product_price * $item_array['count'];\n }\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n\n if ($product_price <= 0) {\n $product_price = '0.00';\n }\n else {\n $product_price = $product_price . '.00';\n }\n $item_array['price'] = $product_price;\n }\n else {\n $product_price = round($product_price, 2);\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n $product_price = $product_price . '.00';\n }\n elseif(strlen($prod_price_arr[1]) === 1){\n $product_price = $prod_price_arr[0].'.'.$prod_price_arr[1].'0';\n }\n $item_array['price'] = $product_price.'';\n }\n\n $item_details[] = $item_array;\n }\n }\n \n # Add new Item\n if( $isProductExist == \"No\" )\n { \n $userPreferrences = $this -> basketmodel -> get_user_preferred_retailer($user_id);\n $productDetails = $this -> productmodel -> product_details($product_id, $userPreferrences -> Id, $user_id,$special_id);\n\n $new_item_array = array ();\n $new_item_array['name'] = $productDetails['ProductName'];\n $new_item_array['product_id'] = $product_id;\n $new_item_array['retailer_id'] = $userPreferrences -> Id;\n $new_item_array['store_type_id'] = $userPreferrences -> StoreTypeId;\n $new_item_array['store_id'] = $userPreferrences -> StoreId;\n $new_item_array['count'] = $product_count;\n $new_item_array['bought'] = '0';\n $new_item_array['is_special'] = '0';\n\n $product_price = $productDetails['store_price'];\n if ($productDetails['SpecialPrice'] > 0) {\n $product_price = $productDetails['SpecialPrice'];\n $new_item_array['is_special'] = \"1\";\n }\n if ($productDetails['SpecialPrice'] > 0 && $productDetails['SpecialQty'] > 0) {\n $product_price = $productDetails['SpecialPrice'] / $productDetails['SpecialQty'];\n }\n if ($new_item_array['count'] > 1) {\n $product_price = $product_price * $new_item_array['count'];\n }\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n if ($product_price <= 0) {\n $product_price = '0.00';\n }\n else {\n $product_price = $product_price . '.00';\n }\n $new_item_array['price'] = $product_price;\n }\n else {\n $product_price = round($product_price, 2);\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n $product_price = $product_price . '.00';\n }\n elseif(strlen($prod_price_arr[1]) === 1){\n $product_price = $prod_price_arr[0].'.'.$prod_price_arr[1].'0';\n }\n $new_item_array['price'] = $product_price.'';\n }\n $item_details[] = $new_item_array;\n }//if( $isProductExist = \"No\" )\n\n $shopping_list_string = '';\n $i = 0;\n foreach($item_details as $singleItem)\n {\n if ($i == 0) {\n $shopping_list_string .= $singleItem['name'] . ':::' . $singleItem['product_id'] . ':::' . $singleItem['retailer_id'] . ':::' . $singleItem['store_type_id'] . ':::' . $singleItem['store_id'] . ':::' . $singleItem['count'] . ':::' . $singleItem['bought'];\n }\n else {\n $shopping_list_string .= ',' . $singleItem['name'] . ':::' . $singleItem['product_id'] . ':::' . $singleItem['retailer_id'] . ':::' . $singleItem['store_type_id'] . ':::' . $singleItem['store_id'] . ':::' . $singleItem['count'] . ':::' . $singleItem['bought'];\n }\n $i++; \n }\n\n $shoppingListData = array(\n 'UserId' => $user_id,\n 'ShoppingList' => $shopping_list_string,\n 'CreatedOn' => date('Y-m-d H:i:s'),\n );\n //Save the user shopping list\n $resultShoppingList = $this -> quickshoppingmodel -> save_list($user_id, $shoppingListData);\n \n } //if($addToShoppingList == 'yes')\n # Add product to shopping list ends\n \n //$basket_count = $this -> basketmodel -> get_basket_count($user_id);\n $basket_count = $this -> basketmodel -> get_user_basket_count($user_id,$retailer_id,$store_id);\n \n if ($result == 'duplicate') {\n $message = \"Product already added to basket\";\n $result = 0;\n }\n else {\n $message = \"Product added to basket successfully\";\n }\n\n if ($result) {\n $retArr['status'] = SUCCESS;\n $retArr['message'] = $message;\n $retArr['basket_count'] = $basket_count;\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n else {\n $retArr['status'] = FAIL;\n $retArr['message'] = $message;\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n \n }else{\n $retArr['status'] = FAIL;\n $retArr['message'] = \"Not allow to add this product.\";\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die; \n }\n }", "function createOrderItem($orderID, $capID, $qty)\n {\n return $this->data->insertOrderItem($orderID, $capID, $qty);\n }", "public function getBasket()\r\n {\r\n $shippingcosts = $this->getShippingCosts();\r\n $basket = $this->basket->sGetBasket();\r\n\r\n $basket['sShippingcostsWithTax'] = $shippingcosts['brutto'];\r\n $basket['sShippingcostsNet'] = $shippingcosts['netto'];\r\n $basket['sShippingcostsTax'] = $shippingcosts['tax'];\r\n\r\n if (!empty($shippingcosts['brutto'])) {\r\n $basket['AmountNetNumeric'] += $shippingcosts['netto'];\r\n $basket['AmountNumeric'] += $shippingcosts['brutto'];\r\n $basket['sShippingcostsDifference'] = $shippingcosts['difference']['float'];\r\n }\r\n if (!empty($basket['AmountWithTaxNumeric'])) {\r\n $basket['AmountWithTaxNumeric'] += $shippingcosts['brutto'];\r\n }\r\n if ((!Shopware()->System()->sUSERGROUPDATA['tax'] && Shopware()->System()->sUSERGROUPDATA['id'])) {\r\n $basket['sTaxRates'] = $this->getTaxRates($basket);\r\n\r\n $basket['sShippingcosts'] = $shippingcosts['netto'];\r\n $basket['sAmount'] = round($basket['AmountNetNumeric'], 2);\r\n $basket['sAmountTax'] = round($basket['AmountWithTaxNumeric'] - $basket['AmountNetNumeric'], 2);\r\n $basket['sAmountWithTax'] = round($basket['AmountWithTaxNumeric'], 2);\r\n\r\n } else {\r\n $basket['sTaxRates'] = $this->getTaxRates($basket);\r\n\r\n $basket['sShippingcosts'] = $shippingcosts['brutto'];\r\n $basket['sAmount'] = $basket['AmountNumeric'];\r\n\r\n $basket['sAmountTax'] = round($basket['AmountNumeric'] - $basket['AmountNetNumeric'], 2);\r\n }\r\n return $basket;\r\n }", "function addItem($value, $text, $bstore=false){\n\t\t\t\tif($bstore){\n\t\t\t\t\t$this->items[] = array($value => $text);\n\t\t\t\t}else{\n\t\t\t\t\t$this->item = array($value => $text);\n\t\t\t\t}\n\n\t\t\t\treturn $this->item;\n\t\t\t}", "public function sCreateTemporaryOrder()\n {\n $this->sShippingData['AmountNumeric'] = $this->sShippingData['AmountNumeric'] ? $this->sShippingData['AmountNumeric'] : '0';\n if (!$this->sShippingcostsNumeric) {\n $this->sShippingcostsNumeric = 0.;\n }\n if (!$this->sBasketData['AmountWithTaxNumeric']) {\n $this->sBasketData['AmountWithTaxNumeric'] = $this->sBasketData['AmountNumeric'];\n }\n\n $net = '0';\n if ($this->isTaxFree(\n $this->sSYSTEM->sUSERGROUPDATA['tax'],\n $this->sSYSTEM->sUSERGROUPDATA['id']\n )) {\n $net = '1';\n }\n\n $dispatchId = '0';\n $this->sBasketData['AmountNetNumeric'] = round($this->sBasketData['AmountNetNumeric'], 2);\n if ($this->dispatchId) {\n $dispatchId = $this->dispatchId;\n }\n\n $this->sBasketData['AmountNetNumeric'] = round($this->sBasketData['AmountNetNumeric'], 2);\n\n if (empty($this->sBasketData['sCurrencyName'])) {\n $this->sBasketData['sCurrencyName'] = 'EUR';\n }\n if (empty($this->sBasketData['sCurrencyFactor'])) {\n $this->sBasketData['sCurrencyFactor'] = '1';\n }\n\n $shop = Shopware()->Shop();\n $mainShop = $shop->getMain() !== null ? $shop->getMain() : $shop;\n\n $taxfree = '0';\n if (!empty($this->sNet)) {\n // Complete net delivery\n $net = '1';\n $this->sBasketData['AmountWithTaxNumeric'] = $this->sBasketData['AmountNetNumeric'];\n $this->sShippingcostsNumeric = $this->sShippingcostsNumericNet;\n $taxfree = '1';\n }\n if (empty($this->sBasketData['AmountWithTaxNumeric'])) {\n $this->sBasketData['AmountWithTaxNumeric'] = '0';\n }\n if (empty($this->sBasketData['AmountNetNumeric'])) {\n $this->sBasketData['AmountNetNumeric'] = '0';\n }\n\n $data = [\n 'ordernumber' => '0',\n 'userID' => $this->sUserData['additional']['user']['id'],\n 'invoice_amount' => $this->sBasketData['AmountWithTaxNumeric'],\n 'invoice_amount_net' => $this->sBasketData['AmountNetNumeric'],\n 'invoice_shipping' => $this->sShippingcostsNumeric,\n 'invoice_shipping_net' => $this->sShippingcostsNumericNet,\n 'ordertime' => new Zend_Db_Expr('NOW()'),\n 'status' => -1,\n 'paymentID' => $this->getPaymentId(),\n 'customercomment' => $this->sComment,\n 'net' => $net,\n 'taxfree' => $taxfree,\n 'partnerID' => (string) $this->getSession()->offsetGet('sPartner'),\n 'temporaryID' => $this->getSession()->offsetGet('sessionId'),\n 'referer' => (string) $this->getSession()->offsetGet('sReferer'),\n 'language' => $shop->getId(),\n 'dispatchID' => $dispatchId,\n 'currency' => $this->sBasketData['sCurrencyName'],\n 'currencyFactor' => $this->sBasketData['sCurrencyFactor'],\n 'subshopID' => $mainShop->getId(),\n 'deviceType' => $this->deviceType,\n ];\n\n try {\n $affectedRows = $this->db->insert('s_order', $data);\n $orderID = $this->db->lastInsertId();\n } catch (Exception $e) {\n throw new Enlight_Exception(sprintf('##sOrder-sTemporaryOrder-#01:%s', $e->getMessage()), 0, $e);\n }\n if (!$affectedRows || !$orderID) {\n throw new Enlight_Exception('##sOrder-sTemporaryOrder-#01: No rows affected or no order id saved', 0);\n }\n\n // Create order attributes\n $this->attributePersister->persist($this->orderAttributes, 's_order_attributes', $orderID);\n\n foreach ($this->sBasketData['content'] as $basketRow) {\n if (!$basketRow['price']) {\n $basketRow['price'] = '0,00';\n }\n\n $basketRow['articlename'] = html_entity_decode($basketRow['articlename']);\n $basketRow['articlename'] = strip_tags($basketRow['articlename']);\n\n $basketRow['articlename'] = $this->sSYSTEM->sMODULES['sArticles']->sOptimizeText($basketRow['articlename']);\n\n if (!$basketRow['esdarticle']) {\n $basketRow['esdarticle'] = '0';\n }\n if (!$basketRow['modus']) {\n $basketRow['modus'] = '0';\n }\n if (!$basketRow['taxID']) {\n $basketRow['taxID'] = '0';\n }\n if (!$basketRow['releasedate']) {\n $basketRow['releasedate'] = '0000-00-00';\n }\n\n $data = [\n 'orderID' => $orderID,\n 'ordernumber' => 0,\n 'articleID' => $basketRow['articleID'],\n 'articleDetailID' => $basketRow['additional_details']['articleDetailsID'],\n 'articleordernumber' => $basketRow['ordernumber'],\n 'price' => $basketRow['priceNumeric'],\n 'quantity' => $basketRow['quantity'],\n 'name' => $basketRow['articlename'],\n 'status' => 0,\n 'releasedate' => $basketRow['releasedate'],\n 'modus' => $basketRow['modus'],\n 'esdarticle' => $basketRow['esdarticle'],\n 'taxID' => $basketRow['taxID'],\n 'tax_rate' => $basketRow['tax_rate'],\n ];\n\n try {\n $this->db->insert('s_order_details', $data);\n $orderDetailId = $this->db->lastInsertId();\n } catch (Exception $e) {\n throw new Enlight_Exception(\n sprintf('##sOrder-sTemporaryOrder-Position-#02:%s', $e->getMessage()),\n 0,\n $e\n );\n }\n\n // Create order detail attributes\n $attributeData = $this->attributeLoader->load('s_order_basket_attributes', $basketRow['id']);\n $this->attributePersister->persist($attributeData, 's_order_details_attributes', $orderDetailId);\n } // For every product in basket\n }", "public function addSimpleItem($item){\t\t\r\n if( //Check the quantity and the name\r\n !empty($item['quantity']) \r\n && is_numeric($item['quantity']) \r\n && $item['quantity']>0 \r\n && !empty($item['name'])\r\n ){ //And add the item to the cart if it is correct\r\n $items = $this->items;\r\n $items[] = $item;\r\n $this->items = $items;\r\n }\r\n }", "public function __construct($_sKU = NULL,$_startPrice = NULL,$_quantity = NULL,$_variationSpecifics = NULL,$_quantitySold = NULL,$_sellingStatus = NULL,$_discountPriceInfo = NULL,$_any = NULL)\r\n\t{\r\n\t\tparent::__construct(array('SKU'=>$_sKU,'StartPrice'=>$_startPrice,'Quantity'=>$_quantity,'VariationSpecifics'=>($_variationSpecifics instanceof EbayShoppingStructNameValueListArrayType)?$_variationSpecifics:new EbayShoppingStructNameValueListArrayType($_variationSpecifics),'QuantitySold'=>$_quantitySold,'SellingStatus'=>$_sellingStatus,'DiscountPriceInfo'=>$_discountPriceInfo,'any'=>$_any));\r\n\t}", "public function addItem($attributes)\n {\n // Don't understand why _token must be removed here, but not in ProductController#store!\n unset($attributes['_token']);\n\n $bag = $this->getCurrent();\n $bag_item = $bag->items()->where('variant_id', $attributes['variant_id'])->first();\n if ($bag_item) {\n $bag_item->quantity += $attributes['quantity'];\n $bag_item->save();\n } else {\n $bag_item = $bag->items()->create($attributes);\n }\n return $bag_item;\n }", "abstract protected function createItemBase( array $values = [], array $listItems = [], array $refItems = [] );", "public function getItemBuilder() {\n $class = '\\Rangka\\Quickbooks\\Builders\\Items\\\\' . $this->getEntityName();\n return new $class($this);\n }", "public function __construct($_items = NULL,$_bucketId = NULL,$_sellerId = NULL,$_externalSellerId = NULL,$_bucketSubtotalAmt = NULL,$_bucketShippingAmt = NULL,$_bucketInsuranceAmt = NULL,$_bucketSalesTaxAmt = NULL,$_bucketTotalAmt = NULL)\r\n\t{\r\n\t\tparent::__construct(array('Items'=>$_items,'BucketId'=>$_bucketId,'SellerId'=>$_sellerId,'ExternalSellerId'=>$_externalSellerId,'BucketSubtotalAmt'=>$_bucketSubtotalAmt,'BucketShippingAmt'=>$_bucketShippingAmt,'BucketInsuranceAmt'=>$_bucketInsuranceAmt,'BucketSalesTaxAmt'=>$_bucketSalesTaxAmt,'BucketTotalAmt'=>$_bucketTotalAmt));\r\n\t}", "public function build(RequestInterface $request): ItemInterface\n {\n $menuItem = $this->getMenuItem($request);\n $store = $this->getStoreById($menuItem->getStoreId());\n\n $this->itemRegistry->set($menuItem);\n $this->storeRegistry->set($store);\n\n return $menuItem;\n }", "public static function create($products = '') {\n\t\t// Generate the random string, \n\t\t$str = random_string();\n\t\t\n\t\t// Set it to a session for easy access\n\t\tself::$_slug = Session::set('dime_basket', $str);\n\t\t\n\t\t// And insert it in the database so we don't forget it\n\t\t$db = self::$_db->insert()->into('baskets')->values(array(\n\t\t\tnull, $str, ip_address(), $products, time(), 'active'\n\t\t))->go();\n\t\t\n\t\treturn $str;\n\t}", "private function getItemXml($item)\n {\n $qty = (int)$item->getQty() ? (int)$item->getQty() : 1;\n $product = Mage::getModel('catalog/product')->load( $item->getProductId() );\n\n\n\n //$this->_totalPrice += $product->getFinalPrice() * $qty;\n if($this->getConfig('product_cost') && $product->getCost() > 0)\n {\n $this->_totalPrice += $product->getCost() * $qty;\n }\n else\n {\n $this->log(\"p p \" . $product->getFinalPrice() . \" and i P \". $product->getPrice());\n $this->_totalPrice += $product->getFinalPrice() * $qty;\n }\n\n $height = $this->getConvertedMeasure($product->getHeight(), $product->getDimensionUnits());\n //$weight = $this->getConvertedWeight($product->getWeight(),$product->getWeightUnits())*$qty;\n $weight = $this->getConvertedWeight($product->getWeight(),$product->getWeightMeasure());\n $width = $this->getConvertedMeasure($product->getWidth(), $product->getDimensionUnits());\n $length = $this->getConvertedMeasure($product->getLength(), $product->getDimensionUnits());\n $title = substr($product->getSku().';'.preg_replace('/[^a-z0-9\\s\\'\\.\\_]/i','',substr($product->getName(),0,32).\" ...\"),0,32);\n $Readytoship = $product->getReadytoship();\n\n if(intval($length) < 1 || intval($width) < 1 || intval($height) < 1 )\n {\n $length = $width = $height = 1;\n }\n\n $Readytoship = \"\";\n if($product->getReadytoship() != 1)\n {\n $Readytoship = '';\n\t\t\t\n }\n\n if(ceil($weight) <= 0.0000)\n {\n $weight = .7; //default to 7.7 kg\n }\n\n if($height < 1 || !is_numeric($height))\n {\n $height = $this->_default_heightlow; // just a low default\n if($weight >= $this->_weight_low) // less than 1k no height (default 2)\n {\n $height = $this->_default_heighthigh;\n }\n\n }\n\n if($width < 1 || !is_numeric($width))\n {\n $width = $this->_default_widthlow; // just a low default\n if($weight >= $this->_weight_low)\n {\t\t\t // less than 1k no height (default 2)\n $width = $this->_default_widthhigh;\n }\n }\n\n // Create default value for length should value be missing\n if($length < 1 || !is_numeric($length))\n {\n $length = $this->_default_lengthlow; // just a low default\n if($weight >= $this->_weight_low) // less than 1k no height (default 2)\n {\n $length = $this->_default_lengthhigh;\n }\n }\n$aweight = $weight;\n/*$aheight = $height*$qty;*/\n\nif($product->getReadytoship() != 1)\n {\n \n\t\t$this->_package_height += $height; \n\t\tif($width > $this->_package_width) $this->_package_width = $width; \n\t\tif($length > $this->_package_length) $this->_package_length = $length;\n\t\t$this->shipping_weight += $aweight; \n\t\t \n\t\n\n\t\t\t\n\t\t\t $items_xml = \"\\n\n <parcel>\n <weight>{$this->shipping_weight}</weight>\n <length>{$this->_package_length}</length>\n <width>{$this->_package_width}</width>\n <height>{$this->_package_height}</height>\n</parcel>\n\";\n\t\t\t\n }\n\t\telse\n\t\t{\n\t\t\t $items_xml = \"\\n\n <parcel>\n <weight>{$aweight}</weight>\n <length>{$length}</length>\n <width>{$width}</width>\n <height>{$height}</height>\n</parcel>\n\";\n\t\t}\n\n\n \n return $items_xml;\n }", "public function __toString(){\t\t\n\t\t$string = '<div class=\"item_wrapper\" id=\"item-'.$this->itemid.'\">';\n\t\t$string .= '<img class=\"itemimage\" src='.HOME.'images/items/'.$this->image.' alt = '.$this->itemname.' />';\n\t\t$string .='<div class = \"item_info\">';\n\t\t// We want to prevent unregistered user from entering the order item page\n\t\tif(isUser()) \n\t\t\t$string .= '<h3><a href=\"'.HOME.'item/'.$this->itemid.'\" title=\"'. __('Order').'\">'.$this->itemname.'</a></h3>';\n\t\telse\n\t\t\t$string .= '<h3>'.$this->itemname.'</h3>';\n\t\t\n\t\t$string .= '<div class=\"item_price\"><table>';\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tswitch ($this->itemtype){\n\t\t\tcase 1:\t\t\t\t\n\t\t\t\tif($this->prices != \"0.00\")\n\t\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">330cc can</td><td> %s </td></tr>'),$this->prices);\n\t\t\t\tif($this->pricem != \"0.00\")\n\t\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">500cc bottle</td><td> %s </td></tr>'),$this->pricem);\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">מחיר: </td><td> %s </td></tr>'),$this->prices);\t\n\t\t\t\tbreak;\n\t\t\tcase 3: \t\t\t\t\n\t\t\t\tif($this->prices != \"0.00\")\n\t\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">Regular</td><td> %s </td></tr>'),$this->prices);\n\t\t\t\tif($this->pricem != \"0.00\")\n\t\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">Double</td><td> %s </td></tr>'),$this->pricem);\t\t\t\t\n\t\t\t\tif($this->pricel != \"0.00\")\n\t\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">Triple</td><td> %s </td></tr>'),$this->pricel);\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 4: \n\t\t\tcase 5:\n\t\t\t//\t$string .= sprintf(__('<tr><td class=\"desc\">Small</td><td> %s </td></tr><tr><td class=\"price\">Medium</td><td> %s</td></tr><tr><td class=\"price\">Large</td><td> %s</td></tr>'),$this->prices, $this->pricem, $this->pricel);\t\t\t\n\t\t\t\tif($this->prices != \"0.00\")\n\t\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">Small</td><td> %s </td></tr>'),$this->prices);\n\t\t\t\tif($this->pricem != \"0.00\")\n\t\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">Medium</td><td> %s </td></tr>'),$this->pricem);\t\t\t\t\n\t\t\t\tif($this->pricel != \"0.00\")\n\t\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">Large</td><td> %s </td></tr>'),$this->pricel);\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">For 3</td><td> %s </td></tr><tr><td class=\"price\">For 4</td><td> %s</td></tr>'), $this->pricem, $this->pricel);\t\t\t\n\t\t\t\tbreak;\t\t\t\n\t\t\t}\t\t\n\t\t$string .= '</table></div>';\n\t\t$string .= '</div>';\n\t\t// We want to prevent unregistered user from entering the order item page\n\t\tif(isUser()){\t\n\t\t\t$string .= '<a href=\"'.HOME.'item/'.$this->itemid.'\" title=\"'.__('Add this item to your cart').'\"><img class=\"addtoorder\" src=\"'.HOME.'images/addtocart.png\" alt=\"Add to order\"></a>';\n\t\t}\n\t\t$string .='</div>';\n\t\treturn $string;\t\t\n\t}", "public function create_cart()\n {\n // get products currently in cart\n\n $products = $this->get();\n\n $shipping = $this->get_shipping_cost();\n $data = '';\n $subtotal = 0;\n\n $data .= '<li class=\"header_row\"><div class=\"col1\">Product Name:</div>\n <div class=\"col2\">Quantity:</div><div class=\"col3\">Product Price:</div>\n <div class=col4>Total:</div></li>';\n\n if ($products != '') {\n //products to display\n\n $line = 1;\n foreach ($products as $product) {\n // create new item in cart\n $data .= '<li';\n if ($line % 2 == 0) {\n $data .= 'class=\"alt\"';\n }\n // displaying cart items(name, price,count)\n $data .= '><div class=\"col1\"><a href=\"' . SITE_PATH . 'product.php?id=' . $product['id'] . '\" >' . $product['name'] . '</a></div>';\n $data .= '<div class=\"col2\"><input name=\"product' . $product['id'] . '\" value=\"' . $_SESSION['cart'][$product['id']] . '\"></div>';\n $data .= '<div class=\"col3\">$' .number_format((float)($product['price']), 2, '.', '') . '</div>';\n $data .= '<div class=\"col4\">$' . $product['price'] * $_SESSION['cart'][$product['id']] . '</div></li>';\n\n // calculating subtotal\n $subtotal += $product['price'] * $_SESSION['cart'][$product['id']];\n\n $line++;\n }\n\n // add subtotal row\n $data .= '<li class=\"subtotal_row\"><div class=\"col1\">Subtotal</div>\n <div class=\"col2\">$' . number_format((float)($subtotal), 2, '.', '') . '</div></li>';\n\n // Tax row\n $data .= '<li class= \"taxes_row\"><div class=\"col1\">Tax (%' . (TAX * 100) . ' )</div>\n <div class=\"col2\">$' . number_format((float)(TAX * $subtotal), 2, '.', '') . '</div></li>';\n\n // Shipping row\n $data .= '<li class= \"shipping_row\"><div class=\"col1\">Total Shipping Cost</div>\n <div class=\"col2\">$' . number_format((float)($shipping), 2, '.', '') . '</div></li>';\n\n\n // add total row\n $data .= '<li class=\"total_row\"><div class=\"col1\">Total</div>\n <div class=\"col2\">$' . number_format((float)((TAX * $subtotal) + $subtotal) + $shipping, 2, '.', '') . '</div></li>';\n \n } else {\n // no products to display\n $data .= '<li><strong>No items in the Cart!</strong></li>';\n\n // add subtotal row\n $data .= '<li class=\"subtotal_row\"><div class=\"col1\">Subtotal</div>\n <div class=\"col2\">$0.00</div></li>';\n\n // Tax row\n $data .= '<li class= \"taxes_row\"><div class=\"col1\">Tax (%' . (TAX * 100) . ' )</div>\n <div class=\"col2\">$0.00</div></li>';\n\n // Shipping row\n $data .= '<li class= \"shipping_row\"><div class=\"col1\">Total Shipping Cost</div>\n <div class=\"col2\">$0.00</div></li>';\n\n // add total row\n $data .= '<li class=\"total_row\"><div class=\"col1\">Total</div>\n <div class=\"col2\">$0.00</div></li>';\n }\n\n\n return $data;\n }", "public function create_cart()\n\t{\n\t\t#get products currently in cart\n\t\t$products = $this->get();\n\t\t\n\t\t$data = '';\n\t\t$form = '';\n\t\t$total = 0;\n\n\t\tif ($products != '')\n\t\t{\n\t\t\t#products to display\n\t\t\t$line = 1;\n\t\t\t$shipping = 0;\n\n\t\t\tforeach($products as $product)\n\t\t\t{\n\t\t\t\t$item_shipping = $this->get_shipping_cost($product['price']) * $_SESSION['cart'][$product['id']];\n\t\t\t\t$shipping += $item_shipping;\n\t\t\t\t\n\t\t\t\t$data .= '<li><b class=\"tab-head\">Product Name:</b>' . \"<b class='tab-detail'>\" . $product['name'] . '</b></li>';\n\t\t\t\t$data .= '<li><b class=\"tab-head\">Quantity:</b><b class=\"tab-detail\"><input name=\"product' . $product['id'] . '\" value=\"' . $_SESSION['cart'][$product['id']] .'\"></b></li>';\n\t\t\t\t$data .= '<li><b class=\"tab-head\">Product Price:</b><b class=\"tab-detail\">&#163;' . $product['price'] . '</b></li><br>';\n\n\t\t\t\t//Create paypal form fields\n\t\t\t\t$form .= '<input type=\"hidden\" name=\"item_name_' . $line . '\" value=\"' . $product['name'] . '\">';\n\t\t\t\t$form .= '<input type=\"hidden\" name=\"amount_' . $line . '\" value=\"' . number_format($product['price'], 2) . '\">';\n\t\t\t\t$form .= '<input type=\"hidden\" name=\"quantity_' . $line . '\" value=\"' . $_SESSION['cart'][$product['id']] . '\">';\n\t\t\t\t$form .= '<input type=\"hidden\" name=\"shipping_' . $line . '\" value=\"' . $item_shipping . '\">';\n\n\t\t\t\t$total += $product['price'] * $_SESSION['cart'][$product['id']];\n\t\t\t\t$line++;\n\t\t\t}\n\t\t\t#add subtotal row\n\t\t\t$data .= '<li><b class=\"tab-head\">Subtotal:</b><b class=\"tab-detail\">&#163;' . $total . '</b></li>';\n\n\t\t\t#add shipping row\n\t\t\t$data .= '<li><b class=\"tab-head\">Shipping cost:</b><b class=\"tab-detail\">&#163;' . number_format($shipping, 2) . '</b></li>';\n\n\t\t\t#add tax row\n\t\t\tif (SHOP_TAX > 0)\n\t\t\t{\n\t\t\t\t$data .= '<li><b class=\"tab-head\">VAT: (' .(SHOP_TAX * 100) . '%):</b><b class=\"tab-detail\">&#163;' . number_format(SHOP_TAX * $total, 2) . '</b></li>';\n\t\t\t}\n\n\t\t\t#add total row\n\t\t\t$data .= '<br><li><b class=\"tab-head\">Total:</b><b class=\"tab-detail\">&#163;' . number_format((SHOP_TAX * $total) + $total + $shipping, 2) . '</li></b>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t#no products to display\n\t\t\t$data .= '<li class=\"red\"><p class=\"text-warning\">There are no items are in your basket.</p></li>';\n\t\t\n\t\t\t#add subtotal row\n\t\t\t$data .= '<li><b class=\"tab-head\">Subtotal:</b><b class=\"tab-detail\">&#163;0.00</b></li>';\n\t\t\n\t\t\t#add shipping row\n\t\t\t$data .= '<li><b class=\"tab-head\">Shipping cost:</b><b class=\"tab-detail\">&#163;0.00</b></li>';\n\t\t\t\n\t\t\t#add tax row\n\t\t\tif (SHOP_TAX > 0)\n\t\t\t{\n\t\t\t\t$data .= '<li><b class=\"tab-head\">VAT: (' .(SHOP_TAX * 100) . '%):</b><b class=\"tab-detail\">&#163;0.00</b></li>';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t#add total row\n\t\t\t$data .= '<br><li><b class=\"tab-head\">Total:</b><b class=\"tab-detail\">&#163;0.00</b></li>';\n\t\t}\n\t\t//set PayPal tax rate \n\t\t$form .= '<input type=\"hidden\" name=\"tax_cart\" value=\"' . number_format(SHOP_TAX * $total, 2).'\">';\n\t\treturn array($data, $form);\n\t}", "public function create()\n\t{\n\t\t$brand = null;\n\t\t$model = null;\n\t\t$itemtype = null;\n\n\t\tif(Input::has('brand'))\n\t\t{\n\t\t\t$brand = $this->sanitizeString(Input::get('brand'));\n\t\t}\n\t\t\n\t\tif(Input::has('model'))\n\t\t{\n\t\t\t$model = $this->sanitizeString(Input::get('model'));\n\t\t}\n\t\t\n\t\tif(Input::has('itemtype'))\n\t\t{\n\t\t\t$itemtype = $this->sanitizeString(Input::get('itemtype'));\n\t\t\t$itemtype = ItemType::type($itemtype)->pluck('id')->first();\n\t\t}\n\n\t\treturn view('inventory.item.create')\n\t\t\t\t\t->with('brand',$brand)\n\t\t\t\t\t->with('model',$model)\n\t\t\t\t\t->with('itemtype',$itemtype);\n\t}", "public function asociar_item_b(&$item_b)\n\t{\n\t\t$this->item=$item_b;\n\t}", "public function addBox() {\n $page = 'basket';\n $id = -1;\n $product = array(\"id\"=>$id, \"name\"=>'Box', \"price\"=>50, \"imgLink\"=>\"./View/img/box.png\");\n\n\n $productInBasket = $this->inBasket($id); //check if the product is in the basket\n\n if(!empty($product) && isset($_SESSION['user']['basket'])) {\n if ($productInBasket)\n $_SESSION['user']['basket'][$id]['quantity']++;\n else\n $_SESSION['user']['basket'][$id] = array(\"product\" => $product, \"quantity\" => 1);\n }\n\n header(\"Location: ./index.php?ctrl=basket&action=consult\");\n require('./View/default.php');\n }", "public function add_item($boat_id, $item, $type) {\n $data = array(\n 'BOAT_ID' => $boat_id,\n 'CL_DES' => $item,\n 'TYPE' => $type,\n 'CHECKED' => false\n );\n $this->db->insert('CL', $data);\n }", "public function actionCreateItem()\r\n {\r\n $catalogItem = new CatalogItem(['scenario' => 'create']);\r\n\r\n if($catalogItem->load(Yii::$app->request->post()) && $catalogItem->save())\r\n {\r\n $this->redirect(['/admin/catalog/index', 'id' => $catalogItem->id]);\r\n }\r\n\r\n $catalog = new Catalog();\r\n\r\n return $this->render(\r\n 'create',\r\n [\r\n 'catalog' => $catalog,\r\n 'catalogItem' => $catalogItem,\r\n ]\r\n );\r\n }", "abstract protected function createItem(string $name): Item;", "public function __construct($itemData) {\n if(self::$itemSchema == null) {\n self::updateSchema();\n }\n\n $this->defindex = $itemData->defindex;\n\n $this->backpackPosition = $itemData->inventory & 0xffff;\n $this->class = self::$itemSchema[$this->defindex]->item_class;\n $this->count = $itemData->quantity;\n $this->id = $itemData->id;\n $this->level = $itemData->level;\n $this->name = self::$itemSchema[$this->defindex]->item_name;\n $this->quality = self::$qualities[$itemData->quality];\n $this->slot = self::$itemSchema[$this->defindex]->item_slot;\n $this->type = self::$itemSchema[$this->defindex]->item_type_name;\n\n $this->equipped = array();\n foreach(self::$CLASSES as $classId => $className) {\n $this->equipped[$className] = ($itemData->inventory & (1 << 16 + $classId) != 0);\n }\n\n if(self::$itemSchema[$this->defindex]->attributes != null) {\n $this->attributes = self::$itemSchema[$this->defindex]->attributes->attribute;\n }\n }", "public function createItem (Item $item) {\n $this->itemsDB->create($item);\n $item->setId($this->retrieveLastItemId());\n }", "function createItem($item) {\n\t\tglobal $dbh;\n\t\t$stmt = $dbh->prepare('INSERT INTO ITEM VALUES (NULL, ?, ?, ?, ?)');\n\t\t$success = $stmt->execute(array($item['content'],\n\t\t\t\t\t\t\t\t\t\t$item['image'],\n\t\t\t\t\t\t\t\t\t\t$item['checked'],\n\t\t\t\t\t\t\t\t\t\t$item['listID']));\n\t\treturn $success;\n\t}", "public function addItem(string $sku, int $qty): Cart;", "function add_CF7_basket_buttom(){\nglobal $post;\n $buttom_container = '<div class=\"add_to_cart_container\">\n<input type=\"number\" class=\"number_to_cart\" step=\"500\" value=\"500\" min=\"500\" />\n<a data-serv-id=\"'. $post->ID . '\" class=\"adding_to_cart\">Add to request</a>\n</div>';\necho $buttom_container;\n}", "public function paypalItem(){\n \treturn \\PaypalPayment::item()->setNAme($this->title)->setDescription($this->description)->setCurrency('USD')->setQuantity(1)->setPrice($this->pricing);\n }", "protected function getNewItemObject()\n\t{\n\t\treturn new \\Yetti\\API\\Item_Combination();\n\t}", "function insertItem(){\n\t\t$cartDB = new DB();\n\n\t\tif(!empty($_GET[\"cartItem\"])) {\n\t\t\t$cartItem = $this->getItemFromProducts($_GET[\"cartItem\"]);\n\t\t\t$this->insertCart($cartItem[0][\"id\"],$cartItem[0][\"itemName\"],$cartItem[0][\"itemDesc\"], 1, $cartItem[0][\"regularPrice\"]);\n\t\t\t$numberOf = $cartItem[0][\"numberLeft\"];\n\t\t\t$numberOf --;\n\t\t\t$this->updateNumberOf($numberOf);\n\t\t}\t\t\n\t}", "public function build_product_data( $item=array(), $old_item=array() ) {\n\n // summarize product details\n $retProd = array(\n 'ASIN' => isset($item['ASIN']) ? $item['ASIN'] : '',\n 'ParentASIN' => isset($item['ParentASIN']) ? $item['ParentASIN'] : '',\n \n 'ItemAttributes' => isset($item['ItemAttributes']) ? $item['ItemAttributes'] : array(),\n 'Title' => isset($item['ItemAttributes']['Title']) ? stripslashes($item['ItemAttributes']['Title']) : '',\n 'SKU' => isset($item['ItemAttributes']['SKU']) ? $item['ItemAttributes']['SKU'] : '',\n 'Feature' => isset($item['ItemAttributes']['Feature']) ? $item['ItemAttributes']['Feature'] : '',\n 'Brand' => isset($item['ItemAttributes']['Brand']) ? $item['ItemAttributes']['Brand'] : '',\n 'Binding' => isset($item['ItemAttributes']['Binding']) ? $item['ItemAttributes']['Binding'] : '',\n //'ListPrice' => isset($item['ItemAttributes']['ListPrice']['FormattedPrice']) ? $item['ItemAttributes']['ListPrice']['FormattedPrice'] : '',\n \n 'Variations' => isset($item['Variations']) ? $item['Variations'] : array(),\n 'VariationSummary' => isset($item['VariationSummary']) ? $item['VariationSummary'] : array(),\n 'BrowseNodes' => isset($item['BrowseNodes']) ? $item['BrowseNodes'] : array(),\n 'DetailPageURL' => isset($item['DetailPageURL']) ? $item['DetailPageURL'] : '',\n 'SalesRank' => isset($item['SalesRank']) ? $item['SalesRank'] : 999999,\n\n 'SmallImage' => isset($item['SmallImage']['URL']) ? trim( $item['SmallImage']['URL'] ) : '',\n 'LargeImage' => isset($item['LargeImage']['URL']) ? trim( $item['LargeImage']['URL'] ) : '',\n\n 'Offers' => isset($item['Offers']) ? $item['Offers'] : '',\n 'OfferSummary' => isset($item['OfferSummary']) ? $item['OfferSummary'] : '',\n 'EditorialReviews' => isset($item['EditorialReviews']['EditorialReview']['Content'])\n ? $item['EditorialReviews']['EditorialReview']['Content'] : '',\n \n\t\t\t\t'hasGallery'\t\t\t=> 'false',\n );\n\t\t\t\n\t\t\t// try to rebuid the description if is empty\n\t\t\tif( trim($retProd[\"EditorialReviews\"]) == \"\" ){\n\t\t\t\tif( isset($item['EditorialReviews']['EditorialReview']) && count($item['EditorialReviews']['EditorialReview']) > 0 ){\n\t\t\t\t\t\n\t\t\t\t\t$new_description = array();\n\t\t\t\t\tforeach ($item['EditorialReviews']['EditorialReview'] as $desc) {\n\t\t\t\t\t\tif( isset($desc['Content']) && isset($desc['Source']) ){\n\t\t\t\t\t\t\t//$new_description[] = '<h3>' . ( $desc['Source'] ) . ':</h3>';\n\t\t\t\t\t\t\t$new_description[] = $desc['Content'] . '<br />';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( isset($new_description) && count($new_description) > 0 ){\n\t\t\t\t\t$retProd[\"EditorialReviews\"] = implode( \"\\n\", $new_description );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n // CustomerReviews url\n if ( isset($item['CustomerReviews'], $item['CustomerReviews']['HasReviews'])\n && $item['CustomerReviews']['HasReviews'] ) {\n $retProd['CustomerReviewsURL'] = $item['CustomerReviews']['IFrameURL'];\n }\n\n // Images\n $retProd['images'] = $this->build_images_data( $item );\n if ( empty($retProd['images']['large']) ) {\n // no images found - if has variations, try to find first image from variations\n $retProd['images'] = $this->get_first_variation_image( $item );\n }\n \n if ( empty($retProd['SmallImage']) ) {\n if ( isset($retProd['images']['small']) && !empty($retProd['images']['small']) ) {\n $retProd['SmallImage'] = $retProd['images']['small'][0];\n }\n }\n if ( empty($retProd['LargeImage']) ) {\n if ( isset($retProd['images']['large']) && !empty($retProd['images']['large']) ) {\n $retProd['LargeImage'] = $retProd['images']['large'][0];\n }\n }\n\n\t\t\t// has gallery: get gallery images\n\t\t\tif ( isset($item['ImageSets']) && count($item['ImageSets']) > 0 ) {\n\t\t\t\tforeach ( $item['ImageSets'][\"ImageSet\"] as $key => $value ) {\n\t\t\t\t\tif ( isset($value['LargeImage']['URL']) ) {\n\t\t\t\t\t\t$retProd['hasGallery'] = 'true';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n return $retProd;\n }", "public function initialize()\n {\n // attributes\n $this->setName('item');\n $this->setPhpName('Item');\n $this->setIdentifierQuoting(false);\n $this->setClassName('\\\\Slims\\\\Models\\\\Bibliography\\\\Item\\\\Item');\n $this->setPackage('Slims.Models.Bibliography.Item');\n $this->setUseIdGenerator(true);\n // columns\n $this->addPrimaryKey('item_id', 'ItemId', 'INTEGER', true, null, null);\n $this->addColumn('item_code', 'Item_code', 'VARCHAR', true, 20, null);\n $this->addForeignKey('biblio_id', 'BiblioId', 'INTEGER', 'biblio', 'biblio_id', true, null, null);\n $this->addColumn('call_number', 'Call_number', 'VARCHAR', false, 50, null);\n $this->addForeignKey('coll_type_id', 'Coll_type_id', 'INTEGER', 'mst_coll_type', 'coll_type_id', false, 3, null);\n $this->addColumn('inventory_code', 'Inventory_code', 'VARCHAR', false, 200, null);\n $this->addColumn('received_date', 'Received_date', 'DATE', false, null, null);\n $this->addColumn('supplier_id', 'SupplierId', 'INTEGER', false, null, null);\n $this->addColumn('order_no', 'Order_no', 'VARCHAR', false, 20, null);\n $this->addColumn('location_id', 'LocationId', 'VARCHAR', false, 3, null);\n $this->addColumn('order_date', 'Order_date', 'DATE', false, null, null);\n $this->addColumn('item_status_id', 'ItemStatusId', 'CHAR', false, 3, null);\n $this->addColumn('site', 'Site', 'VARCHAR', false, 50, null);\n $this->addColumn('source', 'Source', 'INTEGER', false, 1, null);\n $this->addColumn('invoice', 'Invoice', 'VARCHAR', false, 20, null);\n $this->addColumn('price', 'Price', 'INTEGER', false, null, null);\n $this->addColumn('price_currency', 'Price_currency', 'VARCHAR', false, 10, null);\n $this->addColumn('invoice_date', 'Invoice_date', 'DATE', false, null, null);\n $this->addColumn('input_date', 'Input_date', 'TIMESTAMP', false, null, null);\n $this->addColumn('last_update', 'Last_update', 'TIMESTAMP', false, null, null);\n $this->addForeignKey('uid', 'Uid', 'INTEGER', 'user', 'user_id', false, null, null);\n }", "public function createShoppingBasket($basket){\n if(!$this->existsBasket($basket)){\n // Create a new shopping basket for this user\n $sql = \"insert into shoppingbasket values(:basketID,:username)\";\n $ps = $this->pdo->prepare($sql);\n $ps->execute($basket);\n }\n }", "public function addBed($item, $id){\n\n $storedItem = ['qty' => 0, 'productPrice' => $item->productPrice, 'item' => $item];\n if($this->items){\n if(array_key_exists($id, $this->items)){\n $storedItem = $this->items[$id];\n }\n }\n\n $storedItem['qty']++;\n $storedItem['productPrice'] = $item->productPrice * $storedItem['qty'];\n $this->items[$id] = $storedItem;\n $this->totalQty++;\n $this->totalPrice += $item->productPrice;\n }", "public static function createNew ($data = []) {\n\t\t$config = App::module('bixie/cart')->config();\n\t\treturn static::create(array_merge([\n\t\t\t'vat' => $config['vat'],\n\t\t\t'currency' => $config['currency']\n\t\t], $data));\n\t}", "public static function createFromCart(CartItemRepository $item)\n {\n $model = new OrderItem;\n\n $model->set(\n array(\n 'orderable_id' => $item->type_id,\n 'orderable_type' => $item->type,\n 'item_data' => $item->type_payload,\n 'quantity' => $item->quantity,\n 'price' => $item->price,\n 'tax' => $item->tax,\n 'currency' => $item->currency,\n\n )\n );\n\n return $model;\n }", "public function createNewItem() {\n\t\treturn new FeedItem($this->type);\n\t}", "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 __construct($product_item)\n {\n $this->product_item = $product_item;\n }", "protected function createItem()\n {\n return new PHP_Depend_Code_Class('clazz', 0);\n }", "public function store()\n\t{\n\t\t$order = new Order();\n\n\t\t$items = json_decode(Input::get('items', []), true);\n\n\t\tforeach($items as &$item) {\n\t\t\t$id = $item['reference']['id'];\n\t\t\t$model = Product::find($id);\n\t\t\t$item['name'] = $model->name;\n\t\t\t$item['unit_price'] = $model->price;\n\t\t\t$item['total_price_including_tax'] = ceil($model->price * $model->vatgroup->amount * $item['quantity']);\n\t\t\t$item['total_price_excluding_tax'] = ceil($model->price * $item['quantity']);\n\t\t\t$item['type'] = 'physical';\n\t\t\t$item['discount_rate'] = 0;\n\t\t\t$item['tax_rate'] = (int) abs((1 - $model->vatgroup->amount) * 100);\n\t\t}\n\n\t\t$order->items = $items;\n\n\t\t# determine shipping type\n\t\t$total = $order->getTotal();\n\t\t$weight = $order->getWeight();\n\t\tif ($weight <= 1000) {\n\t\t\t$shippingType = 'mail';\n\t\t\t$shippingCost = 39;\n\t\t}else {\n\t\t\t$shippingType = 'service-pack';\n\t\t\t$shippingCost = 99;\n\t\t}\n\n\t\t# free shipping?\n\t\tif ($total >= 800) {\n\t\t\t$shippingCost = 0;\n\t\t}\n\n\t\t# add shipping\n\t\t$items = $order->items;\n\t\t$items[] = [\n\t\t\t'discount_rate' => 0,\n\t\t\t'name' => $shippingType,\n\t\t\t'quantity' => 1,\n\t\t\t'reference' => null,\n\t\t\t'tax_rate' => 0,\n\t\t\t'total_price_excluding_tax' => $shippingCost,\n\t\t\t'total_price_including_tax' => $shippingCost,\n\t\t\t'total_tax_amount' => 0,\n\t\t\t'type' => 'shipping_fee',\n\t\t\t'unit_price' => $shippingCost,\n\t\t];\n\t\t$order->items = $items;\n\n\t\t# set user\n\t\t$order->user_id = Input::get('user_id');\n\n\t\t# set shipping & billing addresses\n\t\t$order->billing_address = [\n\t\t\t'given_name' => $order->user->firstname,\n\t\t\t'family_name' => $order->user->lastname,\n\t\t\t'street_address' => null,\n\t\t\t'postal_code' => null,\n\t\t\t'city' => null,\n\t\t\t'country' => null,\n\t\t\t'email' => $order->user->email,\n\t\t\t'phone' => null,\n\t\t];\n\t\t$order->shipping_address = $order->billing_address;\n\n\t\t# set locale etc\n\t\t$order->locale = 'nb-no';\n\t\t$order->purchase_country = 'no';\n\t\t$order->purchase_currency = 'nok';\n\n\t\t# set total\n\t\t$order->total_price_including_tax = $order->getTotal();\n\n\t\t$total = 0;\n\t\tforeach($order->items as $item) {\n\t\t\t$total += $item['total_price_excluding_tax'];\n\t\t}\n\t\t$order->total_price_excluding_tax = $total;\n\n\t\t# total tax amount\n\t\t$tax = 0;\n\t\tforeach($order->items as $item) {\n\t\t\t$tax += $item['total_price_including_tax'] - $item['total_price_excluding_tax'];\n\t\t}\n\t\t$order->total_tax_amount = $tax;\n\n\t\t$order->status = 'unprocessed';\n\n\t\t# save\n\t\t$order->save();\n\n\t\t# redirect to edit that order now\n\t\treturn Redirect::to(route('admin.orders.edit', $order->id));\n\t}", "function add($item);", "private function viewBasket() {\n $this->_session->put('url', $_SERVER['REQUEST_URI']);\n $contents = $this->_model->getContents();\n $products = array();\n foreach ($contents as $reference => $data) {\n $products[$data['product']] = $data;\n }\n $this->_template->basketProducts = $products;\n // $this->_template->total = $this->_basket->getTotal();\n $this->_template->buildFromTemplates('header.php', 'sidebar.php', 'main.basket.php', 'footer.php');\n }", "public function __construct()\n {\n $this->id = rand(1, 10000);\n $this->createCartStructure();\n }", "public function run()\n {\n factory(ShoppingList::class, 3)->state('with-items')->create();\n }", "public function __construct($_shipmentItem = NULL)\n {\n parent::__construct(array('ShipmentItem' => $_shipmentItem), false);\n }", "public function createItem($item) {\n\t\treturn tdb::insert(self::$tablename,$item);\n\t}", "protected function _construct()\n {\n $this->_init('cminds_multiwishlist/item', 'wishlist_item_id');\n }", "public function createNewItem()\n {\n return new Phone(\n new TouchKeyboardB(),\n new TouchDisplayB(),\n 'Slyva',\n 'S2'\n );\n }", "public function fcpoCreateShadowBasket() {\n $oSession = $this->getSession();\n $oBasket = $oSession->getBasket();\n $sSessionId = $oSession->getId();\n $oDb = $this->_oFcpoHelper->fcpoGetDb();\n\n $sQuery = \"\n REPLACE INTO fcposhadowbasket\n (\n \tFCPOSESSIONID,\n \tOXORDERID,\n \tFCPOBASKET,\n \tFCPOCREATED,\n \tFCPOCHECKED\n )\n VALUES\n (\n \".$oDb->quote($sSessionId).\",\n NULL,\n '\".base64_encode(serialize($oBasket)).\"',\n NOW(),\n NULL\n )\n \";\n\n $oDb->Execute($sQuery);\n }", "public function addItemToCart($account_id, $item_id, $quantity = false);", "public function createProduct($item,$asid)\n\t{\n\t\t//force item type if not exists\n\t\tif(!isset($item[\"type\"]))\n\t\t{\n\t\t\t$item[\"type\"]=\"simple\";\n\t\t}\n\t\t$tname=$this->tablename('catalog_product_entity');\n\t\t$item['type_id']=$item['type'];\n\t\t$item['attribute_set_id']=$asid;\n\t\t$item['entity_type_id']=$this->prod_etype;\n\t\t$item['created_at']=strftime(\"%Y-%m-%d %H:%M:%S\");\n\t\t$item['updated_at']=strftime(\"%Y-%m-%d %H:%M:%S\");\n\t\t$columns=array_intersect(array_keys($item), $this->getProdCols());\n\t\t$values=$this->filterkvarr($item, $columns);\n\t\t$sql=\"INSERT INTO `$tname` (\".implode(\",\",$columns).\") VALUES (\".$this->arr2values($columns).\")\";\n\t\t$lastid=$this->insert($sql,array_values($values));\n\t\treturn $lastid;\n\t}", "function add_item( $params ) {\n\t\textract( $params );\n\n\t\tif( empty( $cart_id ) )\n\t\t\treturn false;\n\n\t\t$this->db->query( \"LOCK TABLES cart_items WRITE, sales_price WRITE, stock WRITE\" );\n\n\t\t// In case of quote, no need to look up price in sales_price table, it's already provided\n\n\t\t// There are 3 sort of prices: customer price group, customer price, bodyshop. In cart the first 2 are taken into account.\n\t\t// The latter is to indicate to bodyshop what would be the price when reselling the item. Bodyshop prices are known by\n\t\t// customer_group CHOUT, customer override is by the user_no else customer group.\n\t\tif( !empty( $price ) )\n\t\t\t$prices = array( 'price' => $price, 'charge_out' => 0 );\n\t\telse {\n\t\t\t// Retrieve the unit price of the product based on the user and customer group\n\t\t\t$res = $this->db->query( \"SELECT GROUP_CONCAT(CONCAT(customer_group,';',price) SEPARATOR '|')price FROM sales_price WHERE sku='\".$item_id.\"' AND (customer_group='\".$user_no.\"' OR customer_group IN ('\".$customer_group.\"') OR ('\".$user_no.\"' LIKE '1%' AND customer_group='CHOUT'))\" )->row_array();\n\n\t\t\t$prices = misc::get_available_prices( $res[ 'price' ], $user_no, $vat );\n\t\t}\n\n\t\t$quote_no = empty( $quote_no ) ? '' : $quote_no;\n\t\t// Apply the changes against the database\n\t\t$qry = \"INSERT INTO cart_items SET cart_id='\".$cart_id.\"', sku='\".$item_id.\"', user='\".$user_no.\"', qty='\".$qty.\"', pu=\".$prices[ 'price' ].\", ebay_shipping='\".$ebay_shipping.\"', creation_date=DATE_FORMAT(NOW(),'%Y%m%d'), quote_no='\".$quote_no.\"' ON DUPLICATE KEY UPDATE qty=qty+'\".$qty.\"', ebay_shipping='\".$ebay_shipping.\"'\";\n\n\t\t$this->db->query( $qry );\n\t\n\t\t// Update the qty of the stock\n\t\t// It's only executed when the order is not created from a quote\n\t\tif( $quote_no == '' )\n\t\t\t$this->db->query( \"UPDATE stock SET qty=qty-\".$qty.\" WHERE sku='\".$item_id.\"'\" );\n\n\t\t$this->db->query( \"UNLOCK TABLES\" );\n\n\t\treturn $prices;\n\t}", "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 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}", "private function addToCart () {\n }", "private function addToCart () {\n }", "public function __construct($item) {\n\t\t$this->item = $item;\n\t}", "public function createCart($observer)\n {\n /*$order = Mage::getModel('sales/order')->loadByIncrementId('145000025');\n print_r($order);exit;*/\n\n $cart = Mage::getModel('checkout/cart')->getQuote();\n $cartItems = $cart->getAllItems();\n\n $result = array();\n $apiItems = array();\n\n foreach ($cartItems as $item) {\n $product = $item->getProduct();\n\n $apiItems[] = array(\n 'sku' => $product->getSku(),\n 'name' => $product->getName(),\n 'vat' => $this->priceFormat($this->getTaxPercent($product->getTaxClassId())),\n 'price' => $this->priceFormat($product->getPrice()),\n 'quantity' => $item->getQty(),\n );\n }\n\n $result['items'] = $apiItems;\n\n $api = Mage::getModel(\"vaimo_urbit/urbit_api\", new Vaimo_UrbIt_Model_Urbit_Api_Client());\n $responseObj = $api->createCart($result);\n\n //save cart id to session\n if (isset($responseObj->response['id'])) {\n Mage::getSingleton('core/session')->setCartIdFromApi($responseObj->response['id']);\n Mage::log($responseObj->response['id']);\n }\n }", "private function saveItem()\n {\n DB::beginTransaction();\n try\n {\n $product = !empty(request()->json('id')) ? Product::find(request()->json('id')) : new Product();\n $product->client_id = auth()->user()->current_client_id;\n $product->warehouse_id = auth()->user()->current_warehouse_id;\n $product->sku = request()->json('sku');\n $product->sku_client = request()->json('sku_client', null);\n $product->name = request()->json('name');\n $product->barcode = request()->json('barcode', null);\n $product->barcode_client = request()->json('barcode_client', null);\n $product->rfid = request()->json('rfid', null);\n $product->reorder_level = request()->json('reorder_level');\n $product->product_type_id = request()->json('product_type_id');\n\n /* HARDCODE IT TO BE THE DEFAULT FOR THE PRODUCT TYPE FOR NOW. CHANGE IT TO BE PER PRODUCT LATER */\n $product->default_uom = request()->json('product_type')['default_uom'];\n\n $product->uom1 = request()->json('uom1');\n $product->uom2 = request()->json('uom2', null);\n $product->uom3 = request()->json('uom3', null);\n $product->uom4 = request()->json('uom4', null);\n $product->uom5 = request()->json('uom5', null);\n $product->uom6 = request()->json('uom6', null);\n $product->uom7 = request()->json('uom7', null);\n $product->uom8 = request()->json('uom8', null);\n $product->oversized_pallet = (!empty(request()->json('oversized_pallet'))) ? true : false;\n $product->active = (!empty(request()->json('active'))) ? true : false;\n\n $product->save();\n\n //check for default bin and add it\n if( empty(request()->json('id')) )\n {\n $aisle = request()->json('aisle');\n $section = request()->json('section');\n $tier = request()->json('tier');\n $position = request()->json('position');\n\n //part of default bin data is missing\n if( empty($aisle) || empty($section) || empty($tier) || empty($position) )\n {\n throw new Exception('Default bin data is missing');\n }\n\n //add the bin\n else\n {\n $bin = new Bin();\n $bin->product_id = $product->id;\n $bin->default = true;\n $bin->active = true;\n $bin->aisle = $aisle;\n $bin->section = $section;\n $bin->tier = $tier;\n $bin->position = $position;\n $bin->save();\n }\n }\n }\n catch(\\Exception $e)\n {\n //rollback since something failed\n DB::rollback();\n\n //log error so we can trace it if need be later\n Log::info(auth()->user());\n Log::error($e);\n\n //set error message. Don't send verbose error if not in debug mode\n $err_msg = ( env('APP_DEBUG') === true ) ? $e->getMessage() : 'SQL error. Please try again or report the issue to the admin.';\n\n //send back error\n $error_message = array('errorMsg' => 'The product was not saved. Error: ' . $err_msg);\n return response()->json($error_message);\n }\n\n //if we got here, then everything worked!\n DB::commit();\n\n return $product->id;\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 add($fruit) {\r\n \r\n // We get the number of $fruit in the basket\r\n // +1 to qty\r\n // Update value in basket\r\n\r\n $qty = $this->get($fruit);\r\n $this->itemQtyArr[$fruit] = $qty + 1;\r\n }", "public function auto_build_items($item_list,$data){\r\n\t\treturn\r\n\t\t\t ($this->model->crud_config['can_create'] ? \r\n\t\t\t \tComponent::add_button($this->model->table_name) : '').\r\n\t\t\t'<div class=\"row col-md-12 centered\">'.$item_list.'</div>';\r\n\t}", "public function execute()\n {\n //children[child_id][startdate] = startdate[child_id];\n $newCartState = $this->state->toObject();\n\n $cartSession = JFactory::getSession();\n $cart = ($cart = $cartSession->get('sp4k_cart')) ? $cart : [];\n\n if(count($cart)>0) {\n foreach($cart as $item_type=>&$type_items){\n if($newCartState->item_type == $item_type){\n if(array_key_exists($newCartState->{$newCartState->item_identifier},$type_items)){\n $test='test';\n $type_items[$newCartState->{$newCartState->item_identifier}] = $newCartState;\n }\n }\n }\n }else{\n $cart[$newCartState->item_type][$newCartState->{$newCartState->item_identifier}]\n = $newCartState;\n }\n\n $cartSession->set('sp4k_cart',$cart);\n\n /**\n * todo\n * set a cart item type, then use a class to process that cart item for display.\n * also use that class to process new additions to the cart, so it can intelligently merge new items.\n *\n */\n }", "public function addBasketParams()\n {\n $oRequest = $this->getPayPalRequest();\n $oBasket = $this->getBasket();\n\n $blVirtualBasket = $oBasket->isVirtualPayPalBasket();\n\n // only downloadable products? missing getter on oxBasket yet\n $oRequest->setParameter(\"NOSHIPPING\", $blVirtualBasket ? \"1\" : \"0\");\n\n if ($blVirtualBasket) {\n $oRequest->setParameter(\"REQCONFIRMSHIPPING\", \"0\");\n }\n // passing basket VAT (tax) value. It is required as in Net mode articles are without VAT, but basket is with VAT.\n // PayPal need this value to check if all articles sum match basket sum.\n if ($oBasket->isCalculationModeNetto()) {\n $oRequest->setParameter(\"PAYMENTREQUEST_0_TAXAMT\", $this->_formatFloat($oBasket->getPayPalBasketVatValue()));\n }\n\n $oRequest->setParameter(\"PAYMENTREQUEST_0_AMT\", $this->_formatFloat($oBasket->getPrice()->getBruttoPrice()));\n $oRequest->setParameter(\"PAYMENTREQUEST_0_CURRENCYCODE\", $oBasket->getBasketCurrency()->name);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_ITEMAMT\", $this->_formatFloat($oBasket->getSumOfCostOfAllItemsPayPalBasket()));\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPPINGAMT\", $this->_formatFloat($oBasket->getDeliveryCosts()));\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPDISCAMT\", $this->_formatFloat($oBasket->getDiscountSumPayPalBasket() * -1));\n\n $oDelivery = oxNew(\"oxDeliverySet\");\n $sDeliveryName = ($oDelivery->load($oBasket->getShippingId())) ? $oDelivery->oxdeliveryset__oxtitle->value : \"#1\";\n\n $oRequest->setParameter(\"L_SHIPPINGOPTIONISDEFAULT0\", \"true\");\n $oRequest->setParameter(\"L_SHIPPINGOPTIONNAME0\", $sDeliveryName);\n $oRequest->setParameter(\"L_SHIPPINGOPTIONAMOUNT0\", $this->_formatFloat($oBasket->getDeliveryCosts()));\n }", "function _add2cart()\n\t{\n\t\t# 'parts2' = side 2 stuff.\n\t\t# DesignSide => parts encoded\n\n\t\t#$cartItem = $this->data[\n\n\t\t# Get full data dump so we know what fields to create.\n\t\theader(\"Content-Type: text/plain\");\n\t\tprint_r($this->data);\n\t\texit(0);\n\t}", "public function add($id)\n {\n \tif(empty($this->items))\n \t{\n \t\t$item = new ShoppingItem($id,1);\n\t\t\t$this->session->push(self::SHOPPINGCART, $item);\n\t\t\t$this->items[] = $item;\n \t}else\n \t{\n \n \t\tif($this->getItem($id))\n \t\t{\n \t\t\t$item = $this->getItem($id);\n \t\t\t$item->quantity += 1;\n \t\t}\n else\n {\n \t\t$item = new ShoppingItem($id,1);\n \t\t$this->session->push(self::SHOPPINGCART,$item);\n \t\t$this->items[] = $item;\n }\n \t} \n \t\n }" ]
[ "0.6277098", "0.60813564", "0.6048471", "0.601397", "0.5993974", "0.5983087", "0.5983087", "0.5942521", "0.593675", "0.59180576", "0.5895039", "0.58577913", "0.5853265", "0.58143425", "0.5810961", "0.5805979", "0.5781869", "0.57765776", "0.57380635", "0.57339346", "0.5672548", "0.5669053", "0.56631917", "0.56585133", "0.5613862", "0.5609104", "0.56011707", "0.5593374", "0.55598575", "0.554009", "0.5531837", "0.55310553", "0.5521679", "0.551984", "0.5517838", "0.55153066", "0.54553735", "0.54501843", "0.5437354", "0.5435411", "0.54280704", "0.54074174", "0.5403105", "0.5385689", "0.53697884", "0.53632396", "0.5356981", "0.53544044", "0.53543204", "0.53538966", "0.53502756", "0.53480893", "0.5340604", "0.532995", "0.53286093", "0.5317549", "0.5313576", "0.5308665", "0.53058094", "0.5299799", "0.52969503", "0.52955544", "0.52923703", "0.52906436", "0.52300286", "0.5229284", "0.52283967", "0.52209884", "0.52202094", "0.52193344", "0.52149457", "0.52060974", "0.52008295", "0.51993865", "0.5192741", "0.5189568", "0.5186705", "0.5180124", "0.5173469", "0.5172531", "0.5153759", "0.51536506", "0.5152038", "0.5149862", "0.5146213", "0.51374817", "0.513454", "0.51253", "0.51232064", "0.51232064", "0.51219493", "0.51186615", "0.51181877", "0.511761", "0.51113915", "0.5105245", "0.50990236", "0.5093707", "0.5083957", "0.50838333" ]
0.53406703
52
Magic get to allow us to pull individual item data vars
public function __get($param);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getItem() ;", "abstract function get ($item);", "public function getItemData()\n {\n return $this->_fields['ItemData']['FieldValue'];\n }", "abstract public function getItem();", "public function getItem();", "public function getItem() {}", "public function getItem() {}", "public function getItemData() {\n return array(\n 'itemSku' => $this->itemSku,\n 'itemQty' => $this->itemQty,\n 'itemDisc' => $this->itemDisc,\n 'itemMaxDisc' => $this->itemMaxDisc,\n 'rewardRatio' => $this->rewardRatio\n );\n }", "public function get_data()\n\t\t{\t\t// Should there be a common method for this?\n\t\t}", "function get_data_item( $name ) {\n\t\treturn $this->data_layer()->get_item( $name );\n\t}", "function getItems();", "function getItems();", "public function getItem() {\n return $this->item;\n }", "public function getData() {\n return $this->items;\n }", "public function getItem()\n {\n return $this->get(self::ITEM);\n }", "public function getItem() {\n\t\treturn $this->item;\n\t}", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getAdditionalData() {\n return $this->item->getAdditionalData();\n }", "protected function _getItemsData()\n {\n return array();\n }", "public function getItem() {\n return $this->item;\n }", "public function get_item() {\n\t\treturn $this->item;\n\t}", "public function get_data();", "function getItems(){return $this->items;}", "function readItems() {return $this->_items;}", "function get_data() {\r\n return $this->data;\r\n }", "protected function getFieldsFromShowItem() {}", "function getData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_data))\n\t\t{\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_data = $this->_getList($query, $this->getState('limitstart'), $this->getState('limit'));\n\n\t\t\t$total = count($this->_data);\n\t\t\tfor($i = 0; $i < $total; $i++)\n\t\t\t{\n\t\t\t\t$item =& $this->_data[$i];\n\t\t\t\t$item->slug = $item->id.':'.$item->alias;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_data;\n\t}", "function getData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_data))\n\t\t{\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_data = $this->_getList($query, $this->getState('limitstart'), $this->getState('limit'));\n\n\t\t\t$total = count($this->_data);\n\t\t\tfor($i = 0; $i < $total; $i++)\n\t\t\t{\n\t\t\t\t$item =& $this->_data[$i];\n\t\t\t\t$item->slug = $item->id.':'.$item->alias;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_data;\n\t}", "function get_data()\n {\n }", "public function getItemVarSetVars()\n {\n return $this->item_var_set_vars;\n }", "abstract public function getItem($name);", "function get_meta($items) {\n\t\tif($items) {\n\t\t\tif(is_array($items)) {\n\t\t\t\tforeach($items as $item) {\n\t\t\t\t\t$item->meta = get_post_custom($item->ID);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$items->meta = get_post_custom($items->ID);\n\t\t\t}\n\t\t}\n\t\treturn $items;\n\t}", "abstract function getdata();", "public function getItems(){\n\t\treturn $this->_makeCall('items?');\n\t}", "public function getItem($key){}", "public function getExtraData();", "public function get($item)\n {\n return $this->items[$item];\n }", "abstract protected function _getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems()\n {\n return $this['ITEMS'];\n }", "public function getCustomData()\n {\n return $this->get(self::_CUSTOM_DATA);\n }", "function getItems(){\r\n\t\t\treturn $this->items;\r\n\t\t}", "public function f_get_item()\n {\n\n $sql = $this->db->query(\"SELECT * FROM md_dm_item \");\n return $sql->result();\n\n }", "public static function getData() {}", "public function getSecondItem();", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function get_data() {\n $data = parent::get_data();\n if ($data !== null) {\n }\n return $data;\n }", "public function getItems()\n {\n }", "public function &items();", "protected function getData() { }", "function item_get()\n {\n $key = $this->get('id');\n $result = $this->supplies->get($key);\n if ($result != null)\n $this->response($result, 200);\n else\n $this->response(array('error' => 'Supplies item not found!'), 404);\n }", "protected function getItemData($id){\n $query = \"SELECT * FROM `\".$this->current_module_table.\"` WHERE `id` = \".intval($id);\n return $this->main->db->assocItem($query);\n }", "public function retrieve($item);", "function getObjectDataArray($item){\n\t\t$dataArray = array(\n\t\t\t\t'list_id' => $item->getListId(),\n\t\t\t\t'class' => \"List8D_Model_Item\",\n\t\t\t\t'resource_id' => $item->getResourceId(),\n\t\t\t\t'order' => $item->getOrder(),\n\t\t\t\t'start' => $item->getStart(),\n\t\t\t\t'end' => $item->getEnd(),\n\t\t\t\t'created' => $item->getCreated(),\n\t\t\t\t'updated' => $item->getUpdated(),\n\t\t\t\t'author' => $item->getAuthor(),\n\t\t\t);\n\t\treturn $dataArray;\n\t}", "static function getGriditemsInfo()\r\n\t{\r\n\t\treturn Storydata::get('item_locations',array());\t\t\r\n\t}", "public function getData($var)\n {\n return $this -> $var;\n }", "public function getItems(): array;", "public function getItems(): array;", "function &get($key) {\n\t\tif ($key=='_id')\n\t\t\treturn $this->id;\n\t\tif (array_key_exists($key,$this->item))\n\t\t\treturn $this->item[$key];\n\t\tuser_error(sprintf(self::E_Field,$key),E_USER_ERROR);\n\t\treturn FALSE;\n\t}", "protected function _getItemsData()\n {\n if (!Mage::helper('catalin_seo')->isEnabled()) {\n return parent::_getItemsData();\n }\n\n $attribute = $this->getAttributeModel();\n $this->_requestVar = $attribute->getAttributeCode();\n\n $key = $this->getLayer()->getStateKey() . '_' . $this->_requestVar;\n $data = $this->getLayer()->getAggregator()->getCacheData($key);\n\n if ($data === null) {\n $attrUrlKeyModel = Mage::getResourceModel('catalin_seo/attribute_urlkey');\n $options = $attribute->getFrontend()->getSelectOptions();\n $optionsCount = $this->_getResource()->getCount($this);\n $data = array();\n foreach ($options as $option) {\n if (is_array($option['value'])) {\n continue;\n }\n if (Mage::helper('core/string')->strlen($option['value'])) {\n // Check filter type\n if ($this->_getIsFilterableAttribute($attribute) == self::OPTIONS_ONLY_WITH_RESULTS) {\n if (!empty($optionsCount[$option['value']])) {\n $data[] = array(\n 'label' => $option['label'],\n 'value' => $attrUrlKeyModel->getUrlKey($attribute->getId(), $option['value']),\n 'count' => $optionsCount[$option['value']],\n );\n }\n } else {\n $data[] = array(\n 'label' => $option['label'],\n 'value' => $attrUrlKeyModel->getUrlKey($attribute->getId(), $option['value']),\n 'count' => isset($optionsCount[$option['value']]) ? $optionsCount[$option['value']] : 0,\n );\n }\n }\n }\n\n $tags = array(\n Mage_Eav_Model_Entity_Attribute::CACHE_TAG . ':' . $attribute->getId()\n );\n\n $tags = $this->getLayer()->getStateTags($tags);\n $this->getLayer()->getAggregator()->saveCacheData($data, $key, $tags);\n }\n \n return $data;\n }", "function &_getData($itemid){\n\t\tif (!isset($this->tabledata[$itemid])) {\n\t\t\t$this->tabledata[$itemid]=mysql_fetch_assoc($res=$this->plug->sql_query('SELECT * FROM','WHERE itemid='.(int)$itemid.' LIMIT 1'));\n\t\t\tmysql_free_result($res);\n\t\t}\n\t\treturn $this->tabledata[$itemid];\n\t}", "function getItemIvar_dump($item_id, $name = '',$language='fr')\r\n\t{\r\n\t\tglobal $lang;\r\n\t\t$item = array('id' => $item_id);\r\n\r\n // retrieve the item data\r\n $item_data = $this->get_itemdata($item_id, $language);\r\n\t\tif (sizeof($item_data) == 0)\r\n\t\t{\r\n\t\t\t// error, probably an invalid item id\r\n\t\t\tunset($item['link']);\r\n\t\t\treturn $item;\r\n\t\t}\r\n\t\t// apparantly weve got valid item data\r\n\r\n\t\t$lang = $item_data[0]['attr']['LANG'];\r\n\r\n\t\t$tooltip = array();\r\n\t\t$slot = array();\r\n\t\t$lang_data = $this->get_item_langdata($lang, $language);\r\n\t\tforeach ($lang_data as $childe)\r\n\t\t{\r\n\t\t\tif ($childe[\"name\"] == 'ITEMTOOLTIP')\r\n\t\t\t{\r\n\r\n\t\t\t\tforeach ($childe['child'] as $child)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (strpos($child['attr']['ID'],'armory.item-tooltip.') !== false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$tooltip[substr($child['attr']['ID'],strlen('armory.item-tooltip.'))] = $child['data'];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if ($childe[\"name\"] == 'ITEMSLOT')\r\n\t\t\t{\r\n\t\t\t\tforeach ($childe['child'] as $child)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (strpos($child['attr']['ID'],'armory.itemslot.slot.') !== false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$slot[substr($child['attr']['ID'],strlen('armory.itemslot.slot.'))] = $child['data'];\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\tif (debug_mode == true)\r\n\t\t{\r\n echo \"Search on the Armory site : language \".$lang.\"<br/>\";\r\n\t\t}\r\n\r\n $properties = $this->splitProperties($item_data[0]['child'][0]['child'][0]['child']);\r\n\r\n\t\tif (debug_mode == true) var_dump($properties);\r\n\r\n\t\t// set item data\r\n\t\tif ($name != '')\r\n\t\t{\r\n\t\t\t$item['name'] = $name;\r\n\t\t} else\r\n\t\t{\r\n\t\t\t$item['name'] = $properties['NAME']['data'];\r\n\t\t}\r\n\t\t$item['lang'] = $language;\r\n\t\t$item['link'] = 'http://'.$this->urlprefix.'.wowarmory.com/item-info.xml?i='.$item_id; // wowhead url to the item\r\n\t\t$item['icon'] = $properties['ICON']['data']; // icon filename without an extension\r\n\r\n\t\t// if download icons is enabled, download the icon\r\n\t\tif (DOWNLOAD_ICONS)\r\n\t\t{\r\n\t\t\tif (!$this->downloadIcon($item['icon']))\r\n\t\t\t{\r\n\t\t\t\t// failed to download the icon, use default\r\n\t\t\t\t$item['icon'] = DEFAULT_ICON;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// set the item color based on the item quality\r\n\t\tswitch ($properties['OVERALLQUALITYID']['data']) {\r\n\t\t\tcase 0:\r\n\t\t\t\t$item['color'] = 'greyname';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\t$item['color'] = 'whitename';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\t$item['color'] = 'greenname';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\t$item['color'] = 'bluename';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\t$item['color'] = 'purplename';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\t\t$item['color'] = 'orangename';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t\t$item['color'] = 'redname';\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$item['color'] = 'greyname';\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t$properties['HTMLTOOLTIP']['data'] = \"<table><tr><td><b class=\\\"q\".$properties['OVERALLQUALITYID']['data'].\"\\\">\".$item['name'].\"</b><br/>\";\r\n\t\tswitch($properties['BONDING']['data'])\r\n\t\t{\r\n case '0': break; //for gems\r\n\t\t case '1': $properties['HTMLTOOLTIP']['data'] .= $tooltip[\"binds-pickup\"].\"<br/>\";break;\r\n case '4': $properties['HTMLTOOLTIP']['data'] .= $tooltip[\"quest-item\"].\"<br/>\";break;\r\n default : $properties['HTMLTOOLTIP']['data'] .= $tooltip[\"binds-equipped\"].\"<br/>\";\r\n }\r\n\t\tif ($properties['MAXCOUNT']['data'])\r\n\t\t{\r\n $properties['HTMLTOOLTIP']['data'] .= $tooltip[\"unique\"].\"<br/>\";\r\n }\r\n\r\n $slots = array (\r\n \t0 => $tooltip[\"non-equip\"],\r\n \t1 => $slot[\"head\"],\r\n \t2 => $slot[\"neck\"],\r\n \t3 => $slot[\"shoulders\"],\r\n \t4 => $slot[\"shirt\"],\r\n \t5 => $slot[\"chest\"],\r\n \t6 => $slot[\"waist\"],\r\n \t7 => $slot[\"legs\"],\r\n \t8 => $slot[\"feet\"],\r\n \t9 => $slot[\"wrist\"],\r\n \t10 => $slot[\"hands\"],\r\n \t11 => $slot[\"finger\"],\r\n \t12 => $slot[\"trinket\"],\r\n \t13 => $tooltip[\"one-hand\"],\r\n \t14 => $slot[\"offHand\"],\r\n \t15 => $slot[\"ranged\"],\r\n \t16 => $slot[\"back\"],\r\n \t17 => $tooltip[\"two-hand\"],\r\n \t18 => $tooltip[\"bag-type\"],\r\n \t19 => $slot[\"tabard\"],\r\n \t20 => $slot[\"chest\"],\r\n \t21 => $slot[\"mainHand\"],\r\n \t22 => $slot[\"offHand\"],\r\n \t23 => $tooltip[\"held-off-hand\"],\r\n \t24 => $tooltip[\"projectile\"],\r\n \t25 => $tooltip[\"thrown\"],\r\n \t26 => $slot[\"ranged\"],\r\n \t27 => $tooltip[\"quiver-type\"],\r\n \t28 => $slot[\"relic\"]\r\n );\r\n\r\n if ((int)$properties['EQUIPDATA_INVENTORYTYPE0']['data'] > 0)\r\n {\r\n \t$properties['HTMLTOOLTIP']['data'].= \"<table><tbody><tr><td>\";\r\n\t\t\t$typeName = $slots[$properties['EQUIPDATA_INVENTORYTYPE0']['data']];\r\n\t\t\tif (strpos($typeName,\"INDEX_\")!== false)\r\n\t\t\t{\r\n\t\t\t\t$typeName = \"\";\r\n\t\t\t\tforeach (array_keys($properties) as $key)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (strpos($key,\"EQUIPDATA_\")!==false && $key != \"EQUIPDATA_INVENTORYTYPE0\")\r\n\t\t\t\t\t$typeName.=$properties[$key][\"data\"].\" \";\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$properties['HTMLTOOLTIP']['data'].=$typeName;\r\n\t\t\t$properties['HTMLTOOLTIP']['data'].=\"</td><th>\".$properties['EQUIPDATA_SUBCLASSNAME1']['data'].\"</th></tr></tbody></table>\";\r\n\t\t}\r\n\r\n\t\tif ($properties['DAMAGEDATA']['data'])\r\n\t\t{\r\n \t$damage=array(0=>\"\", 1=>$tooltip[\"holy-damage\"], 2=>$tooltip[\"fire-damage\"], 3=>$tooltip[\"nature-damage\"], 4=>$tooltip[\"frost-damage\"], 5=>$tooltip[\"shadow-damage\"].\")\", 6=>$tooltip[\"arcane-damage\"]);\r\n $properties['HTMLTOOLTIP']['data'].= \"<table><tbody><tr><td>\".$properties['DAMAGEDATA_DAMAGE0_MIN']['data'].\" - \".$properties['DAMAGEDATA_DAMAGE0_MAX']['data'].\" \".$tooltip[\"damage\"];\r\n\t\t if ($damage[$properties['DAMAGEDATA_DAMAGE0_TYPE']['data']])\r\n\t\t {\r\n\t\t\t\t$properties['HTMLTOOLTIP']['data'].= \"(\".$damage[$properties['DAMAGEDATA_DAMAGE0_TYPE']['data']].\")\";\r\n\t\t }\r\n $properties['HTMLTOOLTIP']['data'].= \"</td><th>\".$tooltip[\"speed\"].\" \".number_format($properties['DAMAGEDATA_SPEED1']['data'],2).\"</th></tr></tbody></table>\";\r\n $properties['HTMLTOOLTIP']['data'].= \"(\".number_format($properties['DAMAGEDATA_DPS2']['data'],1).\" \".$tooltip[\"dps\"].\")<br/>\";\r\n }\r\n\r\n if ($properties['REQUIREDSKILL'])\r\n {\r\n $properties['HTMLTOOLTIP']['data'].= $tooltip[\"requires\"].\" \".$properties['REQUIREDSKILL']['attr']['NAME'].\" (\".$properties['REQUIREDSKILL']['attr']['RANK'].\")<br/>\";\r\n }\r\n\r\n if ($properties['ARMOR'])\r\n {\r\n \t\t$properties['HTMLTOOLTIP']['data'].= $tooltip[\"armor\"].\" \".$properties['ARMOR']['data'].\"<br/>\";\r\n }\r\n\r\n\r\n\t\t$caracs = array(\"BLOCKVALUE\" => \"block\", \"BONUSSTRENGTH\" => \"strength\", \"BONUSAGILITY\"=>\"agility\",\r\n\t\t\"BONUSSTAMINA\" => \"stamina\",\"BONUSINTELLECT\"=>\"intellect\",\"BONUSSPIRIT\"=>\"spirit\",\r\n\t\t\"FIRERESIST\"=>\"fire-resistance\",\"NATURERESIST\"=>\"nature-resistance\",\"FROSTRESIST\"=>\"frost-resistance\",\"SHADOWRESIST\"=>\"shadow-resistance\",\"ARCANERESIST\"=>\"arcane-resistance\");\r\n\t\tforeach ($caracs as $k => $c)\r\n\t\t{\r\n\t\t\tif ($properties[$k]['data'])\r\n\t\t\t{\r\n\t\t\t $properties['HTMLTOOLTIP']['data'].= (((int)$properties[$k]['data'])>0)?\"+\":\"\";\r\n\t\t\t $properties['HTMLTOOLTIP']['data'].= (int)$properties[$k]['data'];\r\n\t\t\t $properties['HTMLTOOLTIP']['data'].= \" \".$tooltip[$c].\"<br/>\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n if ($properties['SOCKETDATA'])\r\n {\r\n \tfor ($i=0;$i<3;$i++)\r\n \t{\r\n \tif ($properties['SOCKETDATA_SOCKET'.$i])\r\n \t{\r\n \t$properties['HTMLTOOLTIP']['data'].= \"<span class=\\\"socket-\";\r\n\t\t\t \t\t$color = strtolower($properties['SOCKETDATA_SOCKET'.$i]['attr'][\"COLOR\"]);\r\n\t\t\t \t\t$properties['HTMLTOOLTIP']['data'].= $color.\" q0\\\">\".$tooltip[$color.\"-socket\"];\r\n $properties['HTMLTOOLTIP']['data'].= \"</span><br/>\";\r\n } else break;\r\n }\r\n if($properties['SOCKETDATA_SOCKETMATCHENCHANT'.$i]['data'])\r\n {\r\n \t$properties['HTMLTOOLTIP']['data'].=\"<span class=\\\"q0\\\">\".$tooltip[\"socket-bonus\"].\" : \".$properties['SOCKETDATA_SOCKETMATCHENCHANT'.$i]['data'].\"</span><br/>\";\r\n }\r\n }\r\n\r\n if ($properties['DURABILITY'])\r\n {\r\n \t$properties['HTMLTOOLTIP']['data'] .= $tooltip[\"durability\"].\" : \".$properties['DURABILITY']['attr']['CURRENT'].\" / \".$properties['DURABILITY']['attr']['MAX'].\"<br/>\";\r\n }\r\n\r\n if ($properties['ALLOWABLECLASSES'])\r\n {\r\n \t$properties['HTMLTOOLTIP']['data'] .= $tooltip[\"classes\"].\": \";\r\n for ($i=0;$i<10;$i++)\r\n {\r\n \tif ($properties['ALLOWABLECLASSES_CLASS'.$i])\r\n \t{\r\n \tif ($i>0)\r\n \t{\r\n \t\t$properties['HTMLTOOLTIP']['data'] .= \", \";\r\n \t}\r\n $properties['HTMLTOOLTIP']['data'] .= $properties['ALLOWABLECLASSES_CLASS'.$i]['data'];\r\n }\r\n else\r\n\t {\r\n\t $properties['HTMLTOOLTIP']['data'] .= \"<br/>\";\r\n\t break;\r\n\t }\r\n }\r\n }\r\n\r\n if ($properties['STARTQUESTID'])\r\n {\r\n \t$properties['HTMLTOOLTIP']['data'] .= \"<a href=\\\"http://www.wowhead.com/?quest=\".$properties['STARTQUESTID']['data'].\"\\\">\".$tooltip[\"begins-quest\"].\"</a><br/>\";\r\n }\r\n\r\n\r\n if ($properties['REQUIREDLEVEL'])\r\n {\r\n $properties['HTMLTOOLTIP']['data'] .= $tooltip[\"requires-level\"].\" \".$properties['REQUIREDLEVEL']['data'].\"<br/>\";\r\n }\r\n\r\n if ($properties['REQUIREDABILITY'])\r\n {\r\n $properties['HTMLTOOLTIP']['data'] .= $tooltip[\"requires\"].\" \".$properties['REQUIREDABILITY']['data'].\"<br/>\";\r\n }\r\n\r\n\t\tif ($properties['GEMPROPERTIES'])\r\n\t\t{\r\n $properties['HTMLTOOLTIP']['data'] .= $properties['GEMPROPERTIES']['data'].\"<br/>\";\r\n }\r\n\r\n $properties['HTMLTOOLTIP']['data'] .=\"</td></tr></table>\";\r\n $properties['HTMLTOOLTIP']['data'] .=\"<table><tr><td>\";\r\n\r\n\t\t$caracs = array(\r\n\t\t\t\"BONUSDEFENSESKILLRATING\" \t=> \"increase-defense\",\r\n\t\t\t\"INCREASEDODGE\"\t\t\t\t=> \"increase-dodge\",\r\n\t\t\t\"BONUSPARRYRATING\"\t\t\t=> \"bonusParryRating\",\r\n \t\"BONUSDODGERATING\" \t\t\t=> \"increase-dodge\",\r\n\t\t\t\"BONUSBLOCKRATING\" \t\t\t=> \"bonusBlockRating\",\r\n\t\t\t\"BONUSCRITRATING\"\t\t\t=> \"improve-crit-strike\",\r\n\t\t\t\"BONUSHITRATING\"\t\t\t=> \"improve-hit-rating\",\r\n\t\t\t\"BONUSHITTAKENRATING\"\t\t=> \"bonusHitTakenRating\",\r\n\t\t\t\"BONUSCRITTAKENRATING\"\t\t=> \"bonusCritTakenRating\",\r\n\t\t\t\"BONUSRESILIENCE\"\t\t\t=> \"improve-resilience\",\r\n\t\t\t\"BONUSHASTERATING\"\t\t\t=> \"bonusHasteRating\",\r\n\t\t\t\"BONUSSPELLPOWER\"\t\t\t=> \"bonusSpellPower\",\r\n\t\t\t\"BONUSexpertiseRating\"\t\t=> \"bonusExpertiseRating\",\r\n\t\t\t\"bonusArmorPenetration\"\t\t=> \"bonusArmorPenetration\",\r\n\t\t\t\"bonusAttackPower\"\t\t\t=> \"bonusAttackPower\",\r\n\t\t\t\"bonusRangedAttackPower\"\t=> \"bonusRangedAttackPower\",\r\n \t\"bonusFeralAttackPower\"\t\t=> \"bonusFeralAttackPower\",\r\n \t\"bonusManaRegen\"\t\t\t=> \"bonusManaRegen\"\r\n );\r\n foreach ($caracs as $k => $c)\r\n {\r\n\t\t\t$k = strtoupper($k);\r\n\t\t\tif ($properties[$k])\r\n\t\t\t{\r\n\t\t\t $properties['HTMLTOOLTIP']['data'] .= \"<span class=\\\"q2\\\">\".$tooltip[$c].\" \".$properties[$k]['data'].\"</span><br/>\";\r\n }\r\n\t\t}\r\n\r\n if ($properties['SPELLDATA'])\r\n {\r\n\t for ($i=0;$i<10;$i++)\r\n\t {\r\n\t if ($properties['SPELLDATA_SPELL'.$i])\r\n\t {\r\n\t $properties['HTMLTOOLTIP']['data'] .= \"<span class=\\\"q2\\\">\";\r\n\t switch ($properties['SPELLDATA_SPELL'.$i.'_TRIGGER']['data'])\r\n\t {\r\n\t case \"1\" : $properties['HTMLTOOLTIP']['data'] .= $tooltip[\"equip\"].\": \"; break;\r\n\t case \"2\" : $properties['HTMLTOOLTIP']['data'] .= $tooltip[\"chance-on-hit\"].\": \"; break;\r\n\t default : $properties['HTMLTOOLTIP']['data'] .= $tooltip[\"use\"].\": \";\r\n\t }\r\n\t $properties['HTMLTOOLTIP']['data'] .= $properties['SPELLDATA_SPELL'.$i.'_DESC']['data'].\"</span><br/>\";\r\n\t } else break;\r\n\t }\r\n }\r\n\r\n if ($properties['SETDATA'])\r\n {\r\n $properties['HTMLTOOLTIP']['data'] .= \"<br/><span class=\\\"q\\\">\".$properties['SETDATA_NAME0']['data'].\"</span>\";\r\n for ($i=1;$i<15;$i++)\r\n {\r\n if ($properties['SETDATA_ITEM'.$i])\r\n {\r\n $properties['HTMLTOOLTIP']['data'] .= \"<div class=\\\"q0 indent\\\">\".$properties['SETDATA_ITEM'.$i]['attr']['NAME'].\"</div>\";\r\n } elseif ($properties['SETDATA_SETBONUS'.$i])\r\n {\r\n $properties['HTMLTOOLTIP']['data'] .= \"<br/><span class=\\\"q0\\\">(\".$properties['SETDATA_SETBONUS'.$i]['attr']['THRESHOLD'].\") : \".$properties['SETDATA_SETBONUS'.$i]['attr']['DESC'].\"</span>\";\r\n } else break;\r\n }\r\n\r\n $properties['HTMLTOOLTIP']['data'] .= \" <br/>\";\r\n }\r\n\r\n if ($properties['DESC']['data'])\r\n {\r\n $properties['HTMLTOOLTIP']['data'] .= \"<span class=\\\"q\\\">\\\"\".$properties['DESC']['data'].\"\\\"</span><br/>\";\r\n }\r\n\r\n if ($properties['SPELLDATA_SPELL0_REAGENT'])\r\n {\r\n $properties['HTMLTOOLTIP']['data'] .= $tooltip[\"requires\"].\" \";\r\n $properties['HTMLTOOLTIP']['data'] .= $properties['SPELLDATA_SPELL0_REAGENT']['attr']['NAME'].\" (\".$properties['SPELLDATA_SPELL0_REAGENT']['attr']['COUNT'].\")\";\r\n if ($properties['SPELLDATA_SPELL0_REAGENT']['nbre'])\r\n {\r\n for ($i=1;$i <= $properties['SPELLDATA_SPELL0_REAGENT']['nbre'];$i++)\r\n {\r\n $properties['HTMLTOOLTIP']['data'] .= \", \";\r\n $properties['HTMLTOOLTIP']['data'] .= $properties['SPELLDATA_SPELL0_REAGENT'.$i]['attr']['NAME'].\" (\".$properties['SPELLDATA_SPELL0_REAGENT'.$i]['attr']['COUNT'].\")\";\r\n }\r\n }\r\n $properties['HTMLTOOLTIP']['data'] .= \"<br/>\";\r\n }\r\n\r\n if (debug_mode == true) d($properties['ITEMSOURCE']);\r\n if ($properties['ITEMSOURCE'])\r\n {\r\n\r\n \t\t$_lang['is_from'] \t\t\t\t\t= 'Source';\r\n\t\t\t$_lang['is_vendor'] \t\t\t\t\t= 'Vendor';\r\n\t\t\t$_lang['is_Boss'] \t\t\t\t\t= 'Boss';\r\n\t\t\t$_lang['is_Droprate'] \t\t\t\t= 'Droprate';\r\n\t\t\t$_lang['is_crafted'] \t\t\t\t= 'Crafted';\r\n\t\t\t$_lang['is_pvp'] \t\t\t\t\t= 'PvP Reward';\r\n\t\t\t$_lang['is_reput']\t \t\t\t\t= 'Rep. Reward';\r\n\t\t\t$_lang['is_world']\t \t\t\t\t= 'WorldDrop';\r\n\r\n \tif($language=='de')\r\n \t{\r\n\t\t\t\t$_lang['is_from'] \t\t\t\t\t= 'Quelle';\r\n\t\t\t\t$_lang['is_vendor'] \t\t\t\t\t= 'H&auml;ndler';\r\n\t\t\t\t$_lang['is_Boss'] \t\t\t\t\t= 'Boss';\r\n\t\t\t\t$_lang['is_Droprate'] \t\t\t\t= 'Droprate';\r\n\t\t\t\t$_lang['is_crafted'] \t\t\t\t= 'Hergestellt';\r\n\t\t\t\t$_lang['is_pvp'] \t\t\t\t\t= 'PVP-Belohnung';\r\n\t\t\t\t$_lang['is_world']\t \t\t\t\t= 'WorldDrop';\r\n\t\t\t\t$_lang['is_reput']\t \t\t\t\t= 'Rufbelohnung';\r\n \t}\r\n\r\n \t$from = str_replace('sourceType.','',$properties['ITEMSOURCE']['attr']['VALUE']) ;\r\n\r\n \tif ($from == 'creatureDrop' )\r\n \t{\r\n \t\tif ($properties['ITEMSOURCE']['attr']['AREANAME'])\r\n \t\t{\r\n \t\t\t$from_link = \"http://\".$this->urlprefix.\".wowarmory.com/search.xml?fl%5Bsource%5D=dungeon&fl%5Bdungeon%5D=\".$properties['ITEMSOURCE']['attr']['AREAID'].\"&fl%5Bboss%5D=all&fl%5Bdifficulty%5D=normal&fl%5Btype%5D=all&fl%5BusbleBy%5D=all&fl%5BrqrMin%5D=&fl%5BrqrMax%5D=&fl%5Brrt%5D=all&advOptName=none&fl%5Bandor%5D=and&searchType=items&fl%5BadvOpt%5D=none\";\r\n \t\t\t$properties['HTMLTOOLTIP']['data'] .= \"<br/><span class=\\\"q\\\">\".$_lang['is_from'].\": </span> <a href=\".$from_link.\" target=_blank>\" . $properties['ITEMSOURCE']['attr']['AREANAME'].\"</a>\" ;\r\n \t\t}\r\n\r\n\r\n \t\tif ($properties['ITEMSOURCE']['attr']['CREATURENAME'])\r\n \t\t{\r\n \t\t $link = \"<a href=http://\".$this->urlprefix.\".wowarmory.com/search.xml?searchType=items&fl[source]=dungeon&fl[difficulty]=normal&fl[boss]=\".$properties['ITEMSOURCE']['attr']['CREATUREID'].\"\r\n \t\t\t\t\t target=_blank >\".$properties['ITEMSOURCE']['attr']['CREATURENAME'].\"</a>\";\r\n \t\t\t$properties['HTMLTOOLTIP']['data'] .= \"<br/><span class=\\\"q\\\">\".$_lang['is_Boss'].\": </span>\" . $link ;\r\n \t\t}\r\n\r\n\r\n \t\tif ($properties['ITEMSOURCE']['attr']['DROPRATE'])\r\n \t\t{\r\n \t\t\tswitch ($properties['ITEMSOURCE']['attr']['DROPRATE'])\r\n \t\t\t{\r\n \t\t\t\tcase 0:\r\n\t\t\t\t\t \t$droprate= \"0 - 0%\"; break;\r\n\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t \t$droprate= \"0 - 2%\"; break;\r\n\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t \t$droprate= \"3 - 14% \"; break;\r\n\t\t\t\t\t\tcase 3:\r\n\t\t\t\t\t \t$droprate= \"15 - 24% \"; break;\r\n\t\t\t\t\t\tcase 4:\r\n\t\t\t\t\t \t$droprate= \"25 - 49% \"; break;\r\n\t\t\t\t\t\tcase 5:\r\n\t\t\t\t\t \t$droprate= \"50 - 75% \"; break;\r\n\t\t\t\t\t\tcase 6:\r\n\t\t\t\t\t \t$droprate= \"100%\"; break;\r\n \t\t\t}\r\n\r\n \t\t}\r\n \t\t$properties['HTMLTOOLTIP']['data'] .= \"<br/><span class=\\\"q\\\">\".$_lang['is_Droprate'].\": </span>\" . $droprate .\"\" ;\r\n\r\n \t}\r\n \telseif ($from == 'worldDrop')\r\n \t{\r\n \t\t$properties['HTMLTOOLTIP']['data'] .= \"<br/><span class=\\\"q\\\">\".$_lang['is_from'].\": </span> \".$_lang['is_world'] ;\r\n \t}\r\n \telseif ($from == 'vendor')\r\n \t{\r\n \t\t$properties['HTMLTOOLTIP']['data'] .= \"<br/><span class=\\\"q\\\">\".$_lang['is_from'].\": </span> \".$_lang['is_vendor'] ;\r\n \t}\r\n \telseif ($from == 'factionReward')\r\n \t{\r\n \t\t$properties['HTMLTOOLTIP']['data'] .= \"<br/><span class=\\\"q\\\">\".$_lang['is_from'].\": </span> \".$_lang['is_reput'] ;\r\n \t}\r\n \telse\r\n \t{\r\n\t \t $xml_item_data = itemstats_read_url('http://www.wowarmory.com/item-info.xml?i=' . $item_id, $language);\r\n\t\t $info_data = $this->xml_parser->parse($xml_item_data);\r\n\t\t if (sizeof($info_data) != 0)\r\n\t\t {\r\n\t\t if (debug_mode) d($info_data);\r\n\t\t $properties2 = $this->splitProperties($info_data[0]['child'][0]['child'][0]['child']);\r\n\t\t if (debug_mode) d($properties2);\r\n\t\t $reagents = array();\r\n\t\t if ($properties2['CREATEDBY_SPELL0_REAGENT'])\r\n\t\t {\r\n\t\t $reagents[] = $properties2['CREATEDBY_SPELL0_REAGENT']['attr'];\r\n\t\t $i = 1;\r\n\t\t while ($properties2['CREATEDBY_SPELL0_REAGENT'.$i])\r\n\t\t {\r\n\t\t $reagents[] = $properties2['CREATEDBY_SPELL0_REAGENT'.$i]['attr'];\r\n\t\t $i++;\r\n\t\t }\r\n\t\t if (debug_mode) var_dump($reagents);\r\n\t\t }\r\n\r\n\t\t if (sizeof($reagents) >0)\r\n\t\t {\r\n\t\t $item['reagent'] = '';\r\n\t\t foreach ($reagents as $reagent)\r\n\t\t {\r\n\t\t // if download icons is enabled, download the icon\r\n\t\t \t\t\tif (DOWNLOAD_ICONS)\r\n\t\t \t\t\t{\r\n\t\t \t\t\t\tif (!$this->downloadIcon($reagent['ICON']))\r\n\t\t \t\t\t\t{\r\n\t\t \t\t\t\t\t// failed to download the icon, use default\r\n\t\t \t\t\t\t\t$reagent['ICON'] = DEFAULT_ICON;\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t}\r\n\t\t $item['reagent'] .= $reagent['COUNT'] .' x ';\r\n\t\t $item['reagent'] .= \"<img src=\\\"\".ICON_STORE_LOCATION.$reagent['ICON'].ICON_EXTENSION.\"\\\">\";\r\n\t\t $item['reagent'] .= \" \".$reagent['NAME'].\"<br/>\";\r\n\t\t }\r\n\r\n\t\t $template_html = trim(file_get_contents(dirname(__FILE__) . '/../templates/' . ARMORY_CRAFT));\r\n\t\t $item['reagent'] = str_replace('{ITEM_HTML}', $item['reagent'], $template_html);\r\n\t\t }\r\n\r\n\t\t }\r\n \t}\r\n }\r\n #################\r\n\r\n $properties['HTMLTOOLTIP']['data'] .=\"</td></tr></table>\";\r\n\r\n\t\tif (debug_mode)\r\n\t\t{\r\n var_dump(strpos($xml_item_data,\"<itemTooltip>\"+13));\r\n\t\t\tvar_dump($item);\r\n\t\t var_dump($properties);\r\n\t\t}\r\n\r\n\t\t// create the tooltip html\r\n\t\t/*if (substr($properties['HTMLTOOLTIP']['data'], 0, 7) != '<table>') {\r\n\t\t\t$item['html'] = '*' . $properties['HTMLTOOLTIP']['data'] . '</td></tr></table>';\r\n\t\t} else {\r\n\t\t*/\t$item['html'] = $properties['HTMLTOOLTIP']['data'];\r\n\t\t//}\r\n\r\n\t\t// remove the width attributes from the tooltips, they mess the tooltip up in IE\r\n\t\t$item['html'] = str_replace(' width=\"100%\"', '', $item['html']);\r\n\r\n\t\t// tooltip title/item name links to its wowhead page\r\n\t\t$item['html'] = str_replace($item['name'], '<a href=\\'' . $item['link'] . '\\' target=\\'_new\\'>' . $properties['NAME']['data'] . '</a>', $item['html']);\r\n\r\n\t\t// add escape slashes\r\n\t\t$item['html'] = str_replace('\"', '\\'', $item['html']);\r\n\r\n /*$item['html'] = preg_replace('/<a(.*?)>/', '', $item['html']);\r\n $item['html'] = str_replace('</a>', '', $item['html']);\r\n\r\n */// place the tooltip content html into the tooltip template\r\n\t\t$template_html = trim(file_get_contents(dirname(__FILE__) . '/../templates/' . ARMORY_TEMPLATE));\r\n\t\t$item['html'] = str_replace('{ITEM_HTML}', $item['html'], $template_html);\r\n\r\n\t\tforeach (array_keys($item) as $key)\r\n\t\t{\r\n\t\t $item[$key] = utf8_decode($item[$key]);\r\n\t\t if (DECODE_UTF8 == true)\r\n\t\t {\r\n\t\t \t$item[$key] = utf8_decode($item[$key]);\r\n }\r\n }\r\n\r\n if (DECODE_UTF8 == true)\r\n {\r\n $item['name'] = utf8_decode($item['name']);\r\n }\r\n\r\n $item['name'] = str_replace(chr(160),' ',$item['name']);\r\n\r\n\t\treturn $item;\r\n\t}", "public static function getStorageItemsField() {}", "public function Individualgetdata();", "public function getIdentifyingData(FeedItemBase $item);", "function carton_get_order_item_meta( $item_id, $key, $single = true ) {\n\treturn get_metadata( 'order_item', $item_id, $key, $single );\n}", "public function getItemsList(){\n return $this->_get(4);\n }", "abstract public function getItem($url,$itemId);", "public function getItems() : array;", "public function get($item)\r\n {\r\n $instance = $this->getInstance($item);\r\n return $instance->get();\r\n }", "public function item_details($item_id)\n {\n $url = preg_replace('/set/i', 'item:' . $item_id, $this->public_url);\n return $this->curl($url)->item;\n }", "public function get_data() {\n\t\treturn $this->data;\n\t}", "public function get_data() {\r\n\t\treturn $this->data;\r\n\t}", "public function getDataMetas()\n\t {\n\t \treturn get_option('metas-custom');\n\t }", "public function getItem()\n {\n if ($this->item !== null) {\n return $this->item;\n }\n\n $this->item = 'lol';\n\n return $this->getItem();\n }", "function itemGetMetadata($args)\n {\n if(!array_key_exists('id', $args))\n {\n throw new Exception('Parameter id is not defined', MIDAS_INVALID_PARAMETER);\n }\n $userDao = $this->_getUser($args);\n\n $itemid = $args['id'];\n $item = $this->Item->load($itemid);\n\n if($item === false || !$this->Item->policyCheck($item, $userDao, MIDAS_POLICY_READ))\n {\n throw new Exception(\"This item doesn't exist or you don't have the permissions.\", MIDAS_INVALID_POLICY);\n }\n\n if(isset($args['revision']))\n {\n $revisionNumber = $args['revision'];\n $revisions = $item->getRevisions();\n foreach($revisions as $revision)\n {\n if($revisionNumber == $revision->getRevision())\n {\n $revisionDao = $revision;\n break;\n }\n }\n }\n\n if(!isset($revisionDao))\n {\n $revisionDao = $this->Item->getLastRevision($item);\n }\n\n $metadata = $this->ItemRevision->getMetadata($revisionDao);\n $metadataArray = array();\n foreach($metadata as $m)\n {\n $metadataArray[] = $m->toArray();\n }\n return $metadataArray;\n }", "public function __get($key)\n {\n if (in_array($key, static::$json_fields)) {\n $attr = $this->get_attribute($key);\n $data = json_decode($attr, true);\n }\n \n /*elseif (in_array($key, static::$secured_items)) {\n $data Security::xss_clean(e($this->get_attribute($key)));\n }*/\n\n else $data = parent::__get($key);\n\n return $data; // I could also use the helper e() (html_entities())\n }", "public function getCollectionItem() {}" ]
[ "0.7260159", "0.6695529", "0.65501076", "0.6511861", "0.6458563", "0.64195496", "0.64195496", "0.63570166", "0.6356423", "0.6336282", "0.62852556", "0.62852556", "0.62802005", "0.62462103", "0.62239057", "0.6205057", "0.6175269", "0.6175269", "0.6175269", "0.6175269", "0.6175269", "0.6175269", "0.6175269", "0.6175269", "0.6175269", "0.61676556", "0.6153527", "0.6153219", "0.61405164", "0.61294055", "0.60811794", "0.6040794", "0.6033836", "0.5990305", "0.5957774", "0.5957774", "0.5952665", "0.595182", "0.59394634", "0.59151465", "0.591067", "0.58956283", "0.5894974", "0.5879997", "0.58695495", "0.58679736", "0.5851134", "0.5851134", "0.5851134", "0.5851134", "0.5851134", "0.5851134", "0.5851134", "0.5851134", "0.5851134", "0.5851134", "0.5851134", "0.5851134", "0.5851134", "0.57950205", "0.57896173", "0.5782671", "0.5775334", "0.5770725", "0.57663214", "0.5755928", "0.5755292", "0.5755292", "0.5755292", "0.57552135", "0.5752397", "0.57387185", "0.57380915", "0.5723474", "0.5721945", "0.5716156", "0.5714811", "0.569659", "0.5695995", "0.569357", "0.569357", "0.5687982", "0.56790984", "0.5676463", "0.5669014", "0.56659114", "0.56619436", "0.5658477", "0.5658318", "0.56582564", "0.56433064", "0.56412333", "0.5640387", "0.56359583", "0.5634447", "0.5631999", "0.56314546", "0.56297225", "0.56238186", "0.5621119", "0.56039953" ]
0.0
-1
Allows setting any param value
public function __set($param, $value);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set($params) {}", "public function setParam($name, $value);", "public function setParam($param, $value);", "abstract protected function setParameter($key, $value);", "public function setParam($key, $value);", "public function setParameter($name, $value);", "abstract public function setValue($value);", "public abstract function setParameter($parameter);", "public function setParams($params);", "public function setParams($params);", "public function setDefaultParam($name, $value);", "public function set_param($key, $value)\n {\n }", "protected function setParam($name, $value) {\n if (!array_key_exists($name, $this->params)) {\n throw new \\Exception(E()->Utils->translate('ERR_DEV_NO_PARAM').': '.$name.' @'.$this->getName() , SystemException::ERR_DEVELOPER);\n }\n if ($name == 'active') {\n $value = (bool)$value;\n }\n if (is_scalar($value)) {\n $value = explode('|', $value);\n $this->params[$name] =\n (sizeof($value) == 1) ? current($value) : $value;\n } elseif (is_array($value)) {\n $this->params[$name] = $value;\n } else {\n $this->params[$name] = $value;\n }\n }", "public function set($parameter, $value);", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "protected final function setParams ($params)\n\t{\n\t\t/// This method is restricted (cannot be used by descendants).\n\t}", "public function __set($param, $value)\r\n {\r\n $this->params_named->set($param, $value);\r\n }", "public function setParameter(string $paramName, $paramValue = NULL);", "function set_params($params)\r\n\t{\r\n\t\t$this->parameters = $params;\r\n\t}", "function setParam($name, $value) {\n $this->params[$name] = $value;\n }", "private function _setParam($param, $val)\n {\n \n switch ($param) {\n case 'symbol':\n $this->symbol = $val;\n break;\n case 'stat':\n $this->stat = $val;\n break;\n case 'history':\n $this->history = $val;\n break;\n }\n }", "public function setParam($param, $value){\n // $value = array_merge(array('plugins'), (array)$value);\n\n if ($param == 'template_dir'){\n $this->setTemplateDirs((array)$value);\n } else {\n //$this->_instance->$param = $value;\n }\n\n\n }", "public function setParam($name, $value){\n\t\tthrow new Exception(\"Method \".__CLASS__.\"::\".__METHOD__.\" not implemented yet!\");\n\t}", "private function setParam($statemant, $key, $value){\n\t\t$statemant->bindParam($key, $value);\n\t}", "function set_parameter($name, $value)\r\n {\r\n //dump(get_class($this) . ' | ' . $name);\r\n $this->parameters[$name] = $value;\r\n }", "public function set( $name, $value = NULL );", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setParam($name, $value){\n\t\t$this->params[(string)$name] = $value;\n\t}", "abstract public function set();", "public function setter(string $paramName, $paramValue);", "public function set( $name, $value )\n\t{\n\t\t$this->params[ $name ] = $value;\n\t\tif( $value === null ) unset( $this->params[ $name ] );\n\t\t\n\t\t$this->modified = true;\n\t}", "public function __set($name, $value)\n {\n $this->params[$name] = $value;\n }", "private function setParams($params)\n\t{\n\t\t$this->params = $params;\n\t}", "function set($name = '', $value = \\null)\n {\n }", "public function set( $name, $value )\n\t{\n\t\t$this->_params[$name] = $value;\n\t}", "public function setParameter($params)\r\n\t{\r\n\t\tif (is_array($params))\r\n\t\t\t$this->params = array_merge($this->defaultParams(), $params);\r\n\t\telse\r\n\t\t\t$this->params = $this->defaultParams();\r\n\t}", "public function __set($param, $value)\n\t{\n\t\tswitch($param)\n\t\t{\n\t\t\tcase 'width':\n\t\t\tcase 'height':\n\t\t\tcase 'font_size':\n\t\t\tcase 'line_height':\n\t\t\t\tif(intval($value) )\n\t\t\t\t\t$this->$param = intval($value);\n\t\t\t\tbreak;\n\t\t\tcase 'format':\n\t\t\t\tif(in_array($value, array('jpg', 'jpeg') ) )\n\t\t\t\t{\n\t\t\t\t\t$this->format = 'jpg';\n\t\t\t\t\t$this->mime = 'images/jpeg';\n\t\t\t\t}\n\t\t\t\tif(in_array($value, array('png', 'gif') ) )\n\t\t\t\t{\n\t\t\t\t\t$this->format = $value;\n\t\t\t\t\t$this->mime = \"image/$value\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'font':\n\t\t\t\t// you can only use OTF fonts if it contains TTF outlines, otherwise the font may not work at all with GD\n\t\t\t\tif(file_exists($value) && preg_match('/(\\.[to]tf)$/', $value) )\n\t\t\t\t\t$this->font = $value;\n\t\t\t\tbreak;\n\t\t\tcase 'foreground':\n\t\t\t\tif(preg_match('/^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/', $value, $matches))\n\t\t\t\t\t$this->$param = $this->add_colour($matches[1]);\n\t\t\t\tbreak;\n\t\t\tcase 'auto_rotate':\n\t\t\t\tif(is_bool($value))\n\t\t\t\t\t$this->$param = $value;\n\t\t\t\tbreak;\n\t\t}//end switch\n\t}", "abstract public function set($in): void;", "public function testSetParams(): void\n {\n $set = $this->class->setParams([$this->value]);\n\n self::assertTrue($set instanceof Command);\n }", "public function set_parameter( $param_id, $value, $required = false, $data = NULL )\n {\n $util_class_name = lib::get_class_name( 'util' );\n\n // make sure the parameter exists\n if( !array_key_exists( $param_id, $this->parameters ) )\n throw lib::create( 'exception\\argument', 'param_id', $param_id, __METHOD__ );\n\n // process the value so that it displays correctly\n if( 'boolean' == $this->parameters[$param_id]['type'] )\n {\n if( is_null( $value ) ) $value = '';\n else $value = $value ? 'Yes' : 'No';\n }\n else if( 'date' == $this->parameters[$param_id]['type'] )\n {\n if( strlen( $value ) )\n {\n $date_obj = $util_class_name::get_datetime_object( $value );\n $value = $date_obj->format( 'Y-m-d' );\n }\n else $value = '';\n }\n else if( 'time' == $this->parameters[$param_id]['type'] )\n {\n if( strlen( $value ) )\n {\n $date_obj = $util_class_name::get_datetime_object( $value );\n $value = $date_obj->format( 'H:i' );\n }\n else $value = '12:00';\n }\n else if( 'hidden' == $this->parameters[$param_id]['type'] )\n {\n if( is_bool( $value ) ) $value = $value ? 'true' : 'false';\n }\n else if( 'constant' == $this->parameters[$param_id]['type'] &&\n ( ( is_int( $value ) && 0 == $value ) ||\n ( is_string( $value ) && '0' == $value ) ) )\n {\n $value = ' 0';\n }\n else if( 'number' == $this->parameters[$param_id]['type'] )\n {\n $value = floatval( $value );\n }\n\n $this->parameters[$param_id]['value'] = $value;\n if( 'enum' == $this->parameters[$param_id]['type'] )\n {\n $enum = $data;\n if( is_null( $enum ) )\n throw lib::create( 'exception\\runtime',\n 'Trying to set enum parameter without enum values.', __METHOD__ );\n\n // add a null entry (to the front of the array) if the parameter is not required\n if( !$required )\n {\n $enum = array_reverse( $enum, true );\n $enum['NULL'] = '';\n $enum = array_reverse( $enum, true );\n }\n $this->parameters[$param_id]['enum'] = $enum;\n }\n else if( 'date' == $this->parameters[$param_id]['type'] ||\n 'datetime' == $this->parameters[$param_id]['type'] )\n {\n if( is_array( $data ) )\n {\n $date_limits = $data;\n if( array_key_exists( 'min_date', $date_limits ) )\n $this->parameters[$param_id]['min_date'] = $date_limits['min_date'];\n if( array_key_exists( 'max_date', $date_limits ) )\n $this->parameters[$param_id]['max_date'] = $date_limits['max_date'];\n }\n }\n\n $this->parameters[$param_id]['required'] = $required;\n }", "public function setParams(array $params) :void;", "abstract protected function handle_set($name,$value);", "public function setParams($params){\r\n $this->params=$params;\r\n }", "public function setValues(){\n if($this->getType() == \"var\"){\n $this->setValue($this->getArg());\n }else if($this->getType() == \"int\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"bool\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"string\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"nil\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"label\"){\n $this->setValue($this->getArg());\n }else if($this->getType() == \"type\"){\n $this->setValue($this->getArg());\n }else{\n $this->setValue(\"CHYBA\");\n }\n }", "function _set_config_param($name,$value)\r\n\t{\r\n\t\t$this->db->query(\"update m_config_params set value = ? where name = ? limit 1\",array($value,$name));\r\n\t}", "public function set($value = null);", "function setParams($params) {\n $params = array_change_key_case($params);\n \n if (isset($params['localStatus'])) $this -> _localStatus = $params['localstatus'];\n if (isset($params['peerStatus'])) $this -> _peerStatus = $params['peerstatus'];\n if (isset($params['interconID'])) $this -> _interconID = $params['interconid']; \n }", "public function __set($param, $value)\n\t{\n\t\tswitch($param)\n\t\t{\n\t\t\tcase 'type':\n\t\t\t\tif(in_array($type, array('data', 'xref') ) )\n\t\t\t\t\t$this->type = $type;\n\t\t\t\tbreak;\n\t\t\tcase 'caption':\n\t\t\tcase 'class':\n\t\t\tcase 'id':\n\t\t\tcase 'xref_x':\n\t\t\t\tif(is_string($value))\n\t\t\t\t\t$this->$param = $value;\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function __set($var, $value) { $this->{$this->_parameterMap[$var]} = $value; }", "public function __set($var, $value) { $this->{$this->_parameterMap[$var]} = $value; }", "function setValue($value){\r\n\t\t$this->value = $value;\r\n\t}", "public function __set($name, $value)\n {\n $this->userParams[$name] = $value;\n }", "public function setParam($name, $val) {\n $this->params[$name]= $val;\n }", "function set_value($value)\n\t{\n\t\t$this->value = $value;\n\t}", "private function _setParams ()\n {\n $endpoint = $this->_endpoint->getData();\n if (count($endpoint) > 0) {\n \n $method = $this->_endpoint->getUrl();\n $methodname = 'setParameter' . ucfirst($method['method']);\n \n $this->_httpclient->{$methodname}('access_token', \n $this->_accesstoken);\n $this->_httpclient->{$methodname}('api_secret', $this->_apisecret);\n \n foreach ($endpoint as $param => $value) {\n $this->_httpclient->{$methodname}($param, $value);\n }\n }\n }", "function setParam()\n {\n $this->rFromDate = '0000-00-00';\n $this->rToDate = date('Y-m-d');\n $this->rAllDate = false;\n $this->rColumns = array();\n }", "public function setParams(array $params): void;", "public function setArgument($name, $value);", "function setParams($params) {\n $this->params = $params;\n }", "function setParameters($parameters);", "function set_post_parameter($param, $value) {\n\n $post_value = \\M\\Config::get('POST');\n $post_value[$param] = $value;\n\n \\M\\Config::set('POST', $post_value);\n}", "function set_get_parameter($param, $value) {\n\n $get_value = \\M\\Config::get('GET');\n $get_value[$param] = $value;\n\n \\M\\Config::set('GET', $get_value);\n}", "public function setParams(array $params);", "public function setParams(array $params);", "public function setParams(array $params);", "public function set($name, $value){}", "function setParam($var, $val) {\n\t\t\t$this->obj[$var] = $val;\n\t\t}", "public function __set($var, $val) {\n\t\t$test = $this->_sanitize_arg($var,$val);\n\t\tif ($test !== null) {\n\t\t\t$this->args[$var] = $test;\n\t\t}\n\t}", "protected function _setValue($name, $value) {}", "public function set_query_arg($key, $value)\n {\n }", "public function setParam($params)\n {\n $this->m_params = $params;\n }", "public function setParam($param = false, $val = false)\n\t{\n\t\tif (($param) && ($val)) {\n\t\t\t$_SESSION[$param] = $val;\n\t\t} else {\n\t\t\tExceptions::throwNew(\n\t\t\t\t__CLASS__,\n\t\t\t\t__FUNCTION__,\n\t\t\t\t'Not possible to set a parameter.'\n\t\t\t);\n\t\t}\n\t}", "public function setParam(string $name, $value): void\n {\n $this->params[$name] = $value;\n }", "public function setParameter($name, $value)\n {\n $this->params[$name] = $value;\n $this->processFilters();\n }", "function setAllFieldsParam($name, $value)\n\t{\n \t\tforeach ($this->table->fields as $field)\n\t\t{\n\t\t\t$array[] = $field->name;\n\t\t}\n\n\t\t$this->setFieldParam($array, $name, $value);\n\t}", "public function setParams($params) {\n\t\t$this->data['params'] = $params;\n\t}", "public function setParams( $params )\r\n\t{\r\n\t\t$this->params = $params;\r\n\t}", "function setParameter($key, $value) {\n $this->parameters[$key] = $value;\n }", "public function setParam($name, $value)\n {\n throw new \\BadMethodCallException(__METHOD__ . ' not supported');\n }" ]
[ "0.7533565", "0.7122675", "0.7120944", "0.7078099", "0.70670426", "0.69775724", "0.6975281", "0.6967299", "0.69639844", "0.69639844", "0.6930339", "0.6846463", "0.68289834", "0.68227017", "0.6789295", "0.6789295", "0.6789295", "0.6789295", "0.6789295", "0.6789295", "0.6789295", "0.6789295", "0.6789295", "0.6789295", "0.6789295", "0.6788375", "0.6788375", "0.6749015", "0.6722144", "0.6677293", "0.66436505", "0.66419435", "0.6635226", "0.66331744", "0.66148204", "0.66064", "0.6581654", "0.6574479", "0.65428174", "0.65428174", "0.65428174", "0.65428174", "0.65428174", "0.65428174", "0.65428174", "0.65428174", "0.65428174", "0.65428174", "0.65419555", "0.6531053", "0.65280235", "0.6513304", "0.65073776", "0.64930886", "0.6478672", "0.6459917", "0.6430583", "0.64277613", "0.6424913", "0.6412659", "0.64052147", "0.64045507", "0.6391765", "0.63903326", "0.6381242", "0.63717777", "0.6359957", "0.6340108", "0.6326783", "0.6311736", "0.6311736", "0.63100755", "0.6305585", "0.6304197", "0.6302579", "0.63019264", "0.6297555", "0.6291127", "0.62906635", "0.6289216", "0.6264985", "0.62579477", "0.62547445", "0.6243353", "0.6243353", "0.6243353", "0.6234286", "0.62273484", "0.6225769", "0.62181675", "0.62167346", "0.62139755", "0.6210347", "0.62051094", "0.61993957", "0.6194319", "0.61914235", "0.6187738", "0.61820316", "0.6180734" ]
0.713207
1
Calculates and returns the item total from the unit price and quantity
public function total();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function total()\n {\n \treturn $this->price()*$this->quantity;\n }", "public function calcTotal()\n {\n\n $productBusinessService = new ProductBusinessService();\n\n // create an array to hold all subtotals\n $subtotals_array = array();\n $this->total_price = 0;\n\n foreach ($this->items as $item => $qty) {\n\n // get the price of the product from the database\n $product = $productBusinessService->getProductByID($item);\n\n // calculate the total (price * quantity)\n $product_subtotal = $product->getPrice() * $qty;\n\n // add that subtotal to the subtotal array\n $subtotals_array = $subtotals_array + array($item => $product_subtotal);\n\n // add the item subtotal to the cart total\n $this->total_price += $product_subtotal;\n }\n\n // set the subtotals array\n $this->subtotals = $subtotals_array;\n }", "public function itemTotal(): float;", "protected function calculatetotal()\n {\n $total = $this->UnitPrice() * $this->Quantity;\n $this->extend('updateTotal', $total);\n $this->CalculatedTotal = $total;\n return $total;\n }", "public function getTotal()\n {\n return $this->getQty() * $this->getProduct()->getPrice();\n }", "public function getTotalPrice() {\n return $this->getQuantity()*$this->getPrice();\n }", "function total( $params ) {\n\t\textract( $params );\n\n\t\t// Should zcarriage be in the items or not? If $zcarriage='NO' exclude the zcarriage from the total cost\n\t\t$zcarriage = !empty( $zcarriage ) && $zcarriage == 'NO' ? \" AND sku<>'zcarriage'\" : '';\n\n\t\t// The pu already contains vat\n\t\t$res = $this->db->query( \"SELECT SUM(ci.qty*ci.pu) price FROM cart_items ci INNER JOIN cart c ON c.id=ci.cart_id WHERE cart_id='\".$cart_id.\"' AND user='\".$user_no.\"' AND qty>0\".$zcarriage )->row_array();\n\t\treturn $res[ 'price' ];\n\t}", "public function calItem($quantity,$item_price){\n $cal_price=$quantity*$item_price;\n return $cal_price;\n }", "public function getTotalPrice()\n {\n // use format_currency to get correct decimals and avoid rounding errors\n return $this->getQuantity() * format_currency($this->getProductPrice(),null, true);\n// return $this->getQuantity() * format_currency($this->getNetPrice(),null, true);\n }", "public function total()\n {\n // $this->line_items\n $total_price = 0;\n foreach ($this->line_items as $key => $value) {\n $total_price = $total_price + $value->product->price_amount;\n }\n // dd();\n return $total_price;\n }", "public function calculateTotalAmount()\n {\n\n $total = 0;\n $base_currency_total = 0;\n $items_in_bag = Session::get('items');\n\n if (!empty($items_in_bag)) {\n foreach ($items_in_bag as $item) {\n $priceAccessoiresMust = 0;\n $priceAccessoires = 0;\n if (!empty($item['orderItemAccessories'])) {\n foreach ($item['orderItemAccessories'] as $orderItemAccessorie) {\n if (Session::get('cur_currency') === 'USD') {\n if(!empty($orderItemAccessorie['must_purchase']) && $orderItemAccessorie['must_purchase'] == 1) {\n $priceAccessoiresMust = $priceAccessoiresMust + $item['quantity'] * ($orderItemAccessorie['price'] * Session::get('amount_per_unit'));\n }else{\n $priceAccessoires = $priceAccessoires + 1 * ($orderItemAccessorie['price'] * Session::get('amount_per_unit'));\n }\n } else {\n if(!empty($orderItemAccessorie['must_purchase']) && $orderItemAccessorie['must_purchase'] == 1) {\n $priceAccessoiresMust = $priceAccessoiresMust + $item['quantity'] * ($orderItemAccessorie['price'] * Session::get('amount_per_unit'));\n }else{\n $priceAccessoires = $priceAccessoires + 1 * ($orderItemAccessorie['price'] * Session::get('amount_per_unit'));\n }\n }\n }\n }\n\n if (Session::get('cur_currency') === 'USD') {\n $price = $item['quantity'] * ($item['price'] * Session::get('amount_per_unit'));\n } else {\n $price = $item['quantity'] * $item['price'];\n }\n\n $base_currency_total = $base_currency_total + ($item['price'] * $item['quantity']) + $priceAccessoiresMust + $priceAccessoires;\n $total = round($total + $price + $priceAccessoiresMust + $priceAccessoires, 2);\n\n }\n }\n\n Session::put('total', $total);\n Session::put('bc_currency_total', $base_currency_total);\n return $total;\n }", "public function getTotal(): float\n {\n $total = 0;\n foreach ($this->itemsVolume as $code => $volume) {\n $total += $this->store->calculatePrice($code, $volume);\n }\n return $total;\n }", "public function total(): float\n {\n return $this->itemsPrice()->sum(fn (array $item) => $item['price']);\n }", "public function total(): float\n {\n $price = $this->price;\n\n /* if ($this->hasOptions()) {\n foreach ($this->data['options'] as $item) {\n if (array_key_exists('price', $item)) {\n $price += $item['price'];\n }\n }\n }\n\n if ($includeTax) {\n $price = $this->tax->add($price);\n }*/\n\n return (float)($price * $this->quantity);\n }", "public function getTotalPrice()\n\t{\n\t\t$total = 0.0;\n\n\t\tforeach ($this->items as $item)\n\t\t{\n $total += $item->getPrice() + $item->getExtrasPrice();\n }\n\n\t\treturn $total;\n\t}", "public function __subTotal($items) {\n\n $price = 0.0;\n\n foreach ($items as $item) {\n\n// if ($item['currency_id'] == 2)\n// $currency = 1;\n//\n// if ($item['currency_id'] == 1)\n// $currency = 4.17;\n//\n// if ($item['currency_id'] == 3)\n// $currency = 4.50;\n\n //$price += $this->__lineItemTotal($item['qty'], $item['price'], $item['taxRate'], $item['currency_id']);\n //$price += $item['qty'] * $item['price'] * $currency;\n $price += $item['qty'] * $item['price'] * $item['rate'];\n }\n\n return $price;\n }", "public function total()\n {\n $total = 0;\n foreach($this->_data as &$product) {\n $total += ($product['price'] * $product['quantity']);\n }\n\n return $total;\n }", "public function get_total_items(){\n\t \t$total = 0;\n\t \t//Si no esta vacio va sumando la cantidad de articulos\n\t \tif(!empty($this->cart)){\n\t \t\tforeach ($this->cart as $linea){\n\t\t\t\t\t$total += $linea['amount'];\n\t\t\t\t}\n\t \t}\n\t \techo $total;\n\t }", "public function calculateTotalPrice($items){\n $total = 0;\n foreach($items as $item){\n $total += $item['subtotal'];\n }\n return $total;\n }", "protected function getTotal()\n {\n $total = 0;\n foreach ($this->entries as $entry) {\n $total += $entry['price'] * $entry['quantity'];\n }\n\n return $total;\n }", "function total_price($cart){\n\t\t$price = 0.0;\n\t\tif(is_array($cart)){\n\t\t \tforeach($cart as $isbn => $qty){\n\t\t \t\t$medicineprice = getmedicineprice($isbn);\n\t\t \t\tif($medicineprice){\n\t\t \t\t\t$price += $medicineprice * $qty;\n\t\t \t\t}\n\t\t \t}\n\t\t}\n\t\treturn $price;\n\t}", "function getTotalPrice(){\n \treturn $this->myCart->total();\n }", "abstract function total_price($price_summary);", "function get_deals_subtotal( $_deals, $quantity ) {\n\t\t\tglobal $cmdeals;\n\t\t\t\n\t\t\t$price \t\t\t= $_deals->get_sale();\n\t\t\t\t\t\t\t\n $row_price \t\t= $price * $quantity;\n $return = cmdeals_price( $row_price );\n\t\t\t\n\t\t\treturn $return; \n\t\t\t\n\t\t}", "public function getSubTotal()\n {\n if (($this->quantity_adjustment != 0 || $this->count_adjustment != 0) &&\n $this->quantity < $this->getMinimumQuantity() && $this->unit_price_overridden == 'false'\n ) {\n return $this->unit_price * $this->getMinimumQuantity();\n } else {\n return $this->unit_price * $this->quantity;\n }\n\n }", "public function __itemTotals() {\n\n //$this->request->data['items'] = array_values($this->request->data['items']);\n\n $itemsCount = isset($this->request->data['items']) ? count($this->request->data['items']) : 0;\n\n// pr($this->request->data['Item']);\n// die('asdas');\n\n\n\n for ($i = 0; $i < $itemsCount; $i++) {\n\n\n\n\n\n\n\n $this->request->data['items'][$i]['total'] = $this->__lineItemTotal($this->request->data['items'][$i]['qty'], $this->request->data['items'][$i]['price'], $this->request->data['items'][$i]['rate']);\n\n\n\n // collect unit name from unit model\n\n $unit = $this->Papers->Items->Units->find()\n ->where(['id'=>$this->request->data['items'][$i]['unit_id']])\n ->select(['name'])\n ->first()\n ->toArray();\n\n $this->request->data['items'][$i]['name'] = $unit['name'];\n }\n }", "public function getUnitAmount();", "public function calculateOrderTotal($items)\n {\n $total = 0;\n foreach ($items as $key => $item) {\n $total += $item['quoted_price'];\n }\n return $total;\n }", "public function calculateTotal() {\n $result = 0;\n\n if(isset($_SESSION['user']['basket']))\n foreach ($_SESSION['user']['basket'] as $item)\n $result += $item['product']['price']*$item['quantity'];\n\n return $result;\n }", "private function total()\n\t{\n\t\t//\tObteniendo los productos del carro.\n\t\t$cart = \\Session::get('cart');\n\t\t$total = 0;\n\t\t//\tSumando el precio de cada producto.\n\t\tforeach($cart as $item){\n\t\t\t$total += $item->precio * $item->cantidad;\n\t\t}\n\t\treturn $total;\n\t}", "function inventory_total($inventory) {\n $inventory_total = 0;\n foreach ($inventory as $product_id => $quantity) {\n $inventory_total += $quantity;\n }\n return $inventory_total;\n}", "function getPriceTotal()\n{\n\t$total = \\Cart::instance('shopping')->total();\n\n return $total;\n}", "public function getTotal()\n {\n return $this->getAmount() * $this->getPrice();\n }", "public function getTotalValue()\n {\n $totalValue = 0.0;\n $cartItems = $this->cart->getCartItems();\n\n foreach ($cartItems as $cartItem) {\n $totalValue += $cartItem['price'] * $cartItem['quantity'];\n }\n\n return $totalValue;\n }", "public function getTotalPrice();", "public function getTotalPrice();", "function total($price, $quantity)\n {\n $total = $price * $quantity;\n $total = number_format($total, 2);\n return \"The total is: \" . $total;\n }", "public function total()\n {\n if ($this->_isCartArray($this->cart()) === TRUE)\n {\n $price = 0;\n $vat = 0;\n foreach ($this->cart() as $key)\n {\n $item_price = ($key['price'] * $key['qty']);\n $item_vat = (($item_price/100)*$key['vat']);\n // $price =+ ($price + ($key['price'] * $key['qty']));\n $price += $item_price;\n $vat += $item_vat;\n }\n\n // $params = $this->_config['vat'];\n // $vat = $this->_formatNumber((($price / 100) * $params));\n\n return array(\n 'sub-total' => $this->_formatNumber($price),\n 'vat' \t\t=> $this->_formatNumber($vat),\n 'total' \t=> $this->_formatNumber($price + $vat)\n );\n }\n }", "public function getTotalEstimated() {\n\t\t$total = 0;\n\t\t$this->costitem->get();\n\t\tforeach($this->costitem->all as $item) {\n\t\t\tif ($item->item_type == 'price') {\n\t\t\t\t$total += $item->amount;\n\t\t\t}\n\t\t}\n\t\treturn $total;\n\t\t\n\t}", "function total_price($cart){\n $price = 0.0;\n if(is_array($cart)){\n foreach($cart as $isbn => $qty){\n $bookprice = getbookprice($isbn);\n if($bookprice){\n $price += $bookprice * $qty;\n }\n }\n }\n return $price;\n }", "function total($price, $quantity){\n $total = $price * $quantity;\n $total = number_format($total,2);\n return $total;\n }", "public function getTotalQtyOrdered();", "public function calculateItemQuantity($data){\n\t\textract($data);\n\t\tif ($mode == 'order' || $mode == 'pull') {\n\t\t\t$sell_qty = $this->Item->OrderItem->field('sell_quantity', array('id' => $rowId));\n\t\t\treturn $this->itemRecord['Item']['quantity'] + ($pullQty * $sell_qty);\n\t\t} elseif ($mode == 'replenishment') {\n\t\t\t// we need the quantity per unit for this replenishment item\n\t\t\t$po_qty = $this->Item->ReplenishmentItem->field('po_quantity', array('id' => $rowId));\n\t\t\treturn $this->itemRecord['Item']['quantity'] + ($pullQty * $po_qty);\n\t\t}\n }", "function calculerTotal () {\n\t $total = 0;\n\t \n\t foreach ($this->lignes as $lp) {\n\t $prod = $lp->prod;\n\t $prixLigne = $prod->prix * $lp->qte ;\n\t $total = $total + $prixLigne ;\n\t }\n\t \n\t return $total;\n\t }", "public function initTotal()\n {\n // Return val.\n $temp = 0;\n // Add cone price.\n $temp += $this->coneType['price'];\n // Add all scoops of ice cream.\n foreach ($this->scoops as $scoop) {\n $temp += $scoop['price'];\n }\n // Return total item cost.\n return $temp;\n }", "public function getTotal()\n {\n $cart = $this->getContent();\n\n $sum = array_reduce($cart->all(), function ($a, ItemCollection $item) {\n return $a += $item->getPrice(false);\n }, 0);\n\n return Helpers::formatValue(floatval($sum), $this->config['format_numbers'], $this->config);\n }", "public function getUnitTotal()\n {\n $cost = clone $this->getUnitCost();\n return $cost->multiplyWith($this->getNrOfUnits());\n }", "function get_cart_total() {\n\t\t\tif (!$this->prices_include_tax) :\n\t\t\t\treturn cmdeals_price($this->cart_contents_total);\n\t\t\telse :\n\t\t\t\treturn cmdeals_price($this->cart_contents_total + $this->tax_total);\n\t\t\tendif;\n\t\t}", "public function total_items()\n {\n $total_items = 0;\n $items = $this->_session->offsetGet('products');\n if ($this->_isCartArray($items) === TRUE)\n {\n foreach ($items as $key)\n {\n $total_items =+ ($total_items + $key['qty']);\n }\n return $total_items;\n }\n }", "public function getTotalPrice(): float;", "function cart_total_it($type)\n {\n $carted = $this->cart->contents();\n $ret = 0;\n if (count($carted) > 0) {\n foreach ($carted as $items) {\n $ret += $items[$type] * $items['qty'];\n }\n return $ret;\n } else {\n return false;\n }\n }", "public function amount(): float\n {\n return $this->items->sum(function ($item) {\n return $item->amount * $item->quantity;\n });\n }", "public function subtotal()\n {\n $subTotal = 0;\n foreach($this->items as $item) {\n $subTotal += $item->get(Cart\\Item::KEY_AMOUNT);\n }\n return $subTotal;\n }", "function ciniki_sapos_itemCalcAmount($ciniki, $item) {\n\n if( !isset($item['quantity']) || !isset($item['unit_amount']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.30', 'msg'=>'Unable to calculate the item amount, missing quantity or unit amount'));\n }\n\n $unit_amount = $item['unit_amount'];\n //\n // Apply the dollar amount discount first\n //\n if( isset($item['unit_discount_amount']) && $item['unit_discount_amount'] > 0 ) {\n $unit_amount = bcsub($unit_amount, $item['unit_discount_amount'], 4);\n }\n //\n // Apply the percentage discount second\n //\n if( isset($item['unit_discount_percentage']) && $item['unit_discount_percentage'] > 0 ) {\n $percentage = bcdiv($item['unit_discount_percentage'], 100, 4);\n $unit_amount = bcsub($unit_amount, bcmul($unit_amount, $percentage, 4), 4);\n }\n\n //\n // Calculate what the amount should have been without discounts\n //\n $subtotal = bcmul($item['quantity'], $item['unit_amount'], 2);\n\n //\n // Apply the quantity\n //\n $total = bcmul($item['quantity'], $unit_amount, 2);\n\n //\n // Calculate the total discount on the item\n //\n $discount = bcsub(bcmul($item['quantity'], $item['unit_amount'], 2), $total, 2);\n\n //\n // Calculate the preorder_amount, after all discount calculations because this amount will be paid later\n //\n $preorder = 0;\n if( isset($item['unit_preorder_amount']) ) {\n $preorder = bcmul($item['quantity'], $item['unit_preorder_amount'], 2);\n if( $preorder > 0 ) {\n $total = bcsub($total, $preorder, 2);\n }\n }\n\n return array('stat'=>'ok', 'subtotal'=>$subtotal, 'preorder'=>$preorder, 'discount'=>$discount, 'total'=>$total);\n}", "function get_total() {\n\t\t\treturn cmdeals_price($this->total);\n\t\t}", "public function subtotal()\n {\n return $this->getCartSessionCollection()->map(function($item, $key) {\n return $item['price'] * $item['quantity'];\n })->reduce(function($carry, $item) {\n return $carry + $item;\n });\n }", "public function getTotal() \n {\n $tax = $this->getTax(); \n return $this->_subtotal + $tax; \n }", "public function getQuantity(): float;", "function priceCart(){\n\t\t$sum = 0;\n\t\tforeach ($this->articulos as $bookid => $book) {\n\t\t\t$sum += $book['precio']*$book['cantidad'];\n\t\t}\n\t\treturn $sum;\n\t}", "public function getTotal()\n {\n return $this->totalCalculator->getCartTotal($this->cart);\n }", "function __lineItemTotal($qty, $price, $rate) {\n\n\n\n\n\n\n\n// if ($curency_id == 2)\n// $currency = 1;\n//\n// if ($curency_id == 1)\n// $currency = 4.17;\n//\n// if ($curency_id == 3)\n// $currency = 4.50;\n\n\n\n $line_total = $qty * $price * $rate;\n\n //$line_total = $line_total + (($line_total * $taxRate) / 100);\n\n\n\n return $line_total;\n }", "public function getTotal(): float\r\n {\r\n $total = 0;\r\n\r\n foreach ($this->basket as $product => $quantity) {\r\n $total += $this->product_price_calculator->getTotalPrice($product, $quantity);\r\n }\r\n\r\n return $total;\r\n }", "public function getTotal()\n {\n $subTotal = $this->getSubTotal(false);\n\n $newTotal = 0.00;\n\n $process = 0;\n\n $conditions = $this\n ->getConditions()\n ->filter(function (CartCondition $cond) {\n return $cond->getTarget() === 'total';\n });\n\n // if no conditions were added, just return the sub total\n if (!$conditions->count()) {\n return Helpers::formatValue($subTotal, $this->config['format_numbers'], $this->config);\n }\n\n $conditions\n ->each(function (CartCondition $cond) use ($subTotal, &$newTotal, &$process) {\n $toBeCalculated = ($process > 0) ? $newTotal : $subTotal;\n\n $newTotal = $cond->applyCondition($toBeCalculated);\n\n $process++;\n });\n\n return Helpers::formatValue($newTotal, $this->config['format_numbers'], $this->config);\n }", "public function subtotal()\n\t{\n\t\tif(count($this->cart) > 0)\n\t\t{\n\t\t\t$products = \\Model_Products::build();\n\t\t\tforeach($this->cart as $key => $item)\n\t\t\t{\n\t\t\t\t$products->or_where('ProductID', $key);\n\t\t\t}\n\t\t\t$products->selector('Product_Price, ProductID');\n\n\t\t\t$prices = $products->execute();\n\n\t\t\t$subtotal = 0;\n\n\t\t\tforeach($prices as $price)\n\t\t\t{\n\t\t\t\t$subtotal += (int)$price->Product_Price*$this->cart[$price->ProductID];\n\t\t\t}\n\t\t\t\n\t\t\treturn $subtotal;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t}", "public function getQuantityByUnit()\n {\n return $this->quantity_by_unit;\n }", "public function calculateTotalPrice()\n {\n $this->price = CartHelper::getTotalPrice();\n\n if ($this->shippingCarrierId) {\n $shippingCarrier = ShippingCarrier::find($this->shippingCarrierId);\n if ($shippingCarrier) {\n $this->price += TaxesHelper::calcPriceWithTax($shippingCarrier->price);\n }\n }\n\n if ($this->paymentMethodId) {\n $paymentMethod = PaymentMethod::find($this->paymentMethodId);\n if ($paymentMethod) {\n $this->price += TaxesHelper::calcPriceWithTax($paymentMethod->price);\n }\n }\n\n $this->taxes = TaxesHelper::calcTaxPrice($this->price);\n }", "public function get_rows_total_price()\n\t{\n\t\t// TODO: This price should be stored not calculated every time!\n\t\t$total = 0;\n\n\t\tforeach ($this->get_rows() as $row)\n\t\t{\n\t\t\t$total += $row->prop(\"price\") * $row->prop(\"items\");\n\t\t}\n\n\t\treturn $total;\n\t}", "function getTotalPrice()\n {\n $total = 0;\n foreach ($_SESSION['cart'] as $key => $value) {\n $total += $_SESSION['cart'][$key]['total'];\n }\n return $total;\n }", "public function getTotalAmount();", "public function getTotalCost()\n {\n $this->loadItems();\n return $this->calculator->getCost($this->items);\n }", "public function getPrice() {\n $sum = parent::getPrice();\n foreach ($this->extraItems as $extraItem) {\n $sum += $extraItem->getPrice();\n }\n return $sum;\n }", "private function _calculateTotal()\n {\n\n if (!is_null($this->shipping_option_id)) {\n $this->total = $this->unit_price * $this->quantity - $this->promotion_amount -\n $this->discount_amount;\n $this->save();\n return;\n }\n\n if ($this->quantity == 0) {\n if ($this->total > 0) {\n $this->total = '0.00';\n $this->save();\n }\n return;\n }\n\n if (is_null($pricing = $this->getPricing()) && $this->unit_price_overridden == 'false') {\n if ($this->total > 0) {\n $this->total = '0.00';\n $this->save();\n }\n return;\n }\n\n if ($this->unit_price_overridden != 'true') {\n $this->unit_price = $pricing->price;\n }\n\n // Reset promotion to capture any adjustments affecting discount\n if (!is_null($promotion = $this->promotion)) {\n $this->save();//flush current values to db for promo calculations\n $promotion->calculate($this->invoice);\n $this->refresh();\n }\n\n /**\n * Multipay discount\n */\n if (!$this->invoice->discount_id && 'incomplete' == $this->invoice->status) {\n $discount = $this->invoice->user->account()->discounts()->active()->first();\n } else {\n $discount = $this->invoice->discount;\n }\n if ($discount) {\n // flush current values to db prior to calculations\n if (count($this->getDirty())) {\n $this->save();\n }\n $discount->calculate($this->invoice);\n $this->refresh();\n }\n\n $this->total = $this->getSubTotal() - $this->promotion_amount - $this->discount_amount;\n $this->save();\n }", "public function getSubtotalAttribute()\n {\n if ( $this->picked > 0 ) {\n return (float) $this->price * (float) $this->picked;\n }\n return (float) $this->price * (float) $this->quantity;\n }", "function total_price2(){\n\tglobal $conn;\n\t$ip = getIp();\n\t$total=0;\n\t$get_cart =mysqli_query($conn, \"SELECT * FROM `cart` WHERE `ip_add`='$ip'\");\n\twhile ( $row_cart=mysqli_fetch_array($get_cart)) {\n\t\t# code...\n\n\t\t$quantity= $row_cart[\"qty\"];\n\t\t$product_id=$row_cart['p_id'];\t\n\n\t$get_price =mysqli_query($conn, \"SELECT * FROM `products` WHERE `product_id`='$product_id' AND `stock`='0'\");\n\twhile ( $row_price = mysqli_fetch_array($get_price)) {\n\t\n\t\t$price= $row_price[\"product_price\"];\n\n\t//get the subtotal\n\t$sub_total=$price * $quantity;\n\n\t$total +=$sub_total;\n\t}\n\t\n\t}\n\t\n\n\treturn $total;\n\n\t\n}", "public function totalQuantity(): int\n {\n return $this->items->sum(function ($item) {\n return $item->quantity;\n });\n }", "function total_items($cart){\n $items = 0;\n if(is_array($cart)){\n foreach($cart as $isbn => $qty){\n $items += $qty;\n }\n }\n return $items;\n }", "public function getTotalAttribute()\n {\n return $this->price * $this->quantity;\n }", "function totalSale()\r\n {\r\n //$strSQLQuery = \"SELECT SUM(TotalPrice) as OrderTotal FROM e_orders WHERE PaymentStatus=1 AND OrderStatus='Completed'\";\r\n $strSQLQuery = \"SELECT SUM((CASE when Currency='USD' then TotalPrice \r\n \t\telse TotalPrice/CurrencyValue\r\n\tEND )) as OrderTotal FROM e_orders WHERE (PaymentStatus='1' OR OrderType in('Amazon','Ebay')) AND OrderStatus in ('Completed', 'Shipped','Unshipped') \";\r\n $arrayRow = $this->query($strSQLQuery, 1);\r\n return $arrayRow[0]['OrderTotal'];\r\n }", "function calculate(){\r\n global $item_price, $item_qty, $item_total;\r\n $item_price = number_format($item_price, 2);\r\n $item_total = number_format(($item_price * $item_qty), 2);\r\n}", "public function sumItems(): float\n\t{\n\t\treturn $this->storage->sum();\n\t}", "function fix_order_amount_item_total( $price, $order, $item, $inc_tax = false, $round = true ) {\n $qty = ( ! empty( $item[ 'qty' ] ) && $item[ 'qty' ] != 0 ) ? $item[ 'qty'] : 1;\n if( $inc_tax ) {\n $price = ( $item[ 'line_total' ] + $item[ 'line_tax' ] ) / $qty;\n } else {\n $price = $item[ 'line_total' ] / $qty;\n }\n $price = $round ? round( $price, 2 ) : $price;\n return $price;\n}", "function getCartTotal(){\n\t\t$totalCost = 0;\n\t\t$cartInfo = $this->getCart();\n\t\t$cartInfoSize = sizeof($cartInfo);\n\t\t$cartInfoSize--;\n\t\tfor($i=0; $i<=$cartInfoSize; $i++) {\n\t\t\t$totalCost = $totalCost + $cartInfo[$i][\"price\"];\n\t\t}\n\n\t\treturn $totalCost;\t\n\t}", "function totalPrice() {\n\n $total = 0;\n\n global $con;\n\n $ip = getIp();\n\n $run_price = mysqli_query($con,\"SELECT * FROM cart WHERE ip_add = '$ip'\");\n\n while($row_pro_price = mysqli_fetch_array($run_price)) {\n\n $pro_id = $row_pro_price['p_id'];\n $pro_qty = $row_pro_price['qty'];\n\n $run_pro_price2 = mysqli_query($con,\"SELECT * FROM products WHERE product_id = '$pro_id'\");\n\n while($row_pro_price2 = mysqli_fetch_array($run_pro_price2)) {\n\n $pro_price = array($row_pro_price2['product_price']);\n\n $pro_price_single = $row_pro_price2['product_price'];\n\n $pro_price_values = array_sum($pro_price);\n\n\n $total += $pro_price_values;\n\n if($pro_qty > 1) {\n $pro_price_single_all = $pro_price_single * $pro_qty;\n $total = $total + $pro_price_single_all - $pro_price_single;\n }\n\n\n }\n\n }\n echo \"$\" . $total;\n }", "public function individual_products_total() {\n\n foreach($this->remaining_category_price as $remaining_category_prices){\n $this->individual_products_total += $remaining_category_prices['price'];\n }\n\n }", "function totalPrice(){\n \n global $conn;\n\n $ip_add = getUserIp();\n $total = 0;\n\n $select_cart = \"SELECT * FROM cart WHERE ip_address = '$ip_add'\";\n $run_select_cart = mysqli_query($conn, $select_cart) or die(\"Total Price Query Failed\");\n while($row_select_cart = mysqli_fetch_assoc($run_select_cart)){\n $pro_id = $row_select_cart['cart_id'];\n $product_qty = $row_select_cart['qty'];\n\n $get_price = \"SELECT * FROM products WHERE product_id = '$pro_id'\";\n $run_get_price = mysqli_query($conn, $get_price);\n while($row_get_price = mysqli_fetch_assoc($run_get_price)){\n $price_qty = $row_get_price['product_price'] * $product_qty;\n\n $total = $total + $price_qty; \n }\n }\n\n echo $total; \n }", "function calculateTotalPrice()\n {\n $this->sellingPrice = $this->bid;\n $this->buyersPremium = $this->sellingPrice * 0.1;\n $this->totalPrice = $this->sellingPrice + $this->buyersPremium;\n\n return $this->totalPrice;\n }", "public function getTotalAmountFromWoodItems()\n {\n $total = 0;\n // #179 - Add Wood Products if they exist to Cabinet Items.\n foreach ($this->quote->cabinets AS $cabinet)\n {\n if ($cabinet->wood_xml)\n {\n $woods = self::returnWoodArray($cabinet);\n foreach ($woods AS $wood)\n {\n\n $total += $wood['qty'] * $wood['price'];\n }\n }\n }\n return $total;\n }", "public function getTotalAttribute() {\n return $this->cartItems->map(function ($item, $key) {\n return $item->subtotal;\n })->sum();\n }", "public function UnitPrice()\n {\n if ($this->Order()->IsCart()) {\n $buyable = $this->Buyable();\n $unitprice = ($buyable) ? $buyable->sellingPrice() : $this->UnitPrice;\n $this->extend('updateUnitPrice', $unitprice);\n return $this->UnitPrice = $unitprice;\n }\n return $this->UnitPrice;\n }", "public function get_total_cost()\n\t{\n\t\t$num = '0.00';\n\t\tif (isset($_SESSION['cart']))\n\t\t{\n\t\t\t#if there are items to display \n\t\t\t\n\t\t\t#get product ids\n\t\t\t$ids = $this->get_ids();\n\t\t\t\n\t\t\t#get product prices\n\t\t\tglobal $Products;\n\t\t\t$prices = $Products->get_prices($ids);\n\t\t\t\n\t\t\t#loop throih adding the cost of each item and timesing it by the number of item in the cart. \n\t\t\tif($prices != NULL)\n\t\t\t{\n\t\t\t\tforeach($prices as $price)\n\t\t\t\t{\n\t\t\t\t\t$num += doubleval($price['price'] * $_SESSION['cart'][$price['id']]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $num;\n\t}", "function total_price(){\n\nglobal $db;\n\n$ip_add = getRealUserIp();\n\n$total = 0;\n\n$select_cart = \"select * from cart where ip_add='$ip_add'\";\n\n$run_cart = mysqli_query($db,$select_cart);\n\nwhile($record=mysqli_fetch_array($run_cart)){\n\n$pro_id = $record['p_id'];\n\n$pro_qty = $record['qty'];\n\n\n$sub_total = $record['p_price']*$pro_qty;\n\n$total += $sub_total;\n\n\n\n\n\n\n}\n\necho \"$\" . $total;\n\n\n\n}", "public function total(): float;", "public function total(): float;", "public function calculate_cart_total()\r\n\t{\r\n\t\t$cart_total = 0;\r\n\t\t$cart_total += $this->flexi->cart_contents['summary']['item_summary_total'];\r\n\t\t$cart_total += $this->flexi->cart_contents['summary']['shipping_total'];\r\n\t\t$cart_total += $this->flexi->cart_contents['summary']['surcharge_total'];\r\n\t\t$cart_total += (! $this->flexi_cart->cart_prices_inc_tax()) ? $this->flexi->cart_contents['summary']['tax_total'] : 0; \r\n\t\t\r\n\t\t$this->flexi->cart_contents['summary']['total'] = $this->format_calculation($cart_total);\r\n\t\t\t\t\r\n\t\treturn TRUE; \r\n\t}", "public function getTotalItems()\n {\n $total = 0;\n \n foreach ($this->items as $item) {\n $total += ($item->Quantity) ? $item->Quantity : 1;\n }\n\n return $total;\n }", "function total_items($cart){\n\t\t$items = 0;\n\t\tif(is_array($cart)){\n\t\t\tforeach($cart as $isbn => $qty){\n\t\t\t\t$items += $qty;\n\t\t\t}\n\t\t}\n\t\treturn $items;\n\t}", "function total_price($price_summary) {\r\n return ($price_summary ['OfferedPriceRoundedOff']);\r\n }", "public function testItemPriceAndQty()\n {\n $item = $this->addItem(3, 10);\n\n $this->assertEquals(3, $item->qty);\n $this->assertEquals(10, $item->price(false));\n $this->assertEquals(30, $item->subTotal(false));\n }" ]
[ "0.7662698", "0.75393146", "0.7473209", "0.73755276", "0.7307806", "0.7300539", "0.7208036", "0.71769536", "0.7138646", "0.71382874", "0.71123123", "0.70972145", "0.70614463", "0.7052506", "0.7052069", "0.70471656", "0.696539", "0.69605327", "0.6949979", "0.6914651", "0.6886345", "0.68757254", "0.68578345", "0.6842606", "0.68008786", "0.6783593", "0.6766341", "0.67348397", "0.67313385", "0.673066", "0.6718749", "0.67061687", "0.67050976", "0.6686145", "0.6683611", "0.6683611", "0.66810256", "0.667513", "0.665407", "0.6645053", "0.6640479", "0.6635524", "0.6630445", "0.6629454", "0.66235924", "0.661356", "0.66068196", "0.6591385", "0.65878886", "0.65667254", "0.6563649", "0.65623015", "0.6547046", "0.6546941", "0.65241134", "0.65154755", "0.6506069", "0.65023816", "0.6486854", "0.64793193", "0.64767283", "0.6470598", "0.64620584", "0.64400536", "0.6439866", "0.64305556", "0.64273655", "0.64179045", "0.64115125", "0.63742894", "0.63710296", "0.6361859", "0.63503313", "0.6349131", "0.63477796", "0.6345217", "0.63383293", "0.63375086", "0.63342035", "0.63341707", "0.6331668", "0.6331482", "0.632628", "0.6326026", "0.63188887", "0.63163155", "0.63134724", "0.63131785", "0.6304687", "0.6296893", "0.62918836", "0.62891746", "0.62891746", "0.6286634", "0.62837315", "0.628289", "0.6281977", "0.6260004" ]
0.63554275
74
Returns the item data, which is already an array
public function toArray();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getItemArray()\n {\n return $this->itemArray;\n }", "public function getData() {\n return $this->items;\n }", "protected function _getItemsData()\n {\n return array();\n }", "public function getDataArray(){\n return array($this->item_id,$this->name,$this->count,$this->price);\n }", "public function getItemData() {\n return array(\n 'itemSku' => $this->itemSku,\n 'itemQty' => $this->itemQty,\n 'itemDisc' => $this->itemDisc,\n 'itemMaxDisc' => $this->itemMaxDisc,\n 'rewardRatio' => $this->rewardRatio\n );\n }", "public function getItemsArray();", "public function getItemData()\n {\n return $this->_fields['ItemData']['FieldValue'];\n }", "public function getItems(): array\n {\n return $this->getData();\n }", "public function convertItemArray() {}", "public function getArray() {\n\t\treturn $this->data; \n\t}", "public function getArray() {\n\t\treturn $this->data; \n\t}", "public function toArray(){\n return $this->items;\n }", "private function getDataArray() {\n\t\treturn $this->dataArray;\n\t}", "public function toArray(): array {\n return $this->items;\n }", "public function asArray()\r\n {\r\n return $this->data;\r\n }", "public function getData() {\n if ($this->_multiple) {\n return $this->_data;\n }\n return isset($this->_data[0])? $this->_data[0] : [];\n }", "function getObjectDataArray($item){\n\t\t$dataArray = array(\n\t\t\t\t'list_id' => $item->getListId(),\n\t\t\t\t'class' => \"List8D_Model_Item\",\n\t\t\t\t'resource_id' => $item->getResourceId(),\n\t\t\t\t'order' => $item->getOrder(),\n\t\t\t\t'start' => $item->getStart(),\n\t\t\t\t'end' => $item->getEnd(),\n\t\t\t\t'created' => $item->getCreated(),\n\t\t\t\t'updated' => $item->getUpdated(),\n\t\t\t\t'author' => $item->getAuthor(),\n\t\t\t);\n\t\treturn $dataArray;\n\t}", "public function getData()\n\t{\n\t\treturn $this->arrData;\n\t}", "public function getData()\n\t{\n\t\treturn $this->arrData;\n\t}", "public function getItems() : array;", "public function asArray(){\n return $this->data;\n }", "public function asArray() {\n return $this->items;\n }", "public function getData () : array {\n\t\treturn $this->data;\n\t}", "public function getDataArr(){\n\t\treturn $this->data_arr;\n\t}", "public function getItems(): array;", "public function getItems(): array;", "public function asArray()\n {\n return $this->data;\n }", "public function toArray()\n\t{\n\t\treturn $this->items;\n\t}", "public function toArray()\n\t{\n\t\treturn $this->items;\n\t}", "public function toArray() // untested\n {\n return $this->data;\n }", "public function get_items() {\n\t\treturn (array) $this->items;\n\t}", "public function get_data(): array;", "public function get_data(): array;", "function toArray(){\r\n\t\treturn $this->data;\r\n\t}", "public function toArray()\n {\n return $this->items;\n }", "public function toArray()\n {\n return $this->items;\n }", "public function toArray()\n {\n return $this->items;\n }", "public /*array*/ function toArray()\n\t{\n\t\treturn $this->_data;\n\t}", "public function getData() : array\n {\n return $this->data;\n }", "public function getData() : array\n {\n return $this->data;\n }", "public function getData() : array\n {\n return $this->data;\n }", "public function toArray(): array\n {\n return $this->items;\n }", "public function toArray(): array\n {\n return $this->items;\n }", "public function toArray() {\n return $this->_items;\n }", "public function toArray()\n {\n return $this->_data;\n }", "public function toArray()\n {\n return $this->_data;\n }", "public function toArray() {\n\t\treturn $this->data;\n\t}", "public function toArray()\r\n\t{\r\n\t\treturn $this->m_data;\r\n\t}", "public function data() : array\n {\n return $this->data->toArray();\n }", "public function toArray()\r\n {\r\n return $this->data;\r\n }", "public function toArray()\n {\n return [\n 'id' => $this->getRowId(),\n 'data' => $this->item\n ];\n }", "public function toArray(): array\n {\n return (array) $this->items;\n }", "public function getData() : array;", "public function getData() : array;", "public function getData(): array;", "public function getData(): array;", "public function getData(): array;", "public function getData(): array;", "public function getData()\n {\n return array(\n\n );\n }", "public function getData(): array\n\t{\n\t\treturn $this->data;\n\t}", "public function toArray()\n {\n return $this->data;\n }", "public function toArray()\n {\n return $this->data;\n }", "public function toArray()\n {\n return $this->data;\n }", "public function toArray()\n {\n return $this->data;\n }", "public function toArray()\n {\n return $this->data;\n }", "public function toArray()\n {\n return $this->data;\n }", "public function getItem(): ?array\n {\n if (empty($this->params['itemId']->value)) {\n return null;\n }\n \n $sql = 'SELECT *' . \n ' FROM #__enikeishik_ufmexample_items' . \n ' WHERE id=' . $this->params['itemId']->value;\n return $this->db->getItem($sql);\n }", "public function toArray()\n {\n\n\n return $this->data;\n }", "public function getData(): array\n {\n return $this->data;\n }", "public function getData(): array\n {\n return $this->data;\n }", "public function getData(): array\n {\n return $this->data;\n }", "public function data()\n {\n return static::toArray($this);\n }", "public function toArray() {\n return $this->data;\n }", "public function toArray() {\n return $this->data;\n }", "public function returnItems()\n\t{\n\t\treturn is_array($this->items) ? $this->items : array();\n\t}", "public function data(): array\n {\n return $this->data;\n }", "protected abstract function getData(): array;", "public function getData() : array{\n $this->collection->rewind();\n $data = [];\n while($this->collection->valid()){\n $data[] = $this->collection->current()->getData();\n $this->collection->next();\n }\n return $data;\n }", "public function _getData(): array\n {\n $result = [\n ];\n\n return parent::normalizeData($result);\n }", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->_data;\n\t}", "public function getItemsAsArray()\n {\n $map = function ($item) {\n return $item->toArray();\n };\n return array_map($map, $this['ITEMS']);\n }", "public function toArray()\n {\n return [\n 'id' => $this->items->first()->getKey(), //eventually change ow this works\n 'ids' => $this->items->pluck('id'),\n 'grocery_list_id' => $this->items->first()->grocery_list_id,\n 'department' => $this->department(),\n 'department_id' => $this->departmentId(),\n 'quantity' => $this->quantity(),\n 'description' => $this->description(),\n 'implicitQty' => $this->hasImplicitQuantity(),\n ];\n }", "public function getData()\n\t{\n\t\treturn $this->m_data->getData();\n\t}", "public function asArray()\n {\n return $this->items();\n }", "public function toArray() : array\n {\n return $this->data;\n }", "public function &getData() : array\n {\n return $this->data;\n }", "public function getData() {\r\n\t\treturn $this->_data;\r\n\t}", "public function getItemsArray() {\r\n $stmt = $this->DB->prepare ( \"SELECT * FROM products\");\r\n $stmt->execute ();\r\n return $stmt->fetchAll (PDO::FETCH_ASSOC);\r\n }", "public function getData() \n\t{\n return $this->data;\n }", "public function get_data() {\r\n\t\treturn $this->data;\r\n\t}", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData() {\n\t\treturn $this->_data;\n\t}" ]
[ "0.7801701", "0.7786829", "0.7713397", "0.76220894", "0.76195407", "0.74484944", "0.7406114", "0.7367317", "0.7332244", "0.73011386", "0.73011386", "0.73009783", "0.7272797", "0.72068936", "0.7171484", "0.7155383", "0.71465516", "0.71217704", "0.71217704", "0.71192384", "0.71183807", "0.7115215", "0.71008086", "0.7088595", "0.70871735", "0.70871735", "0.70846224", "0.70781714", "0.70781714", "0.7052896", "0.70364076", "0.7033798", "0.7033798", "0.7013311", "0.7012735", "0.7012735", "0.7012735", "0.698235", "0.6967179", "0.6967179", "0.6967179", "0.6944697", "0.6944697", "0.69290227", "0.6908285", "0.6908285", "0.69066644", "0.68922436", "0.6890535", "0.689005", "0.6868903", "0.6861171", "0.68595874", "0.68595874", "0.6847146", "0.6847146", "0.6847146", "0.6847146", "0.6841814", "0.6830294", "0.68033564", "0.68033564", "0.68033564", "0.68033564", "0.68033564", "0.68033564", "0.67807734", "0.6779441", "0.67770416", "0.67770416", "0.67770416", "0.6770617", "0.6768869", "0.6768869", "0.67602104", "0.6753736", "0.6735143", "0.67318124", "0.67069006", "0.6700978", "0.6700978", "0.6700978", "0.6700978", "0.66936785", "0.66885", "0.6684987", "0.6676388", "0.6671601", "0.6669709", "0.6666451", "0.6663506", "0.66611254", "0.66608214", "0.66552407", "0.6649987", "0.6649987", "0.6649987", "0.6649987", "0.6649987", "0.6649987", "0.6647206" ]
0.0
-1
Initializes context. Every scenario gets its own context instance. You can also pass arbitrary arguments to the context constructor through behat.yml.
public function __construct(UserRepository $userRepository) { $user = $userRepository->findOneBy(['name' => 'behatTestuser']); $this->user = $user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init(&$context){}", "function testContext() {\n $this->ConfigFile();\n $this->ContextHierarchy();\n }", "public function before(BeforeScenarioScope $scope) {\n\t\t// Get the environment\n\t\t$environment = $scope->getEnvironment();\n\t\t// Get all the contexts you need in this context\n\t\t$this->featureContext = $environment->getContext('FeatureContext');\n\t\t$this->webUIGeneralContext = $environment->getContext('WebUIGeneralContext');\n\t}", "public function before(BeforeScenarioScope $scope): void {\n\t\t// Get the environment\n\t\t$environment = $scope->getEnvironment();\n\t\t// Get all the contexts you need in this context from here\n\t\t$this->featureContext = $environment->getContext('FeatureContext');\n\t}", "abstract protected function initializeContext();", "public function gatherContexts(BeforeScenarioScope $scope) {\n /** @var Environment $environment */\n $environment = $scope->getEnvironment();\n\n $this->drupalContext = $environment->getContext('Drupal\\DrupalExtension\\Context\\DrupalContext');\n $this->minkContext = $environment->getContext('Drupal\\DrupalExtension\\Context\\MinkContext');\n $this->groupContext = $environment->getContext('Drupal\\GroupContext');\n }", "public function before(BeforeScenarioScope $scope) {\n\t\t// Get the environment\n\t\t$environment = $scope->getEnvironment();\n\t\t// Get all the contexts you need in this context\n\t\t$this->webUIGeneralContext = $environment->getContext('WebUIGeneralContext');\n\t}", "public function __construct(array $parameters = []) {\n // Initialize your context here\n }", "public function __construct(array $parameters)\n {\n // Initialize your context here\n }", "public function __construct(Context $context);", "public function __construct(array $parameters)\n {\n // Initialize your context here\n }", "public function __construct(array $parameters)\n {\n // Initialize your context here\n }", "public function __construct(array $parameters)\n {\n // Initialize your context here\n }", "public function __construct(array $parameters)\n {\n // Initialize your context here\n }", "public function __construct(array $parameters)\n {\n // Initialize your context here\n }", "public function __construct(array $parameters)\n {\n // Initialize your context here\n }", "public function __construct(array $parameters)\n {\n // Initialize your context here\n }", "public function gatherContexts(BeforeScenarioScope $scope) {\n $environment = $scope->getEnvironment();\n $this->configContext = $environment->getContext('Drupal\\DrupalExtension\\Context\\ConfigContext');\n }", "protected function initializeContext(): void\n {\n $this->context->setAspect('date', new DateTimeAspect(new \\DateTimeImmutable('@' . $GLOBALS['EXEC_TIME'])));\n $this->context->setAspect('visibility', new VisibilityAspect(true, true));\n $this->context->setAspect('workspace', new WorkspaceAspect(0));\n $this->context->setAspect('backend.user', new UserAspect(null));\n }", "public function __Init_Context() {\r\n $this->_Load_Context();\r\n // Fire the shortcode init action\r\n do_action('vcff_supports_init_context',$this);\r\n }", "public function setUp()\n {\n $parameters = array(\n 'builder' => $this->getPageObjectBuilderMock()\n );\n $this->context = new CommonContext($parameters);\n $this->context->setParentContext($this->getParentContextMock());\n }", "public function __construct()\n {\n require_once(dirname(__FILE__).'/../../../behat4eve2Plugin/vendor/autoload.php');\n require_once(dirname(__FILE__).'/../../../../config/ProjectConfiguration.class.php');\n\n $configuration = ProjectConfiguration::getApplicationConfiguration('default', 'dev', true);\n sfContext::createInstance($configuration);\n }", "public function initContext($ctx);", "public function gatherContexts(BeforeScenarioScope $scope)\n {\n /** @var InitializedContextEnvironment $environment */\n $environment = $scope->getEnvironment();\n $this->restContext = $environment->getContext('Behatch\\Context\\RestContext');\n }", "private function _initContext( )\n {\n if( empty($this->_application) )\n {\n $this->_application = self::getDefaultApplicationName();\n }\n\n if( ! sfContext::hasInstance() )\n {\n sfContext::createInstance($this->getApplicationConfiguration());\n }\n\n sfContext::switchTo($this->_application);\n }", "public function __construct()\n {\n $this->categories = [];\n $this->faker = Factory::create();\n $this->useContext('symfony_doctrine_context', new SymfonyDoctrineContext());\n }", "public function __construct()\n {\n if (class_exists('Context')) {\n $this->context = Context::getContext();\n } else {\n global $smarty, $cookie;\n $this->context = new StdClass();\n $this->context->smarty = $smarty;\n $this->context->cookie = $cookie;\n }\n }", "function __construct()\n {\n // Set up the correct context\n parent::__construct(new Context());\n }", "public function initialize ($context)\n {\n\n $this->request = $context->getRequest();\n\n }", "public function initialContext() {\n return $this->ff->createBasicContext();\n }", "public function __construct(array $parameters)\n {\n $this->parameters = $parameters;\n\n $kernel = new \\AppKernel(\"test\", true);\n $kernel->boot();\n\n $this->useContext('symfony_mailer', new \\Behat\\CommonContexts\\SymfonyMailerContext($kernel));\n $this->useContext('mink_redirect', new \\Behat\\CommonContexts\\MinkRedirectContext($kernel));\n\n }", "public function __construct()\n\t{\n\n\t\t$this->context = Context::getContext();\n\t\tparent::__construct();\n\t}", "public function __construct(array $parameters)\n {\n $this->useContext('phpguard',new PhpGuardContext());\n $this->useContext('plugin-behat',new BehatPluginContext());\n }", "protected function initContextAware()\n {\n return;\n }", "public function createContext(): IContext;", "public function setUpContext()\n {\n return $this->context = (new \\NetLicensing\\Context())\n ->setBaseUrl(self::BASE_URL)\n ->setSecurityMode(self::SECURITY_MODE)\n ->setUsername(self::USERNAME)\n ->setPassword(self::PASSWORD);\n }", "public function __construct( ContextManager $context ) {\n $this->context= $context;\n $this->routes= array();\n }", "function ctools_plugin_example_context_create_simplecontext($empty, $data = NULL, $conf = FALSE) {\n $context = new ctools_context('simplecontext');\n $context->plugin = 'simplecontext';\n\n if ($empty) {\n return $context;\n }\n\n if ($conf) {\n if (!empty($data)) {\n $context->data = new stdClass();\n // For this simple item we'll just create our data by stripping non-alpha and\n // adding '_from_configuration_item_1' to it.\n $context->data->item1 = t(\"Item1\");\n $context->data->item2 = t(\"Item2\");\n $context->data->description = preg_replace('/[^a-z]/i', '', $data['sample_simplecontext_setting']);\n $context->data->description .= '_from_configuration_sample_simplecontext_setting';\n $context->title = t(\"Simplecontext context from config\");\n return $context;\n }\n }\n else {\n // $data is coming from an arg - it's just a string.\n // This is used for keyword.\n $context->title = $data;\n $context->argument = $data;\n // Make up a bogus context\n $context->data = new stdClass();\n $context->data->item1 = t(\"Item1\");\n $context->data->item2 = t(\"Item2\");\n\n // For this simple item we'll just create our data by stripping non-alpha and\n // adding '_from_simplecontext_argument' to it.\n $context->data->description = preg_replace('/[^a-z]/i', '', $data);\n $context->data->description .= '_from_simplecontext_argument';\n $context->arg_length = strlen($context->argument);\n return $context;\n }\n}", "abstract protected function prepareContext(): void;", "protected function setUp()\n {\n if ($this->bootstrap) require $this->bootstrap;\n $this->dispatcher->dispatch('test.before', new \\Codeception\\Event\\Test($this));\n $this->codeGuy = new CodeGuy($scenario = new \\Codeception\\Scenario($this));\n $scenario->run();\n }", "public function initPhpContext()\r\n {\r\n $this->initAbstractContext();\r\n }", "public function __construct()\n {\n // $this->session = new \\Behat\\Mink\\Session($this->driver);\n // $this->session->start();\n }", "abstract public function get_context();", "protected function _Load_Context() {\r\n $dir = untrailingslashit( plugin_dir_path(__FILE__ ) );\r\n // Recurssively load the directory\r\n $this->_Recusive_Load_Dir($dir.'/context');\r\n // Fire the shortcode init action\r\n do_action('vcff_supports_context_init',$this);\r\n }", "public function setUp() {\n $this->temp= new Folder(\\lang\\System::tempDir());\n $this->spec= new GlueSpec();\n }", "public function contextStrategy();", "public function __construct () {\n $this->loadEnvironment();\n }", "public function __construct(\\Scrivo\\Context $context=null) {\n\t\t\\Scrivo\\ArgumentCheck::assertArgs(func_get_args(), array(null));\n\n\t\tif ($context) {\n\t\t\t$this->title = new \\Scrivo\\Str();\n\t\t\t$this->icon = new \\Scrivo\\Str();\n\t\t\t$this->phpSelector = new \\Scrivo\\Str();\n\t\t\t$this->titleLabel = new \\Scrivo\\Str();\n\n\t\t\t$this->context = $context;\n\t\t}\n\t}", "public function __construct($context, $template)\n {\n $this->context = $context;\n $this->setTemplate($template);\n }", "public function setContext($context);", "public function setContext($context);", "function initialize()\n {\n if (isset($this->key)) {\n $key = common_config('contextio', 'key');\n if (empty($key)) {\n Config::save(\n 'contextio',\n 'key',\n $this->key\n );\n }\n }\n\n if (isset($this->secret)) {\n $secret = common_config('contextio', 'secret');\n if (empty($secret)) {\n Config::save('contextio', 'secret', $this->secret);\n }\n }\n }", "public function __construct(TraceContext $context = null)\n {\n $this->context = $context ?: new TraceContext();\n }", "function setContext( )\n\t{\n\t\t$args = new safe_args();\n\t\t$args->set('name', \tREQUIRED, 'string');\n\t\t$args->set('value', REQUIRED, 'any');\t\t\n\t\t$args = $args->get(func_get_args());\n\t\t\t\n\t\t$this->context[$args['name']] = $args['value'];\n\t}", "public function __construct(array $parameters)\n {\n // not used - just here as an example of using configuration - see behat.yml\n $screenshotPath = $parameters['screenshots_path'];\n\n $this->useContext('mink', new MinkContext());\n\n require_once __DIR__.'/../../../../app/autoload.php';\n require_once __DIR__.'/../../../../app/AppKernel.php';\n self::$kernel = new \\AppKernel('test', true);\n self::$kernel->boot();\n }", "public function __construct($context = null) {\r\n\t\tif(self::$instances === null) {\r\n\t\t\tself::$instances = array();\r\n\t\t}\r\n\r\n\t\tself::$instances[get_class($this)] = $this;\r\n\t\t$this->context = $context;\r\n\t}", "protected function setUp()\n {\n parent::setUp();\n $this->prepareContextApiMock();\n }", "public function __construct()\n {\n $paypal_conf = \\Config::get('paypal');\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n }", "public function __construct()\r\n {\r\n $paypal_conf = Config::get('paypal');\r\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\r\n $this->_api_context->setConfig($paypal_conf['settings']);\r\n }", "public function __construct()\n {\n $this->webDriver = new \\Behat\\Mink\\Driver\\Selenium2Driver();\n $this->session = new \\Behat\\Mink\\Session($this->webDriver);\n\n }", "public function __construct(Context$context) {\n\t\t\n\t\tparent::__construct($context);\n\t\t\n\t\t#Get the answer format\n\t\t$this->extension = $context->request->getPath()->getFormat();\n\t\t\n\t\t#Get the variables needed for the creation of a template\n\t\t$basedir = $this->app->getTemplateDirectory();\n\t\t$controller = strtolower(implode(DIRECTORY_SEPARATOR, $this->app->getControllerURI($this->controller)));\n\t\t$action = $this->action;\n\t\t$extension = $this->extension === 'php'? '' : '.' . $this->extension;\n\t\t\n\t\t#Create the templates for the layout and the template\n\t\t$this->template = new Template([\n\t\t\t\"{$basedir}{$controller}/{$action}{$extension}.php\",\n\t\t\t\"{$basedir}{$controller}{$extension}.php\"\n\t\t]);\n\t\t\n\t\t$this->layout = new Layout([\n\t\t\t\"{$basedir}{$controller}/layout{$extension}.php\",\n\t\t\t\"{$basedir}layout{$extension}.php\"\n\t\t]);\n\t}", "protected function __construct()\n\t{\n\t\tTwig_Autoloader::register();\n\n\t\t$loader = new Twig_Loader_Filesystem( TEMPLATE_PATH );\n\n\t\t$params = array(\n\t\t\t'cache'\t\t=> TMP_PATH\n\t\t\t, 'debug'\t=> true\n\t\t);\n\n\t\t$this->twig = new Twig_Environment( $loader, $params );\n\n\t\t$this->twig->addExtension( new Twig_Extension_I18n() );\n\t\t$this->twig->addExtension( new Twig_Extension_LoadModule() );\n\n\t\t$this->setContext('MAIN');\n\t}", "public function __construct()\n {\n // initialize the default configuration\n $this->initDefaultDirectories();\n $this->initDefaultLoggers();\n $this->initDefaultScanners();\n $this->initDefaultExtractors();\n $this->initDefaultProvisioners();\n $this->initDefaultInitialContext();\n }", "protected function setUp()\n\t{\n\t\t$this->instance = new GteCompare('flower', 'sakura');\n\t}", "public function __construct() {\r\n global $TEST_BED;\r\n\r\n if ($TEST_BED == 'SimpleTest')\r\n $this->sharedFixture = new MovieLensDataSet(DATA_DIR);\r\n }", "function __construct($intContext)\n\t{\n\t\t$this->_intContext = $intContext;\n\t}", "function __construct() {\n //invoke the init method of the config object in context\n $this->init();\n }", "public function __construct(array $parameters)\n {\n $this->useContext('api',\n new Behat\\CommonContexts\\WebApiContext($parameters['base_url'])\n );\n\n $this->getSubcontext('api')\n ->setPlaceHolder('BASE_URL', rtrim($parameters['base_url'], '/')\n );\n }", "protected function getContext() {}", "public function __construct()\n {\n // setup the fixture settings\n $this->fixtureSettings = array(\n sfConfig::get('sf_data_dir') . '/fixtures/wspNopastePlugin-sfGuardUserTest.yml' => 'mcx-users',\n sfConfig::get('sf_data_dir') . '/fixtures/wspNopastePlugin-EntriesCommentsTest.yml' => 'wsp-nopaste',\n );\n }", "public function __construct()\n {\n $paypal_conf = config('paypal');\n \n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n \n }", "public function setContext($context = \"default\")\n {\n $this->context = $context;\n }", "public function __construct(\\FortissimoExecutionContext $context) {\n $this->collection = new Collection($this);\n\n // Set the action to the current url as a default.\n $this->action = $context->getRequestMapper()->baseURL();\n \n $this->context = $context;\n }", "public function __construct() {\n $paypal_conf = Config::get('paypal_payment');\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n }", "public function setUp()\n {\n parent::setUp();\n\n $this->startSituation = new Situation([\n 'redGoat' => new Pokey('RED'),\n 'redLocation' => new Location('RED'),\n 'blueGoat' => new Pokey('BLUE'),\n 'blueLocation' => new Location('BLUE')\n ]);\n }", "public function init()\n {\n chdir($this->context['source_dir']);\n $this->loadConfig();\n $this->context['temp_dir'] = $this->cacheDir(\"upgrades/temp\");\n $this->context['extract_dir'] = $this->context['temp_dir'];\n $this->ensureDir($this->context['temp_dir']);\n $this->context['state_file'] = $this->cacheDir('upgrades/') . self::STATE_FILE;\n $this->context['upgrader_dir'] = dirname(__FILE__);\n $this->loadState();\n $this->context['backup_dir'] = $this->config['upload_dir'] . \"/upgrades/backup/\" . pathinfo(\n $this->context['zip'],\n PATHINFO_FILENAME\n ) . \"-restore\";\n if (isset($this->context['script_mask'])) {\n $this->script_mask &= $this->context['script_mask'];\n }\n if (isset($this->state['extract_dir'])) {\n $this->context['extract_dir'] = $this->state['extract_dir'];\n }\n if (empty($this->context['health_check_path'])) {\n $this->context['health_check_path'] =\n realpath($this->context['extract_dir']) . self::DEFAULT_HEALTHCHECK_PATH;\n }\n $this->context['case_insensitive_fs'] = $this->testFilesystemCaseInsensitive();\n $this->context['versionInfo'] = self::getVersion();\n\n $this->initialized = true;\n }", "public function __construct()\n {\n /** setup PayPal api context **/\n $paypal_conf = \\Config::get('paypal');\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n }", "public function __construct()\n {\n\n /** PayPal api context **/\n $paypal_conf = \\Config::get('paypal');\n $this->_api_context = new ApiContext(new OAuthTokenCredential(\n $paypal_conf['client_id'],\n $paypal_conf['secret'])\n );\n $this->_api_context->setConfig($paypal_conf['settings']);\n\n }", "public function __construct(){\n\t\t$paypal_conf = config('paypal');\n\t\t$this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n\t\t$this->_api_context->setConfig($paypal_conf['settings']);\n\t}", "public function setContext($context) {\n $this->context = $context;\n }", "public function __construct()\r\n {\r\n $this->includes();\r\n $this->setup();\r\n $this->hooks();\r\n }", "public function __construct()\n {\n \n /** setup PayPal api context **/\n $paypal_conf = \\Config::get('paypal');\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n }", "public function __construct()\n {\n \n /** setup PayPal api context **/\n $paypal_conf = \\Config::get('paypal');\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n }", "public function __construct()\n {\n $this->templateData = array(\n // Any data that belongs to every template.\n );\n $this->before();\n }", "public function setUp()\n {\n $this->salt = new Ingredient('salt');\n $this->tomato = new Ingredient('tomato');\n $this->kg = new Unit('kilogram', 'kg');\n $this->l = new Unit('liter', 'l');\n $this->recipe = new Recipe('tomato sauce', [\n new Quantity(0.5, $this->kg, $this->tomato),\n new Quantity(0.2, $this->kg, $this->salt),\n ], true, $this->l, 0.8);\n }", "protected function initDefaultInitialContext()\n {\n\n // initialize the configuration values for the initial context\n $description = new DescriptionNode(new NodeValue('The initial context configuration.'));\n $storage = new StorageNode('AppserverIo\\Storage\\StackableStorage');\n\n // set the default initial context configuration\n $this->initialContext = new InitialContextNode('AppserverIo\\Appserver\\Core\\InitialContext', $description, $storage);\n }", "public function __construct() {\n\t\t\t$this->init_globals();\n\t\t\t$this->init_actions();\n\t\t}", "public function __construct($context, array $options = [])\n {\n $this->options = $options;\n parent::__construct($context, $options);\n }", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "protected function setUp() {\n\t\tparent::setUp();\n\n\t\t$this->object = new ControllerFixture([\n\t\t\t'module' => 'module',\n\t\t\t'controller' => 'controller',\n\t\t\t'action' => 'action',\n\t\t\t'args' => [100, 25]\n\t\t]);\n\n\t\t// Used by throwError()\n\t\tTiton::router()->initialize();\n\t}", "public function setContext(array $context = []): void;", "protected function setup() {\n $driver = new \\Behat\\Mink\\Driver\\GoutteDriver();\n $this->session = new \\Behat\\Mink\\Session($driver);\n $this->session->start();\n }", "function ctools_demos_context_demos($empty, $data = NULL, $conf = FALSE) {\n $context = new ctools_context('demos');\n $context->plugin = 'demos';\n \n if ($empty) {\n return $context;\n }\n \n \n\n if ($conf) {\n if (!empty($data)) {\n // For this simple item we'll just create our data by stripping non-alpha and\n // adding '_from_configuration_item_1' to it.\n $context->data = new stdClass();\n $context->data->item1 = t(\"Item1\");\n $context->data->item2 = t(\"Item2\");\n $context->data->description = preg_replace('/[^a-z]/i', '', $data['sample_demos_setting']);\n $context->data->description .= '_from_configuration_sample_demos_setting';\n $context->title = t(\"Simplecontext context from config\");\n return $context;\n }\n }\n else {\n // $data is coming from an arg - it's just a string.\n // This is used for keyword.\n $context->title = $data;\n $context->argument = $data;\n // Make up a bogus context\n \n // For this simple item we'll just create our data by stripping non-alpha and\n // adding '_from_demos_argument' to it.\n $context->data = new stdClass();\n $context->data->item1 = t(\"Item1\");\n $context->data->item2 = t(\"Item2\");\n $context->data->description = preg_replace('/[^a-z]/i', '', $data);\n $context->data->description .= '_from_demos_argument';\n $context->arg_length = strlen($context->argument);\n return $context;\n }\n}", "protected function setUp()\n {\n $this->workload = new Workload('my-workload');\n }", "public function setContext($context)\r\n {\r\n $this->context = $context;\r\n }", "public function init() {\n\t$this->_helper->_acl->allow(null);\n\t$this->_helper->contextSwitch()\n\t\t->setAutoDisableLayout(true)\n\t\t->addActionContext('index', array('xml','json'))\n\t\t->addActionContext('type', array('xml','json'))\n\t\t->initContext();\n }", "public function setUp()\n {\n\n $this->db = Db::getActive();\n $this->response = Response::getActive();\n\n }" ]
[ "0.712063", "0.6949832", "0.69141215", "0.69123834", "0.68356997", "0.6668963", "0.6644645", "0.6632251", "0.65958416", "0.65619874", "0.65504867", "0.65504867", "0.65504867", "0.65504867", "0.65504867", "0.65504867", "0.65504867", "0.6519796", "0.64825034", "0.6473241", "0.64552665", "0.641105", "0.6375436", "0.63496757", "0.6261951", "0.62612414", "0.622701", "0.6187997", "0.6145431", "0.6112098", "0.6076671", "0.6059334", "0.60575366", "0.60138357", "0.5978591", "0.59737706", "0.5954953", "0.5892599", "0.58867234", "0.5870539", "0.58503675", "0.5823491", "0.5813347", "0.5798197", "0.5783783", "0.5769623", "0.5756678", "0.5754366", "0.57528436", "0.57510436", "0.57510436", "0.57278264", "0.5725532", "0.571912", "0.5695413", "0.5686608", "0.5668276", "0.5653382", "0.5629582", "0.5627084", "0.5625627", "0.5618346", "0.55981934", "0.55963904", "0.5584833", "0.55632514", "0.55548376", "0.5548602", "0.5548336", "0.5547533", "0.55407417", "0.5532005", "0.5530664", "0.5528295", "0.5527486", "0.5524276", "0.55224013", "0.5522347", "0.55188215", "0.55182666", "0.55079687", "0.55034304", "0.55034304", "0.5501267", "0.5494211", "0.54827243", "0.5479127", "0.5477636", "0.546613", "0.546613", "0.546613", "0.546613", "0.546613", "0.54649526", "0.5458796", "0.54483163", "0.5443418", "0.54308635", "0.5429621", "0.5420304", "0.5416802" ]
0.0
-1
Constructor method for NaftaLowValueStatementDetail
public function __construct($role = null) { $this ->setRole($role); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct() {\n parent::__construct(\"tr_125t_detail\");\n $this->primary_key = \"id_f125t_detail\";\n\n $this->attribute_labels = array_merge_recursive($this->_continuously_attribute_label, $this->attribute_labels);\n $this->rules = array_merge_recursive($this->_continuously_rules, $this->rules);\n }", "public function __construct() {\r\n parent::__construct(\"tr_102E1_detail\");\r\n $this->primary_key = \"id_f102E1_detail\";\r\n\r\n $this->attribute_labels = array_merge_recursive($this->_continuously_attribute_label, $this->attribute_labels);\r\n $this->rules = array_merge_recursive($this->_continuously_rules, $this->rules);\r\n }", "public function __construct($value = null, int $type = VT_EMPTY, $codepage = CP_ACP) {}", "public function __construct($data) {\r\n\t\t\r\n\t\t$this->_description = $data[\"Description\"];\r\n\t\t$this->_value = $data[\"Value\"];\r\n\t\t\r\n\t\t// Computing real numeric value\r\n\t\t$matches = Array();\r\n\t\tif(preg_match(\"/\\+(\\d+)%?/i\", $data[\"Value\"], $matches) && count($matches) >= 2)\r\n\t\t\t$this->_realValue = intval($matches[1]);\r\n\t}", "public function __construct(\\SetaPDF_Core_Font_TrueType_Table_ControlValueProgram $table) {}", "public function __construct($value)\n {\n $this->literal = $value;\n }", "public function _construct(int $vl_ref, int $code = 1){ parent::__construct(\"Can't find the register using the PK reference #$vl_ref!\", $code);}", "public function _construct(int $vl_ref, int $code = 1){ parent::__construct(\"Can't find the register using the PK reference #$vl_ref!\", $code);}", "public function __construct() {\r\n\t\t$this->_val = new \\tinyPHP\\Classes\\Core\\Val();\r\n\t}", "public function __construct($value) {\n\t\t$this->_value = $value + 0;\n\t\t$this->_result = '';\n\t}", "function __construct() {\n # Initialize Attributes\n $this->cur_val = 0;\n $this->cur_type = \"Integer\";\n $this->length = 0;\n $this->result = 0;\n $this->error_message = \"\";\n $this->error_log = array();\n $this->error_count = 0;\n }", "public function __construct(int $errorCode)\n {\n parent::__construct('SPID user-generated anomaly', $errorCode);\n $this->errorCode = $errorCode;\n }", "public function __construct($objStatement) \r\n\t{\r\n\t\t// Set properties\r\n\t\t$this->setStatement($objStatement);\r\n\t}", "public function __construct() {\n parent::__construct();\n $this->setOdataType('#microsoft.graph.windows10SecureAssessmentConfiguration');\n }", "public function __construct($stockStatusUid) {\r\n\t\t\r\n\t\ttx_pttools_assert::isValidUid($stockStatusUid, array('message' => '$stockStatusUid must be an integer but was ' . $stockStatusUid));\r\n\t\t\r\n\t\t$this->tableName = 'tx_ptgsastock_stock_status';\r\n\t\tparent::__construct(intval($stockStatusUid));\r\n\t\t\r\n\t}", "public function __construct($value)\n\t\t{\n\t\t\tparent::__construct(EntityType::Literal);\n\t\t\t$this->value = $value;\n\t\t}", "public function __construct($lowongan, $mahasiswa)\n {\n $this->lowongan = $lowongan;\n $this->mahasiswa = $mahasiswa;\n }", "public function __construct(RawCost|int $value)\n {\n $value = (string)$value;\n $this->set((int)$value);\n parent::__construct($this->property_name);\n }", "public function __construct(\\SetaPDF_Core_Font_TrueType_Table_ControlValue $table) {}", "function __construct() {\n //added for code coverage.\n //$this->testValue = $testValue;\n }", "public function __construct() {\n parent::__construct();\n $this->setOdataType('#microsoft.graph.callStartedEventMessageDetail');\n }", "public function __construct($polarity = '+')\n {\n parent::__construct(0);\n\n if ($polarity == '+') {\n $this->setNegative(false);\n } else {\n $this->setNegative(true);\n }\n }", "public function __construct($_indValue,$_indName = NULL)\n {\n MicrobiltWsdlClass::__construct(array('IndValue'=>$_indValue,'IndName'=>$_indName),false);\n }", "public function __construct($parameter_name, $parameter_value, $explanation = null, $code = 0, $previous = null){\n\t\tparent::__construct('Explanation:\"'.$explanation.'\", Parameter:\"'.$parameter_name.'\", Value:\"'.$parameter_value.'\"', $code, $previous);\n\n\t\t$this->setParameterName($parameter_name);\n\t\t$this->setParameterValue($parameter_value);\n\t\t$this->setExplanation($explanation);\n\t}", "public function __construct($_statusCode,$_severity,$_serverStatusCode = NULL,$_statusDesc = NULL,$_additionalStatus = NULL)\n {\n parent::__construct(array('StatusCode'=>$_statusCode,'Severity'=>$_severity,'ServerStatusCode'=>$_serverStatusCode,'StatusDesc'=>$_statusDesc,'AdditionalStatus'=>$_additionalStatus),false);\n }", "function __construct($code = 0)\r\n {\r\n $this->code = $code;\r\n }", "public function __construct($longitud=8) {\r\n\r\n $this->longitud = $longitud;\r\n\r\n if (!is_numeric($this->longitud) || $this->longitud <= 0) {\r\n $this->longitud = 8;\r\n }\r\n if ($this->longitud > 32) {\r\n $this->longitud = 32;\r\n }\r\n }", "function __construct($value) {\n if ($value != self::ADDR_NOMEN_FULL && $value != self::ADDR_NOMEN_PARTIAL ) {\n $this->_value = self::ADDR_NOMEN_NO;\n } else {\n $this->_value = $value;\n }\n }", "public function __construct($statement)\n {\n if (is_resource($statement)\n && get_resource_type($statement) == 'oci8 statement') {\n $this->statement = $statement;\n } else {\n throw new Exception('Statement must be a valid oci8 statement identifier.');\n }\n }", "public function __construct ($value) {}", "public function __construct ($value) {}", "public function __construct ($value) {}", "function __construct($value) {\n $this->value = $value;\n }", "function __construct($value) {\n $this->value = $value;\n }", "public function __construct($low_xml = null, $direct_flights = null, $cabin = null, $resident = null, $family_fare = null)\n {\n $this\n ->setLow_xml($low_xml)\n ->setDirect_flights($direct_flights)\n ->setCabin($cabin)\n ->setResident($resident)\n ->setFamily_fare($family_fare);\n }", "public function __construct($tableName,$oldValue=null,$clauses = null,$atributes_alias=null)\n {\n $this->tableName=$tableName;\n $this->oldValue=$oldValue;\n $this->clauses=$clauses;\n $this->attributes_alias=$atributes_alias;\n }", "public function __construct()\n\t{\n\t\t$this->incomeData = FieldMap::getFieldLabel(\"income_data\",\"\",1);\n\t\t$this->removeIncomeFlag = 0;\n\t}", "abstract public function __construct($value);", "function __construct($label, $value)\n\t{\n\t\t$this->label = $label;\n \t$this->value = $value;\n\t}", "function __construct($value){\n $this->value = $value;\n //\n parent::__construct();\n }", "public function __construct($value)\n\t{\n\t\t$this->value = $value;\n\t}", "function __construct($value) {\n\t\t$this->_value = $value;\n\t}", "public function __construct($StudentNameVal, $StudentSurnameVal, $EmailAddressVal, $PhoneNumberVal, $CellNumberVal, $BirthDateVal, $AddressVal, $EnglishProofVal, $IDTypeVal, $IDNumberVal, $RegistrationFeeVal, $ProgramNameVal, $ProgramTuitionVal, $StartDateVal){\r\n \t\r\n \tparent::__construct($StudentNameVal, $StudentSurnameVal, $EmailAddressVal\r\n \t\t, $PhoneNumberVal, $CellNumberVal, $BirthDateVal,\r\n $AddressVal, $EnglishProofVal, $IDTypeVal, $IDNumberVal, $RegistrationFeeVal, $ProgramNameVal, $ProgramTuitionVal, $StartDateVal);\r\n\r\n\t}", "public function __construct($value) {\n $this->value= $value;\n }", "public function __construct($value) {\n $this->value= $value;\n }", "public function __construct($value) {\n $this->value = $value;\n }", "public function __construct($_statementDt = NULL,$_numberOfTransactions = NULL,$_numberOfNSFs = NULL,$_balanceAmt = NULL,$_verifiedDt = NULL,$_statementBalAmt = NULL)\n {\n MicrobiltCriminalReportWsdlClass::__construct(array('StatementDt'=>$_statementDt,'NumberOfTransactions'=>$_numberOfTransactions,'NumberOfNSFs'=>$_numberOfNSFs,'BalanceAmt'=>$_balanceAmt,'VerifiedDt'=>$_verifiedDt,'StatementBalAmt'=>$_statementBalAmt),false);\n }", "public function __construct() {\r\n parent::__construct(\"tr_angka_kredit_tahunan\");\r\n $this->primary_key = \"id_akt\";\r\n $this->attribute_labels = array_merge_recursive($this->_continuously_attribute_label, $this->attribute_labels);\r\n $this->rules = array_merge_recursive($this->_continuously_rules, $this->rules);\r\n }", "protected function constructor()\r\n\t{\r\n\t\t$this->finalYear = self::MAX_INT;\r\n\t\t$this->finalMillis = self::MAX_DBL;\r\n\t\t$this->finalZone = null;\r\n\r\n\t\t$this->constructEmpty();\r\n\t}", "public function __construct($code = null);", "public function __construct()\n {\n parent::__construct();\n// $this->upper_limit = self::getConfig('kandianbao', 'upper_limit')->config_value ?: 600;\n// $this->designArea = self::getConfig('kandianbao', 'area')->config_value;\n list($this->keywords, $this->keyword_num) = self::get_keyword_num();\n $this->keyword_catch_num = self::getConfig('kandianbao', 'keyword_catch_num')->config_value;\n }", "public function __construct() {\n\t\t$this->setTitle('Low Order Fee');\n\t\t$this->setDescription('Low Order Fee');\n\n\t\t$this->init('loworderfee');\n\n\t\tif ($this->isInstalled() === true){\n\t\t\t$this->taxClass = $this->getConfigData('TAX_CLASS');\n\t\t\t$this->allowFees = $this->getConfigData('MODULE_ORDER_TOTAL_LOWORDERFEE_LOW_ORDER_FEE');\n\t\t\t$this->feesDestination = $this->getConfigData('MODULE_ORDER_TOTAL_LOWORDERFEE_DESTINATION');\n\t\t\t$this->lowOrderAmount = $this->getConfigData('MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER');\n\t\t\t$this->lowOrderFee = $this->getConfigData('MODULE_ORDER_TOTAL_LOWORDERFEE_FEE');\n\t\t}\n\t}", "public function __construct($code)\n\t{\n\t\t$this->code = $code;\n\t}", "public function __construct($phVersion)\n\t{\n\t\t// turn ph version from '1.8' to 0180\n\t\t$this->currentVersion = $phVersion * 100;\n\t\t$this->log = LO_EventLog::instance();\n\t}", "public function __construct($value)\n {\n $this->value = $value;\n }", "public function __construct($value)\n {\n $this->value = $value;\n }", "public function __construct($value)\n {\n $this->value = $value;\n }", "public function __construct($value)\n {\n $this->value = $value;\n }", "public function __construct(int $value) {\n if (!in_array($value, self::$values)) {\n throw new Exception($value . ' does not exist.');\n }\n\n $this->value = $value;\n }", "public function __construct(DiaTrabalho $oDiaTrabalho) {\n\n $this->setDiaTrabalho($oDiaTrabalho);\n parent::__construct();\n\n $this->oExtra50Diurna = $this->getHoraZerada();\n $this->oExtra50Noturna = $this->getHoraZerada();\n $this->oExtra50 = $this->getHoraZerada();\n $this->oMaximoExtra75 = new \\DateTime(\n $this->getDiaTrabalho()->getData()->getDate() .' '. $this->getConfiguracoesLotacao()->getHoraExtra75()\n );\n }", "public function __construct() {\n parent::__construct();\n $this->setOdataType('#microsoft.graph.windowsQualityUpdateCatalogItem');\n }", "public function __construct($value, $label)\n {\n $this->value = $value;\n $this->label = $label;\n }", "public function __construct($code = 0, $extInfo = \"\")\n {\n parent::__construct(GNError::getMessage($code), $code);\n $this->_extInfo = $extInfo;\n echo(\"exception: code=\" . $code . \", message=\" . GNError::getMessage($code) . \", ext=\" . $extInfo . \"\\n\");\n }", "public function __construct(array $data = null)\n {\n // if data set\n if ($data)\n {\n if (isset($data['value']))\n {\n $this->_value = intval($data['value']);\n }\n }\n }", "public function __construct($source, int $number)\n {\n $this->source = remove_whitespace($source);\n $this->number = $number;\n\n $this->determineComment();\n $this->determineCommand();\n $this->determineValue();\n }", "public function __construct($number)\n {\n $this->value = $number;\n }", "public function __construct(array $consts, $line = -1, $docComment = null) {\n parent::__construct(\n array(\n 'consts' => $consts,\n ),\n $line, $docComment\n );\n }", "public function __construct($_oprL = null,$_oprType = null,$_label = null,$_name = null,$_oper = null,$_debit = null,$_credit = null)\n {\n parent::__construct(array('oprL'=>$_oprL,'oprType'=>$_oprType,'Label'=>$_label,'Name'=>$_name,'oper'=>$_oper,'Debit'=>$_debit,'Credit'=>$_credit), false);\n }", "function __construct($code=0){\n\t\tif($code){\n\t\t\t$this->code= $code;\n\t\t\t$this->load();\n\t\t}\n\t}", "public function __construct( $details)\n {\n $this->details= $details;\n }", "public function __construct()\n {\n $this->_val=new Val();\n }", "public function __construct($code)\n {\n $this->code = $code;\n }", "public function __construct($code)\n {\n $this->code = $code;\n }", "public function __construct() {\n parent::__construct();\n $this->setOdataType('#microsoft.graph.stsPolicy');\n }", "public function __construct($aPatientInfo=NULL)\n {\n try\n {\n parent::__construct(new \\raptor_ci\\SREContext(),$aPatientInfo);\n } catch (\\Exception $ex) {\n throw new \\Exception('Failed to create an instance of ContraIndEngine because '.$ex->getMessage(),99901,$ex);\n }\n }", "public function __construct($details)\n {\n $this->details=$details;\n }", "public function __construct($details)\n {\n $this->details = $details;\n }", "public function __construct($details)\n {\n $this->details = $details;\n }", "public function __construct($details)\n {\n $this->details = $details;\n }", "public function __construct($details)\n {\n $this->details = $details;\n }", "public function __construct($value)\n {\n }", "public function __construct(TDProject_Project_Model_Entities_Estimation $estimation)\n {\n // call the parents constructor\n parent::__construct($estimation);\n // initialize the ValueObject with the passed data\n $this->_username = new TechDivision_Lang_String();\n }", "public function __construct(array $data)\n {\n // to mark that the value hasn't been derived\n if (!array_key_exists('numberOfLpas', $data)) {\n $data['numberOfLpas'] = null;\n }\n\n $this->data = $data;\n }", "function __construct() {\r\n\t\t$this->production_total = \"0\";\r\n\t\t$this->id_state = 1;\r\n\t}", "public function __construct($Warna) //base class\r\n {\r\n $this->Warna=$Warna;\r\n }", "public function __construct($dbRow) {\n $this->_commentID = $dbRow['commentID'];\n $this->_comment = $dbRow['comment'];\n $this->_iSBNNo = $dbRow['iSBNNo'];\n $this->_customerID = $dbRow['customerID'];\n $this->_dateTime = $dbRow['dateTime'];\n }", "public function __construct() {\n parent::__construct();\n $this->setOdataType('#microsoft.graph.androidWorkProfileCertificateProfileBase');\n }", "public function __construct($code, $name, $index=-1) {\r\n\t\t\t$this->code = $code;\r\n\t\t\t$this->name = $name;\r\n\t\t\t$this->index = $index;\r\n\t\t\t$arr = explode('-', $code);\r\n\t\t\t$this->sigSource = $arr[0];\r\n\t\t\t$this->nid = $arr[1];\r\n\t\t\t$this->tid = $arr[2];\r\n\t\t\t$this->sid = $arr[3];\r\n\t\t}", "public function __construct() {\n parent::__construct();\n $this->setOdataType('#microsoft.graph.win32LobAppPowerShellScriptRule');\n }", "public function __construct($sql, PDOStatement $statement) {\n parent::__construct($sql);\n\n $startsWith = strtoupper(substr($sql, 0, 5));\n if ($startsWith != 'SELEC' && $startsWith != 'SHOW ') {\n return;\n }\n\n $this->initializeResult($statement);\n }", "public function __construct(){\n $this->parser = new Parser\\LL1_Parser(CustomQueryColumnGenerator::TOKEN_SYMBOLS, CustomQueryColumnGenerator::GRAMMAR, 'EXPR');\n $this->parser->SetExpressionTreeGenerator(new Parser\\TreeGenerators\\CustomQueryTreeGenerator(CustomQueryColumnGenerator::TOKEN_SYMBOLS));\n $this->context = new ContextEngine();\n }", "public function __construct($warna){\n $this->warna = $warna;\n }", "public function __construct($_enviaSMSAltResult = NULL)\n\t{\n\t\tparent::__construct(array('EnviaSMSAltResult'=>$_enviaSMSAltResult));\n\t}", "public function __construct(array $additionalDetail = array())\n {\n $this\n ->setAdditionalDetail($additionalDetail);\n }", "public function __construct($value)\n {\n parent::__construct($value);\n $this->previous = NULL;\n }", "function __construct(/*$value=NULL,$key=NULL,$settings=array()*/){\n $this->err = new opc_status($this->_init_msgs());\n $this->val = $this->s_get('val_init');\n $this->err->mode_success = 2;\n $this->err->lev_base = 2;\n $ar = func_get_args();\n call_user_func_array(array(&$this,'init'),$ar);\n }", "public function __construct()\n {\n $this->currency = NULL;\n $this->order = NULL;\n $this->customer = NULL;\n $this->fraudScreeningRequest = NULL;\n $this->statementDescriptor = NULL;\n $this->amount = 0;\n $this->amountOriginal = 0;\n $this->amountSurcharge = 0;\n }", "public function __construct(\n \tTDProject_Core_Common_ValueObjects_UserValue $vo) {\n // call the parents constructor\n parent::__construct($vo);\n }", "private function __construct() {\n\t\tadd_shortcode( 'get-accessibility-statement', array( $this, 'vi_accessibility_callback' ) );\n\n\t}", "public function __construct ()\n {\n parent::__construct(NULL);\n $this->name_tuples = [];\n // use name attributes must conform to: AS 5017-2006: Health Care Client Name Usage\n $this->acceptable_use_attributes = UseAttributeInterface::NameValues;\n }", "public function __construct($number = null, $indication_driven_axle = null, $indication_bogie_lift = null, $max_axle_load = null, $max_axle_load_technical = null, $location_code = null, $track_width = null, $road_behavior_code = null, $road_behavior_description = null)\n {\n $this\n ->setNumber($number)\n ->setIndication_driven_axle($indication_driven_axle)\n ->setIndication_bogie_lift($indication_bogie_lift)\n ->setMax_axle_load($max_axle_load)\n ->setMax_axle_load_technical($max_axle_load_technical)\n ->setLocation_code($location_code)\n ->setTrack_width($track_width)\n ->setRoad_behavior_code($road_behavior_code)\n ->setRoad_behavior_description($road_behavior_description);\n }" ]
[ "0.5704482", "0.562243", "0.55198246", "0.5515601", "0.5389704", "0.53326315", "0.53022176", "0.53022176", "0.5221702", "0.5199897", "0.51848495", "0.5157446", "0.5147865", "0.51439726", "0.5143407", "0.5127532", "0.5122909", "0.512104", "0.508854", "0.49902788", "0.49703446", "0.49654815", "0.49538302", "0.49523082", "0.4951149", "0.49371848", "0.49268937", "0.48932528", "0.48831466", "0.48711598", "0.48711598", "0.48711598", "0.4852776", "0.4852776", "0.48519722", "0.48498344", "0.48397866", "0.48310474", "0.48286334", "0.48280987", "0.4822256", "0.4813336", "0.48001707", "0.47975364", "0.47975364", "0.47846937", "0.47678423", "0.4765442", "0.4760828", "0.4759607", "0.47577783", "0.47500682", "0.4748447", "0.47445303", "0.4737945", "0.4737945", "0.4737945", "0.4737945", "0.47373974", "0.4737067", "0.4724984", "0.47176638", "0.47037435", "0.46986806", "0.46986344", "0.46873325", "0.46844777", "0.4679327", "0.46777567", "0.46754995", "0.46744323", "0.46732798", "0.46732798", "0.46731085", "0.46715817", "0.4667727", "0.46651804", "0.46651804", "0.46651804", "0.46651804", "0.4659292", "0.4649698", "0.46384332", "0.46344295", "0.4630155", "0.4621313", "0.4621027", "0.46208525", "0.46205935", "0.46192545", "0.46179783", "0.46132258", "0.46122143", "0.45994544", "0.4587418", "0.45845944", "0.457815", "0.45774484", "0.45761654", "0.45753238", "0.45619786" ]
0.0
-1
Method called when an object has been exported with var_export() functions It allows to return an object instantiated with the values
public static function __set_state(array $array) { return parent::__set_state($array); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ExportObject() {\n // Init object\n $plugin = new stdClass();\n // Set values\n $plugin->Name = $this->Name;\n $plugin->Version = $this->Version;\n $plugin->Author = $this->Author;\n $plugin->About = $this->About;\n $plugin->Root = $this->Root;\n $plugin->Identifier = $this->Identifier;\n \n // Return result\n return $plugin;\n }", "protected function constructExportObject()\n\t{\n\t\t//default export is \"all public fields\"\n\t\treturn (object) Arrays::getPublicPropertiesOfObject($this);\n\t}", "function from_export($value) {\n return $value;\n }", "public function export(): mixed;", "public function ExportObject() {\n // Init object\n $col = new stdClass();\n \n // Set values\n $col->id = $this->Id;\n $col->type = $this->Type;\n $col->label = $this->Label;\n $col->p = $this->P;\n \n // Return values\n return $col;\n }", "public function exportData() {\n\t\treturn $this->constructExportObject();\n\t}", "public function toObject();", "function ctools_export_new_object($table, $set_defaults = TRUE) {\r\n $schema = ctools_export_get_schema($table);\r\n $export = $schema['export'];\r\n\r\n $object = new $export['object'];\r\n foreach ($schema['fields'] as $field => $info) {\r\n if (isset($info['object default'])) {\r\n $object->$field = $info['object default'];\r\n }\r\n else if (isset($info['default'])) {\r\n $object->$field = $info['default'];\r\n }\r\n else {\r\n $object->$field = NULL;\r\n }\r\n }\r\n\r\n if ($set_defaults) {\r\n // Set some defaults so this data always exists.\r\n // We don't set the export_type property here, as this object is not saved\r\n // yet. We do give it NULL so we don't generate notices trying to read it.\r\n $object->export_type = NULL;\r\n $object->{$export['export type string']} = t('Local');\r\n }\r\n return $object;\r\n}", "public function export();", "public function export();", "public function export();", "public function export();", "public function export();", "public function createExport();", "public function newInstance(): object;", "public static function createFromGlobals();", "public function export (){\n\n }", "function &object(object $value, string $namespace = 'default'): object\n{\n $var = new Variable\\ObjectVariable($value);\n Repository::add($var, $namespace);\n return $var->getValue();\n}", "public function getObj();", "public static function toObject(){\r\n $args = func_get_args();\r\n \r\n if(count($args) >=2){\r\n $className = '\\\\'.str_replace('.', '\\\\', $args[0]);\r\n $refClass = new \\ReflectionClass($className);\r\n $toObjInstance = $refClass->newInstance();\r\n\r\n unset($args[0]);\r\n \r\n foreach($args as $arg){\r\n \r\n if(is_object($arg)){\r\n $arg = Obj::getProperties($arg);\r\n }\r\n \r\n if(is_array($arg)){\r\n foreach($arg as $propertyName=>$propertyValue){\r\n if($refClass->hasProperty($propertyName)){\r\n $property = $refClass->getProperty($propertyName);\r\n $property->setAccessible(true);\r\n $property->setValue($toObjInstance, $propertyValue);\r\n }\r\n }\r\n }\r\n }\r\n return $toObjInstance;\r\n }\r\n }", "public function export()\n {\n }", "function &stdClass(stdClass $value, string $namespace = 'default'): stdClass\n{\n $var = new Variable\\StdClassVariable($value);\n Repository::add($var, $namespace);\n return $var->getValue();\n}", "public function getExportableValues() {\n\t\telgg_deprecated_notice(__METHOD__ . ' has been deprecated by toObject()', 1.9);\n\t\treturn array(\n\t\t\t'id',\n\t\t\t'entity_guid',\n\t\t\t'name',\n\t\t\t'value',\n\t\t\t'value_type',\n\t\t\t'owner_guid',\n\t\t\t'type',\n\t\t);\n\t}", "public function ExportObject() {\n // Init object\n $overviewChart = new stdClass();\n \n // Set values\n $overviewChart->Types = $this->Types;\n $overviewChart->Chart = $this->Chart->ExportObject();\n \n //return result\n return $overviewChart;\n }", "public function export()\n {\n \n }", "public function newInstance(): object\n {\n return $this->instantiator->instantiate($this->name);\n }", "public function getter () {\n return (object)[\n get_plugin_name => $this->plugin_name,\n get_plugin_version => $this->plugin_version,\n get_translation_slug => $this->translation_slug,\n get_admin_page_slug => $this->admin_page_slug,\n get_api_namespace => $this->api_namespace,\n get_options_name => $this->options_name\n ];\n }", "public function getObject() {}", "public function getObject() {}", "public function export()\n {\n //\n }", "function _instantiateExportDeployment($context) {\n\t\t$exportDeploymentClassName = $this->getExportDeploymentClassName();\n\t\t$this->import($exportDeploymentClassName);\n\t\t$exportDeployment = new $exportDeploymentClassName($context, $this);\n\t\treturn $exportDeployment;\n\t}", "function get_obj()\n {\n $object = new ApiRest;\n return $object;\n }", "public function __CONSTRUCT(){\n\t}", "public function newInstance();", "public function newInstance();", "public function getInstance(): object;", "public function exportedVars(): iterable;", "public static function fromGlobals() {}", "public function ExportObject() {\n // Init object\n $submission = new stdClass();\n \n // Set values\n $submission->Id = $this->Id;\n $submission->DateTime = $this->DateTime;\n $submission->GitHash = $this->GitHash;\n $submission->Categories = array();\n \n // Export each category\n foreach ($this->Categories as $category) {\n $submission->Categories[] = $category->ExportObject();\n }\n \n // return result\n return $submission;\n }", "public function getInstance(): object\n {\n }", "function ctools_get_default_object($table, $name) {\r\n $schema = ctools_export_get_schema($table);\r\n $export = $schema['export'];\r\n\r\n if (!$export['default hook']) {\r\n return;\r\n }\r\n\r\n // Try to load individually from cache if this cache is enabled.\r\n if (!empty($export['cache defaults'])) {\r\n $defaults = _ctools_export_get_some_defaults($table, $export, array($name));\r\n }\r\n else {\r\n $defaults = _ctools_export_get_defaults($table, $export);\r\n }\r\n\r\n $status = variable_get($export['status'], array());\r\n\r\n if (!isset($defaults[$name])) {\r\n return;\r\n }\r\n\r\n $object = $defaults[$name];\r\n\r\n // Determine if default object is enabled or disabled.\r\n if (isset($status[$object->{$export['key']}])) {\r\n $object->disabled = $status[$object->{$export['key']}];\r\n }\r\n\r\n $object->{$export['export type string']} = t('Default');\r\n $object->export_type = EXPORT_IN_CODE;\r\n $object->in_code_only = TRUE;\r\n\r\n return $object;\r\n}", "public function toStdClass() {\n $stdClass = new stdClass();\n $stdClass->number = $this->_number;\n $stdClass->internal = $this->_internal;\n return $stdClass;\n }", "public function getObject(): object;", "public function get_export_data()\n {\n\n $l_sql = \"SELECT isys_obj_type__id, isys_obj_type__title, isys_verinice_types__title, isys_verinice_types__const \" . \"FROM isys_obj_type \" . \"INNER JOIN isys_verinice_types ON isys_obj_type__isys_verinice_types__id = isys_verinice_types__id \";\n\n return $this->retrieve($l_sql);\n\n }", "public function dataProviderExport()\n {\n // Regular :\n $data = [\n [\n 'test string',\n var_export('test string', true),\n ],\n [\n 75,\n var_export(75, true),\n ],\n [\n 7.5,\n var_export(7.5, true),\n ],\n [\n null,\n 'null',\n ],\n [\n true,\n 'true',\n ],\n [\n false,\n 'false',\n ],\n [\n [],\n '[]',\n ],\n ];\n // Arrays :\n $var = [\n 'key1' => 'value1',\n 'key2' => 'value2',\n ];\n $expectedResult = <<<'RESULT'\n[\n 'key1' => 'value1',\n 'key2' => 'value2',\n]\nRESULT;\n $data[] = [$var, $expectedResult];\n $var = [\n 'value1',\n 'value2',\n ];\n $expectedResult = <<<'RESULT'\n[\n 'value1',\n 'value2',\n]\nRESULT;\n $data[] = [$var, $expectedResult];\n $var = [\n 'key1' => [\n 'subkey1' => 'value2',\n ],\n 'key2' => [\n 'subkey2' => 'value3',\n ],\n ];\n $expectedResult = <<<'RESULT'\n[\n 'key1' => [\n 'subkey1' => 'value2',\n ],\n 'key2' => [\n 'subkey2' => 'value3',\n ],\n]\nRESULT;\n $data[] = [$var, $expectedResult];\n // Objects :\n $var = new \\StdClass();\n $var->testField = 'Test Value';\n $expectedResult = \"unserialize('\" . serialize($var) . \"')\";\n $data[] = [$var, $expectedResult];\n $var = function () {return 2;};\n $expectedResult = 'function () {return 2;}';\n $data[] = [$var, $expectedResult];\n return $data;\n }", "public static function export()\n {\n return null;\n }", "function create()\n\t{\n\t\t$names = $this->_fields;\n\t\t$object = new StdClass;\n\t\tforeach ($names as $name)\n\t\t\t$object->$name = \"\";\n\t\treturn $object;\n\t}", "public function construct()\n {\n return $this->object;\n }", "public function metaExport($object = false);", "public function vars()\n {\n \n return new ArrayWrapper(get_object_vars($this->object));\n \n }", "public function getValuesObject()\n {\n $obj = new \\stdClass;\n\n foreach ( $this->keyValues as $key => $value )\n {\n $obj->$key = $value;\n }\n\n return $obj;\n }", "public function getObject();", "public function getObject();", "function newDataObject() {\n\t\t$ofrPlugin =& PluginRegistry::getPlugin('generic', $this->parentPluginName);\n\t\t$ofrPlugin->import('classes.ObjectForReviewPerson');\n\t\treturn new ObjectForReviewPerson();\n\t}", "public function __construct(VariableExportInterface $variableExport)\n {\n $this->serialized = $variableExport->toSerialize();\n }", "public function as_object($class = TRUE, $arguments = array());", "function var_export($expression, $return = false)\n{\n}", "function getObject();", "function getObject();", "abstract public function object();", "public function __construct()\r\n {\r\n $this->_internalObject = new stdClass();\r\n\t\t$a=serialize($this->_internalObject);\r\n\t\t\"echo $a<br>\";\r\n }", "abstract protected function createObject();", "function &getInstance($module_srl)\n\t{\n\t\treturn new ExtraVar($module_srl);\n\t}", "abstract function exportData();", "function createProduct($name,$price,$qty,$id):stdClass\n{\n$product=new stdClass();\n$product->name=$name;\n$product->price=$price;\n$product->quantity= $qty;\n$product->id=$id;\n\nreturn $product;\n}", "abstract protected function exportFunctions();", "public static function factory()\n {\n $class = get_called_class();\n $object = new $class();\n foreach (static::getDefaults() as $field => $value) {\n $object->{$field} = $value;\n }\n return $object;\n }", "public function &__invoke()\r\n\t{\r\n\t\t$result = new stdClass();\r\n\t\tAdhoc::eachTrap('Registry',\r\n\t\t\tfunction ($trap) use (&$result)\r\n\t\t\t{\r\n\t\t\t\t$data =& $trap->GetList();\r\n\t\t\t\tforeach ($data as $k=>$v)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (!isset($result->$k) and isset($v))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$result->$k = $v;\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\r\n\t\treturn $result;\r\n\t}", "public static function instantation($the_record){\n\n // can be used to retrieve a string with the name of the called class and static:: introduces its scope.\n $calling_class = get_called_class();\n\n $the_object = new $calling_class;\n\n\n // doing a loop to get all of the values in the object ]\n foreach($the_record as $key => $value) {\n\n if($the_object->has_the_key($key)){\n $the_object->$key = $value;\n \n }\n }\n\n return $the_object;\n }", "public static function get_object() {\n\t\treturn self::$object;\n\t}", "function adminer_object() {\r\n include_once \"./plugins/plugin.php\";\r\n \r\n // autoloader\r\n foreach (glob(\"plugins/*.php\") as $filename) {\r\n include_once \"./$filename\";\r\n }\r\n \r\n $plugins = array(\r\n // specify enabled plugins here\r\n // new AdminerDumpXml,\r\n // new AdminerTinymce,\r\n // new AdminerFileUpload(\"data/\"),\r\n // new AdminerSlugify,\r\n // new AdminerTranslation,\r\n // new AdminerForeignSystem,\r\n // new AdminerLoginPasswordLess(password_hash(\"\", PASSWORD_DEFAULT)),\r\n );\r\n \r\n /* It is possible to combine customization and plugins:\r\n class AdminerCustomization extends AdminerPlugin {\r\n }\r\n return new AdminerCustomization($plugins);\r\n */\r\n class AdminerCustomization extends AdminerPlugin {\r\n function login($login, $password) {\r\n // validate user submitted credentials\r\n return true;\r\n }\r\n }\r\n return new AdminerCustomization($plugins);\r\n \r\n // return new AdminerPlugin($plugins);\r\n}", "public function ExportItem() {\n // Init object\n $submission = new stdClass();\n \n // Set values\n $submission->Id = $this->Id;\n $submission->DateTime = $this->DateTime;\n $submission->ImportDateTime = $this->ImportDateTime;\n $submission->User = $this->User;\n $submission->Good = $this->Good;\n $submission->Bad = $this->Bad;\n $submission->Strange = $this->Strange;\n $submission->GitHash = $this->GitHash;\n $submission->SequenceNumber = $this->SequenceNumber;\n \n // Return result\n return $submission;\n }", "private static function _instantiateThisObject() {\r\n $className = get_called_class();\r\n return new $className();\r\n }", "function instance($obj) {\n\tif (is_string($obj)) {\n\t\t$obj = new $obj;\n\t}\n\treturn $obj;\n}", "function ctools_var_export($var, $prefix = '') {\r\n if (is_array($var)) {\r\n if (empty($var)) {\r\n $output = 'array()';\r\n }\r\n else {\r\n $output = \"array(\\n\";\r\n foreach ($var as $key => $value) {\r\n $output .= $prefix . \" \" . ctools_var_export($key) . \" => \" . ctools_var_export($value, $prefix . ' ') . \",\\n\";\r\n }\r\n $output .= $prefix . ')';\r\n }\r\n }\r\n else if (is_object($var) && get_class($var) === 'stdClass') {\r\n // var_export() will export stdClass objects using an undefined\r\n // magic method __set_state() leaving the export broken. This\r\n // workaround avoids this by casting the object as an array for\r\n // export and casting it back to an object when evaluated.\r\n $output = '(object) ' . ctools_var_export((array) $var, $prefix);\r\n }\r\n else if (is_bool($var)) {\r\n $output = $var ? 'TRUE' : 'FALSE';\r\n }\r\n else {\r\n $output = var_export($var, TRUE);\r\n }\r\n\r\n return $output;\r\n}", "public function getOutputObject()\n {\n $baseObject = parent::getOutputObject();\n $baseObject->name = $this->getName();\n\n return $baseObject;\n }", "public function init_objects() {\n $this->controller_oai = new \\Tainacan\\OAIPMHExpose\\OAIPMH_Expose();\n $this->list_sets = new \\Tainacan\\OAIPMHExpose\\OAIPMH_List_Sets();\n $this->list_metadata_formats = new \\Tainacan\\OAIPMHExpose\\OAIPMH_List_Metadata_Formats();\n $this->list_records = new \\Tainacan\\OAIPMHExpose\\OAIPMH_List_Records();\n $this->get_record = new \\Tainacan\\OAIPMHExpose\\OAIPMH_Get_Record();\n $this->identify = new \\Tainacan\\OAIPMHExpose\\OAIPMH_Identify();\n $this->identifiers = new \\Tainacan\\OAIPMHExpose\\OAIPMH_List_Identifiers();\n }", "public function _construct(){\n\t\treturn $this->data;\n\t}", "public function _construct(){\n\t\treturn $this->data;\n\t}", "public function regularNew() {}", "function data2Object($data) { \n\t\t\t$class_object = new getData($data); \n\t\t\treturn $class_object; \n\t\t}", "public function newInstance()\n {\n return $this->newInstanceArgs(func_get_args());\n }", "function ctools_export_object($table, $object, $indent = '', $identifier = NULL, $additions = array(), $additions2 = array()) {\r\n $schema = ctools_export_get_schema($table);\r\n if (!isset($identifier)) {\r\n $identifier = $schema['export']['identifier'];\r\n }\r\n\r\n $output = $indent . '$' . $identifier . ' = new ' . get_class($object) . \"();\\n\";\r\n\r\n if ($schema['export']['can disable']) {\r\n $output .= $indent . '$' . $identifier . '->disabled = FALSE; /* Edit this to true to make a default ' . $identifier . ' disabled initially */' . \"\\n\";\r\n }\r\n if (!empty($schema['export']['api']['current_version'])) {\r\n $output .= $indent . '$' . $identifier . '->api_version = ' . $schema['export']['api']['current_version'] . \";\\n\";\r\n }\r\n\r\n // Put top additions here:\r\n foreach ($additions as $field => $value) {\r\n $output .= $indent . '$' . $identifier . '->' . $field . ' = ' . ctools_var_export($value, $indent) . \";\\n\";\r\n }\r\n\r\n $fields = $schema['fields'];\r\n if (!empty($schema['join'])) {\r\n foreach ($schema['join'] as $join) {\r\n if (!empty($join['load'])) {\r\n foreach ($join['load'] as $join_field) {\r\n $fields[$join_field] = $join['fields'][$join_field];\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Go through our schema and joined tables and build correlations.\r\n foreach ($fields as $field => $info) {\r\n if (!empty($info['no export'])) {\r\n continue;\r\n }\r\n if (!isset($object->$field)) {\r\n if (isset($info['default'])) {\r\n $object->$field = $info['default'];\r\n }\r\n else {\r\n $object->$field = '';\r\n }\r\n }\r\n\r\n // Note: This is the *field* export callback, not the table one!\r\n if (!empty($info['export callback']) && function_exists($info['export callback'])) {\r\n $output .= $indent . '$' . $identifier . '->' . $field . ' = ' . $info['export callback']($object, $field, $object->$field, $indent) . \";\\n\";\r\n }\r\n else {\r\n $value = $object->$field;\r\n if ($info['type'] == 'int') {\r\n if (isset($info['size']) && $info['size'] == 'tiny') {\r\n $info['boolean'] = (!isset($info['boolean'])) ? $schema['export']['boolean'] : $info['boolean'];\r\n $value = ($info['boolean']) ? (bool) $value : (int) $value;\r\n }\r\n else {\r\n $value = (int) $value;\r\n }\r\n }\r\n\r\n $output .= $indent . '$' . $identifier . '->' . $field . ' = ' . ctools_var_export($value, $indent) . \";\\n\";\r\n }\r\n }\r\n\r\n // And bottom additions here\r\n foreach ($additions2 as $field => $value) {\r\n $output .= $indent . '$' . $identifier . '->' . $field . ' = ' . ctools_var_export($value, $indent) . \";\\n\";\r\n }\r\n\r\n return $output;\r\n}", "function _construct(){ }", "public function createValidObject() : object {\n\t\treturn (object) [\"tweetContent\" => bin2hex(random_bytes(12))];\n\t}", "public function _init_obj()\n {\n // dummy\n }", "protected function make_object( \\stdClass $data ) {\n\t\treturn new Purchase( $data );\n\t}", "public function as_object()\n {\n $this->return_as = 'object';\n return $this;\n }", "static public function fromObj($anObj) {\n\t\t$theClassName = get_called_class();\n\t\t$o = new $theClassName();\n\t\treturn $o->setDataFrom($anObj);\n\t}", "function adminer_object() {\n\t\tinclude_once \"plugins/plugin.php\";\n\t\t// autoloader\n\t\tforeach (glob(\"plugins/*.php\") as $filename) {\n\t\t\tinclude_once $filename;\n\t\t}\n\t\t$plugins = array(\n\t\t\t// specify enabled plugins here\n\t\t\tnew AdminerDatabaseHide(array('information_schema', 'mysql', 'performance_schema')),\n\t\t\t//new AdminerDumpJson,\n\t\t\t//new AdminerDumpBz2,\n\t\t\t//new AdminerDumpZip,\n\t\t\t//new AdminerDumpXml,\n\t\t\t//new AdminerDumpAlter,\n\t\t\t//~ new AdminerSqlLog(\"past-\" . rtrim(`git describe --tags --abbrev=0`) . \".sql\"),\n\t\t\t//new AdminerFileUpload(\"\"),\n\t\t\t//new AdminerJsonColumn,\n\t\t\t//new AdminerSlugify,\n\t\t\t//new AdminerTranslation,\n\t\t\t//new AdminerForeignSystem,\n\t\t\t//new AdminerEnumOption,\n\t\t\t//new AdminerTablesFilter,\n\t\t\t//new AdminerEditForeign,\n\t\t);\n\n\t\treturn new AdminerPlugin($plugins);\n\t}", "public function newCObj() {}", "private function PREPARE_OBJECT_VARIABLE_METHOD()\r\r {\r\r if($this->_type === 'POST')\r\r {\r\r foreach($this->_fields as $key=>$field)\r\r {\r\r $this->_object[$key]['VALUE'] = isset($_POST[$key])?$_POST[$key]:false;\r\r } \r\r } \r\r else if($this->_type === 'GET')\r\r {\r\r foreach($this->_fields as $key=>$field)\r\r {\r\r $this->_object[$key]['VALUE'] = isset($_GET[$key])?$_GET[$key]:false;\r\r } \r\r } \r\r }", "public function toStdClass() {\n $stdClass = new stdClass();\n $stdClass->amountInsuranceBase = $this->_amountInsuranceBase;\n $stdClass->fragile = $this->_fragile;\n $stdClass->parcelsCount = $this->_parcelsCount;\n $stdClass->serviceTypeId = $this->_serviceTypeId;\n return $stdClass;\n }", "public function toStdClass() {\n $stdClass = new stdClass();\n $stdClass->billOfLading = $this->_billOfLading;\n $stdClass->secondaryPickingType = $this->_secondaryPickingType;\n return $stdClass;\n }", "abstract public function prepare_new_object(array $args);", "protected function getRealScriptUserObj() {}", "public function export(bool $private = FALSE, bool $meta = FALSE) {\n\t\t$keys = [];\n\t\t$ret = [];\n\n\t\tif ($private) {\n\t\t\t$keys = static::$PRIVATE;\n\t\t} else {\n\t\t\t$keys = static::$PUBLIC;\n\t\t}\n\n\t\tif (!empty(array_intersect(EXP_RESERVED, $keys))) {\n\t\t\tthrow new ExportableException(\n\t\t\t\t\"Reserved key '\".EXP_CLASSNAME.\"' used in object.\"\n\t\t\t);\n\t\t}\n\n\t\tif ($meta) { // Add metadata.\n\t\t\t$ret[EXP_CLASSNAME] = get_class($this);\n\t\t\t$ret[EXP_VISIBILITY] = $private ? 'private' : 'public';\n\t\t}\n\n\t\tforeach ($keys as $k) {\n\t\t\t$current = $this->__exportable_get($k);\n\t\t\tswitch (gettype($current)) {\n\t\t\t\tcase 'object':\n\t\t\t\t\t$ret[$k] = $this->exp_obj(\n\t\t\t\t\t\t$current, $private, $meta\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'array':\n\t\t\t\t\t$ret[$k] = $this->exp_array(\n\t\t\t\t\t\t$current, $private, $meta\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$ret[$k] = $current;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "public static function & GetInstance ();", "public function getInstance(): mixed;", "function FetchObj() {}", "public function convertToUserIntObject() {}" ]
[ "0.6952051", "0.6924868", "0.657655", "0.63783693", "0.6145847", "0.6125172", "0.6056005", "0.60397583", "0.59241486", "0.59241486", "0.59241486", "0.59241486", "0.59241486", "0.5859572", "0.5836334", "0.5811004", "0.5801863", "0.57161164", "0.571605", "0.5712643", "0.5690107", "0.56588435", "0.56425095", "0.5603366", "0.5526498", "0.5510343", "0.5462462", "0.5406494", "0.5406494", "0.5403983", "0.5375716", "0.53713435", "0.5369512", "0.5368846", "0.5368846", "0.53409564", "0.5338098", "0.5315473", "0.5308665", "0.52962804", "0.52636254", "0.52607524", "0.5248227", "0.5246357", "0.52282083", "0.51888424", "0.5178593", "0.514953", "0.5142763", "0.5134664", "0.51324636", "0.5117897", "0.5117897", "0.5116931", "0.5112873", "0.510653", "0.51005936", "0.5094239", "0.5094239", "0.50785726", "0.5039316", "0.5037833", "0.503224", "0.50098085", "0.50049716", "0.5003327", "0.49964523", "0.49867654", "0.49842963", "0.49789998", "0.49737033", "0.49682796", "0.49557734", "0.49544722", "0.49540114", "0.49503955", "0.49416965", "0.49262935", "0.49262935", "0.49178216", "0.49155024", "0.49153635", "0.4909127", "0.49060875", "0.48950052", "0.48922458", "0.48882398", "0.48818365", "0.48797154", "0.48757276", "0.4875005", "0.48645556", "0.4862953", "0.486231", "0.4847333", "0.4846088", "0.48431632", "0.4837684", "0.4836843", "0.4835212", "0.48348922" ]
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
Order payment type config
public function types() { return [ self::TYPE_NONE => 'none', self::TYPE_WECHAT => 'wechat', self::TYPE_ALIPAY => 'alipay', self::TYPE_CASH => 'cash', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPaymentType(){\n return $this->payment_type;\n }", "function get_payment_type()\n {\n // echeck - payment funded with e-check\n // instant - payment was funded with platnosci balance, credit card, or instant transfer\n return $this->platnosci_post_vars['payment_type'];\n }", "public static function payment_types($type = null) {\n $types = self::config()->get('payment_types');\n if ($type) {\n return $types[$type];\n }\n\n return $types;\n }", "public function setPaymentType($payment_type){\n $this->payment_type = $payment_type;\n }", "public function getPaymenttype()\n {\n return $this->paymenttype;\n }", "public function getOrderType();", "public function setupPayment($order){\r\n $response = array(\r\n 'success'=> false,\r\n 'msg'=> __('Payment failed!', ET_DOMAIN)\r\n );\r\n // write session\r\n et_write_session('order_id', $order->ID);\r\n et_write_session('processType', 'buy');\r\n $arg = apply_filters('ae_payment_links', array(\r\n 'return' => et_get_page_link('process-payment') ,\r\n 'cancel' => et_get_page_link('process-payment')\r\n ));\r\n /**\r\n * process payment\r\n */\r\n $paymentType_raw = $order->payment_type;\r\n $paymentType = strtoupper($order->payment_type);\r\n /**\r\n * factory create payment visitor\r\n */\r\n $order_data = array(\r\n 'payer' => $order->post_author,\r\n 'total' => '',\r\n 'status' => 'draft',\r\n 'payment' => $paymentType,\r\n 'paid_date' => '',\r\n 'post_parent' => $order->post_parent,\r\n 'ID'=> $order->ID,\r\n 'amount'=> $order->amount\r\n );\r\n $order_temp = new mJobOrder($order_data);\r\n $order_temp->add_product($order);\r\n $order = $order_temp;\r\n $visitor = AE_Payment_Factory::createPaymentVisitor($paymentType, $order, $paymentType_raw);\r\n // setup visitor setting\r\n $visitor->set_settings($arg);\r\n // accept visitor process payment\r\n $nvp = $order->accept($visitor);\r\n if ($nvp['ACK']) {\r\n $response = array(\r\n 'success' => $nvp['ACK'],\r\n 'data' => $nvp,\r\n 'paymentType' => $paymentType\r\n );\r\n } else {\r\n $response = array(\r\n 'success' => false,\r\n 'paymentType' => $paymentType,\r\n 'msg' => __(\"Invalid payment gateway!\", ET_DOMAIN)\r\n );\r\n }\r\n /**\r\n * filter $response send to client after process payment\r\n *\r\n * @param Array $response\r\n * @param String $paymentType The payment gateway user select\r\n * @param Array $order The order data\r\n *\r\n * @package AE Payment\r\n * @category payment\r\n *\r\n * @since 1.0\r\n * @author Dakachi\r\n */\r\n $response = apply_filters('mjob_setup_payment', $response, $paymentType, $order);\r\n return $response;\r\n }", "public function get_payment_type() {\n\n\t\treturn 'credit_card' === $this->get_request()->get_order()->payment->type ? 'credit-card' : 'echeck';\n\t}", "public function getOrderType()\n {\n return $this->order_type;\n }", "private function _ratepayEvent($type, $order)\n {\n switch($type){\n case 'invoice':\n $invoice = $order->prepareInvoice();\n $invoice->register()->save();\n $order->setTotalInvoiced($order->getTotalInvoiced() + $invoice->getGrandTotal());\n $order->setBaseTotalInvoiced($order->getBaseTotalInvoiced() + $invoice->getBaseGrandTotal());\n $order->save();\n break;\n case 'creditmemo':\n $creditmemo = Mage::getModel('sales/service_order', $order)->prepareCreditmemo();\n $creditmemo->register()->save();\n $order->setTotalRefunded($order->getTotalRefunded() + $creditmemo->getGrandTotal());\n $order->setBaseTotalRefunded($order->getBaseTotalRefunded() + $creditmemo->getGrandTotal());\n $order->setBaseTotalRefunded($creditmemo->getGrandTotal());\n $order->save();\n break;\n case 'cancel':\n $order->cancel()->save();\n break;\n default:\n throw new Exception('Wrong operation!');\n }\n }", "public function getOrderType()\n {\n return 'purchase';\n }", "public function getPaymentType()\n {\n\n return 'IPAY';\n }", "public function __construct() {\n \n $this->id = 'wcpg-pay-on-credit'; // payment gateway plugin ID\n $this->icon = ''; // URL of the icon that will be displayed on checkout page near your gateway name\n $this->has_fields = true; // in case you need a custom credit card form\n $this->method_title = 'Pay On Credit Gateway';\n $this->method_description = 'Pay on credit gateway'; // will be displayed on the options page\n $this->domain = 'wcpg-pay-on-credit';\n \n // gateways can support subscriptions, refunds, saved payment methods,\n // but in this tutorial we begin with simple payments\n $this->supports = array(\n 'products'\n );\n\n\n // Define \"payment duration\" radio buttons options field\n $this->options = array(\n '4' => __( '4 Months Payment', $this->domain ),\n '6' => __( '6 Months Payment', $this->domain ),\n ); \n \n // Method with all the options fields\n $this->init_form_fields();\n \n // Load the settings.\n $this->init_settings();\n $this->title = $this->get_option( 'title' );\n $this->description = $this->get_option( 'description' );\n $this->instructions = $this->get_option( 'instructions' );\n $this->order_status = $this->get_option( 'order_status' );\n $this->status_text = $this->get_option( 'status_text' );\n $this->enabled = $this->get_option( 'enabled' );\n \n // This action hook saves the settings\n add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );\n add_action( 'woocommerce_checkout_create_order', array( $this, 'save_order_payment_type_meta_data' ), 10, 2 );\n add_filter( 'woocommerce_get_order_item_totals', array( $this, 'display_payment_duration_order_item_totals'), 10, 3 );\n add_action( 'woocommerce_admin_order_data_after_billing_address', array( $this, 'display_payment_type_order_edit_pages'), 10, 1 );\n add_action( 'woocommerce_thankyou_' . $this->id, array( $this, 'thankyou_page' ) );\n\n // Customer Emails\n add_action( 'woocommerce_email_before_order_table', array( $this, 'email_instructions' ), 10, 3 ); \n \n // We need custom JavaScript to obtain a token\n add_action( 'wp_enqueue_scripts', array( $this, 'payment_scripts' ) );\n \n \n \t\t}", "abstract public function getPaymentInstance($payment, $order = array(), $config = array());", "public function getOrderType()\n {\n return $this->orderType;\n }", "function get_params( $order) {\n\t\tglobal $woocommerce, $wc_authorize_sim;\n\t\t\n\t\t$this->add_log( 'Generating payment form for order #' . $order->id);\n\t\t\n\t\t$params = array();\n\t\t\n\t\t$params = array (\n\t\t\t'x_login'\t\t\t=> $this->login_id,\n\t\t\t'x_show_form'\t\t=> 'PAYMENT_FORM',\t\t\t\n\t\t\t'x_type' \t\t\t=> $this->type,\n\t\t\t'x_test_request' \t=> ($this->testmode == 'yes') ? 'TRUE' : 'FALSE',\t\t\t\n\t\t\t'x_relay_response'\t=> 'TRUE',\n 'x_relay_url' \t=> add_query_arg('_hdl_anet_sim', 'relay', $this->notify_url),\n \n\t\t\t//billing\n\t\t\t'x_first_name' \t\t=> $order->billing_first_name,\n\t\t\t'x_last_name' \t\t=> $order->billing_last_name,\n\t\t\t'x_address' \t\t=> $order->billing_address_1,\n\t\t\t'x_city' \t\t\t=> $order->billing_city,\n\t\t\t'x_state' \t\t\t=> $order->billing_state,\n\t\t\t'x_zip' \t\t\t=> $order->billing_postcode,\n\t\t\t'x_country' \t\t=> $order->billing_country,\n\t\t\t'x_phone' \t\t\t=> $order->billing_phone,\n\t\t\t'x_email'\t\t\t=> $order->billing_email,\n\t\t\t\n\t\t\t//shipping\n\t\t\t'x_ship_to_first_name' \t\t=> $order->shipping_first_name,\n\t\t\t'x_ship_to_last_name' \t\t=> $order->shipping_last_name,\n\t\t\t'x_ship_to_address' \t\t=> $order->shipping_address_1,\n\t\t\t'x_ship_to_city' \t\t\t=> $order->shipping_city,\n\t\t\t'x_ship_to_state' \t\t\t=> $order->shipping_state,\n\t\t\t'x_ship_to_zip' \t\t\t=> $order->shipping_postcode,\n\t\t\t'x_ship_to_country' \t\t=> $order->shipping_country,\n\t\t\t'x_ship_to_company' \t\t=> $order->shipping_company,\n\t\t\t\t\n\t\t\t'x_cust_id' \t\t=> $order->user_id,\n\t\t\t'x_customer_ip' \t=> $this->get_user_ip(),\n\t\t\t'x_invoice_num' \t=> $order->id,\n\t\t\t'x_fp_sequence'\t\t=> $order->order_key,\n\t\t\t'x_amount' \t\t\t=> $order->get_total(),\n\t\t\t\n\t\t\t'x_cancel_url'\t\t=> $order->get_cancel_order_url(),\n\t\t\t'x_cancel_url_text'\t=> __( 'Cancel', WC_Authorize_SIM::TEXT_DOMAIN ),\n\t\t);\n\t\t\n\t\t// Address 2\n\t\tif( ! empty( $order->billing_address_2 ) ) {\n\t\t\t$params['x_address'] .= ' - ' . $order->billing_address_2;\n\t\t}\n\t\tif( ! empty( $order->shipping_address_2 ) ) {\n\t\t\t$params['x_ship_to_address'] .= ' - ' . $order->shipping_address_2;\n\t\t}\n\t\t\n\t\t// Add item line\n\t\t$this->add_item_fields( $order );\n\t\t\n\t\t// Tax\n\t\tif( $order->get_total_tax() > 0 ) {\n\t\t\t// Id\n\t\t\t$item_id = 'TAX01' ;\n\t\t\t\n\t\t\t// name\n\t\t\t$item_name \t= __( 'Cart Tax', WC_Authorize_SIM::TEXT_DOMAIN );\n\t\t\t\n\t\t\t// description\n\t\t\t$item_desc \t= '';\n\t\t\t\n\t\t\t// Quantity\n\t\t\t$item_qty \t= 1;\n\t\t\t\n\t\t\t// Amount\n\t\t\t$item_amount = $order->get_total_tax();\n\t\t\t\n\t\t\t// Log point\n\t\t\t$this->add_log( $item_id . \", $item_name, $item_desc, $item_qty, $item_amount\" );\n\t\t\t\n\t\t\t// Add line item\n\t\t\t$this->add_item_field( $item_id, $item_name, $item_desc, $item_qty, $item_amount, 'N');\n\t\t}\n\n\t\t// Fees\n\t\tif ( sizeof( $order->get_fees() ) > 0 ) {\n\t\t\t$idx = 0;\n\t\t\tforeach ( $order->get_fees() as $item ) {\n\t\t\t\t$idx ++;\n\t\t\t\t\n\t\t\t\t// Id\n\t\t\t\t$item_id = sprintf( 'FEE%02d', $idx );\n\t\t\t\n\t\t\t\t// name\n\t\t\t\t$item_name \t= $this->get_item_name( $item['name'] );\n\t\t\t\t\n\t\t\t\t// description\n\t\t\t\t$item_desc \t= $item_name;\n\t\t\t\t\n\t\t\t\t// Quantity\n\t\t\t\t$item_qty \t= 1;\n\t\t\t\t\n\t\t\t\t// Amount\n\t\t\t\t$item_amount = $item['line_total'];\n\t\t\t\t\n\t\t\t\t// Log point\n\t\t\t\t$this->add_log( $item_id . \", $item_name, $item_desc, $item_qty, $item_amount\" );\n\t\t\t\t\n\t\t\t\t$this->add_item_field( $item_id, $item_name, $item_desc, $item_qty, $item_amount, 'N');\n\t\t\t}\n\t\t}\n\n\t\t// Shipping Cost item\n\t\tif ( $order->get_total_shipping() > 0 ) {\n\t\t\t// Id\n\t\t\t$item_id = 'SHP01';\n\t\t\t\t\n\t\t\t// name\n\t\t\t$item_name \t= $this->get_item_name( $order->get_shipping_method() );\n\t\t\t\n\t\t\t// description\n\t\t\t$item_desc \t= sprintf( __( 'Shipping via %s', WC_Authorize_SIM::TEXT_DOMAIN ), $order->get_shipping_method() );\n\t\t\t\n\t\t\t// Quantity\n\t\t\t$item_qty \t= 1;\n\t\t\t\n\t\t\t// Amount\n\t\t\t$item_amount = round( $order->get_total_shipping(), 2 );\n\t\t\t\n\t\t\t// Log point\n\t\t\t$this->add_log( $item_id . \", $item_name, $item_desc, $item_qty, $item_amount\" );\n\t\t\t\n\t\t\t$this->add_item_field( $item_id, $item_name, $item_desc, $item_qty, $item_amount, 'N');\n\t\t}\n\t\t\n\t\t// Discount\n\t\tif ( $order->get_cart_discount() > 0 ) {\n\t\t\t// Id\n\t\t\t$item_id = 'DIS01' ;\n\t\t\t\n\t\t\t// name\n\t\t\t$item_name \t= __( 'Cart Discount', WC_Authorize_SIM::TEXT_DOMAIN );\n\t\t\t\n\t\t\t// description\n\t\t\t$item_desc \t= '';\n\t\t\t\n\t\t\t// Quantity\n\t\t\t$item_qty \t= 1;\n\t\t\t\n\t\t\t// Amount\n\t\t\t$item_amount = round( $order->get_cart_discount(), 2 );\n\t\t\t\n\t\t\t// Log point\n\t\t\t$this->add_log( $item_id . \", $item_name, $item_desc, $item_qty, $item_amount\" );\n\t\t\t\n\t\t\t$this->add_item_field( $item_id, $item_name, $item_desc, $item_qty, $item_amount, 'N');\n\t\t}\n\t\t\n\t\treturn apply_filters( 'woocommerce_authorize_sim_args', $params, $order->id );\n\t}", "function hook_commerce_adyen_payment_types() {\n $types = [];\n\n $types['openinvoice'] = [\n 'label' => 'OpenInvoice',\n 'controllers' => [\n 'payment' => \\Commerce\\Adyen\\Payment\\OpenInvoice\\PaymentController::class,\n 'checkout' => \\Commerce\\Adyen\\Payment\\OpenInvoice\\CheckoutController::class,\n ],\n ];\n\n return $types;\n}", "public function getOrdertype()\n {\n return $this->ordertype;\n }", "public function process($order_id, $amount, $currency_id, payment_option $payment_option, $order_type_id, array $products) {\n\t$urlPre = ('http' . (($_SERVER ['SERVER_PORT'] == 80) ? '' : 's') . '://');\n\t$country = new country($payment_option->address->country_id);\n\t$splitName = explode(' ', trim(preg_replace('/[^A-Z\\ ]/i', '', $payment_option->name)));\n\tif (1 < count($splitName)) {\n\t $lName = array_pop($splitName);\n\t $fName = implode(' ', $splitName);\n\t} else {\n\t $fName = $payment_option->name;\n\t $lName = $payment_option->name;\n\t}\n\n\t$param = array();\n\tforeach ($products as $product_id => $quantity) {\n\t if (0 < (int) $quantity) {\n\t\t$param ['product_list'] [] = $product_id;\n\t }\n\t}\n\t$sql = 'SELECT `product_id`,\n\t\t\t`name`,\n\t\t\t`sku`,\n\t\t\t`wholesale_price`,\n\t\t\t`retail_price`\n\t\tFROM `products`\n\t\tWHERE `product_id` IN (#product_list);';\n\t$resultSet = Agel_Db_Table::getDefaultAdapter()->query(Agel_Db_Table::prepareInClause($sql, $param), $param);\n\t$product_list = array();\n\twhile (false !== ($row = $resultSet->fetch())) {\n\t $product_list [] = array(\n\t\t'productId' => $row ['product_id'],\n\t\t'name' => $row ['name'],\n\t\t'sku' => $row ['sku'],\n\t\t'quantity' => $products [$row ['product_id']],\n\t\t'wholesalePrice' => $row ['wholesale_price'],\n\t\t'retailPrice' => $row ['retail_price']);\n\t}\n\n\t$payment = new Agel_Payment_Container_Worldpay ();\n\t$payment->set(array(\n\t 'name' => $payment_option->name,\n\t 'account' => $payment_option->account,\n\t 'amount' => $amount,\n\t 'currencyId' => $currency_id,\n\t 'orderId' => $order_id,\n\t 'orderTypeId' => $payment_option->order_type_id,\n\t 'creditCardTypeId' => $payment_option->credit_card_type_id,\n\t 'cvv' => $payment_option->cvv,\n\t 'expMonth' => str_pad($payment_option->expiration_month, 2, '0', STR_PAD_LEFT),\n\t 'expYear' => $payment_option->expiration_year ,\n\t 'countryId' => $payment_option->address->country_id,\n\t 'firstName' => $fName,\n\t 'lastName' => $lName,\n\t 'street' => ($payment_option->address->line1 . ' ' . $payment_option->address->line2),\n\t 'postalCode' => $payment_option->address->zip,\n\t 'city' => $payment_option->address->city,\n\t 'state' => states::get_state_name_by_id($payment_option->address->state_id),\n\t 'countryCode' => $country->iso_code,\n\t 'telephoneNumber' => $payment_option->phone_number,\n\t 'email' => $payment_option->email,\n\t 'distributorId' => (isset($_SESSION['user']['distributor_id']) ? $_SESSION['user']['distributor_id'] : 4 ),\n\t 'products' => $product_list));\n\n\t$this->gateway->chargeAccount($payment);\n \n if ($this->gateway->getTransactionStatus() == 'pending') {\n\t throw new Agel_Payment_Gateway_GatewayException('Unable to ');\n\t}\n\n\treturn $this->getStatusAsBool();\n }", "public function form_order_type() {\n\t\tglobal $current_user;\n\n\t\tget_currentuserinfo();\n\n\t\t$data = array();\n\n\t\tif ( !isset( $_REQUEST['page'] ) )\n\t\t\treturn;\n\n\t\tif ( 'visual-form-builder-pro' !== $_REQUEST['page'] )\n\t\t\treturn;\n\n\t\tif ( isset( $_REQUEST['mode'] ) ) :\n\t\t\t$user_id = $current_user->ID;\n\n\t\t\t$type = get_user_meta( $user_id, 'vfb-form-order-type', true );\n\n\t\t\t$meta_value = ( in_array( $_REQUEST['mode'], array( 'order', 'list' ) ) ) ? esc_html( $_REQUEST['mode'] ) : '';\n\t\t\tupdate_user_meta( $user_id, 'vfb-form-order-type', $meta_value );\n\n\t\tendif;\n\t}", "public function display_payment_type_order_edit_pages( $order ){\n if( $this->id === $order->get_payment_method() && $order->get_meta('_payment_duration') ) {\n $options = $this->options;\n echo '<p><strong>'.__('Payment Duration').':</strong> ' . $options[$order->get_meta('_payment_duration')] . '</p>';\n }\n }", "public static function getPaymentTypes(){\n return array(self::IGFC=> PaymentUtils::getLabelText('PAYMENT_TYPE_IGFS'),self::CMPT1 => PaymentUtils::getLabelText('PAYMENT_TYPE_CMPT'));\n }", "public function getPaymentType()\n {\n switch ( $this->payment_type ) {\n case Contribution::PAYMENT_CASH:\n return 'cash';\n break;\n case Contribution::PAYMENT_CREDITCARD:\n return 'credit_card';\n break;\n case Contribution::PAYMENT_CHECK:\n return 'check';\n break;\n case Contribution::PAYMENT_TRANSFER:\n return 'transfer';\n break;\n case Contribution::PAYMENT_PAYPAL:\n return 'paypal';\n break;\n case Contribution::PAYMENT_OTHER:\n return 'other';\n break;\n default:\n Analog::log(\n __METHOD__ . ' Unknonw payment type ' . $this->payment_type,\n Analog::ERROR\n );\n throw new \\RuntimeException(\n 'Unknonw payment type ' . $this->payment_type\n );\n }\n\n }", "public function setOrderType($value)\n {\n $this->order_type = $value;\n $this->setSettingValue('retailcrm_order_type', $value);\n }", "public function getPaymentUrl($id_order)\n {\n \n $x_fp_timestamp = time();\n $order = new Order($id_order);\n $cart = new Cart($order->id_cart);\n \n $currency = new Currency($order->id_currency);\n $order_id = $order->id;\n $description = $this->l('Payment order ') . ' №' . $order_id;\n $paysto_merchant_id = ConfPPM::getConf('paysto_merchant_id');\n $x_relay_url = _PS_BASE_URL_.__PS_BASE_URI__.'module/paysto/result';\n \n $order_amount = number_format(($order->total_products_wt + $order->total_shipping_tax_incl), 2, '.', '');\n \n // Not right RUR for rubles iso_code = RUB\n $iso_code = $currency->iso_code;\n if ($iso_code == 'RUR') {\n $iso_code = 'RUB';\n }\n \n $address = new Address($cart->id_address_delivery);\n $customer = new Customer($order->id_customer);\n \n $products = $cart->getProducts(true);\n \n foreach ($products as &$product) {\n $price_item_with_tax = Product::getPriceStatic(\n $product['id_product'],\n true,\n $product['id_product_attribute']\n );\n $price_item_with_tax = number_format(\n $price_item_with_tax,\n 2,\n '.',\n ''\n );\n \n $product['price_item_with_tax'] = $price_item_with_tax;\n \n \n if (!ConfPPM::getConf('disable_tax_shop')) {\n if (Configuration::get('PS_TAX')) {\n $rate = $product['rate'];\n switch ($rate) {\n case 10:\n $product['tax_value'] = 'Y';\n break;\n case 18:\n $product['tax_value'] = 'Y';\n break;\n case 20:\n $product['tax_value'] = 'Y';\n break;\n default:\n $product['tax_value'] = 'N';\n }\n } else {\n $product['tax_value'] = 'N';\n }\n } else {\n $product['tax_value'] = $this->getProductTax($product['id_product']);\n }\n }\n \n $params = [\n 'x_description' => $description,\n 'x_login' => $paysto_merchant_id,\n 'x_amount' => $order_amount,\n 'x_email' => $customer->email,\n 'x_currency_code' => $iso_code,\n 'x_fp_sequence' => $order_id,\n 'x_fp_timestamp' => $x_fp_timestamp,\n 'x_fp_hash' => $this->get_x_fp_hash($paysto_merchant_id, $order_id, $x_fp_timestamp,\n $order_amount, $iso_code),\n 'x_invoice_num' => $order_id,\n 'x_relay_response' => \"TRUE\",\n 'x_relay_url' => $x_relay_url\n ];\n \n $params['x_line_item'] = '';\n \n if (is_array($products) && count($products)) {\n $tax_value_shipping = ConfPPM::getConf('tax_delivery');\n $products = $cart->getProducts(true);\n foreach ($products as $pos => $product) {\n if (!ConfPPM::getConf('disable_tax_shop')) {\n $carrier = new Carrier((int)$cart->id_carrier);\n \n $tax_value = 'no_vat';\n if (Configuration::get('PS_TAX')) {\n $rate = $carrier->getTaxesRate($address);\n switch ($rate) {\n case 10:\n $tax_value = 'Y';\n break;\n case 18:\n $tax_value = 'Y';\n break;\n case 20:\n $tax_value = 'Y';\n break;\n default:\n $tax_value = 'N';\n }\n }\n } else {\n $tax_value = ConfPPM::getConf('tax_delivery');\n }\n \n $lineArr = array();\n $lineArr[] = '№' . $pos . \" \";\n $lineArr[] = substr($product['id_product'], 0, 30);\n $lineArr[] = substr($product['name'], 0, 254);\n $lineArr[] = substr($product['cart_quantity'], 0, 254);\n $lineArr[] = number_format($product['price_wt'], 2, '.', '');\n $lineArr[] = $tax_value;\n $params['x_line_item'] .= implode('<|>', $lineArr) . \"0<|>\\n\";\n }\n \n if ($order->total_shipping_tax_incl) {\n $pos++;\n $lineArr = array();\n $lineArr[] = '№' . $pos . \" \";\n $lineArr[] =$this->l('Shipping');\n $lineArr[] = $this->l('Shipping') .' '. $order_id;\n $lineArr[] = 1;\n $lineArr[] =number_format($order->total_shipping_tax_incl, 2,\n '.', '');\n $lineArr[] = $tax_value_shipping;\n $params['x_line_item'] .= implode('<|>', $lineArr) . \"0<|>\\n\";\n }\n }\n \n return ['url' => $this->url, 'params' => $params];\n \n }", "abstract public function getPaymentConfig($payment);", "public function getPaymentType(): string\n {\n $paymentMethod = $this->getPaymentMethod();\n $paymentTypes = [\n 'regular_checkout' => __('Regular'),\n 'express_checkout' => __('Express'),\n ];\n\n return (string) ($paymentTypes[$paymentMethod] ?? '');\n }", "public function setOrderTypePaymentPlan() {\n $this->orderType = \"PaymentPlan\";\n return $this;\n }", "public function makeConfiguration($paymentMethod,$order,$transaction){\n\n\t\t$conf['merchantId'] = $paymentMethod->options->merchantId ?? null;\n\t \t$conf['publicKey'] = $paymentMethod->options->publicKey ?? null;\n\t \t\n\t \t$conf['sandboxMode'] = true;\n\t \tif($paymentMethod->options->mode!='sandbox')\n\t \t\t$conf['sandboxMode'] = false;\n\t \t\n\t \t$conf['reedirectAfterPayment'] = $order->url;\n\t \t\n\t \t$conf['order'] = $order;\n\n\t \treturn json_decode(json_encode($conf));\n \n\t}", "public function save_order_payment_type_meta_data( $order, $data ) {\n if ( $data['payment_method'] === $this->id && isset($_POST['payment_duration']) )\n $order->update_meta_data('_payment_duration', esc_attr($_POST['payment_duration']) );\n }", "public function getConfig()\n {\n return [\n 'payment' => [\n EWallet::CODE => [\n 'redirectUrl' => $this->helperData->getEWalletRedirectUrl(),\n 'subtypes' => [\n [\n 'name' => 'pagseguro',\n 'image' => $this->assetRepository->getUrl('Uol_BoaCompra::images/pagseguro-logo.png')\n ],\n [\n 'name' => 'paypal',\n 'image' => $this->assetRepository->getUrl('Uol_BoaCompra::images/paypal-logo.png')\n ],\n ]\n ]\n ]\n ];\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 getOrderDataType(): ?string {\n\t\treturn Hash::get($this->_config, 'orderDataType');\n\t}", "public function getPaymentAmountType()\n {\n return $this->_fields['PaymentAmountType']['FieldValue'];\n }", "public function getPaymentMode()\n {\n return $this->payment_mode;\n }", "function spgateway_credit_config() {\n return array(\n // the friendly display name for a payment gateway should be\n // defined here for backwards compatibility\n 'FriendlyName' => array(\n 'Type' => 'System',\n 'Value' => 'spgateway信用卡',\n ),\n // a text field type allows for single line text input\n 'MerchantID' => array(\n 'FriendlyName' => '商店代號',\n 'Type' => 'text',\n 'Size' => '15',\n 'Default' => '',\n 'Description' => 'spgateway商店代號。',\n ),\n // a password field type allows for masked text input\n 'HashKey' => array(\n 'FriendlyName' => 'HashKey',\n 'Type' => 'password',\n 'Size' => '32',\n 'Default' => '',\n 'Description' => 'HashKey',\n ),\n 'HashIV' => array(\n 'FriendlyName' => 'HashIV',\n 'Type' => 'password',\n 'Size' => '16',\n 'Default' => '',\n 'Description' => 'HashIV',\n ),\n 'TradeLimit' => array(\n 'FriendlyName' => '交易秒數',\n 'Type' => 'text',\n 'Size' => '3',\n 'Default' => '90',\n 'Description' => '最少 60 秒',\n ),\n \"InvoicePrefix\" => array(\n \"FriendlyName\" => \"帳單前綴\",\n \"Type\" => \"text\",\n \"Default\" => \"\",\n \"Description\" => \"選填(只能為數字、英文,且與帳單 ID 合併總字數不能超過 20)\",\n \"Size\" => \"5\",\n ),\n 'CreditRed' => array(\n 'FriendlyName' => '信用卡紅利',\n 'Type' => 'yesno',\n 'Description' => '勾選以啟用',\n ),\n 'UNIONPAY' => array(\n 'FriendlyName' => '銀聯',\n 'Type' => 'yesno',\n 'Description' => '勾選以啟用',\n ),\n // the yesno field type displays a single checkbox option\n 'testMode' => array(\n 'FriendlyName' => '測試模式',\n 'Type' => 'yesno',\n 'Description' => '測試模式',\n ),\n );\n}", "private function getPaymentMethod(){\r\n\r\n $paymentMethod = 1;\r\n switch($this->medio_pago){\r\n case 'webpay': {\r\n $paymentMethod = 1;\r\n break;\r\n }\r\n case 'servipag': {\r\n $paymentMethod = 2;\r\n break;\r\n }\r\n case 'multicaja': {\r\n $paymentMethod = 3;\r\n break;\r\n }\r\n case 'onepay': {\r\n $paymentMethod = 5;\r\n break;\r\n }\r\n case 'flow': {\r\n $paymentMethod = 9;\r\n break;\r\n }\r\n case 'webpay3c': {\r\n $paymentMethod = 13;\r\n break;\r\n }\r\n case 'mach': {\r\n $paymentMethod = 15;\r\n break;\r\n }\r\n default : {\r\n $paymentMethod = 1;\r\n break;\r\n } \r\n }\r\n\r\n return $paymentMethod;\r\n }", "public function payment_type()\n {\n return $this->belongsTo('App\\PaymentType');\n }", "public function testParsePaymentType(): void\n {\n $result = Parser::parsePaymentType('Cash');\n $this->assertEquals('cash', $result);\n\n $result = Parser::parsePaymentType('Lease');\n $this->assertEquals('lease', $result);\n\n $result = Parser::parsePaymentType('Financing');\n $this->assertEquals('finance', $result);\n\n $result = Parser::parsePaymentType('Comptant');\n $this->assertEquals('cash', $result);\n\n $result = Parser::parsePaymentType('location');\n $this->assertEquals('lease', $result);\n\n $result = Parser::parsePaymentType('Financement');\n $this->assertEquals('finance', $result);\n\n $this->assertNull(Parser::parsePaymentType('banana'));\n }", "public function getSupportedPaymentTypes()\n {\n return [PaymentMethod::PAYPAL];\n }", "public function paymentModes(array $config = array())\n {\n $config = new KObjectConfig($config);\n\n $options = array(\n array('label' => 'Online Banking (Funds Transfer)', 'value' => 1),\n array('label' => 'Over-the-Counter Banking and ATM', 'value' => 2),\n array('label' => 'Over-the-Counter non-Bank', 'value' => 4)\n );\n\n $config->append(array(\n 'name' => 'payment_mode',\n 'selected' => null,\n 'options' => $options,\n 'filter' => array(),\n 'attribs' => array(\n 'style' => 'width: 100%'\n )\n ));\n\n return parent::optionlist($config);\n }", "public static function PaymentOptionList()\n {\n \t\n \treturn array(\n \t 'cod'=>t(\"Cash On delivery\"),\n \t 'ocr'=>t(\"Offline Credit Card Payment\"),\n \t 'pyr'=>t(\"Pay On Delivery\"),\n \t 'pyp'=>t(\"paypal\"),\n \t 'stp'=>t(\"stripe\"),\n \t 'mcd'=>t(\"mercapado\"),\n \t 'ide'=>t(\"sisow\"),\n \t 'payu'=>t(\"payumoney\"),\n \t 'pys'=>t(\"paysera\"), \t \n \t 'bcy'=>t(\"Barclay\"),\n \t 'epy'=>t(\"EpayBg\"),\n \t 'atz'=>t(\"Authorize.net\"),\n \t 'obd'=>t(\"Offline Bank Deposit\"),\n \t 'btr' =>t(\"Braintree\")\n \t);\n }", "public function setPaymenttype($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->paymenttype !== $v) {\n $this->paymenttype = $v;\n $this->modifiedColumns[OrdrhedTableMap::COL_PAYMENTTYPE] = true;\n }\n\n return $this;\n }", "public function email($order, $type) {\r\n\r\n switch ($type) {\r\n case 'shipping_confirmation':\r\n if ($order['status'] == 'shipped' && !empty($order['shipping_tracking_number'])) {\r\n // Send Shipping Confirmation email to customer\r\n $templateId = config('custom.emails.templates.shipping_confirmation');\r\n\r\n if (!empty($order['user_id'])) {\r\n $user = $order->user;\r\n }\r\n\r\n $sub = [\r\n 'customer_name' => !empty($order['user_id']) ? $user['first_name'] : $order['billing_name'],\r\n 'order_number' => $order['order_number'],\r\n 'shipping_carrier' => !empty($order['shipping_carrier']) ? config('custom.checkout.shipping.carriers.' . $order['shipping_carrier'] . '.name') : '',\r\n 'shipping_plan' => !empty($order['shipping_plan']) ? config('custom.checkout.shipping.carriers.' . $order['shipping_carrier'] . '.plans.' . $order['shipping_plan'] . '.plan') : '',\r\n 'tracking_url' => 'https://tools.usps.com/go/TrackConfirmAction?tLabels=' . $order['shipping_tracking_number'],\r\n 'tracking_number' => $order['shipping_tracking_number'],\r\n 'delivery_address' => [\r\n 'name' => $order['delivery_name'],\r\n 'phone' => $order['delivery_phone'],\r\n 'address_1' => $order['delivery_address_1'],\r\n 'address_2' => $order['delivery_address_2'],\r\n 'city' => $order['delivery_city'],\r\n 'state' => $order['delivery_state'],\r\n 'zipcode' => $order['delivery_zipcode']\r\n ]\r\n ];\r\n\r\n foreach ($order->inventoryItems as $item) {\r\n $tmp = [\r\n 'name' => $item->product['name'],\r\n 'url' => route('shop.product', [$item->product['uri'], $item->product['id']]),\r\n 'unit_price' => number_format($item->pivot['price'], 2),\r\n 'quantity' => $item->pivot['quantity'],\r\n 'price' => number_format($item->pivot['price'] * $item->pivot['quantity'], 2)\r\n ];\r\n\r\n if ($item->options()->count() > 0) {\r\n $tmp['options'] = [];\r\n\r\n foreach ($item->options()->get() as $option) {\r\n $tmp['options'][] = [\r\n 'attribute' => $option->attribute['name'],\r\n 'value' => $option['name']\r\n ];\r\n }\r\n }\r\n\r\n if ($item->product->defaultPhoto()->count() > 0) {\r\n $tmp['image'] = CustomHelper::image($item->product->defaultPhoto['name'], true);\r\n }\r\n\r\n $sub['items'][] = $tmp;\r\n }\r\n\r\n $recipients = [\r\n [\r\n 'address' => !empty($order['contact_email']) ? $order['contact_email'] : $user['email'],\r\n 'name' => $sub['customer_name'],\r\n 'substitution_data' => $sub\r\n ]\r\n ];\r\n\r\n SparkPostHelper::sendTemplate($templateId, $recipients);\r\n\r\n return back()->with('alert-success', 'You have successfully sent a Shipping Confirmation email to the customer.');\r\n } else {\r\n return back()->with('alert-danger', 'You need to change the status to Shipped and add a Tracking Number first in order to send this Shipping Confirmation email to the customer.');\r\n }\r\n\r\n break;\r\n }\r\n }", "function ihc_check_payment_available($type=''){\n\tif ($type){\n\t\t$payment_metas = ihc_return_meta_arr('payment_' . $type);\n\t\tswitch ($type){\n\t\t\tcase 'paypal':\n\t\t\t\tif (!empty($payment_metas['ihc_paypal_email']) && !empty($payment_metas['ihc_paypal_status'])){\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'authorize':\n\t\t\t\tif (!empty($payment_metas['ihc_authorize_login_id']) && !empty($payment_metas['ihc_authorize_transaction_key']) && !empty($payment_metas['ihc_authorize_status'])){\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'twocheckout':\n\t\t\t\tif (!empty($payment_metas['ihc_twocheckout_status']) && !empty($payment_metas['ihc_twocheckout_api_user'])\n\t\t\t\t\t\t&& !empty($payment_metas['ihc_twocheckout_api_pass']) && !empty($payment_metas['ihc_twocheckout_private_key'])\n\t\t\t\t\t\t&& !empty($payment_metas['ihc_twocheckout_account_number']) && !empty($payment_metas['ihc_twocheckout_secret_word'])){\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'bank_transfer':\n\t\t\t\tif (!empty($payment_metas['ihc_bank_transfer_status']) && !empty($payment_metas['ihc_bank_transfer_message'])){\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'stripe':\n\t\t\t\tif (!empty($payment_metas['ihc_stripe_secret_key']) && !empty($payment_metas['ihc_stripe_publishable_key']) && !empty($payment_metas['ihc_stripe_status'])){\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'braintree':\n\t\t\t\tif ($payment_metas['ihc_braintree_status'] == 1 && !empty($payment_metas['ihc_braintree_merchant_id']) && !empty($payment_metas['ihc_braintree_public_key']) && !empty($payment_metas['ihc_braintree_private_key'])){\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'payza':\n\t\t\t\tif (!empty($payment_metas['ihc_payza_status']) && !empty($payment_metas['ihc_payza_email'])){\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'mollie':\n\t\t\t\tif (!empty($payment_metas['ihc_mollie_status']) && !empty($payment_metas['ihc_mollie_api_key'])){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'pagseguro':\n\t\t\t\tif (!empty($payment_metas['ihc_pagseguro_status']) && !empty($payment_metas['ihc_pagseguro_email']) && !empty($payment_metas['ihc_pagseguro_token'])){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'paypal_express_checkout':\n\t\t\t\tif (!empty($payment_metas['ihc_paypal_express_checkout_signature']) && !empty($payment_metas['ihc_paypal_express_checkout_user'])\n\t\t\t\t\t&& !empty($payment_metas['ihc_paypal_express_checkout_password']) && !empty($payment_metas['ihc_paypal_express_checkout_status'])){\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'stripe_checkout_v2':\n\t\t\t\tif (!empty($payment_metas['ihc_stripe_checkout_v2_secret_key']) && !empty($payment_metas['ihc_stripe_checkout_v2_publishable_key']) && !empty($payment_metas['ihc_stripe_checkout_v2_status'])){\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn FALSE;\n}", "function setExpressCheckout(&$order)\n\t\t{\n\t\t\tglobal $pmpro_currency;\n\n\t\t\tif(empty($order->code))\n\t\t\t\t$order->code = $order->getRandomCode();\n\n\t\t\t//clean up a couple values\n\t\t\t$order->payment_type = \"PayPal Express\";\n\t\t\t$order->CardType = \"\";\n\t\t\t$order->cardtype = \"\";\n\n\t\t\t//taxes on initial amount\n\t\t\t$initial_payment = $order->InitialPayment;\n\t\t\t$initial_payment_tax = $order->getTaxForPrice($initial_payment);\n\t\t\t$initial_payment = pmpro_round_price((float)$initial_payment + (float)$initial_payment_tax);\n\n\t\t\t//taxes on the amount\n\t\t\t$amount = $order->PaymentAmount;\n\t\t\t$amount_tax = $order->getTaxForPrice($amount);\n\t\t\t$amount = pmpro_round_price((float)$amount + (float)$amount_tax);\n\n\t\t\t//paypal profile stuff\n\t\t\t$nvpStr = \"\";\n\t\t\t$nvpStr .=\"&AMT=\" . $initial_payment . \"&CURRENCYCODE=\" . $pmpro_currency;\n\t\t\tif(!empty($order->ProfileStartDate) && strtotime($order->ProfileStartDate, current_time(\"timestamp\")) > 0)\n\t\t\t\t$nvpStr .= \"&PROFILESTARTDATE=\" . $order->ProfileStartDate;\n\t\t\tif(!empty($order->BillingFrequency))\n\t\t\t\t$nvpStr .= \"&BILLINGPERIOD=\" . $order->BillingPeriod . \"&BILLINGFREQUENCY=\" . $order->BillingFrequency . \"&AUTOBILLOUTAMT=AddToNextBilling&L_BILLINGTYPE0=RecurringPayments\";\n\t\t\t$nvpStr .= \"&DESC=\" . urlencode( apply_filters( 'pmpro_paypal_level_description', substr($order->membership_level->name . \" at \" . get_bloginfo(\"name\"), 0, 127), $order->membership_level->name, $order, get_bloginfo(\"name\")) );\n\t\t\t$nvpStr .= \"&NOTIFYURL=\" . urlencode(admin_url('admin-ajax.php') . \"?action=ipnhandler\");\n\t\t\t$nvpStr .= \"&NOSHIPPING=1&L_BILLINGAGREEMENTDESCRIPTION0=\" . urlencode(substr($order->membership_level->name . \" at \" . get_bloginfo(\"name\"), 0, 127)) . \"&L_PAYMENTTYPE0=Any\";\n\n\t\t\t//if billing cycles are defined\n\t\t\tif(!empty($order->TotalBillingCycles))\n\t\t\t\t$nvpStr .= \"&TOTALBILLINGCYCLES=\" . $order->TotalBillingCycles;\n\n\t\t\t//if a trial period is defined\n\t\t\tif(!empty($order->TrialBillingPeriod))\n\t\t\t{\n\t\t\t\t$trial_amount = $order->TrialAmount;\n\t\t\t\t$trial_tax = $order->getTaxForPrice($trial_amount);\n\t\t\t\t$trial_amount = pmpro_round_price((float)$trial_amount + (float)$trial_tax);\n\n\t\t\t\t$nvpStr .= \"&TRIALBILLINGPERIOD=\" . $order->TrialBillingPeriod . \"&TRIALBILLINGFREQUENCY=\" . $order->TrialBillingFrequency . \"&TRIALAMT=\" . $trial_amount;\n\t\t\t}\n\t\t\tif(!empty($order->TrialBillingCycles))\n\t\t\t\t$nvpStr .= \"&TRIALTOTALBILLINGCYCLES=\" . $order->TrialBillingCycles;\n\n\t\t\tif(!empty($order->discount_code))\n\t\t\t{\n\t\t\t\t$nvpStr .= \"&ReturnUrl=\" . urlencode(pmpro_url(\"checkout\", \"?level=\" . $order->membership_level->id . \"&discount_code=\" . $order->discount_code . \"&review=\" . $order->code));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$nvpStr .= \"&ReturnUrl=\" . urlencode(pmpro_url(\"checkout\", \"?level=\" . $order->membership_level->id . \"&review=\" . $order->code));\n\t\t\t}\n\n\t\t\t$additional_parameters = apply_filters(\"pmpro_paypal_express_return_url_parameters\", array());\n\t\t\tif(!empty($additional_parameters))\n\t\t\t{\n\t\t\t\tforeach($additional_parameters as $key => $value)\n\t\t\t\t\t$nvpStr .= urlencode(\"&\" . $key . \"=\" . $value);\n\t\t\t}\n\n\t\t\t$nvpStr .= \"&CANCELURL=\" . urlencode(pmpro_url(\"levels\"));\n\n\t\t\t$account_optional = apply_filters('pmpro_paypal_account_optional', true);\n \t\tif ($account_optional)\n \t\t$nvpStr .= '&SOLUTIONTYPE=Sole&LANDINGPAGE=Billing';\n\n\t\t\t$nvpStr = apply_filters(\"pmpro_set_express_checkout_nvpstr\", $nvpStr, $order);\n\n\t\t\t///echo str_replace(\"&\", \"&<br />\", $nvpStr);\n\t\t\t///exit;\n\n\t\t\t$this->httpParsedResponseAr = $this->PPHttpPost('SetExpressCheckout', $nvpStr);\n\n\t\t\tif(\"SUCCESS\" == strtoupper($this->httpParsedResponseAr[\"ACK\"]) || \"SUCCESSWITHWARNING\" == strtoupper($this->httpParsedResponseAr[\"ACK\"])) {\n\t\t\t\t$order->status = \"token\";\n\t\t\t\t$order->paypal_token = urldecode($this->httpParsedResponseAr['TOKEN']);\n\n\t\t\t\t//update order\n\t\t\t\t$order->saveOrder();\n\n\t\t\t\t//redirect to paypal\n\t\t\t\t$paypal_url = \"https://www.paypal.com/webscr?cmd=_express-checkout&useraction=commit&token=\" . $this->httpParsedResponseAr['TOKEN'];\n\t\t\t\t$environment = pmpro_getOption(\"gateway_environment\");\n\t\t\t\tif(\"sandbox\" === $environment || \"beta-sandbox\" === $environment)\n\t\t\t\t{\n\t\t\t\t\t$paypal_url = \"https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&useraction=commit&token=\" . $this->httpParsedResponseAr['TOKEN'];\n\t\t\t\t}\n\n\t\t\t\twp_redirect($paypal_url);\n\t\t\t\texit;\n\n\t\t\t\t//exit('SetExpressCheckout Completed Successfully: '.print_r($this->httpParsedResponseAr, true));\n\t\t\t} else {\n\t\t\t\t$order->status = \"error\";\n\t\t\t\t$order->errorcode = $this->httpParsedResponseAr['L_ERRORCODE0'];\n\t\t\t\t$order->error = urldecode($this->httpParsedResponseAr['L_LONGMESSAGE0']);\n\t\t\t\t$order->shorterror = urldecode($this->httpParsedResponseAr['L_SHORTMESSAGE0']);\n\t\t\t\treturn false;\n\t\t\t\t//exit('SetExpressCheckout failed: ' . print_r($httpParsedResponseAr, true));\n\t\t\t}\n\n\t\t\t//write session?\n\n\t\t\t//redirect to PayPal\n\t\t}", "public function mp_client_payment($type, $mode, $req = []){\n\t\tif(!$this->env_get('mp_mobile:mobileID')) return;\n\n\t\t// for Abo or OTP payment\n\t\tif(in_array($type, ['abo','otp'])){\n\n\t\t\t// if this process is finished and resetable (and this is not a ajax call)\n\t\t\tif($this->us_get('mp:'.$type.':finished') and $this->us_get('mp:'.$type.':resetable') and $mode !== 'ajaxstatus'){\n\n\t\t\t\t// reset session data\n\t\t\t\t$this->mp_init_session($type, true);\n\t\t\t\t}\n\n\t\t\t// abort if we have no ID and this is a ajax call\n\t\t\tif(!$this->us_get('mp:'.$type.':'.$type.'ID') and $mode === 'ajaxstatus') return;\n\n\t\t\t// if we have a confirmationURL\n\t\t\tif(h::cX($req, 'confirmationURL')){\n\n\t\t\t\t// save it for other processes (without it)\n\t\t\t\t$this->us_set('mp:'.$type.':confirmationURL', h::gX($req, 'confirmationURL'));\n\t\t\t\t}\n\n\t\t\t// if this process is not finished\n\t\t\tif(!$this->us_get('mp:'.$type.':finished')){\n\n\t\t\t\t// define param\n\t\t\t\t$param = [\n\t\t\t\t\t'mobileID'\t\t\t=> $this->env_get('mp_mobile:mobileID'),\n\t\t\t\t\t'persistID'\t\t\t=> $this->us_get('persistID'),\n\t\t\t\t\t'confirmationURL'\t=> $this->us_get('mp:'.$type.':confirmationURL'),\n\t\t\t\t\t$type.'ID'\t\t\t=> $this->us_get('mp:'.$type.':'.$type.'ID'), // aboID or otpID is 0, if new\n\t\t\t\t\t'netm'\t\t\t\t=> $req['netm'] ?? null,\n\t\t\t\t\t'dimoco'\t\t\t=> $req['dimoco'] ?? null,\n\t\t\t\t\t'submitted'\t\t\t=> ($mode === 'submitted'),\n\t\t\t\t\t'clickrequest'\t\t=> $this->env_get('nexus:is_click_request'),\n\t\t\t\t\t'tan'\t\t\t\t=> $req['tan'] ?? null,\n\t\t\t\t\t] + $this->mp_get_product_param();\n\n\t\t\t\t// call client\n\t\t\t\t$res = ($type == 'abo') ? client::create_abo($param) : client::submit_otp($param);\n\n\t\t\t\t// save status\n\t\t\t\t$this->us_set('mp:'.$type.':status', $res->status);\n\n\t\t\t\t// if we have data\n\t\t\t\tif(isset($res->data)){\n\n\t\t\t\t\t// if we have an aboID or otpID\n\t\t\t\t\tif(isset($res->data->{$type.'ID'})){\n\n\t\t\t\t\t\t// save ID\n\t\t\t\t\t\t$this->us_set('mp:'.$type.':'.$type.'ID', $res->data->{$type.'ID'});\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// if we have a reflectorID\n\t\t\t\t\tif(isset($res->data->reflectorID)){\n\n\t\t\t\t\t\t// save it to session\n\t\t\t\t\t\t$this->us_set('mp:'.$type.':reflectorID', $res->data->reflectorID);\n\t\t\t\t\t\t$this->us_set('mp:'.$type.':startStackID', $res->data->stackID);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// if the actual status is not one to continue, but the process is not finished\n\t\t\tif(!in_array($this->us_get('mp:'.$type.':status'), [100,102,307]) and !$this->us_get('mp:'.$type.':finished')){\n\n\t\t\t\t// for a ajax call, do nothing\n\t\t\t\tif($mode === 'ajaxstatus') return;\n\n\t\t\t\t// save this process is finished\n\t\t\t\t$this->us_set('mp:'.$type.':finished', true);\n\n\t\t\t\t// check if process can be reseted\n\t\t\t\tif(in_array($this->us_get('mp:'.$type.':status'), [200,201,401,402])){\n\n\t\t\t\t\t// save it\n\t\t\t\t\t$this->us_set('mp:'.$type.':resetable', true);\n\t\t\t\t\t}\n\n\t\t\t\t// if payment was successful\n\t\t\t\tif($this->us_get('mp:'.$type.':status') == 200){\n\n\t\t\t\t\t// set identify is confirmed (through successful payment process)\n\t\t\t\t\t$this->us_set('mp:identify:confirmed', true);\n\t\t\t\t\t}\n\n\t\t\t\t// finish further processing\n\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t// if this process needs a redirect\n\t\t\tif($this->us_get('mp:'.$type.':status') == 307){\n\n\t\t\t\t// check if reflectorID is missing\n\t\t\t\tif(!$this->us_get('mp:'.$type.':reflectorID')){\n\n\t\t\t\t\t// log error\n\t\t\t\t\te::logtrigger('Payment process failed, no reflectorID for redirect given: '.h::encode_php($this->us_get('mp:'.$type)));\n\n\t\t\t\t\t// set status and abort further processing\n\t\t\t\t\treturn $this->us_set('mp:'.$type.':status', 500);\n\t\t\t\t\t}\n\n\t\t\t\t// if this process has no stackID set for returning\n\t\t\t\tif(!$this->us_get('mp:'.$type.':returnStackID')){\n\n\t\t\t\t\t// append it\n\t\t\t\t\t$res = reflector::stack([\n\t\t\t\t\t\t'reflectorID' \t=> $this->us_get('mp:'.$type.':reflectorID'),\n\t\t\t\t\t\t'url'\t\t\t=> $this->us_same_url('?rt='.time()),\n\t\t\t\t\t\t]);\n\n\t\t\t\t\t// on error, set status and abort further processing\n\t\t\t\t\tif($res->status != 201) return $this->us_set('mp:'.$type.':status', 500);\n\n\t\t\t\t\t// save stackID\n\t\t\t\t\t$this->us_set('mp:'.$type.':returnStackID', $res->data->stackID);\n\t\t\t\t\t}\n\n\t\t\t\t// if this is not a ajax call\n\t\t\t\tif($mode !== 'ajaxstatus'){\n\n\t\t\t\t\t// get first stack to redirect\n\t\t\t\t\t$res = reflector::run_stack([\n\t\t\t\t\t\t'reflectorID'\t=> $this->us_get('mp:'.$type.':reflectorID'),\n\t\t\t\t\t\t'stackID'\t\t=> $this->us_get('mp:'.$type.':startStackID'),\n\t\t\t\t\t\t]);\n\n\t\t\t\t\t// on error, set status and abort further processing\n\t\t\t\t\tif($res->status != 200) return $this->us_set('mp:'.$type.':status', 500);\n\n\t\t\t\t\t// make redirect\n\t\t\t\t\theader('HTTP/1.1 302 Found');\n\t\t\t\t\theader('Location:'.$res->data->url);\n\n\t\t\t\t\t// append track data\n\t\t\t\t\t$this->env_set('tracker:callinfo:page', $type.'/redirect/'.$this->us_get('mp:'.$type.':startStackID'));\n\n\t\t\t\t\t// exit php processing here\n\t\t\t\t\texit;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// finish further processing\n\t\treturn;\n\t\t}", "function addPaymentFormField(NodeTypeInterface $type, $label = 'Payment Label') {\n $field_storage = FieldStorageConfig::create(array(\n 'field_name' => $this->fieldName,\n 'entity_type' => 'node',\n 'type' => 'payment_form',\n ));\n $field_storage->save();\n\n $instance = FieldConfig::create(array(\n 'field_storage' => $field_storage,\n 'bundle' => $type->id(),\n 'label' => $label,\n 'settings' => array('currency_code' => 'CHF'),\n ));\n $instance->save();\n\n // Assign display settings for the 'default' and 'teaser' view modes.\n entity_get_display('node', $type->id(), 'default')\n ->setComponent($this->fieldName, array(\n 'label' => 'hidden',\n 'type' => 'text_default',\n ))\n ->save();\n\n return $instance;\n }", "public function getConfigPaymentAction()\n {\n return $this->getConfigData('order_status') == 'pending' ? null : parent::getConfigPaymentAction();\n }", "public function makeDefaultPreferencePaymentV1($paymentInfo = [], $quote = null, $order = null)\n {\n if (!$quote) {\n $quote = $this->_getQuote();\n }\n\n $orderId = $quote->getReservedOrderId();\n\n if (!$order) {\n $order = $this->_getOrder($orderId);\n }\n\n $customer = $this->_customerSession->getCustomer();\n $billing_address = $quote->getBillingAddress()->getData();\n $customerInfo = $this->getCustomerInfo($customer, $order);\n\n $preference = [];\n\n $notification_params = [\n '_query' => [\n 'source_news' => 'webhooks'\n ]\n ];\n\n $notification_url = $this->_urlBuilder->getUrl('mercadopago/notifications/custom', $notification_params);\n if (isset($notification_url) && !strrpos($notification_url, 'localhost')) {\n $preference['notification_url'] = $notification_url;\n }\n\n $preference['description'] = __(\n \"Order # %1 in store %2\",\n $order->getIncrementId(),\n $this->_storeManager->getStore()->getBaseUrl(UrlInterface::URL_TYPE_LINK)\n );\n\n $preference['transaction_amount'] = $this->getAmount();\n $preference['external_reference'] = $order->getIncrementId();\n $preference['payer']['email'] = $customerInfo['email'];\n\n if (!empty($paymentInfo['identification_type'])) {\n $preference['payer']['identification']['type'] = $paymentInfo['identification_type'];\n $preference['payer']['identification']['number'] = $paymentInfo['identification_number'];\n }\n\n $preference['additional_info']['items'] = $this->getItemsInfo($order, $quote);\n $preference['additional_info']['payer']['first_name'] = $customerInfo['first_name'];\n $preference['additional_info']['payer']['last_name'] = $customerInfo['last_name'];\n\n $preference['additional_info']['payer']['address'] = [\n \"zip_code\" => $billing_address['postcode'],\n \"street_name\" => $billing_address['street'] . \" - \" . $billing_address['city'] . \" - \" . $billing_address['country_id'],\n \"street_number\" => ''\n ];\n\n $preference['additional_info']['payer']['registration_date'] = date(\n 'Y-m-d',\n $customer->getCreatedAtTimestamp()\n ) . \"T\" . date(\n 'H:i:s',\n $customer->getCreatedAtTimestamp()\n );\n\n if ($order->canShip()) {\n $shipping = $order->getShippingAddress()->getData();\n\n $preference['additional_info']['shipments']['receiver_address'] = [\n \"zip_code\" => $shipping['postcode'],\n \"street_name\" => $shipping['street'] . \" - \" . $shipping['city'] . \" - \" . $shipping['country_id'],\n \"street_number\" => '',\n \"floor\" => \"-\",\n \"apartment\" => \"-\",\n ];\n\n $preference['additional_info']['payer']['phone'] = [\n \"area_code\" => \"-\",\n \"number\" => $shipping['telephone']\n ];\n }\n\n $this->_coreHelper->log(\"==> makeDefaultPreferencePaymentV1 -> preference\", 'mercadopago-standard.log', $preference);\n $this->_coreHelper->log(\"==> makeDefaultPreferencePaymentV1\", 'mercadopago-standard.log', $paymentInfo);\n\n $sponsorId = $this->getSponsorId();\n $this->_coreHelper->log(\"Sponsor_id\", 'mercadopago-standard.log', $sponsorId);\n\n $test_mode = false;\n\n if (!empty($sponsorId) && strpos($customerInfo['email'], \"@testuser.com\") === false) {\n $this->_coreHelper->log(\"Sponsor_id identificado\", 'mercadopago-custom.log', $sponsorId);\n $preference['sponsor_id'] = (int)$sponsorId;\n $test_mode = true;\n }\n\n $this->_version->afterLoad();\n\n $preference['metadata'] = [\n \"platform\" => \"BP1EF6QIC4P001KBGQ10\",\n \"platform_version\" => $this->_productMetaData->getVersion(),\n \"module_version\" => $this->_version->getValue(),\n \"sponsor_id\" => $sponsorId,\n \"test_mode\" => $test_mode,\n \"site\" => $this->_scopeConfig->getValue(\n \\MercadoPago\\Core\\Helper\\ConfigData::PATH_SITE_ID,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n )\n ];\n\n return $preference;\n }", "abstract public function getPaymentMethod();", "public function setOrdertype($var)\n {\n GPBUtil::checkInt64($var);\n $this->ordertype = $var;\n\n return $this;\n }", "public function __construct() {\r\n \r\n $this->id = 'plaid_payment'; // payment gateway plugin ID\r\n $this->icon = ''; // URL of the icon that will be displayed on checkout page near your gateway name\r\n $this->has_fields = true; // in case you need a custom credit card form\r\n $this->method_title = 'Plaid Payment Gateway';\r\n $this->method_description = 'Description of Plaid payment gateway'; // will be displayed on the options page\r\n \r\n // gateways can support subscriptions, refunds, saved payment methods,\r\n // but in this tutorial we begin with simple payments\r\n $this->supports = array(\r\n 'products'\r\n );\r\n \r\n // Method with all the options fields\r\n $this->init_form_fields();\r\n \r\n // Load the settings.\r\n $this->init_settings();\r\n $this->title = $this->get_option( 'title' );\r\n $this->description = $this->get_option( 'description' );\r\n $this->enabled = $this->get_option( 'enabled' );\r\n //$this->testmode = 'yes' === $this->get_option( 'testmode' );\r\n //$this->private_key = $this->testmode ? $this->get_option( 'test_private_key' ) : $this->get_option( 'private_key' );\r\n //$this->publishable_key = $this->testmode ? $this->get_option( 'test_publishable_key' ) : $this->get_option( 'publishable_key' );\r\n \r\n // This action hook saves the settings\r\n add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );\r\n \r\n // We need custom JavaScript to obtain a token\r\n add_action( 'wp_enqueue_scripts', array( $this, 'payment_scripts' ) );\r\n \r\n // You can also register a webhook here\r\n // add_action( 'woocommerce_api_{webhook name}', array( $this, 'webhook' ) );\r\n \r\n \t\t}", "public function getTransactionTypes()\n\t{\n\t\t$processed_list = array();\n\t\t$alias_map = array();\n\n\t\t$selected_types = $this->orderCardTransactionTypes(\n\t\t\t$this->config->get('emerchantpay_checkout_transaction_type')\n\t\t);\n\t\t$methods = \\Genesis\\API\\Constants\\Payment\\Methods::getMethods();\n\n\t\tforeach ($methods as $method) {\n\t\t\t$alias_map[$method . self::PPRO_TRANSACTION_SUFFIX] = \\Genesis\\API\\Constants\\Transaction\\Types::PPRO;\n\t\t}\n\n\t\t$alias_map = array_merge($alias_map, [\n\t\t\tself::GOOGLE_PAY_TRANSACTION_PREFIX . self::GOOGLE_PAY_PAYMENT_TYPE_AUTHORIZE =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::GOOGLE_PAY,\n\t\t\tself::GOOGLE_PAY_TRANSACTION_PREFIX . self::GOOGLE_PAY_PAYMENT_TYPE_SALE =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::GOOGLE_PAY,\n\t\t\tself::PAYPAL_TRANSACTION_PREFIX . self::PAYPAL_PAYMENT_TYPE_AUTHORIZE =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::PAY_PAL,\n\t\t\tself::PAYPAL_TRANSACTION_PREFIX . self::PAYPAL_PAYMENT_TYPE_SALE =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::PAY_PAL,\n\t\t\tself::PAYPAL_TRANSACTION_PREFIX . self::PAYPAL_PAYMENT_TYPE_EXPRESS =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::PAY_PAL,\n\t\t\tself::APPLE_PAY_TRANSACTION_PREFIX . self::APPLE_PAY_PAYMENT_TYPE_AUTHORIZE =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::APPLE_PAY,\n\t\t\tself::APPLE_PAY_TRANSACTION_PREFIX . self::APPLE_PAY_PAYMENT_TYPE_SALE =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::APPLE_PAY,\n\t\t]);\n\n\t\tforeach ($selected_types as $selected_type) {\n\t\t\tif (array_key_exists($selected_type, $alias_map)) {\n\t\t\t\t$transaction_type = $alias_map[$selected_type];\n\n\t\t\t\t$processed_list[$transaction_type]['name'] = $transaction_type;\n\n\t\t\t\t// WPF Custom Attribute\n\t\t\t\t$key = $this->getCustomParameterKey($transaction_type);\n\n\t\t\t\t$processed_list[$transaction_type]['parameters'][] = array(\n\t\t\t\t\t$key => str_replace(\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\tself::PPRO_TRANSACTION_SUFFIX,\n\t\t\t\t\t\t\tself::GOOGLE_PAY_TRANSACTION_PREFIX,\n\t\t\t\t\t\t\tself::PAYPAL_TRANSACTION_PREFIX,\n\t\t\t\t\t\t\tself::APPLE_PAY_TRANSACTION_PREFIX\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'',\n\t\t\t\t\t\t$selected_type\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$processed_list[] = $selected_type;\n\t\t\t}\n\t\t}\n\n\t\treturn $processed_list;\n\t}", "function get_transaction_type()\n {\n return $this->platnosci_post_vars['txn_type']; \n }", "function admin_custom_config()\n {\n $db = DataAccess::getInstance();\n\n $options = '';\n $current_currency = $this->get('currency');\n if (!$current_currency) {\n $current_currency = 'USD';\n $this->set('currency', 'USD');//default to USD\n }\n $count = 0;\n ksort(self::$_currency);\n foreach (self::$_currency as $key => $currency) {\n $selected = ($current_currency == $key) ? ' selected=\"selected\"' : '';\n $options .= \"\n\t\t\t\t<option value='$key'$selected>$key - $currency</option>\";\n }\n\n $tpl = new geoTemplate('admin');\n $tpl->assign('payment_type', self::gateway_name);\n\n $tooltips['installation_id'] = geoHTML::showTooltip('Worldpay Installation ID', 'This the id you were given by Worldpay. This id will identify a user you submit to Worldpay to collect funds from.');\n $tooltips['callback_password'] = geoHTML::showTooltip('Worldpay Callback Password', 'This is the password that you can optionally set at Worldpay to verify that Worldpay is the one returning an authorization. You can leave this field blank and the password will not be checked on any Worldpay callback procedures.');\n $tpl->assign('tooltips', $tooltips);\n\n $tpl->assign('commonAdminOptions', $this->_showCommonAdminOptions());\n\n $values['installation_id'] = geoString::specialChars($this->get('installation_id'));\n $tpl->assign('currency_options', $options);\n $values['callback_password'] = geoString::specialChars($this->get('callback_password'));\n $tpl->assign('values', $values);\n\n\n return $tpl->fetch('payment_gateways/worldpay.tpl');\n }", "public function getOrderType()\n {\n return _('Subscription');\n }", "private function getPaymentMethod($orderPayment): string\n {\n //====================================================================//\n // Detect Payment Method Type from Default Payment \"known\" methods\n $method = $orderPayment->getMethod();\n foreach (static::$PAYMENT_METHODS as $paymentMethod => $methodIds) {\n if (in_array($method, $methodIds, true)) {\n return $paymentMethod;\n }\n }\n Splash::log()->war(\"Unknown Payment Method: \".$method);\n\n return \"CreditCard\";\n }", "public function onPlaceOrder()\n {\n $gateway = Checkout::get($this->owner)->getSelectedPaymentMethod();\n if (OrderProcessor::config()->bank_deposit_send_confirmation && GatewayInfo::isManual($gateway) && $this->owner->Status == \"Unpaid\") {\n OrderProcessor::config()->send_confirmation = true;\n } else {\n OrderProcessor::config()->send_confirmation = false;\n }\n }", "public function __construct() {\n \n $this->id = 'vortex'; // payment gateway plugin ID\n $this->icon = 'https://raw.githubusercontent.com/JsTorres97/Media/master/Vortex%20Payment/VortexPaymentLogo.png'; // URL of the icon that will be displayed on checkout page near your gateway name\n $this->method_title = 'Vortex Payment Gateway';\n $this->method_description = 'Recibe pagos con tarjeta en tu sitio web con Vortex Payement'; // will be displayed on the options page\n \n // gateways can support subscriptions, refunds, saved payment methods,\n // but in this tutorial we begin with simple payments\n $this->supports = array(\n 'products'\n );\n \n // Method with all the options fields\n $this->init_form_fields();\n \n // Load the settings.\n $this->init_settings();\n $this->title = $this->get_option( 'title' );\n $this->description = $this->get_option( 'description' );\n $this->enabled = $this->get_option( 'enabled' );\n\t\t\t$this->BusinessID = $this->get_option('BID');\n\n // This action hook saves the settings\n add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );\n \n \n \n // You can also register a webhook here\n // add_action( 'woocommerce_api_{webhook name}', array( $this, 'webhook' ) );\n \n \t\t}", "public function setPaymentAmountType($value)\n {\n $this->_fields['PaymentAmountType']['FieldValue'] = $value;\n return $this;\n }", "public function getAfterPayParamsByOrder(Order $order = null, $mode = PaymentHelper::MODE_AFTERPAY)\n {\n\n// $payments = $paymentContract->getPaymentsByOrderId($order->îd);\n\n $AfterPayRequestParams['basket'] = [];\n $basket['currency'] = $order->amounts[0]->currency;\n $basket['basketAmount'] = $order->amounts[0]->invoiceTotal;\n $basket['couponDiscount'] = 0;\n $basket['shippingAmount'] = 0;\n\n /** declare the variable as array */\n $AfterPayRequestParams['basketItems'] = [];\n\n /** @var \\Plenty\\Modules\\Item\\Item\\Contracts\\ItemRepositoryContract $itemContract */\n $itemContract = pluginApp(\\Plenty\\Modules\\Item\\Item\\Contracts\\ItemRepositoryContract::class);\n\n $itemSum = 0.0;\n\n /** @var OrderItem $basketItem */\n foreach ($order->orderItems as $orderItem)\n {\n if ($orderItem->typeId == 4) //coupon\n {\n $basket['couponDiscount'] = $orderItem->amounts[0]->priceGross; //amount\n continue;\n }\n if ($orderItem->typeId == 6) //shipping costs\n {\n $basket['shippingAmount'] = $orderItem->amounts[0]->priceGross; //amount\n continue;\n }\n\n\n $AfterPayBasketItem['itemId'] = $orderItem->variation->itemId;\n $AfterPayBasketItem['quantity'] = $orderItem->quantity;\n $AfterPayBasketItem['price'] = $orderItem->amounts[0]->priceGross;\n\n $itemSum += $orderItem->quantity * $orderItem->amounts[0]->priceGross;\n\n /** @var \\Plenty\\Modules\\Item\\Item\\Models\\Item $item */\n $item = $itemContract->show($orderItem->variation->itemId);\n\n /** @var \\Plenty\\Modules\\Item\\Item\\Models\\ItemText $itemText */\n $itemText = $item->texts;\n\n $AfterPayBasketItem['name'] = $itemText->first()->name1;\n\n $AfterPayRequestParams['basketItems'][] = $AfterPayBasketItem;\n }\n\n $basket['itemSum'] = $itemSum;\n\n /** @var Basket $basket */\n $AfterPayRequestParams['basket'] = $basket;\n\n // Read the shipping address ID from the session\n $shippingAddress = $order->deliveryAddress;\n\n if (empty($shippingAddress))\n {\n $shippingAddress = $order->billingAddress;\n }\n\n if (!is_null($shippingAddress))\n {\n /** declarce the variable as array */\n $AfterPayRequestParams['shippingAddress'] = [];\n $AfterPayRequestParams['shippingAddress']['town'] = $shippingAddress->town;\n $AfterPayRequestParams['shippingAddress']['postalCode'] = $shippingAddress->postalCode;\n $AfterPayRequestParams['shippingAddress']['firstname'] = $shippingAddress->firstName;\n $AfterPayRequestParams['shippingAddress']['lastname'] = $shippingAddress->lastName;\n $AfterPayRequestParams['shippingAddress']['street'] = $shippingAddress->street;\n $AfterPayRequestParams['shippingAddress']['houseNumber'] = $shippingAddress->houseNumber;\n\n /** @var \\Plenty\\Modules\\Order\\Shipping\\Countries\\Contracts\\CountryRepositoryContract $countryRepo */\n $countryRepo = pluginApp(\\Plenty\\Modules\\Order\\Shipping\\Countries\\Contracts\\CountryRepositoryContract::class);\n\n // Fill the country for AfterPay parameters\n $country = [];\n $country['isoCode2'] = $countryRepo->findIsoCode($shippingAddress->countryId, 'iso_code_2');\n $AfterPayRequestParams['country'] = $country;\n\n // Get the URLs for AfterPay parameters\n $AfterPayRequestParams['urls'] = $this->paymentHelper->getRestOrderReturnUrls($order->id);\n\n return $AfterPayRequestParams;\n }\n// }\n // Get the URLs for AfterPay parameters\n $AfterPayRequestParams['urls'] = $this->paymentHelper->getRestOrderReturnUrls($order->id);\n\n return $AfterPayRequestParams;\n }", "public static function payment_methods() {\n return array(\n CheckfrontModule::PaymentPayNow => 'Pay now',\n CheckfrontModule::PaymentPayLater => 'Pay later'\n );\n }", "public function formAction($type = 'payment', $customer_id = null)\n {\n $shortDomainKey = substr(Hanzo::getInstance()->get('core.domain_key'), -2);\n $order = OrdersPeer::getCurrent(false);\n\n if (null === $customer_id) {\n if ($order->getCustomersId()) {\n $customer_id = $order->getCustomersId();\n } else {\n $id = CustomersPeer::getCurrent()->getId();\n if ($id) {\n $customer_id = $id;\n }\n }\n }\n\n $countries = CountriesPeer::getAvailableDomainCountries(true);\n $deliveryMethodId = $order->getDeliveryMethod();\n\n if ($type == 'CURRENT-SHIPPING-ADDRESS') {\n $type = 'shipping';\n $form = '<div class=\"block\"><form action=\"\" method=\"post\" class=\"address\"></form></div>';\n\n if ('json' === $this->getFormat()) {\n return $this->json_response([\n 'status' => true,\n 'message' => '',\n 'data' => ['html' => $form],\n ]);\n }\n\n return $this->response($form);\n } elseif ('payment' == $type) {\n $address = AddressesQuery::create()\n ->filterByCustomersId($customer_id)\n ->filterByType($type)\n ->findOne();\n }\n\n // to enable address locator or not.\n // 12 = Bring (DK)\n // 15 = PostNord (DK)\n // 71 = hmmm ...\n // 30 = Bring (SE)\n // 31 = PostNord (SE)\n // 500 = Bring (FI)\n // 700 = Bring (NO)\n $enableLocator = (($type !== 'payment') && in_array($deliveryMethodId, [12, 15, 71, 30, 31, 500, 700]));\n\n if (empty($address)) {\n $address = new Addresses();\n $address->setType($type);\n $address->setCustomersId($customer_id);\n\n if ($order->getFirstName()) {\n $address->setFirstName($order->getFirstName());\n $address->setLastName($order->getLastName());\n }\n } elseif ('overnightbox' === $type) {\n $address->setFirstName($order->getFirstName());\n $address->setLastName($order->getLastName());\n }\n\n $builder = $this->createFormBuilder($address, [\n 'validation_groups' => 'shipping_bundle_'.$type\n ]);\n\n if (in_array($type, ['company_shipping', 'overnightbox'])) {\n $label = 'company.name';\n if ($type === 'overnightbox') {\n $label = 'overnightbox.label';\n }\n\n $builder->add('company_name', null, [\n 'label' => $label,\n 'required' => true,\n 'translation_domain' => 'account'\n ]);\n }\n\n if (in_array($shortDomainKey, ['DE'])) {\n $builder->add('title', 'choice', [\n 'choices' => [\n 'female' => 'title.female',\n 'male' => 'title.male',\n ],\n 'label' => 'title',\n 'required' => true,\n 'trim' => true,\n 'translation_domain' => 'account',\n ]);\n }\n\n $builder->add('first_name', null, [\n 'required' => true,\n 'translation_domain' => 'account'\n ]);\n\n $builder->add('last_name', null, [\n 'required' => true,\n 'translation_domain' => 'account'\n ]);\n\n if ($type === 'payment') {\n $builder->add('phone', null, [\n 'required' => true,\n 'translation_domain' => 'account'\n ]);\n }\n\n $builder->add('address_line_1', null, [\n 'translation_domain' => 'account',\n 'max_length' => 35\n ]);\n\n $attr = [];\n if (in_array($shortDomainKey, ['AT', 'CH', 'DE', 'DK', 'FI', 'NL', 'NO', 'SE'])) {\n $attr = ['class' => 'auto-city'];\n }\n\n $builder->add('postal_code', null, [\n 'required' => true,\n 'translation_domain' => 'account',\n 'attr' => $attr,\n ]);\n\n $builder->add('city', null, [\n 'required' => true,\n 'translation_domain' => 'account',\n 'read_only' => (count($attr) ? true : false),\n 'attr' => ['class' => 'js-auto-city-'.$type]\n ]);\n\n if ('overnightbox' === $type || $enableLocator) {\n list($countryId, $countryName) = each($countries);\n\n $address->setCountriesId($countryId);\n $address->setCountry($countryName);\n\n $builder->add('countries_id', 'hidden', ['data' => $countryId]);\n $builder->add('external_address_id', 'hidden', ['data' => $address->getExternalAddressId()]);\n } else {\n if (count($countries) > 1) {\n $builder->add('countries_id', 'choice', [\n 'empty_value' => 'choose.country',\n 'choices' => $countries,\n 'required' => true,\n 'translation_domain' => 'account'\n ]);\n } else {\n list($countryId, $countryName) = each($countries);\n\n $address->setCountriesId($countryId);\n $address->setCountry($countryName);\n\n $builder->add('countries_id', 'hidden', ['data' => $countryId]);\n $builder->add('country', null, [\n 'read_only' => true,\n 'translation_domain' => 'account'\n ]);\n }\n }\n\n // if the locator is enables, set all elements to read-only to prevent customers from editing the found address.\n if ($enableLocator) {\n foreach ($builder->all() as $element) {\n $element->setDisabled(true);\n }\n }\n\n $builder->add('customers_id', 'hidden', ['data' => $customer_id]);\n\n $form = $builder->getForm();\n\n $baseType = 'is-shipping';\n if ('payment' === $type) {\n $baseType = 'is-payment';\n }\n\n $response = $this->render('ShippingBundle:Address:form.html.twig', [\n 'type' => $type,\n 'base_type' => $baseType,\n 'enable_locator' => $enableLocator,\n 'method_id' => $deliveryMethodId,\n 'form' => $form->createView(),\n ]);\n\n\n if ('json' === $this->getFormat()) {\n $html = $response->getContent();\n\n return $this->json_response([\n 'status' => true,\n 'message' => '',\n 'data' => ['html' => $html],\n ]);\n }\n\n return $response;\n }", "public function getOrderType()\n {\n return $this->firstNodeAttribute(\"IDOC/E1EDK01/ZE1EDK01\",'ZAUART', null);\n }", "public function getConfig()\n {\n if (!$this->stripeEnabledValidator->validate()) {\n return [];\n }\n\n return [\n 'payment' => [\n static::CODE => [\n 'isActive' => $this->config->isActive(),\n 'isApplePayEnabled' => $this->config->isApplePayEnabled(),\n 'publicKey' => $this->config->getPublicKey(),\n 'sdkUrl' => $this->config->getSdkUrl(),\n 'threedSecureAlways' => $this->config->getThreedSecureAlways(),\n 'imageUrl' => $this->config->getImageUrl(),\n 'savedCards' => $this->stripeAccountManagement->getAllCards(),\n 'enableSaveCards' => $this->config->isEnableSaveCards(),\n 'zeroDecimal' => AmountHelper::CURRENCY_ZERO_DECIMAL\n ],\n ]\n ];\n }", "public function setOrderType($orderType)\n {\n $this->orderType = $orderType;\n return $this;\n }", "function templatic_get_currency_type()\r\n{\r\n\tglobal $wpdb;\r\n\t$option_value = get_option('currency_code');\r\n\tif($option_value)\r\n\t{\r\n\t\treturn stripslashes($option_value);\r\n\t}else\r\n\t{\r\n\t\treturn 'USD';\r\n\t}\r\n\t\r\n}", "public function getConfig()\n {\n return [\n 'payment' => [\n self::CODE => [\n // get setting values using events.xml section/group/field ids for path\n 'apiKey' => $this->helper->getConfig('payment/payio/integration/api_key'),\n 'apiTransactionPath' => $this->helper->getApiTransactionPath(),\n 'apiSettingsPath' => $this->helper->getApiSettingPath(),\n 'gatewayPath' => $this->helper->getGatewayPath(),\n 'checkoutUrl' => $this->helper->getCheckoutUrl(),\n 'paymentSuccessUrl' => $this->helper->getPaymentSuccessUrl(),\n 'currency' => $this->helper->getCurrentCurrencyCode(),\n 'cartTax' => $this->helper->getUKTaxRate(),\n 'shippingMethods' => $this->helper->getActiveShippingMethods()\n ]\n ]\n ];\n }", "private function payOrder($order){\r\n $this->log('Paying order #'.$order->get_order_number());\r\n $this->addOrderNote($order, 'Pagado con flow');\r\n $order->payment_complete();\r\n }", "public function generate_atos_form( $order_id ) {\n\t\t\tglobal $woocommerce;\n\t\t\t\n\t\t\t$order = &new woocommerce_order( $order_id );\n\t\t\t$atos_adr = $this->liveurl;\n\t\t\t$shipping_name = explode(' ', $order->shipping_method);\t\n\t\t\t\n\t\t\t/******** ATOS PARAMS *************/\n\t\t\t//general\n\t\t\t$parm=\"merchant_id=\" . $this->merchant_id;\n\t\t\t$parm=\"$parm merchant_country=fr\";\n\t\t\t$parm=\"$parm amount=\" . $order->order_total*100;\n\t\t\t$parm=\"$parm currency_code=\" . $this->currency_code;\n\t\t\t//pathfile\n\t\t\t$parm=\"$parm pathfile=\" . $this->pathfile;\n\t\t\t//\t\t$parm=\"$parm transaction_id=123456\";\n\t\t\t$parm=\"$parm normal_return_url=\" . $this->get_return_url( $order );\n\t\t\t$parm=\"$parm cancel_return_url=\" . $order->get_cancel_order_url();\n\t\t\t$parm=\"$parm automatic_response_url=\" . $this->get_return_url( $order );\n\t\t\t//\t\t$parm=\"$parm language=fr\";\n\t\t\t//\t\t$parm=\"$parm payment_means=CB,2,VISA,2,MASTERCARD,2\";\n\t\t\t//\t\t$parm=\"$parm header_flag=no\";\n\t\t\t//\t\t$parm=\"$parm capture_day=\";\n\t\t\t//\t\t$parm=\"$parm capture_mode=\";\n\t\t\t//\t\t$parm=\"$parm bgcolor=\";\n\t\t\t//\t\t$parm=\"$parm block_align=\";\n\t\t\t//\t\t$parm=\"$parm block_order=\";\n\t\t\t//\t\t$parm=\"$parm textcolor=\";\n\t\t\t//\t\t$parm=\"$parm receipt_complement=\";\n\t\t\t//\t\t$parm=\"$parm caddie=mon_caddie\";\n\t\t\t//\t\t$parm=\"$parm customer_id=\";\n\t\t\t//\t\t$parm=\"$parm customer_email=\";\n\t\t\t//\t\t$parm=\"$parm customer_ip_address=\"\n\t\t\tif($order->order_total < 150) {\n\t\t\t\t$parm=\"$parm data=NO_RESPONSE_PAGE;3D_BYPASS;\";\n\n\t\t\t} else {\n\t\t\t\t$parm=\"$parm data=NO_RESPONSE_PAGE\";\n\t\t\t}\n\t\t\t//\t\t$parm=\"$parm return_context=\";\n\t\t\t//\t\t$parm=\"$parm target=\";\n\t\t\t$parm=\"$parm order_id=\" . $order_id;\n\t\t\t// $parm=\"$parm no_responce_page=true\";\n\t\t\t// \t\t$parm=\"$parm normal_return_logo=\";\n\t\t\t// \t\t$parm=\"$parm cancel_return_logo=\";\n\t\t\t// \t\t$parm=\"$parm submit_logo=\";\n\t\t\t$parm=\"$parm logo_id=allo.png\";\n\t\t\t// $parm=\"$parm logo_id=http://www.allotelecommande.com/wp-content/uploads/2012/05/allotelecommande2.com_.png\";\n\t\t\t// \t\t$parm=\"$parm logo_id2=\";\n\t\t\t// \t\t$parm=\"$parm advert=\";\n\t\t\t// \t\t$parm=\"$parm background_id=\";\n\t\t\t// \t\t$parm=\"$parm templatefile=\";\n\t\t\t$path_bin = $this->request_file;\n\t\t\n\t\t\t//\tCall request binary\n\t\t\t$parm = escapeshellcmd($parm);\t\n\t\t\t$result=exec(\"$path_bin $parm\");\n\t\t\t\n\t\t\terror_log(print_r($parm, true), 3, \"/var/tmp/tmp-orders.log\");\n\t\n\t\t\t$tableau = explode (\"!\", \"$result\");\n\t\t\n\t\t\t//Get parameters result\n\t\t\t$code = $tableau[1];\n\t\t\t$error = $tableau[2];\n\t\t\t$message = $tableau[3];\n\t\t\t//Analyze returned code\n\t\t\tif (( $code == \"\" ) && ( $error == \"\" ) )\n\t\t\t{\n\t\t\t\tprint (\"<BR><CENTER>erreur appel request</CENTER><BR>\");\n\t\t\t\tprint (\"executable request non trouve $path_bin\");\n\t\t\t}\n\t\t\t//\tError\n\t\t\telse if ($code != 0){\n\t\t\t\tprint (\"<center><b><h2>Erreur appel API de paiement.</h2></center></b>\");\n\t\t\t\tprint (\"<br><br><br>\");\n\t\t\t\tprint (\" message erreur : $error <br>\");\n\t\t\t}\n\t\t\n\t\t\t//OK, display html form\n\t\t\telse {\n\t\t\t\tprint (\"<br><br>\");\n\t\t\t\t# OK, display debug if activated\n\t\t\t\tprint (\" $error <br>\");\n\t\t\t\tprint (\" $message <br>\");\n\t\t\t}\n\t\t\t\n\t\t}", "function lb_subscription_set_payment_type($account, $subscription, $payment_type) {\n // The $account that rules passes contains the original information, which may have\n // changed as a result of an action that has run.\n $entity = entity_load_single('user', $account->uid);\n $account_subscription_data = lb_subscription_retrieve_account_subscription_data($entity, $subscription);\n if ($account_subscription_data['delta'] === NULL) {\n lb_subscription_set_subscription($entity, $subscription);\n $entity = entity_load_single('user', $account->uid);\n $account_subscription_data = lb_subscription_retrieve_account_subscription_data($entity, $subscription);\n }\n if ($account_subscription_data['delta'] !== NULL) {\n if ($account_subscription_data['payment_type'] != $payment_type) {\n $entity->field_subscription[LANGUAGE_NONE][$account_subscription_data['delta']]['field_payment_type'] = array(\n LANGUAGE_NONE => array(\n 0 => array(\n 'value' => $payment_type,\n ),\n ),\n );\n entity_save('user', $entity);\n }\n }\n}", "public function getPriceType()\n {\n return (int) $this->getConfig('extrafee/general/pricetype');\n }", "protected function _get_configuration(){\n\n return new Payment_Configuration();\n\n }", "public function getPaymentTypeAllowableValues()\n {\n return [\n self::PAYMENT_TYPE_CARD,\n self::PAYMENT_TYPE_MPO,\n self::PAYMENT_TYPE_MOBILEPAY,\n self::PAYMENT_TYPE_VIPPS,\n self::PAYMENT_TYPE_VIPPS_RECURRING,\n self::PAYMENT_TYPE_SWISH,\n self::PAYMENT_TYPE_VIABILL,\n self::PAYMENT_TYPE_ANYDAY,\n self::PAYMENT_TYPE_MANUAL,\n self::PAYMENT_TYPE_APPLEPAY,\n self::PAYMENT_TYPE_GOOGLEPAY,\n self::PAYMENT_TYPE_PAYPAL,\n self::PAYMENT_TYPE_KLARNA_PAY_NOW,\n self::PAYMENT_TYPE_KLARNA_PAY_LATER,\n self::PAYMENT_TYPE_KLARNA_SLICE_IT,\n self::PAYMENT_TYPE_KLARNA_DIRECT_BANK_TRANSFER,\n self::PAYMENT_TYPE_KLARNA_DIRECT_DEBIT,\n self::PAYMENT_TYPE_RESURS,\n self::PAYMENT_TYPE_MOBILEPAY_SUBSCRIPTIONS,\n self::PAYMENT_TYPE_EMV_TOKEN,\n self::PAYMENT_TYPE_BCMC,\n self::PAYMENT_TYPE_BLIK,\n self::PAYMENT_TYPE_PP_BLIK_OC,\n self::PAYMENT_TYPE_GIROPAY,\n self::PAYMENT_TYPE_IDEAL,\n self::PAYMENT_TYPE_P24,\n self::PAYMENT_TYPE_SEPA,\n self::PAYMENT_TYPE_VERKKOPANKKI,\n ];\n }", "public function admin_options()\n {\n ?>\n <h3><?php _e('PAYSTO', 'woocommerce'); ?></h3>\n <p><?php _e('Settings payment recieve from PAYSTO system.', 'woocommerce'); ?></p>\n\n <?php if ($this->is_valid_for_use()): ?>\n\n <table class=\"form-table\">\n\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n\n <?php else: ?>\n <div class=\"inline error\"><p>\n <strong><?php _e('Gate swich off', 'woocommerce'); ?></strong>:\n <?php _e('PAYSTO not support currency used in your store.', 'woocommerce'); ?>\n </p></div>\n <?php\n endif;\n\n }", "private function get_payment_method($payment_type) {\r\n\t\t$info_pieces = explode('_', $payment_type);\r\n\t\t\r\n\t\treturn $info_pieces[0];\r\n\t}", "protected function _getPaymentType($oOrder)\n {\n if (!($oUserPayment = $oOrder->getPaymentType()) && $oOrder->oxorder__oxpaymenttype->value) {\n $oPayment = oxNew(\"oxPayment\");\n if ($oPayment->load($oOrder->oxorder__oxpaymenttype->value)) {\n // in case due to security reasons payment info was not kept in db\n $oUserPayment = oxNew(\"oxUserPayment\");\n $oUserPayment->oxpayments__oxdesc = new oxField($oPayment->oxpayments__oxdesc->value);\n }\n }\n\n return $oUserPayment;\n }", "public function getOrderType()\n {\n return $this->hasOne(OrderType::className(), ['id' => 'order_type_id']);\n }", "public function getPaymentGateway()\n {\n return Mage::getStoreConfig(\"fontis_masterpass/settings/payment_gateway\");\n }", "public function index()\n {\n // Compatibility for 1.4.7\n if (empty($this->session->data['token'])) {\n $this->session->data['token'] = '';\n }\n\n // Load language file and settings model\n $this->load->language('payment/pmt');\n $this->load->model('setting/setting');\n\n // Set page title\n $this->document->setTitle($this->language->get('heading_title'));\n\n // Process settings if form submitted\n if (($this->request->server['REQUEST_METHOD'] == 'POST') && ($this->validate())) {\n $this->load->model('setting/setting');\n $this->model_setting_setting->editSetting('pmt', $this->request->post);\n $this->session->data['success'] = $this->language->get('text_success');\n //v1.5\n $this->redirect(HTTPS_SERVER . 'index.php?route=extension/payment&token=' . $this->session->data['token']);\n //v2.0\n //$this->response->redirect($this->url->link('extension/payment', 'token='.$this->session->data['token'], 'SSL'));\n }\n\n // Load language texts\n $this->data['heading_title'] = $this->language->get('heading_title');\n $this->data['text_enabled'] = $this->language->get('text_enabled');\n $this->data['text_disabled'] = $this->language->get('text_disabled');\n $this->data['text_all_zones'] = $this->language->get('text_all_zones');\n $this->data['text_yes'] = $this->language->get('text_yes');\n $this->data['text_no'] = $this->language->get('text_no');\n $this->data['text_edit'] = $this->language->get('text_edit');\n $this->data['test_customer_code'] = $this->language->get('test_customer_code');\n $this->data['test_customer_key'] = $this->language->get('test_customer_key');\n $this->data['real_customer_code'] = $this->language->get('real_customer_code');\n $this->data['real_customer_key'] = $this->language->get('real_customer_key');\n $this->data['entry_test'] = $this->language->get('entry_test');\n $this->data['entry_discount'] = $this->language->get('entry_discount');\n $this->data['entry_status'] = $this->language->get('entry_status');\n $this->data['entry_geo_zone'] = $this->language->get('entry_geo_zone');\n $this->data['entry_sort_order'] = $this->language->get('entry_sort_order');\n $this->data['entry_order_status'] = $this->language->get('entry_order_status');\n $this->data['tip'] = $this->language->get('tip');\n $this->data['button_save'] = $this->language->get('button_save');\n $this->data['button_cancel'] = $this->language->get('button_cancel');\n $this->data['tab_general'] = $this->language->get('tab_general');\n\n // Set errors if fields not correct\n if (isset($this->error['warning'])) {\n $this->data['error_warning'] = $this->error['warning'];\n } else {\n $this->data['error_warning'] = '';\n }\n\n if (isset($this->error['test_customer_code'])) {\n $this->data['error_test_customer_code'] = $this->error['test_customer_code'];\n } else {\n $this->data['error_test_customer_code'] = '';\n }\n\n if (isset($this->error['test_customer_key'])) {\n $this->data['error_test_customer_key'] = $this->error['test_customer_key'];\n } else {\n $this->data['error_test_customer_key'] = '';\n }\n\n if (isset($this->error['real_customer_code'])) {\n $this->data['error_real_customer_code'] = $this->error['real_customer_code'];\n } else {\n $this->data['error_real_customer_code'] = '';\n }\n\n if (isset($this->error['real_customer_key'])) {\n $this->data['error_real_customer_key'] = $this->error['real_customer_key'];\n } else {\n $this->data['error_real_customer_key'] = '';\n }\n\n // Set breadcrumbs\n $this->data['breadcrumbs'] = array();\n\n $this->data['breadcrumbs'][] = array(\n 'href' => HTTPS_SERVER.'index.php?route=common/home&token='.$this->session->data['token'],\n 'text' => $this->language->get('text_home'),\n 'separator' => false,\n );\n\n $this->data['breadcrumbs'][] = array(\n 'href' => HTTPS_SERVER.'index.php?route=extension/payment&token='.$this->session->data['token'],\n 'text' => $this->language->get('text_payment'),\n 'separator' => ' :: ',\n );\n\n $this->data['breadcrumbs'][] = array(\n 'href' => HTTPS_SERVER.'index.php?route=payment/pmt&token='.$this->session->data['token'],\n 'text' => $this->language->get('heading_title'),\n 'separator' => ' :: ',\n );\n\n // Set save/cancel button urls\n $this->data['action'] = HTTPS_SERVER.'index.php?route=payment/pmt&token='.$this->session->data['token'];\n\n $this->data['cancel'] = HTTPS_SERVER.'index.php?route=extension/payment&token='.$this->session->data['token'];\n\n // Load values for fields\n if (isset($this->request->post['pmt_test_customer_code'])) {\n $this->data['pmt_test_customer_code'] = $this->request->post['pmt_test_customer_code'];\n } else {\n $this->data['pmt_test_customer_code'] = $this->config->get('pmt_test_customer_code');\n }\n if (isset($this->request->post['pmt_test_customer_key'])) {\n $this->data['pmt_test_customer_key'] = $this->request->post['pmt_test_customer_key'];\n } else {\n $this->data['pmt_test_customer_key'] = $this->config->get('pmt_test_customer_key');\n }\n if (isset($this->request->post['pmt_real_customer_code'])) {\n $this->data['pmt_real_customer_code'] = $this->request->post['pmt_real_customer_code'];\n } else {\n $this->data['pmt_real_customer_code'] = $this->config->get('pmt_real_customer_code');\n }\n if (isset($this->request->post['pmt_real_customer_key'])) {\n $this->data['pmt_real_customer_key'] = $this->request->post['pmt_real_customer_key'];\n } else {\n $this->data['pmt_real_customer_key'] = $this->config->get('pmt_real_customer_key');\n }\n if (isset($this->request->post['pmt_test'])) {\n $this->data['pmt_test'] = $this->request->post['pmt_test'];\n } else {\n $this->data['pmt_test'] = $this->config->get('pmt_test');\n }\n if (isset($this->request->post['pmt_discount'])) {\n $this->data['pmt_discount'] = $this->request->post['pmt_discount'];\n } else {\n $this->data['pmt_discount'] = $this->config->get('pmt_discount');\n }\n if (isset($this->request->post['pmt_status'])) {\n $this->data['pmt_status'] = $this->request->post['pmt_status'];\n } else {\n $this->data['pmt_status'] = $this->config->get('pmt_status');\n }\n if (isset($this->request->post['pmt_sort_order'])) {\n $this->data['pmt_sort_order'] = $this->request->post['pmt_sort_order'];\n } else {\n $this->data['pmt_sort_order'] = $this->config->get('pmt_sort_order');\n }\n\n // Render template\n //v1.5.x version\n $this->template = 'payment/pmt.tpl';\n $this->children = array(\n 'common/header',\n 'common/footer'\n );\n\n $this->response->setOutput($this->render());\n //v2.0 version\n //v2.0\n //$this->data['header'] = $this->load->controller('common/header');\n //$this->data['column_left'] = $this->load->controller('common/column_left');\n //$this->data['footer'] = $this->load->controller('common/footer');\n //$this->response->setOutput($this->load->view('payment/pmt.tpl', $this->data));\n }", "function getCustomerpayment($customer='',$type='',$in_type='',$in_status='')\n\t{\n\t \n\t\t$add_sql='';\n\t\t\t$conditional_sql =\"\";\n\t\t\t\n\t\t\t$current_partner = $this->session->userdata['partner'];\n\t\t\t\n\t\t\t$conditional_sql .=\" AND a_order.partner = '\".$current_partner.\"'\";\n\t\t\t\n\t\t\t$orderby = 'ORDER BY a_orderline.modtime ASC';\n\t\t\t\n\t\t\tif($customer!='')\n\t\t\t\t$conditional_sql .= \" AND a_order.customer='\".$customer.\"'\";\n\t\n\t\t //in or out\n\t\t\t//if($type!='') \n\t\t\t\t//$conditional_sql .= \" AND a.type='\".$type.\"'\";\n\n\t\t\t//('visa','invoice','account','cash'\t\n\t\t\tif($in_type!='')\n\t\t\t\t$conditional_sql .= \" AND a_orderline.payment_type='\".$in_type.\"'\";\n\t\t\t\t\n\t\t\t//'pending','paid','canceled','waiting'\n\t\t\tif($in_status!='')\n\t\t\t\t$conditional_sql .= \" AND a_orderline.payment_status='\".$in_status.\"'\";\n\t\t\t\n\t\t\t\n\t\t\tif ($this->input->post('from')) {\n\t\t\t\t$from = $this->db->escape(date('Y-m-d',strtotime($this->input->post('from'))));\n\t\t\t\t$conditional_sql .= \" AND DATE(a_orderline.modtime) >= $from\";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif ($this->input->post('to')) {\n\t\t\t\t\n\t\t\t\t$to = $this->db->escape(date('Y-m-d',strtotime($this->input->post('to'))));\n\t\t\t\t$conditional_sql .= \" AND DATE(a_orderline.modtime) <= $to\";\n\t\t\t}\n\t\t\t\n\t\t\tif($this->input->post('from') == '' && $this->input->post('to') == '')\n\t\t\t{\n\t\t\t\t$conditional_sql .= \" AND DATE(`a_orderline`.`modtime`)='\".date('Y-m-d').\"'\";\n\t\t\t}\n\t\t\n\t\t\t/*if($date!='')\n\t\t\t{\n\t\t\t\t$conditional_sql .= \" AND DATE(`a_orderline`.`modtime`)='\".date('Y-m-d',strtotime($date)).\"'\";\n\t\t\t}*/\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t$qry=\"SELECT a_order.customer,a_order.partner,\n\t\tCASE \n\t\t\t\t WHEN a_orderline.changed_amount IS NULL THEN a_orderline.amount \n\t\t\t\t ELSE a_orderline.changed_amount\n\t\t\t\t END AS amount,a_order.id as `order`,a_orderline.id as orderline,\n\t\t\t\t a_orderline.modtime,a_orderline.modtime as regtime,\n\t\t\t\t a_orderline.payment_type as in_type,a_orderline.payment_status as in_status,\n\t\t\t\tDATE_FORMAT(a_orderline.modtime,'%d.%m.%Y') as rdate,TIME_FORMAT(a_orderline.modtime, '%H:%i') as rtime,TIME_FORMAT(a_orderline.modtime, '%H:%i:%s') as rtimews,DATE_FORMAT(a_orderline.modtime,'%d/%m/%y') as rdatewy,\n\t\t\t\t CASE \n\t\t\t\t WHEN a_product_p_branch_category.display_name IS NULL THEN a_product.name \n\t\t\t\t ELSE a_product_p_branch_category.display_name\n\t\t\t\t END AS name\n\t\t\t\t FROM a_orderline\n\t\t\t\t LEFT JOIN a_order ON a_order.id = a_orderline.order\n\t\t\t\t LEFT JOIN a_product ON a_product.id = a_orderline.product\n\t\t\t\t LEFT JOIN a_product_p_branch_category ON a_product.id = a_product_p_branch_category.product_p_branch\n\t\t\n\t\t\t\t $add_sql\n\t\t\t\t WHERE 1=1 AND a_orderline.payment_type != '' AND (a_orderline.payment_status = 'paid' OR a_orderline.payment_status = 'waiting') AND\n\t\t\t\t a_orderline.id NOT IN(SELECT id FROM a_orderline WHERE id IN(SELECT orderline FROM a_customer_account_log)) \n\t\t\t\t AND \n\t\t\t\t a_orderline.`order` NOT IN(SELECT `order` FROM a_orderline WHERE `order` IN(SELECT `order` FROM a_customer_account_log))\n\t\t\t\t $conditional_sql GROUP BY a_orderline.id $orderby\";\n\t\t\t\n\n\t\t\t\n\t\t\t$query=$this->db->query($qry);\t\n\t\t\t$result=$query->result_array();\n\t\t\treturn $result;\n\t\t\n\t }", "public function transaction($type = '') {\n if ($this->checkLogin('C') == '') {\n redirect(COMPANY_NAME);\n } else {\n $invoice_id = $this->input->post('invoice_id');\n $transaction_id = $this->input->post('transaction_id');\n $paid_date = $this->input->post('paid_date');\n $paid_details = $this->input->post('paid_details');\n $billingArr = $this->revenue_model->get_all_details(BILLINGS, array('invoice_id' => floatval($invoice_id)));\n if ($billingArr->num_rows() > 0) {\n $driver_id = $billingArr->row()->driver_id;\n $txn_type = '';\n $billArr = array();\n if ($type == 'received') {\n $amount = $billingArr->row()->driver_pay_amount;\n $txn_type = 'CREDIT';\n $billArr = array('driver_paid' => 'Yes');\n } else if ($type == 'paid') {\n $amount = $billingArr->row()->site_pay_amount;\n $txn_type = 'DEBIT';\n $billArr = array('site_paid' => 'Yes');\n }\n $txn_date = strtotime($paid_date);\n\n if ($txn_type != '') {\n $txn_arr = array('invoice_id' => (string) $invoice_id,\n 'driver_id' => (string) $driver_id,\n 'txn_type' => (string) $txn_type,\n 'txn_id' => (string) $transaction_id,\n 'txn_date' => MongoDATE($txn_date),\n 'txn_details' => (string) $paid_details,\n );\n $this->revenue_model->simple_insert(PAYMENT_TRANSACTION, $txn_arr);\n if (!empty($billArr)) {\n $this->revenue_model->update_details(BILLINGS, $billArr, array('_id' => MongoID((string) $billingArr->row()->_id)));\n }\n $this->setErrorMessage('success', 'transaction updated successfully','admin_revenue_transaction_update');\n }else{\n\t\t\t\t\t$this->setErrorMessage('error', 'transaction updation failed','admin_revenue_transaction_update_failed');\n\t\t\t\t}\n } else {\n $this->setErrorMessage('error', 'transaction updation failed','admin_revenue_transaction_update_failed');\n }\n echo \"<script>window.history.go(-1);</script>\";\n exit;\n }\n }", "public function getPaymentMethod()\n {\n return $this->response['result']['payment_type'];\n }", "public function generate_netgiro_form($order_id){\r\n\r\n global $woocommerce;\r\n $order = new WC_Order( $order_id );\r\n $txnid = $order_id.'_'.date(\"ymds\");\r\n $round_numbers = $this->round_numbers;\r\n //$redirect_url = ($this -> redirect_page_id==\"\" || $this -> redirect_page_id==0)?get_site_url() . \"/\":get_permalink($this -> redirect_page_id);\r\n $cancel_url = ($this -> cancel_page_id==\"\" || $this -> cancel_page_id==0)?get_site_url() . \"/\":get_permalink($this -> cancel_page_id);\r\n $payment_Confirmed_url = add_query_arg( 'wc-api', 'WC_netgiro', home_url( '/' ) ); \r\n\t $order_dump = '';\r\n\r\n $total = round(number_format($order->get_total(), 0, '', ''));\r\n\r\n if ($round_numbers) {\r\n \t$total = round($total);\r\n }\r\n\r\n $str = $this->secretkey . $order_id . $total . $this->application_id;\r\n $Signature = hash('sha256', $str);\r\n\r\n // Netgiro arguments\r\n $netgiro_args = array(\r\n 'ApplicationID'=>$this->application_id,\r\n 'Iframe'=>'false',\r\n 'PaymentSuccessfulURL'=> $payment_Confirmed_url,\r\n 'PaymentCancelledURL'=>$cancel_url,\r\n //'PaymentConfirmedURL'=>$payment_Confirmed_url,\r\n 'ConfirmationType'=>'0', \r\n 'ReferenceNumber' => $order_id,\r\n 'TotalAmount'=>$total,\r\n 'Signature' => $Signature,\r\n 'PrefixUrlParameters' => 'true',\r\n 'ClientInfo' => 'System: Woocommerce 3.3.3'\r\n );\r\n\r\n if($order->get_shipping_total()>0) {\r\n $netgiro_args['ShippingAmount'] = ceil($order->get_shipping_total());\r\n }\r\n\r\n if($order->get_total_discount()>0) {\r\n $netgiro_args['DiscountAmount'] = ceil($order->get_total_discount());\r\n }\r\n\r\n $netgiro_args_array = array();\r\n foreach($netgiro_args as $key => $value){\r\n $netgiro_args_array[] = \"<input type='hidden' name='$key' value='$value'/>\";\r\n }\r\n\r\n // Woocommerce -> Netgiro Items\r\n foreach ($order->get_items() as $item) {\r\n\t\t$unitPrice = $order->get_item_subtotal($item, true, $round_numbers == 'yes');\r\n\t\t$amount = $order->get_line_subtotal($item, true, $round_numbers == 'yes');\r\n\t\t\r\n\t\tif ($round_numbers == 'yes') {\r\n\t\t\t$unitPrice = round($unitPrice);\r\n \t $amount = round($amount);\t\t\t\r\n }\r\n\t\t\r\n $items[] = array(\r\n 'ProductNo'=>$item['product_id'],\r\n 'Name'=> $item['name'],\r\n 'UnitPrice'=> $unitPrice,\r\n 'Amount'=> $amount,\r\n 'Quantity'=> $item['qty'] * 1000\r\n );\r\n }\r\n\r\n // Create Items\r\n for ($i=0; $i <= count($items)-1; $i++) { \r\n foreach($items[$i] as $key => $value){\r\n $netgiro_items_array[] = \"<input type='hidden' name='Items[$i].$key' value='$value'/>\";\r\n } \r\n }\r\n\r\n return '\r\n <style>\r\n #netgiro_methods { padding: 0px; margin: 0xp; }\r\n #netgiro_methods li { margin: 0px; margin-bottom: -1px; background: #f3f3f3; border: solid 1px #ccc; padding: 15px; color: #676968; list-style:none; }\r\n #netgiro_methods li .logo { float: right; width: 250px; }\r\n #netgiro_methods li .logo img { border: none; box-shadow: none;}\r\n #netgiro_methods strong { font-size: 1.7em; font-weight: bold; }\r\n #netgiro_methods p { margin: 0px; }\r\n </style>\r\n\r\n <form action=\"'.$this -> gateway_url.'\" method=\"post\" id=\"netgiro_payment_form\">\r\n ' . implode('', $netgiro_args_array) . '\r\n ' . implode('', $netgiro_items_array) . '\r\n ' . $order_dump . '\r\n\r\n <p align=\"right\">\r\n <input type=\"submit\" class=\"button alt\" id=\"submit_netgiro_payment_form\" value=\"'.__('Greiða með Netgíró', 'netgiro').'\" /> \r\n <a class=\"button cancel\" href=\"'.$order->get_cancel_order_url().'\">'.__('Hætta við greiðslu', 'netgiro').'</a>\r\n </p>\r\n\r\n <script>\r\n jQuery(function() {\r\n jQuery(\\'.method_reikningur\\').click(function() {\r\n jQuery(this).find(\\'input\\').prop(\\'checked\\', true);\r\n });\r\n });\r\n </script>\r\n\r\n </form>\r\n ';\r\n\r\n }", "private function getBillingType()\n {\n if (!empty($this->getCustomer()->mode_reglement_id)) {\n return $this->getCustomer()->mode_reglement_id;\n }\n\n if (!empty($this->conf->BBC_DEFAULT_PAYMENT_TYPE_ID)) {\n return $this->conf->BBC_DEFAULT_PAYMENT_TYPE_ID;\n }\n\n throw new \\InvalidArgumentException('Billing type / MAIN_DEFAULT_PAYMENT_TYPE_ID not set');\n }", "public function __construct() {\n\n // WPML + Multi Currency related settings\n $this->current_currency = get_option('woocommerce_currency');\n // $this->multi_currency_enabled = in_array( 'woocommerce-multilingual/wpml-woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) && get_option( 'icl_enable_multi_currency' ) == 'yes';\n $this->supported_currencies = array( 'RMB', 'CNY' );\n\n $this->charset = strtolower( get_bloginfo( 'charset' ) );\n if( !in_array( $this->charset, array( 'gbk', 'utf-8') ) ) {\n $this->charset = 'utf-8';\n }\n\n // WooCommerce required settings\n $this->id = 'bocpay';\n $this->icon = apply_filters( 'woocommerce_bocpay_icon', plugins_url( 'images/boc-logo.png', __FILE__ ) );\n $this->has_fields = false;\n $this->method_title = '交通银行支付';\n $this->order_button_text = '使用交通银行支付';\n $this->notify_url = WC()->api_request_url( 'WC_Bocpay' );\n\n // Load the settings.\n $this->init_form_fields();\n $this->init_settings();\n\n $this->merchantID = $this->get_option( 'merchantID' );\n $this->title = $this->get_option( 'title' );\n $this->description = $this->get_option( 'description' );\n $this->debug = $this->get_option( 'debug' );\n\n // Logs\n $this->debug = 'yes';\n if ( 'yes' == $this->debug ) {\n $this->log = new WC_Logger();\n }\n\n // Actions\n add_action( 'woocommerce_update_options_payment_gateways', array( $this, 'process_admin_options' ) ); // WC <= 1.6.6\n add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) ); // WC >= 2.0\n add_action( 'woocommerce_thankyou_bocpay', array( $this, 'thankyou_page' ) );\n add_action( 'woocommerce_receipt_bocpay', array( $this, 'receipt_page' ) );\n\n // Payment listener/API hook\n add_action( 'woocommerce_api_wc_bocpay', array( $this, 'check_bocpay_response' ) );\n\n // Display Bocpay Trade No. in the backend.\n add_action( 'woocommerce_admin_order_data_after_billing_address',array( $this, 'wc_bocpay_display_order_meta_for_admin' ) );\n }", "public function pay($order)\n {\n $order=Order::findOrFail($order);\n $totalValue=$order->order_price+$order->delivery_price;\n\n //GET THE KEY\n //System setup \n $access_token=config('mercadopago.access_token',\"\");\n\n //Setup based on vendor\n if(config('mercadopago.useVendor')){\n $access_token=$order->restorant->getConfig('mercadopago_access_token','');\n }\n\n // Agrega credenciales\n SDK::setAccessToken($access_token);\n\n \n \n // Crea un objeto de preferencia\n $preference = new Preference();\n\n // Crea un ítem en la preferencia\n $item = new Item();\n $item->title = 'Pedido #'.$order->id;\n $item->quantity = 1;\n $item->unit_price = $totalValue;\n $preference->items = array($item);\n $preference->external_reference=$order->id;\n\n $preference->back_urls = array(\n \"success\" => route('mercadopago.execute','success'),\n \"failure\" => route('mercadopago.execute','failure'),\n \"pending\" => route('mercadopago.execute','pending')\n );\n $preference->auto_return = \"approved\";\n\n\n $preference->save();\n\n //OR\n return redirect($preference->init_point);\n\n //OR\n // return view('mercadopago::pay',['preference_id'=>$preference->id,'order'=>$order]);\n }", "function payment_fields() {\n?>\n\t\t<?php if ($this->tran_mode=='sandbox') : ?><p><?php _e('TEST MODE/SANDBOX ENABLED', WC_Authorize_SIM::TEXT_DOMAIN); ?></p><?php endif; ?>\n\t\t<?php if ($this->description) : ?><p><?php echo wpautop(wptexturize($this->description)); ?></p><?php endif; ?>\n<?php\n\n\t}", "public function paymentType(?string $value): self\n {\n $this->instance->setPaymentType($value);\n return $this;\n }", "public function set_type($type) {\n $this->update([\n 'type' => $type\n ]);\n\n $this->type = $type;\n\n // finish configuring this OrderExchange\n $this->sync();\n }", "function init_process_payment() {\r\n global $woocommerce;\r\n\r\n\t if((isset($_GET['ng_netgiroSignature']) && $_GET['ng_netgiroSignature'])\r\n\t\t && $_GET['ng_orderid'] && $_GET['ng_transactionid'] ) {\r\n \r\n\t\tif ( function_exists( 'wc_get_order' ) ) {\r\n\t\t\t$order = wc_get_order( $_GET['ng_orderid'] );\r\n\t\t} else {\r\n\t\t\t$order = new WC_Order( $_GET['ng_orderid'] );\r\n\t\t} \r\n\t\t\r\n\t\t$str = $this->secretkey . $_GET['ng_orderid'];\r\n $hash = hash('sha256', $str);\r\n if($hash==$_GET['ng_signature']) {\r\n $order -> payment_complete();\r\n $order -> add_order_note('Netgíró greiðsla tókst<br/>Tilvísunarnúmer frá Netgíró: '.$_REQUEST['ng_invoiceNumber']); \r\n $woocommerce->cart->empty_cart();\r\n wp_redirect($this->get_return_url( $order ));\r\n exit;\r\n } else {\r\n // Set order status to failed\r\n $order -> update_status('failed');\r\n $order -> add_order_note('Netgiro payment failed. Woocommerce order id: ' . $_GET['ng_orderid'] . ' and Netgiro reference no.: ' . $_REQUEST['ng_invoiceNumber'] . ' does relate to signature: ' . $_GET['ng_signature']); \r\n\t\t \r\n\t\t wc_add_notice(\"Ekki tókst að staðfesta Netgíró greiðslu! Vinsamlega hafðu samband við verslun og athugað stöðuna á pöntun þinni nr. \" . $_GET['ng_orderid'], 'error');\r\n\t\t wp_redirect($this->get_return_url( $order ));\r\n\t\t exit;\r\n }\r\n }\r\n }", "public function getConfig()\n {\n $storeId = $this->session->getStoreId();\n return [\n 'payment' => [\n self::CODE => [\n 'isActive' => $this->config->isActive($storeId),\n 'ccTypesMapper' => $this->config->getCcTypesMapper(),\n 'availableCardTypes' => $this->config->getAvailableCardTypes($storeId),\n 'useCvv' => $this->config->isCvvEnabled($storeId),\n 'environment' => $this->config->getEnvironment($storeId),\n 'environmentUrl' => $this->config->getEnvironmentUrl(),\n 'use_sandbox' => $this->config->useSandbox($storeId),\n 'profile_id' => $this->config->getProfileId($storeId),\n 'profile_key' => $this->config->getProfileKey($storeId),\n 'ccVaultCode' => self::CC_VAULT_CODE,\n ]\n ],\n ];\n }", "function paymentech() {\n global $order;\n $this->code = 'paymentech';\n // Payment module title in Admin\n $this->title = MODULE_PAYMENT_PAYMENTECH_TEXT_TITLE;\n if (MODULE_PAYMENT_PAYMENTECH_MERCHANT_ID_CAD == '' && MODULE_PAYMENT_PAYMENTECH_MERCHANT_ID_USD == '') {\n $this->title .= '<span class=\"alert\"> (Not Configured)</span>'; \n } elseif (MODULE_PAYMENT_PAYMENTECH_TESTMODE == 'Test') {\n $this->title .= '<span class=\"alert\"> (in Testing mode)</span>';\n }\n $this->description = MODULE_PAYMENT_PAYMENTECH_TEXT_DESCRIPTION; // Descriptive Info about module in Admin\n $this->enabled = ((MODULE_PAYMENT_PAYMENTECH_STATUS == 'True') ? true : false); // Whether the module is installed or not\n $this->sort_order = MODULE_PAYMENT_PAYMENTECH_SORT_ORDER; // Sort Order of this payment option on the customer payment page\n\n if ((int)MODULE_PAYMENT_PAYMENTECH_ORDER_STATUS_ID > 0) {\n $this->order_status = MODULE_PAYMENT_PAYMENTECH_ORDER_STATUS_ID;\n }\n\n\t// save the information\n\t// Card numbers are not saved, instead keep the first and last four digits and fill middle with *'s\n\t$card_number = trim($_POST['paymentech_field_1']);\n\t$card_number = substr($card_number, 0, 4) . '********' . substr($card_number, -4);\n\t$this->payment_fields = implode(':',array($_POST['paymentech_field_0'], $card_number, $_POST['paymentech_field_2'], $_POST['paymentech_field_3'], $_POST['paymentech_field_4']));\n\n\t$this->AVSRespCode = array(\n\t\t'1 ' => \"No address supplied\",\n\t\t'2 ' => \"Bill-to address did not pass Auth Host edit checks\",\n\t\t'3 ' => \"AVS not performed\",\n\t\t'4 ' => \"Issuer does not participate in AVS\",\n\t\t'R ' => \"Issuer does not participate in AVS\",\n\t\t'5 ' => \"Edit-error - AVS data is invalid\",\n\t\t'6 ' => \"System unavailable or time-out\",\n\t\t'7 ' => \"Address information unavailable\",\n\t\t'8 ' => \"Transaction Ineligible for AVS\",\n\t\t'9 ' => \"Zip Match / Zip4 Match / Locale match\",\n\t\t'A ' => \"Zip Match / Zip 4 Match / Locale no match\",\n\t\t'B ' => \"Zip Match / Zip 4 no Match / Locale match\",\n\t\t'C ' => \"Zip Match / Zip 4 no Match / Locale no match\",\n\t\t'D ' => \"Zip No Match / Zip 4 Match / Locale match\",\n\t\t'E ' => \"Zip No Match / Zip 4 Match / Locale no match\",\n\t\t'F ' => \"Zip No Match / Zip 4 No Match / Locale match\",\n\t\t'G ' => \"No match at all\",\n\t\t'H ' => \"Zip Match / Locale match\",\n\t\t'J ' => \"Issuer does not participate in Global AVS\", \n\t\t'JA' => \"International street address and postal match\",\n\t\t'JB' => \"International street address match. Postal code not verified.\",\n\t\t'JC' => \"International street address and postal code not verified.\",\n\t\t'JD' => \"International postal code match. Street address not verified.\",\n\t\t'M1' => \"Cardholder name matches\",\n\t\t'M2' => \"Cardholder name, billing address, and postal code matches\",\n\t\t'M3' => \"Cardholder name and billing code matches\",\n\t\t'M4' => \"Cardholder name and billing address match\",\n\t\t'M5' => \"Cardholder name incorrect, billing address and postal code match\",\n\t\t'M6' => \"Cardholder name incorrect, billing address matches\",\n\t\t'M7' => \"Cardholder name incorrect, billing address matches\",\n\t\t'M8' => \"Cardholder name, billing address and postal code are all incorrect\",\n\t\t'N3' => \"Address matches, ZIP not verified\",\n\t\t'N4' => \"Address and ZIP code match (International only)\",\n\t\t'N5' => \"Address not verified (International only)\",\n\t\t'N6' => \"Address and ZIP code match (International only)\",\n\t\t'N7' => \"ZIP matches, address not verified\",\n\t\t'N8' => \"Address and ZIP code match (International only)\",\n\t\t'UK' => \"Unknown\",\n\t\t'X ' => \"Zip Match / Zip 4 Match / Address Match\",\n\t\t'Y ' => \"Not Performed\",\n\t\t'Z ' => \"Zip Match / Locale no match\");\n\n\t$this->CVV2RespCode = array(\n\t\t'M' => \"CVV Match\",\n\t\t'N' => \"CVV No match\",\n\t\t'P' => \"Not processed\",\n\t\t'S' => \"Should have been present\",\n\t\t'U' => \"Unsupported by issuer\",\n\t\t'I' => \"Invalid\",\n\t\t'Y' => \"Invalid\");\n\n }", "function commerce_marketplace_payment_settings_form($form, &$form_state) {\n\n $options = array(\n 'main_store' => t('main store'),\n 'merchants' => t('merchants'),\n );\n $form['commerce_store_payment_mode'] = array(\n '#type' => 'select',\n '#title' => t('Send payments to'),\n '#description' => t('Select how payments for marketplace orders (orders from multiple stores) should be handled. <em>Merchants</em> will try to send payments directly to relevant merchants (assuming they all have the same payment method supporting parallel payments enabled). <em>Main store</em> will send the payment to the marketplace owner, allowing for processing it manually later.'),\n '#options' => $options,\n '#default_value' => variable_get('commerce_store_payment_mode', COMMERCE_MARKETPLACE_PAYMENT_DEFAULT_MODE),\n );\n\n return system_settings_form($form);\n}", "public function get_request_url( $order ) {\n\t\t\n\t\t$registerCard = $useRegisteredCard = 0;\n\t\t$useCard = 0;\n\t\tif (isset($_POST['oneclic'])) {\n\t\t\t$oneclic = wc_clean( $_POST['oneclic'] );\n\t\t\t\n\t\t\tswitch($oneclic) {\n\t\t\t\tcase 'register_card':\n\t\t\t\t\t$registerCard = $useRegisteredCard = 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'use_card':\n\t\t\t\t\t$useCard = 1;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Build args with the order\n\n\t\t$amount = $order->get_total();\n\t\t//$amountCom = $amount;\n $amountCom = 0;\n\t\t\n\t\t/*if( function_exists( 'is_plugin_active' ) ) {\n\t\t\tif ( is_plugin_active( 'payohmkt/payohmkt.php' ) ) {\n\t\t\t\t//@TODO manage mixted cart\n\t\t\t\t\n\t\t\t\t//Keep only subtotal for vendors because webkul plugin work like this :-(\n\t\t\t\t$amountCom = $order->get_total() - $order->get_subtotal();\n\t\t\t}\n\t\t}*/\n\t\n\t\t$comment = get_bloginfo( 'name' ) . \" - \" . sprintf(__('Order #%s by %s %s %s', PAYOH_TEXT_DOMAIN), $order->get_order_number(), $order->billing_last_name, $order->billing_first_name, $order->billing_email);\n\t\t$returnUrl = '';\n\n\t\tif (!$useCard) {\n\t\t\t$params = array(\n\t\t\t\t\t'wkToken' => $order->id,\n\t\t\t\t\t'wallet' => $this->gateway->get_option(WC_Gateway_Payoh::WALLET_MERCHANT_ID),\n\t\t\t\t\t'amountTot' => $this->formatAmount($amount),\n\t\t\t\t\t'amountCom' => $this->formatAmount($amountCom),\n 'autoCommission' => 1,\n\t\t\t\t\t'comment' => $comment,\n\t\t\t\t\t'returnUrl' => $this->notify_url, //esc_url_raw( $this->gateway->get_return_url( $order )),\n\t\t\t\t\t'cancelUrl' => esc_url_raw( $order->get_cancel_order_url_raw() ),\n\t\t\t\t\t'errorUrl' => esc_url_raw( $order->get_cancel_order_url_raw() ), //@TODO change for a specific error url\n\t\t\t\t\t'registerCard' => $registerCard, //For Atos\n\t\t\t\t\t'useRegisteredCard' => $useRegisteredCard, //For payline\n\t\t\t);\n\t\t\t\n\t\t\tWC_Gateway_Payoh::log(print_r($params, true));\n\t\t\t\n\t\t\t//Call APi MoneyInWebInit in correct MODE with the args\n\t\t\t$moneyInWeb = $this->gateway->getDirectkit()->MoneyInWebInit($params);\n\t\t\t\n\t\t\t//Save card ID\n\t\t\tif($registerCard || $useRegisteredCard){\n\t\t\t\tupdate_user_meta( get_current_user_id(), '_lw_card_id', $moneyInWeb->CARD->ID );\n\t\t\t\tupdate_post_meta( $order->id, '_register_card', true );\n\t\t\t\tWC_Gateway_Payoh::log(sprintf(__(\"Card Saved for customer Id %s\", PAYOH_TEXT_DOMAIN), get_current_user_id()));\n\t\t\t}\n\t\t\t\n\t\t\tWC_Gateway_Payoh::log(print_r($moneyInWeb, true));\n\t\t\t$returnUrl = $this->gateway->getDirectkit()->formatMoneyInUrl($moneyInWeb->TOKEN, $this->gateway->get_option(WC_Gateway_Payoh::CSS_URL));\n\t\t}\n\t\telse { //Customer want to use his last card, so we call MoneyInWithCardID directly\n\t\t\n\t\t\t$cardId = get_user_meta(get_current_user_id(), '_lw_card_id', true);\n\t\t\t\n\t\t\t//call directkit for MoneyInWithCardId\n\t\t\t$params = array(\n\n\t\t\t\t\t'wkToken' => $order->id,\n\t\t\t\t\t'wallet' => $this->gateway->get_option(WC_Gateway_Payoh::WALLET_MERCHANT_ID),\n\t\t\t\t\t'amountTot' => $this->formatAmount($amount),\n\t\t\t\t\t'amountCom' => $this->formatAmount($amountCom),\n 'autoCommission' => 1,\n\t\t\t\t\t'comment' => $comment . \" -- \" . sprintf(__('Oneclic mode (card id: %s)', PAYOH_TEXT_DOMAIN), $cardId),\n\t\t\t\t\t'cardId' => $cardId\n\t\t\t);\n\t\t\t\n\t\t\tWC_Gateway_Payoh::log(print_r($params, true));\n\t\t\t\n\t\t\t$operation = $this->gateway->getDirectkit()->MoneyInWithCardId($params);\n\t\t\t\n\t\t\tWC_Gateway_Payoh::log(print_r($operation, true));\n\t\t\t\n\t\t\tif($operation->STATUS == \"3\") {\n\t\t\t\t\n\t\t\t\t$transaction_id = $operation->ID;\n\t\t\t\t//Set transaction id to POST array. Needed on notif handler\n\t\t\t\t\n\t\t\t\t$_POST['response_transactionId'] = $transaction_id;\n\t\t\t\t\n\t\t\t\t//Process order status\n\t\t\t\t$this->gateway->getNotifhandler()->valid_response($order);\n\t\t\t\t\n\t\t\t\t//Return to original wc success page\n\t\t\t\t$returnUrl = $this->gateway->get_return_url($order);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new Exception(__('Error during payment', PAYOH_TEXT_DOMAIN));\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Return redirect url\n\t\treturn $returnUrl;\n\t}", "public function postOrderMake() {\n\n /*\n Array\n (\n [12_97d170e1550eee4afc0af065b78cda302a97674c] => 5\n [metrics] => Порода:\n Пол:\n Обхват шеи:\n Обхват груди:\n Длина спины:\n Обхват передней лапы:\n От шеи до передней лапы:\n Между передними лапами:\n\n [name] => фывчфы\n [email] => [email protected]\n [address] => фывфы\n [tel] => фывфы\n [pay_type] => 1\n )\n */\n\n #Helper::ta(Input::all());\n\n /**\n * Получаем корзину\n */\n CatalogCart::getInstance();\n $goods = CatalogCart::get_full();\n #Helper::ta($goods);\n\n /**\n * Формируем массив с продуктами\n */\n $products = [];\n if (count($goods)) {\n foreach ($goods as $good_hash => $good) {\n $products[$good_hash] = [\n 'id' => $good->id,\n 'count' => $good->_amount,\n 'price' => $good->price,\n 'attributes' => (array)$good->_attributes,\n ];\n }\n }\n #Helper::ta($products);\n\n $pay_type = @$this->pay_types[Input::get('pay_type')] ?: NULL;\n\n /**\n * Формируем окончательный массив для создания заказа\n */\n $order_array = [\n 'client_name' => Input::get('name'),\n 'delivery_info' => Input::get('address') . ' ' . Input::get('email') . ' ' . Input::get('tel'),\n 'comment' => $pay_type . \"\\n\\n\" . Input::get('metrics'),\n 'status' => 1, ## Статус заказа, нужно подставлять ID статуса наподобие \"Новый заказ\"\n 'products' => $products,\n ];\n #Helper::tad($order_array);\n\n $order = Catalog::create_order($order_array);\n\n /*\n $json_request = [];\n $json_request['responseText'] = '';\n $json_request['status'] = FALSE;\n\n if (is_object($order) && $order->id)\n $json_request['status'] = TRUE;\n\n\n return Response::json($json_request, 200);\n */\n\n if (is_object($order) && $order->id) {\n\n CatalogCart::clear();\n return Redirect::route('mainpage');\n #return Redirect::route('catalog-order-success');\n\n } else {\n\n return URL::previous();\n }\n }", "private function _addDynamicInteractionTypeElement($order)\n {\n if (self::ALLOW_INTERACTION_TYPE == $this->paymentDetails['dynamicInteractionType']) {\n $interactionElement = $order->addChild('dynamicInteractionType');\n $interactionElement['type'] = $this->paymentDetails['dynamicInteractionType'];\n }\n }", "function process(&$order)\n\t\t{\t\n\t\t\t$order->payment_type = \"PayPal Express\";\n\t\t\t$order->cardtype = \"\";\n\t\t\t$order->ProfileStartDate = date_i18n(\"Y-m-d\", strtotime(\"+ \" . $order->BillingFrequency . \" \" . $order->BillingPeriod)) . \"T0:0:0\";\n\t\t\t$order->ProfileStartDate = apply_filters(\"pmpro_profile_start_date\", $order->ProfileStartDate, $order);\n\n\t\t\treturn $this->setExpressCheckout($order);\n\t\t}", "public static function getPaymentTypes()\n\t{\n\t\t$types = array('' => 'Any');\n\t\treturn array_merge($types, PaymentMethod::getPaymentMethods());\n\t}", "public function getType()\n {\n return $this->getParameter('type') ?: 'PaymentFlowInstant';\n }" ]
[ "0.68356127", "0.6462882", "0.6461868", "0.6412778", "0.6395504", "0.6276764", "0.6186685", "0.6147888", "0.6129993", "0.61210924", "0.6056632", "0.6054406", "0.59554857", "0.5947917", "0.5935342", "0.59183097", "0.59178257", "0.5908918", "0.5886222", "0.58861613", "0.58857334", "0.58843213", "0.58716357", "0.5864195", "0.58606285", "0.58456403", "0.58385724", "0.5827176", "0.58194983", "0.57997173", "0.57777435", "0.5759605", "0.5722049", "0.5711763", "0.5685217", "0.566684", "0.5653752", "0.56494355", "0.5638355", "0.5595339", "0.5585583", "0.55811983", "0.55755264", "0.55660003", "0.5553037", "0.5540131", "0.5526595", "0.5521674", "0.5502105", "0.5492919", "0.54926413", "0.54859555", "0.54680365", "0.5448274", "0.5437721", "0.5430674", "0.54293436", "0.54256386", "0.54242593", "0.5404847", "0.5393177", "0.53897196", "0.5384593", "0.53692174", "0.5368251", "0.5367675", "0.5365135", "0.5349555", "0.53491837", "0.5347022", "0.53467655", "0.5339276", "0.5321201", "0.5319193", "0.5311275", "0.5307158", "0.5306804", "0.53017807", "0.52913696", "0.5283846", "0.52811027", "0.5275256", "0.52751744", "0.5272965", "0.5272379", "0.52646863", "0.5254808", "0.52516145", "0.5247896", "0.5242579", "0.5241247", "0.5236653", "0.52333474", "0.5225005", "0.5223295", "0.5220826", "0.5217975", "0.5215668", "0.5211129", "0.5204479", "0.52032083" ]
0.0
-1
Order payment type text
public function typeText() { $params = $this->types(); return isset($params[$this->type]) ? $params[$this->type] : ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPaymentType(){\n return $this->payment_type;\n }", "public function getOrderType();", "public function getPaymenttype()\n {\n return $this->paymenttype;\n }", "public function getPaymentType(): string\n {\n $paymentMethod = $this->getPaymentMethod();\n $paymentTypes = [\n 'regular_checkout' => __('Regular'),\n 'express_checkout' => __('Express'),\n ];\n\n return (string) ($paymentTypes[$paymentMethod] ?? '');\n }", "public function getOrderType()\n {\n return $this->order_type;\n }", "function get_payment_type()\n {\n // echeck - payment funded with e-check\n // instant - payment was funded with platnosci balance, credit card, or instant transfer\n return $this->platnosci_post_vars['payment_type'];\n }", "public function getOrderType()\n {\n return 'purchase';\n }", "public function getPaymentType()\n {\n\n return 'IPAY';\n }", "public function getOrdertype()\n {\n return $this->ordertype;\n }", "public function getOrderType()\n {\n return _('Subscription');\n }", "public function getOrderType()\n {\n return $this->orderType;\n }", "public function getPaymentType()\n {\n switch ( $this->payment_type ) {\n case Contribution::PAYMENT_CASH:\n return 'cash';\n break;\n case Contribution::PAYMENT_CREDITCARD:\n return 'credit_card';\n break;\n case Contribution::PAYMENT_CHECK:\n return 'check';\n break;\n case Contribution::PAYMENT_TRANSFER:\n return 'transfer';\n break;\n case Contribution::PAYMENT_PAYPAL:\n return 'paypal';\n break;\n case Contribution::PAYMENT_OTHER:\n return 'other';\n break;\n default:\n Analog::log(\n __METHOD__ . ' Unknonw payment type ' . $this->payment_type,\n Analog::ERROR\n );\n throw new \\RuntimeException(\n 'Unknonw payment type ' . $this->payment_type\n );\n }\n\n }", "public function getOrderType()\n {\n return $this->firstNodeAttribute(\"IDOC/E1EDK01/ZE1EDK01\",'ZAUART', null);\n }", "public function getPaymentDescription();", "public function get_payment_type() {\n\n\t\treturn 'credit_card' === $this->get_request()->get_order()->payment->type ? 'credit-card' : 'echeck';\n\t}", "public function getPaymentAmountType()\n {\n return $this->_fields['PaymentAmountType']['FieldValue'];\n }", "function ezcreditcardType ()\n {\n $this->eZDataType( self::DATA_TYPE_STRING, ezi18n( 'kernel/classes/datatypes', 'Credit card', 'Datatype name' ), array( \n 'serialize_supported' => true , \n 'object_serialize_map' => array( \n 'data_text' => 'text' \n ) \n ) );\n }", "public function testParsePaymentType(): void\n {\n $result = Parser::parsePaymentType('Cash');\n $this->assertEquals('cash', $result);\n\n $result = Parser::parsePaymentType('Lease');\n $this->assertEquals('lease', $result);\n\n $result = Parser::parsePaymentType('Financing');\n $this->assertEquals('finance', $result);\n\n $result = Parser::parsePaymentType('Comptant');\n $this->assertEquals('cash', $result);\n\n $result = Parser::parsePaymentType('location');\n $this->assertEquals('lease', $result);\n\n $result = Parser::parsePaymentType('Financement');\n $this->assertEquals('finance', $result);\n\n $this->assertNull(Parser::parsePaymentType('banana'));\n }", "public function bank_type() {\n\t\treturn '';\n\t}", "function get_transaction_type()\n {\n return $this->platnosci_post_vars['txn_type']; \n }", "private function getPaymentMethod($orderPayment): string\n {\n //====================================================================//\n // Detect Payment Method Type from Default Payment \"known\" methods\n $method = $orderPayment->getMethod();\n foreach (static::$PAYMENT_METHODS as $paymentMethod => $methodIds) {\n if (in_array($method, $methodIds, true)) {\n return $paymentMethod;\n }\n }\n Splash::log()->war(\"Unknown Payment Method: \".$method);\n\n return \"CreditCard\";\n }", "public static function getPaymentTypes(){\n return array(self::IGFC=> PaymentUtils::getLabelText('PAYMENT_TYPE_IGFS'),self::CMPT1 => PaymentUtils::getLabelText('PAYMENT_TYPE_CMPT'));\n }", "abstract public function getPaymentMethod();", "public function getPaymentName()\n {\n return 'Pagosonline';\n }", "function store_order_paid(Order $order)\n {\n if ($order->order_owing < 0) {\n return '<span class=\"store_order_paid_over\">'.lang('store.overpaid').'</span>';\n } elseif ($order->order_owing == 0) {\n return '<span class=\"store_order_paid_yes\">'.lang('yes').'</span>';\n } elseif ($order->order_paid > 0) {\n return store_currency($order->order_paid);\n } else {\n return lang('no');\n }\n }", "public function getRawType()\n {\n if ( $this->isCotis() ) {\n return 'membership';\n } else {\n return 'donation';\n }\n }", "public function getTypeString(){\n\t\t$typeStr=\"\";\n\t\tswitch($this->type){\n\t\t\tcase \"fixed\": $typeStr=_(\"Montant fixe\");break;\n\t\t\tcase \"percentage\": $typeStr=_(\"Pourcentage\");break;\n\t\t\tcase \"percentage_no_transport\": $typeStr=_(\"Pourcentage sans transport\");break;\n\t\t\tcase \"transport\": $typeStr=_(\"Frais de port\");break;\n\t\t\tcase \"grid\": $typeStr=_(\"Variable\");break;\n\t\t}\n\t\treturn $typeStr;\n\t}", "public function getTypeTitle()\n {\n return 'Tokens Purchase';\n }", "public function getPaymentMethod()\n {\n return $this->response['result']['payment_type'];\n }", "public function form_order_type() {\n\t\tglobal $current_user;\n\n\t\tget_currentuserinfo();\n\n\t\t$data = array();\n\n\t\tif ( !isset( $_REQUEST['page'] ) )\n\t\t\treturn;\n\n\t\tif ( 'visual-form-builder-pro' !== $_REQUEST['page'] )\n\t\t\treturn;\n\n\t\tif ( isset( $_REQUEST['mode'] ) ) :\n\t\t\t$user_id = $current_user->ID;\n\n\t\t\t$type = get_user_meta( $user_id, 'vfb-form-order-type', true );\n\n\t\t\t$meta_value = ( in_array( $_REQUEST['mode'], array( 'order', 'list' ) ) ) ? esc_html( $_REQUEST['mode'] ) : '';\n\t\t\tupdate_user_meta( $user_id, 'vfb-form-order-type', $meta_value );\n\n\t\tendif;\n\t}", "public static function Order($order){\n\n $chatID = \"-1001270503780\"; //local\n // $chatID = \"-1001347027599\"; //server\n\n $str = ''; \n $i = 1; \n foreach($order->details as $detail){\n$str.= $i.'. '.$detail->menu->name.' x '.$detail->pending_notification_qty.'\n'; \n $i++; \n }\n\n $type = !is_null($order->last_notify_at) ? 'ហៅថែម':'ការកម្មង់ថ្មី'; \n \n $botRes = TelegramBot::sendMessage([\n 'chat_id' => $chatID, \n 'text' => '<b> '.$type.' : វិក័យបត្រលេខ #'.$order->receipt_number. '</b>\n'.$str, \n 'parse_mode' => 'HTML'\n ]);\n\n return $botRes; \n \n }", "protected function getTradeType()\n {\n return 'MICROPAY';\n }", "public function getOrderDataType(): ?string {\n\t\treturn Hash::get($this->_config, 'orderDataType');\n\t}", "public function save_order_payment_type_meta_data( $order, $data ) {\n if ( $data['payment_method'] === $this->id && isset($_POST['payment_duration']) )\n $order->update_meta_data('_payment_duration', esc_attr($_POST['payment_duration']) );\n }", "function payment_fields(){\r\n if($this -> description) echo wpautop(wptexturize($this -> description));\r\n }", "public function payment_fields(){\r\n if($this->description) echo wpautop(wptexturize($this->description));\r\n }", "function wc_bocpay_display_order_meta_for_admin( $order ){\n $trade_no = get_post_meta( $order->id, 'Bocpay Trade No.', true );\n if( !empty($trade_no ) ){\n echo '<p><strong>交通银行交易流水号:</strong><br />' .$trade_no. '</p>';\n }\n }", "public function getTypeText()\n {\n return ($this->isPending() ? 'Key Request' : 'Key');\n }", "public function payment_fields() {\n\t\t$description = $this->get_description();\n\n\t\tif ( 'yes' == $this->sandbox ) {\n\t\t\t$description .= ' ' . sprintf( __( 'TEST MODE ENABLED. Use a test card: %s', 'woocommerce' ), '<a href=\"https://www.simplify.com/commerce/docs/tutorial/index#testing\">https://www.simplify.com/commerce/docs/tutorial/index#testing</a>' );\n\t\t}\n\n\t\tif ( $description ) {\n\t\t\techo wpautop( wptexturize( trim( $description ) ) );\n\t\t}\n\t}", "function getDescription() {\n\t\tswitch ($this->type) {\n\t\t\tcase PAYMENT_TYPE_PURCHASE_FILE:\n\t\t\t\treturn __('payment.directSales.monograph.description');\n\t\t\tdefault:\n\t\t\t\t// Invalid payment ID\n\t\t\t\tassert(false);\n\t\t}\n\t}", "public function display_payment_type_order_edit_pages( $order ){\n if( $this->id === $order->get_payment_method() && $order->get_meta('_payment_duration') ) {\n $options = $this->options;\n echo '<p><strong>'.__('Payment Duration').':</strong> ' . $options[$order->get_meta('_payment_duration')] . '</p>';\n }\n }", "public function getType()\n {\n return $this->depositType;\n }", "private function getPaymentMethod(){\r\n\r\n $paymentMethod = 1;\r\n switch($this->medio_pago){\r\n case 'webpay': {\r\n $paymentMethod = 1;\r\n break;\r\n }\r\n case 'servipag': {\r\n $paymentMethod = 2;\r\n break;\r\n }\r\n case 'multicaja': {\r\n $paymentMethod = 3;\r\n break;\r\n }\r\n case 'onepay': {\r\n $paymentMethod = 5;\r\n break;\r\n }\r\n case 'flow': {\r\n $paymentMethod = 9;\r\n break;\r\n }\r\n case 'webpay3c': {\r\n $paymentMethod = 13;\r\n break;\r\n }\r\n case 'mach': {\r\n $paymentMethod = 15;\r\n break;\r\n }\r\n default : {\r\n $paymentMethod = 1;\r\n break;\r\n } \r\n }\r\n\r\n return $paymentMethod;\r\n }", "public function getTypeLabel(){\r\n\t\t$ret = \" \";\r\n\t\tswitch ($this->type){\r\n\t\t\tcase 0 : $ret = $_LANG->get('Artikel'); break;\r\n\t\t\tcase 1 : $ret = $_LANG->get('Produkt'); break;\r\n\t\t\tcase 2 : $ret = $_LANG->get('Personalisierung'); break;\r\n\t\t\tdefault: $ret = \"n.A.\";\r\n\t\t}\r\n\t\treturn $ret;\r\n\t}", "function payment_fields() {\n if ($this->description) echo wpautop(wptexturize($this->description));\n ?>\n <ol class=\"my-list\">\n <li>Entrez votre numéro MTN Mobile Money dans le champ de formulaire ci-dessous</li>\n <li>Vous recevrez un message vous demandant de composer *126# et d'entrer votre code PIN</li>\n <li>Composez *126# et entrez votre code PIN pour confirmer votre paiement</li>\n <li>Si le paiement est effectué, votre commande sera automatiquement validé</li>\n </ol>\n\n <label for=\"\">Entrez votre numéro MTN Mobile Money</label>\n\n <input type=\"text\" name=\"gt_user_momo_number\" value=\"\"\n style=\"background-color: #fff; border-radius: 0px; color: #222;\"required class=\"form-controll\"\n placeholder=\"Enter your phone number\">\n <?php\n }", "private function getEntryOrderType()\n {\n return ($this->content)\n ? $this->content->orderType()\n : $this->request->input('extra.order_type');\n }", "function payment_fields() {\r\n if ($this->description) {\r\n echo wpautop(wptexturize($this->description));\r\n }\r\n }", "public function payment_fields() {\n\t\t\tif (true === $this->description) {\n\t\t\t\techo esc_html($this->description);\n\t\t\t}\n\n\t\t}", "function my_custom_checkout_field_display_admin_order_meta($order){\n echo '<p><strong>'.__('Shipping Method').':</strong> ' . get_post_meta( $order->id, 'shippingMethod', true ) . '</p>';\n }", "protected function _getPaymentType($oOrder)\n {\n if (!($oUserPayment = $oOrder->getPaymentType()) && $oOrder->oxorder__oxpaymenttype->value) {\n $oPayment = oxNew(\"oxPayment\");\n if ($oPayment->load($oOrder->oxorder__oxpaymenttype->value)) {\n // in case due to security reasons payment info was not kept in db\n $oUserPayment = oxNew(\"oxUserPayment\");\n $oUserPayment->oxpayments__oxdesc = new oxField($oPayment->oxpayments__oxdesc->value);\n }\n }\n\n return $oUserPayment;\n }", "function payment_fields() {\n?>\n\t\t<?php if ($this->tran_mode=='sandbox') : ?><p><?php _e('TEST MODE/SANDBOX ENABLED', WC_Authorize_SIM::TEXT_DOMAIN); ?></p><?php endif; ?>\n\t\t<?php if ($this->description) : ?><p><?php echo wpautop(wptexturize($this->description)); ?></p><?php endif; ?>\n<?php\n\n\t}", "function payment_fields()\n {\n if ($this->description) {\n echo wpautop(wptexturize($this->description));\n }\n }", "public function getPaymentTypeAttribute() {\n return $this->payment_type()->first()->makeHidden(['id', 'updated_at', 'created_at']);\n }", "function payment_fields() {\n\t\t\tif ($this->description) echo wpautop(wptexturize($this->description));\n\t\t}", "function payment_fields() {\n\t\t\tif ($this->description) echo wpautop(wptexturize($this->description));\n\t\t}", "public function getTYPE_TEXT()\n {\n return self::TYPE_TEXT;\n }", "public function getPaymentRequest(): string;", "abstract protected function getTradeType();", "function rsm_sc_payment_types() {\n\n\tob_start();\n\trsm_get_template( 'rsm-payment-types.php' );\n\treturn ob_get_clean();\n\n}", "public function setPaymentType($payment_type){\n $this->payment_type = $payment_type;\n }", "private function get_payment_method($payment_type) {\r\n\t\t$info_pieces = explode('_', $payment_type);\r\n\t\t\r\n\t\treturn $info_pieces[0];\r\n\t}", "public function payment_fields() {\r\n\t\tif (!empty($this->description)) {\r\n\t\t\techo $this->add_next_line($this->description . '<br /><br />');\r\n\t\t}\r\n\t\techo __('Payment Method', 'ecpay') . ' : ';\r\n\t\techo $this->add_next_line('<select name=\"ecpay_choose_payment\">');\r\n\t\tforeach ($this->ecpay_payment_methods as $payment_method) {\r\n\t\t\techo $this->add_next_line(' <option value=\"' . $payment_method . '\">');\r\n\t\t\techo $this->add_next_line(' ' . $this->get_payment_desc($payment_method));\r\n\t\t\techo $this->add_next_line(' </option>');\r\n\t\t}\r\n\t\techo $this->add_next_line('</select>');\r\n\t}", "abstract function typeAsString();", "function __getInType($type = '')\n {\n\t\t\n switch ($type) {\n\t\t\t\n\t\t\tcase 'visa':\n\t\t\t $str = 'B';\n break;\n\t\t\tcase 'invoice':\n\t\t\t $str = 'F';\n break;\n\t\t\tcase 'gift_card':\n\t\t\t $str = 'G';\n break;\n\t\t\tcase 'cash':\n\t\t\t $str = 'K';\n break;\n\t\t\tcase 'account':\n\t\t\t $str = 'kk';\n break;\n\t\t\tcase '':\n\t\t\t $str = 'kk';\n break;\n default:\n\t\t\t $str = 'B';\n break;\n\t\t\t\t\n\t\t}\n\t\t\n\t\treturn $str;\n\t\t\t\t\n\t}", "function sms_text_order_shortcode()\n{\n return \"\n\t\t<strong>جزییات سفارش : </strong><br/>\n\t\t<code>{phone}</code> = شماره موبایل خریدار ، \n\t\t<code>{email}</code> = ایمیل خریدار ، \t\n\t\t<code>{order_id}</code> = شماره سفارش ، \n\t\t<code>{post_id}</code> = شماره پست (شماره سفارش اصلی) ، \n\t\t<code>{status}</code> = وضعیت سفارش<br/> \n\t\t<code>{price}</code> = مبلغ سفارش ، \n\t\t<code>{all_items}</code> = آیتم های سفارش ، \n\t\t<code>{all_items_qty}</code> = آیتم های سفارش همراه تعداد ، \n\t\t<code>{count_items}</code> = تعداد آیتم های سفارش <br/> \n\t\t<code>{payment_method}</code> = روش پرداخت ، \n\t\t<code>{shipping_method}</code> = روش ارسال ، \n\t\t<code>{description}</code> = توضیحات خریدار ، \n\t\t<code>{transaction_id}</code> = شماره تراکنش<br/><br/>\n\t\t\n\t\t<strong>جزییات صورت حساب : </strong><br/>\n\t\t<code>{b_first_name}</code> = نام خریدار ، \n\t\t<code>{b_last_name}</code> = نام خانوادگی خریدار ، \n\t\t<code>{b_company}</code> = نام شرکت <br/> \n\t\t<code>{b_country}</code> = کشور ، \n\t\t<code>{b_state}</code> = ایالت/استان ، \n\t\t<code>{b_city}</code> = شهر ، \n\t\t<code>{b_address_1}</code> = آدرس 1 ، \n\t\t<code>{b_address_2}</code> = آدرس 2 ، \n\t\t<code>{b_postcode}</code> = کد پستی<br/><br/>\n\t\t\n\t\t\n\t\t<strong>جزییات حمل و نقل : </strong><br/>\n\t\t<code>{sh_first_name}</code> = نام خریدار ، \n\t\t<code>{sh_last_name}</code> = نام خانوادگی خریدار ، \n\t\t<code>{sh_company}</code> = نام شرکت <br/> \n\t\t<code>{sh_country}</code> = کشور ، \n\t\t<code>{sh_state}</code> = ایالت/استان ، \n\t\t<code>{sh_city}</code> = شهر ، \n\t\t<code>{sh_address_1}</code> = آدرس 1 ،\n\t\t<code>{sh_address_2}</code> = آدرس 2 ، \n\t\t<code>{sh_postcode}</code> = کد پستی<br/><br/>\n\t\t\n\t\";\n}", "abstract protected function get_typestring();", "public function getCashPrepayment(\\MBH\\Bundle\\ClientBundle\\Service\\DocumentSerialize\\Order $order): string\n {\n $prepaymentPrice = $this->container->get('mbh.template_prices_generator')->getPrepayment($order);\n\n return $prepaymentPrice === null ? '0.00' : (string)$prepaymentPrice;\n }", "function theme_braintree_payment_method_label(&$variables) {\n $payment_method = $variables['payment_method'];\n\n if ($variables['type'] == 'credit_card') {\n $output = $payment_method->cardType . ' ' . $variables['masked_number'];\n }\n else {\n $output = 'PayPal balance ' . $variables['email'];\n }\n\n return $output;\n}", "function cb_order_meta_general( $order ) {\n\tif ($order->get_payment_method() == 'coinbase') {\n\t\t?>\n\n\t\t<br class=\"clear\"/>\n\t\t<h3>Coinbase Commerce Data</h3>\n\t\t<div class=\"\">\n\t\t\t<p>Coinbase Commerce Reference # <?php echo esc_html($order->get_meta('_coinbase_charge_id')); ?></p>\n\t\t</div>\n\n\t\t<?php\n\t}\n}", "public function getPaymentString(): ?string\n {\n return $this->paymentString;\n }", "public function _getOrderDescription($order)\n {\n $descriptionItems = array();\n $description = '';\n $lengs = 0;\n foreach ($order->getAllItems() as $item) {\n if ($item->getParentItem()) continue;\n // we know that Ingenico Payment Services is not able to handle characters that are not available in iso-8859-1\n// $descriptionItems[] = mb_ereg_replace(\"[^a-zA-Z0-9äáàéèíóöõúüûÄÁÀÉÍÓÖÕÚÜÛ_ ]\" , \"\" , $item->getName());\n $descriptionItems[] = $this->convertToLatin1($item->getName());\n $description = Mage::helper('core/string')->substr(implode(', ', $descriptionItems), 0, 100);\n //COM field is limited to 100 chars max\n if (100 <= Mage::helper('core/string')->strlen($description)) {\n break;\n }\n }\n return $description;\n }", "public function getPaymentMethodType()\n {\n return $this->getInfo()->getAdditionalInformation('payment_method');\n }", "public function toString()\n {\n return \"Order Detail - Shipping method are correct\";\n }", "public function get_type(): string;", "public function getOrderPaymentCode($order)\r\n {\r\n $payment = $order->getPayment();\r\n $method = $payment->getMethodInstance();\r\n $orderPaymentCode = $method->getCode();\r\n return $orderPaymentCode;\r\n }", "public function getType()\n {\n \n $tipos = \n\n $TypeOfProduct = TypeOfProduct::find($this->type_id); \n\n return $TypeOfProduct->description;\n }", "function receipt_page($order) {\n echo '<p>' . __('Gracias! - Tu orden ahora está pendiente de pago. Deberías ser redirigido automáticamente a la página de transbank.') . '</p>';\n\n echo $this->generate_webpayplus_form($order);\n }", "public function getPaymentName()\n {\n return 'paypal';\n }", "protected function _getTransactionType() \n {\n return self::VOID;\n }", "private function _ratepayEvent($type, $order)\n {\n switch($type){\n case 'invoice':\n $invoice = $order->prepareInvoice();\n $invoice->register()->save();\n $order->setTotalInvoiced($order->getTotalInvoiced() + $invoice->getGrandTotal());\n $order->setBaseTotalInvoiced($order->getBaseTotalInvoiced() + $invoice->getBaseGrandTotal());\n $order->save();\n break;\n case 'creditmemo':\n $creditmemo = Mage::getModel('sales/service_order', $order)->prepareCreditmemo();\n $creditmemo->register()->save();\n $order->setTotalRefunded($order->getTotalRefunded() + $creditmemo->getGrandTotal());\n $order->setBaseTotalRefunded($order->getBaseTotalRefunded() + $creditmemo->getGrandTotal());\n $order->setBaseTotalRefunded($creditmemo->getGrandTotal());\n $order->save();\n break;\n case 'cancel':\n $order->cancel()->save();\n break;\n default:\n throw new Exception('Wrong operation!');\n }\n }", "function kato_policy_print_type(){\n\tif(function_exists('the_field')){\n\t\t$type = get_field('type');\n\t\t$field = get_field_object('type');\n\t\t$label = $field['choices'][ $type ];\n\t\tprint '<li class=\"meta-type type-' . $type . '\">';\n\t\tprint $label;\n\t\tprint '</li>';\n\t}\n}", "protected function getType()\n {\n return 'contribution type';\n }", "public function getPaymentUrl($id_order)\n {\n \n $x_fp_timestamp = time();\n $order = new Order($id_order);\n $cart = new Cart($order->id_cart);\n \n $currency = new Currency($order->id_currency);\n $order_id = $order->id;\n $description = $this->l('Payment order ') . ' №' . $order_id;\n $paysto_merchant_id = ConfPPM::getConf('paysto_merchant_id');\n $x_relay_url = _PS_BASE_URL_.__PS_BASE_URI__.'module/paysto/result';\n \n $order_amount = number_format(($order->total_products_wt + $order->total_shipping_tax_incl), 2, '.', '');\n \n // Not right RUR for rubles iso_code = RUB\n $iso_code = $currency->iso_code;\n if ($iso_code == 'RUR') {\n $iso_code = 'RUB';\n }\n \n $address = new Address($cart->id_address_delivery);\n $customer = new Customer($order->id_customer);\n \n $products = $cart->getProducts(true);\n \n foreach ($products as &$product) {\n $price_item_with_tax = Product::getPriceStatic(\n $product['id_product'],\n true,\n $product['id_product_attribute']\n );\n $price_item_with_tax = number_format(\n $price_item_with_tax,\n 2,\n '.',\n ''\n );\n \n $product['price_item_with_tax'] = $price_item_with_tax;\n \n \n if (!ConfPPM::getConf('disable_tax_shop')) {\n if (Configuration::get('PS_TAX')) {\n $rate = $product['rate'];\n switch ($rate) {\n case 10:\n $product['tax_value'] = 'Y';\n break;\n case 18:\n $product['tax_value'] = 'Y';\n break;\n case 20:\n $product['tax_value'] = 'Y';\n break;\n default:\n $product['tax_value'] = 'N';\n }\n } else {\n $product['tax_value'] = 'N';\n }\n } else {\n $product['tax_value'] = $this->getProductTax($product['id_product']);\n }\n }\n \n $params = [\n 'x_description' => $description,\n 'x_login' => $paysto_merchant_id,\n 'x_amount' => $order_amount,\n 'x_email' => $customer->email,\n 'x_currency_code' => $iso_code,\n 'x_fp_sequence' => $order_id,\n 'x_fp_timestamp' => $x_fp_timestamp,\n 'x_fp_hash' => $this->get_x_fp_hash($paysto_merchant_id, $order_id, $x_fp_timestamp,\n $order_amount, $iso_code),\n 'x_invoice_num' => $order_id,\n 'x_relay_response' => \"TRUE\",\n 'x_relay_url' => $x_relay_url\n ];\n \n $params['x_line_item'] = '';\n \n if (is_array($products) && count($products)) {\n $tax_value_shipping = ConfPPM::getConf('tax_delivery');\n $products = $cart->getProducts(true);\n foreach ($products as $pos => $product) {\n if (!ConfPPM::getConf('disable_tax_shop')) {\n $carrier = new Carrier((int)$cart->id_carrier);\n \n $tax_value = 'no_vat';\n if (Configuration::get('PS_TAX')) {\n $rate = $carrier->getTaxesRate($address);\n switch ($rate) {\n case 10:\n $tax_value = 'Y';\n break;\n case 18:\n $tax_value = 'Y';\n break;\n case 20:\n $tax_value = 'Y';\n break;\n default:\n $tax_value = 'N';\n }\n }\n } else {\n $tax_value = ConfPPM::getConf('tax_delivery');\n }\n \n $lineArr = array();\n $lineArr[] = '№' . $pos . \" \";\n $lineArr[] = substr($product['id_product'], 0, 30);\n $lineArr[] = substr($product['name'], 0, 254);\n $lineArr[] = substr($product['cart_quantity'], 0, 254);\n $lineArr[] = number_format($product['price_wt'], 2, '.', '');\n $lineArr[] = $tax_value;\n $params['x_line_item'] .= implode('<|>', $lineArr) . \"0<|>\\n\";\n }\n \n if ($order->total_shipping_tax_incl) {\n $pos++;\n $lineArr = array();\n $lineArr[] = '№' . $pos . \" \";\n $lineArr[] =$this->l('Shipping');\n $lineArr[] = $this->l('Shipping') .' '. $order_id;\n $lineArr[] = 1;\n $lineArr[] =number_format($order->total_shipping_tax_incl, 2,\n '.', '');\n $lineArr[] = $tax_value_shipping;\n $params['x_line_item'] .= implode('<|>', $lineArr) . \"0<|>\\n\";\n }\n }\n \n return ['url' => $this->url, 'params' => $params];\n \n }", "function payment_fields() {\n\t\t\tif ( $this->description ) echo wpautop( wptexturize( $this->description ) );\n\t\t\tdo_action( 'tgm_jigoshop_payment_fields' ); // allow for insertion of custom code if needed\n\t\t}", "public function setPaymenttype($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->paymenttype !== $v) {\n $this->paymenttype = $v;\n $this->modifiedColumns[OrdrhedTableMap::COL_PAYMENTTYPE] = true;\n }\n\n return $this;\n }", "function get_gift_type($donation){\t\t//CC for Credit Card and ACHEFT for ACH Bank Deduction\n\t\tif($donation->donation_type = 'cc'){\n\t\t\t$dpo_gift_type = 'CC';\n\t\t}else{\n\t\t\t$dpo_gift_type = '';\n\t\t}\t\t\n\t\treturn $dpo_gift_type;\n\t}", "function wdm_add_shipping_method_to_order_email( $order, $is_admin_email ) {\r\n\t\tglobal $wpdb;\r\n\t\t$wpdb->show_errors();\r\n\t\t$table_name = $wpdb->prefix.FOXPOST_TABLE_NAME;\r\n\t\t$fp_datas = $wpdb->get_results(\"SELECT id, terminal_id, status FROM \".$table_name.\" WHERE order_id='\".$order->id.\"'\");\r\n\t\t$apt_id = $fp_datas[0]->terminal_id;\r\n\r\n\t\t$apts = getTerminals();\r\n\t\t$apt_str = 'Ismeretlen';\r\n\t\tforeach($apts as $apt){\r\n\t\t\tif($apt_id == $apt['fp_place_id']){\r\n\t\t\t\t$apt_str = $apt['fp_name'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\techo '<p><h4>Választott terminál: <u> ' . $apt_str . '</h4></u></p>';\r\n\t}", "abstract protected function getPaymentMethodCode();", "public function getPaymentMethod(){\n return $this->_getData(self::PAYMENT_METHOD);\n }", "public function getType() : string{\n return $this->type;\n }", "public function getPaymentName()\n {\n return self::METHOD_NAME;\n }", "private function deciperPaypalActionType($txn_type)\n\t{\n\t\tif($txn_type == 'subscr_cancel')\n\t\t{\n\t\t\treturn 'subscription was cancelled';\n\t\t}\n\t\telseif($txn_type == 'subscr_eot')\n\t\t{\n\t\t\treturn 'advanced membership expired and was moved back';\n\t\t}\n\t\telseif($txn_type == 'subscr_failed')\n\t\t{\n\t\t\treturn 'subscription payment failed, a new attempt will be made in 10 days';\n\t\t}\n\t\telseif($txn_type == 'subscr_payment')\n\t\t{\n\t\t\treturn 'account sent a payment';\n\t\t}\n\t\telseif($txn_type == 'subscr_signup')\n\t\t{\n\t\t\treturn 'account was signed up for advanced membership';\n\t\t}\n\t\telse\n\t\t{\n\t\t}\n\t}", "public function getPaymentMode()\n {\n return $this->payment_mode;\n }", "public function payment_fields() {\n \n\t\t\n \n\t\t}", "public function getPayTypeTrans()\n {\n return $this->payTypeTrans;\n }", "function receipt_page( $order ) {\n\t\terror_reporting(E_ERROR);\n\t\tini_set('display_errors', 1);\n\n\t\techo '<p>'.__( 'Спасибо за ваш заказ. Нажмите кнопку, для перехода к оплате через Твои Платежи.', 'woocommerce' ).'</p>';\n\t\techo $this->generate_payu_form( $order );\n\n\t}", "public function get_type()\n\t{\n\t\treturn 'notification.type.approve_post';\n\t}", "public function payment_type()\n {\n return $this->belongsTo('App\\PaymentType');\n }", "public function getPaymentMethodType() {\r\r\n return $this->_paymentMethod;\r\r\n }", "public function getTypeDesc(){\n $type = $this->type;\n $arr = self::getTypeDescArr();\n return $arr[$type] ?? \"\";\n }" ]
[ "0.7083768", "0.68874735", "0.68731713", "0.68542033", "0.66822696", "0.668142", "0.6652296", "0.6624449", "0.657336", "0.649601", "0.6412057", "0.6406932", "0.6358015", "0.6316636", "0.630345", "0.63029146", "0.6234597", "0.62021464", "0.6165217", "0.61613643", "0.61593884", "0.61476046", "0.6106677", "0.60896134", "0.6085999", "0.6083266", "0.6072903", "0.6057269", "0.60492855", "0.60196286", "0.59860927", "0.59709096", "0.59701514", "0.5951975", "0.5929991", "0.59260577", "0.59109324", "0.59092826", "0.59089553", "0.5903681", "0.5895131", "0.58902717", "0.58846295", "0.58498424", "0.584196", "0.5828393", "0.5801406", "0.577704", "0.57655394", "0.5764965", "0.57574826", "0.575294", "0.5742055", "0.5739847", "0.5739847", "0.5738118", "0.5728786", "0.5714266", "0.57058173", "0.57011014", "0.5674431", "0.56645966", "0.56645", "0.5662653", "0.56559455", "0.5638596", "0.56269825", "0.5622119", "0.56052434", "0.5598626", "0.5598155", "0.55970055", "0.55967414", "0.5593072", "0.55791354", "0.55720913", "0.5570467", "0.5561095", "0.5556616", "0.55554736", "0.55435497", "0.5540332", "0.5536317", "0.55347586", "0.55329275", "0.5528634", "0.5524239", "0.5524158", "0.5516093", "0.5511836", "0.551101", "0.5505469", "0.5502418", "0.5487545", "0.54792583", "0.5468548", "0.54606956", "0.5458106", "0.5449863", "0.54482716" ]
0.5969303
33
only does two levels of indexing warning: defaults were set prior to this
function doIndex() { $ret = array(); if( $this->statement->rowCount() > 0 ) { $data = $this->statement->fetchAll($this->fetch_style); } else { $data = array(); } foreach( $data as $line ) { if( !isset($line[$this->index[0]]) ) { throw new Exception( "Index '" . $this->index[0] . "' does not exist in data." ); } $key = $line[$this->index[0]]; if( count($this->index) == 1 ) { $ret[$key] = $line; } else { $key2 = $line[$this->index[1]]; if( !isset($ret[$key]) ) $ret[$key] = array(); $ret[$key][$key2] = $line; } } if( $this->sticky == false ) $this->setDefaults(); return( $ret ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ign_udef_index(&$name, $index, $default = \"\")\r\n{\r\n if (isset($name[$index]))\r\n {\r\n return $name[$index];\r\n }\r\n else\r\n {\r\n return $default;\r\n }\r\n}", "public function applyDefaultValues()\n\t{\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "public function applyDefaultValues()\n {\n $this->is_not = false;\n $this->rank = 0;\n }", "abstract protected function defaults(): array;", "protected function getIndexDefaults() {\n return array(\n 'page_id' => 0,\n 'page_size' => 25,\n 'sort_by' => 'update_date',\n 'sort_order' => 'asc'\n );\n }", "function dindex($array, $key, $default = null)\n{\n foreach ((array)$key as $dimension_key) {\n if (!isset($array[$dimension_key])) {\n return $default;\n }\n $array = $array[$dimension_key];\n }\n return $array;\n}", "public function applyDefaultValues()\n\t{\n\t\t$this->type = 1;\n\t\t$this->total_index = 0;\n\t\t$this->is_published = true;\n\t\t$this->is_featured = false;\n\t\t$this->comments_count = 0;\n\t}", "public function _INDEX()\n\t{\n\t\t\n\t}", "public function setDefaultValues()\n\t{\t\t\n\t\t\t \n\t}", "protected function setCanonicalIndex(): void\n {\n $got = $this->redisConn->hget($this->index, IndexInterface::STRUCTURE);\n $data = (null === $got) ? [] : $this->unser($got);\n if (empty($data)) { // just fill-in new index data\n $data[$this->index] = [\n IndexInterface::ALIASES => [],\n ];\n $this->setMappings($data);\n $this->redisConn->hset($this->index, IndexInterface::STRUCTURE, $this->ser($data));\n } else if (empty($this->indexType) === false\n && empty($data[$this->index][IndexInterface::MAPPINGS][$this->indexType])\n ) {// check for type and update if there is no alike\n $this->setMappings($data);\n $this->redisConn->hset($this->index, IndexInterface::STRUCTURE, $this->ser($data));\n } else { // setting new fields with whitespace type by default\n $this->setMappings($data, true);\n if (true === $this->isNewField) {\n $this->redisConn->hset($this->index, IndexInterface::STRUCTURE, $this->ser($data));\n }\n }\n }", "public function applyDefaultValues()\n\t{\n\t\t$this->closed = 0;\n\t\t$this->lastfmid = 0;\n\t\t$this->hasphotos = 0;\n\t}", "public function __default()\n\t{\n\n\t}", "function ag_ps_override_indexes($array, $to_override) {\n\tforeach($to_override as $key => $val) {\n\t\t$array[$key] = $val;\t\n\t}\n\t\n\treturn $array;\n}", "function isIndexable()\n {\n return true;\n }", "public function applyDefaultValues()\n {\n $this->setregis = 0;\n }", "abstract protected function getIndex();", "protected function func_default() {}", "function setDefaultValues() {}", "private function _setDefaults(): void {\n\t\t// default query options\n\t\t$options['limit'] = 50;\n\t\t$options['offset'] = false;\n\t\t$options['sort'] = false;\n\t\t$options['sortDirection'] = false;\n\t\t$this->setQueryOptions($options);\n\t}", "public function edit_default()\n {\n return method_exists($this, 'matrix') ? app()->call([$this, 'matrix']) : app()->call([$this, 'matrix_default']);\n }", "public function arrayMergeKeepsIndexesAfterMerge() {}", "public function toDefaults() {\n return $this->getIndex()->mapWithKeys(function(Field $field, $key){\n // Determine the default value and the reference route\n return [$key => $field->getDefault()];\n });\n }", "public function toDefaults() {\n return $this->getIndex()->mapWithKeys(function(Field $field, $key){\n // Determine the default value and the reference route\n return [$key => $field->getDefault()];\n });\n }", "protected function prepareSectionIndexTest() {}", "function get_index_params()\n {\n return array();\n }", "function set_defaults()\n {\n $mapper = $this->get_mapper();\n if ($mapper->has_method('set_defaults')) {\n $mapper->set_defaults($this);\n }\n }", "public function useDefaults()\n\t{\n\t\t$this->use_defaults = true;\n\t}", "function _setDefaults() {}", "function isIndexable()\r\n {\r\n return true;\r\n }", "function flu_undefined_index_error($key)\n{\n if (is_bool($key)) {\n $key = (int)$key;\n }\n flu_error(\"Notice: Undefined offset: $key\", E_USER_NOTICE, 2);\n}", "abstract public function getColDefaults();", "public function testDefaultOptions() {\n $config = new Config();\n $this->assertEquals(Config::INDEX_MIXED, $config->getIndexType());\n $this->assertFalse($config->isReadOnly());\n\n $config = new Config(null, array(\n 'indexType' => Config::INDEX_MIXED,\n 'readonly' => true\n ));\n $this->assertEquals(Config::INDEX_MIXED, $config->getIndexType());\n $this->assertTrue($config->isReadOnly());\n }", "function isIndexable()\n {\n return true;\n }", "function array_access($array, $key, $default) {\n if (array_key_exists($key, $array)) {\n return $array[$key];\n }\n return $default;\n }", "function sa_array_index($ary,$idx){\n if( isset($ary) and isset($idx) and isset($ary[$idx]) ) return $ary[$idx];\n}", "function I(&$x,$i,$default=null) {\n\treturn isset($x[$i]) ? $x[$i] : $default;\n}", "function getIndex() ;", "public function applyDefaultValues()\n\t{\n\t\t$this->is_archived = 0;\n\t\t$this->google_analytics_enabled = false;\n\t}", "final protected function _defaults(){\n if(! $this->_defaults) return;\n foreach($this->_defaults as $conf => $default_value){\n if(! self::inform($conf)) self::define($conf, $default_value);\n }\n }", "function idx($value, $key, $default = null) {\n if (is_null($value) || is_null($key)) {\n return $default;\n }\n\n if (is_array($value)) {\n if (array_key_exists($key, $value)) {\n return $value[$key];\n }\n } else {\n if (property_exists($value, $key)) {\n return $value->$key;\n }\n }\n return $default;\n}", "function get_table_indexes($db, $table, $cnx='', $reload=false, $mode='mysql'){\n\tif($mode!=='mysql') exit('only mysql index mode developed');\n\tglobal $get_table_indexes, $dbTypeArray;\n\tif(!$cnx)$cnx=C_MASTER;\n\tif($get_table_indexes[$db][$table] && !$reload){\n\t\treturn $get_table_indexes[$db][$table];\n\t}else{\n\t\t$fl=__FILE__;\n\t\t$ln=__LINE__+1;\n\t\tob_start();\n\t\t$result=q(\"SHOW INDEXES FROM `$db`.`$table`\", $cnx, ERR_ECHO, O_DO_NOT_REMEDIATE);\n\t\t$err=ob_get_contents();\n\t\tob_end_clean();\n\t\tif($err)return false;\n\t\t\n\t\t$typeFlip = array_flip($dbTypeArray);\n\t\t$inCompound=false;\n\t\twhile($v=mysqli_fetch_array($result,MYSQLI_ASSOC)){\n\t\t\t$w++;\n\t\t\t@extract($v);\n\t\t\tif($buffer==$Key_name){\n\t\t\t\t//duplicate part of a key\n\t\t\t\tif(!$inCompound){\n\t\t\t\t\t$multiIdx[$Key_name][]=$singleIdx[count($singleIdx)-1];\n\t\t\t\t\tunset($singleIdx[count($singleIdx)-1]);\n\t\t\t\t\t//next two lines overcome \"bug\" in php: just cause I unset the highest element, this will not reset the next index assigned when I say $singleIdx[]=.. later on.\n\t\t\t\t\t$clr=$singleIdx;\n\t\t\t\t\t$singleIdx=$clr;\n\t\t\t\t}\n\t\t\t\t$multiIdx[$Key_name][]=$v;\n\t\t\t\t$inCompound=true;\n\t\t\t}else{\n\t\t\t\t$singleIdx[]=$v;\n\t\t\t\t$buffer=$Key_name;\n\t\t\t\t$inCompound=false;\n\t\t\t}\n\t\t}\n\t\t//set $singleIdx as assoc for reference\n\t\tif(count($singleIdx)){\n\t\t\tforeach($singleIdx as $v) $a[strtolower($v['Column_name'])]=$v;\n\t\t\t$singleIdx=$a;\n\t\t}\n\t\t//store compound keys as XML\n\t\tif($multiIdx){\n\t\t\t$compoundKey='';\n\t\t\tforeach($multiIdx as $n=>$v){\n\t\t\t\t$ci.='<compoundKey Key_name=\"'.$n.'\" Column_count=\"'.count($v).'\"';\n\t\t\t\t$i=0;\n\t\t\t\tforeach($v as $w){\n\t\t\t\t\t$i++;\n\t\t\t\t\tif($i==1)$ci.=' Non_unique=\"'.$w['Non_unique'].'\">'.\"\\n\";\n\t\t\t\t\t$ci.='<keyColumn Seq_in_index=\"'.$w['Seq_in_index'].'\" Column_name=\"'.$w['Column_name'].'\" Sub_part=\"'.$w['Sub_part'].'\" Comment=\"'.htmlentities($w['Comment']).'\">'.\"\\n\";\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$ci.='</compoundKey>';\n\t\t\t}\n\t\t}\n\t\t$get_table_indexes[$db][$table]=array('singleIdx'=>$singleIdx, 'multiIdx'=>$multiIdx, 'compoundXML'=>$ci);\n\t\treturn $get_table_indexes[$db][$table];\n\t}\n}", "public function isIndexed() {}", "public function isIndexed() {}", "public function isIndexed() {}", "public function hook_before_index(&$result) {\n \n }", "private function rebuildIndex()\n {\n foreach ($this->rows as $id => $row) {\n $label = $row->getColumn('label');\n if ($label !== false) {\n $this->rowsIndexByLabel[$label] = $id;\n }\n }\n $this->indexNotUpToDate = false;\n }", "public function applyDefaultValues()\n {\n $this->jml_lantai = '1';\n $this->asal_data = '1';\n $this->last_sync = '1901-01-01 00:00:00';\n }", "public function applyDefaultValues()\n\t{\n\t\t$this->points = '0';\n\t\t$this->type = 0;\n\t\t$this->hidden = 0;\n\t\t$this->relationship_status = 0;\n\t\t$this->show_email = 1;\n\t\t$this->show_gender = 1;\n\t\t$this->show_hometown = 1;\n\t\t$this->show_home_phone = 1;\n\t\t$this->show_mobile_phone = 1;\n\t\t$this->show_birthdate = 1;\n\t\t$this->show_address = 1;\n\t\t$this->show_relationship_status = 1;\n\t\t$this->credit = 0;\n\t\t$this->login = 0;\n\t}", "function _setDefaults()\n {\n $this->subtask_id = $this->rs['subtask_id'] = 0;\n $this->student_id = $this->rs['student_id'] = 0;\n $this->assignment_id = $this->rs['assignment_id'] = 0;\n $this->file_id = $this->rs['file_id'] = 0;\n }", "protected function setDefaultValues()\n {\n parent::setDefaultValues();\n\t}", "function addingRecordDefaultSettings(){\n\n $settings = parent::addingRecordDefaultSettings();\n\n for($i=0; $i< count($settings); $i++){\n\n switch($settings[$i][\"name\"]){\n\n case \"reportTitle\":\n $settings[$i][\"defaultValue\"] = \"Packing List\";\n\n }//endswitch\n\n }//end foreach\n\n return $settings;\n\n }", "public function get_default_args(){ return $this->default_args; }", "protected function setDefaults()\n {\n return;\n }", "function isIndexed() ;", "private function _getAllValuesDatabaseIndex() {\r\n\t\t$defaultValues = $this->_helper->db->getTable('DefaultMetadataValue')->findAll();\r\n\t\t$indexed = array();\r\n foreach ($defaultValues as $defaultValue) {\r\n $indexed[$defaultValue->id] = $defaultValue;\r\n }\r\n return $indexed;\r\n\t}", "protected function useDefaultValuesForNotConfiguredOptions() {}", "public function buildIndex();", "public function applyDefaultValues()\n {\n $this->montacargas_baja = 0;\n }", "public function get_default()\n\t{\n\t\t$return = $this->default;\n\n\t\tif (count($args = func_get_args()) >= 1) \n\t\t{\n\t\t\tisset($args[0]) && is_array($args[0]) && $args = $args[0];\n\t\t\t$_return = array();\n\t\t\tforeach ($args as $arg)\n\t\t\t{\n\t\t\t\tif (isset($return[$arg]))\n\t\t\t\t{\n\t\t\t\t\t$_return[$arg] = $return[$arg];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tempty($_return) OR $return = $_return;\n\t\t\tunset($_return);\n\t\t}\n\t\treturn $return;\n\t}", "public function applyDefaultValues()\n {\n $this->active = false;\n }", "protected function _getCurrentOptionIndices() {}", "private function getDefault(){\n\t\treturn array(\n\t\t\t'id' => \t'', \n\t\t\t'name' => \t'',\n\t\t\t'date' => \t'', \n\t\t\t'lvl' => \t'', \n\t\t\t'exp' => \t''\n\t\t);\n\t}", "function ST4_columns_head_only_works($defaults) {\n\t$defaults['works_image'] = 'Featured Image';\n\t$defaults['tags'] = 'Tags';\n\treturn $defaults; \n}", "public function isIndex();", "protected function doDefaultGetValueList() {\n return false;\n }", "function apachesolr_fields_default_indexing_callback($entity, $field_name, $index_key, array $field_info) {\n $fields = array();\n $numeric = TRUE;\n if (!empty($entity->{$field_name})) {\n $field = $entity->$field_name;\n list($lang, $values) = each($field);\n switch ($field_info['index_type']) {\n case 'integer':\n case 'half-int':\n case 'sint':\n case 'tint':\n case 'thalf-int':\n case 'boolean':\n $function = 'intval';\n break;\n case 'float':\n case 'double':\n case 'sfloat':\n case 'sdouble':\n case 'tfloat':\n case 'tdouble':\n $function = 'apachesolr_floatval';\n break;\n default:\n $numeric = FALSE;\n $function = 'apachesolr_clean_text';\n }\n for ($i = 0; $i < count($values); $i++) {\n $fields[] = array(\n 'key' => $index_key,\n 'value' => $function($values[$i]['value']),\n );\n }\n // Also store the first value of the field in a singular index for multi value fields\n if ($field_info['multiple'] && $numeric && !empty($values[0])) {\n $singular_field_info = $field_info;\n $singular_field_info['multiple'] = FALSE;\n $single_key = apachesolr_index_key($singular_field_info);\n $fields[] = array(\n 'key' => $single_key,\n 'value' => $function($values[0]['value']),\n );\n }\n }\n return $fields;\n}", "public function applyDefaultValues()\n {\n $this->is_active = false;\n $this->is_closed = false;\n }", "function pixgraphy_get_option_defaults_values() {\n\t\tglobal $pixgraphy_default_values;\n\t\t$pixgraphy_default_values = array(\n\t\t\t'pixgraphy_responsive'\t=> 'on',\n\t\t\t'pixgraphy_column_post'\t=>'four',\n\t\t\t'pixgraphy_border_column'\t=>'on',\n\t\t\t'pixgraphy_design_layout' => 'wide-layout',\n\t\t\t'pixgraphy_animate_css'\t=> 'on',\n\t\t\t'pixgraphy_sidebar_layout_options' => 'right',\n\t\t\t'pixgraphy_photography_layout' => 'photography_layout',\n\t\t\t'pixgraphy_search_custom_header' => 0,\n\t\t\t'pixgraphy-img-upload-footer-image' => '',\n\t\t\t'pixgraphy-footer-title'\t=> '',\n\t\t\t'pixgraphy-footer-link'\t=> '#',\n\t\t\t'pixgraphy_header_display'=> 'header_text',\n\t\t\t'pixgraphy_categories'\t=> array(),\n\t\t\t'pixgraphy_custom_css'\t=> '',\n\t\t\t'pixgraphy_scroll'\t=> 0,\n\t\t\t'pixgraphy_tag_text' => esc_html__('Read More','pixgraphy'),\n\t\t\t'pixgraphy_excerpt_length'\t=> '20',\n\t\t\t'pixgraphy_single_post_image' => 'off',\n\t\t\t'pixgraphy_reset_all' => 0,\n\t\t\t'pixgraphy_stick_menu'\t=>0,\n\t\t\t'pixgraphy_blog_post_image' => 'on',\n\t\t\t'pixgraphy_entry_format_blog' => 'excerptblog_display',\n\t\t\t'pixgraphy_search_text' => esc_html__('Search &hellip;','pixgraphy'),\n\t\t\t'pixgraphy_blog_content_layout'\t=> '',\n\t\t\t'pixgraphy_display_page_featured_image'=>0,\n\t\t\t/* Slider Settings */\n\t\t\t'pixgraphy_slider_type'\t=> 'default_slider',\n\t\t\t'pixgraphy_slider_link' =>0,\n\t\t\t'pixgraphy_enable_slider' => 'frontpage',\n\t\t\t'pixgraphy_transition_effect' => 'fade',\n\t\t\t'pixgraphy_transition_delay' => '4',\n\t\t\t'pixgraphy_transition_duration' => '1',\n\t\t\t/* Front page feature */\n\t\t\t'pixgraphy_entry_format_blog' => 'show',\n\t\t\t'pixgraphy_entry_meta_blog' => 'show-meta',\n\t\t\t/*Social Icons */\n\t\t\t'pixgraphy_top_social_icons' =>0,\n\t\t\t'pixgraphy_buttom_social_icons'\t=>0,\n\t\t\t'pixgraphy_social_facebook'=> '',\n\t\t\t'pixgraphy_social_twitter'=> '',\n\t\t\t'pixgraphy_social_pinterest'=> '',\n\t\t\t'pixgraphy_social_dribbble'=> '',\n\t\t\t'pixgraphy_social_instagram'=> '',\n\t\t\t'pixgraphy_social_flickr'=> '',\n\t\t\t'pixgraphy_social_googleplus'=> '',\n\t\t\t'pixgraphy_remove_parallax_fromheader'=>0,\n\t\t\t);\n\t\treturn apply_filters( 'pixgraphy_get_option_defaults_values', $pixgraphy_default_values );\n\t}", "public function defineIndexes()\n\t{\n\t\treturn array();\n\t}", "public function testLimitDefaultIndex(): void\n {\n $client = $this->_getClient();\n $index = $client->getIndex('zero');\n $index->create(['settings' => ['index' => ['number_of_shards' => 1, 'number_of_replicas' => 0]]]);\n\n $docs = [\n new Document('1', ['id' => 1, 'email' => '[email protected]', 'username' => 'farrelley']),\n new Document('2', ['id' => 1, 'email' => '[email protected]', 'username' => 'farrelley']),\n new Document('3', ['id' => 1, 'email' => '[email protected]', 'username' => 'farrelley']),\n new Document('4', ['id' => 1, 'email' => '[email protected]', 'username' => 'farrelley']),\n new Document('5', ['id' => 1, 'email' => '[email protected]', 'username' => 'farrelley']),\n new Document('6', ['id' => 1, 'email' => '[email protected]', 'username' => 'farrelley']),\n new Document('7', ['id' => 1, 'email' => '[email protected]', 'username' => 'farrelley']),\n new Document('8', ['id' => 1, 'email' => '[email protected]', 'username' => 'farrelley']),\n new Document('9', ['id' => 1, 'email' => '[email protected]', 'username' => 'farrelley']),\n new Document('10', ['id' => 1, 'email' => '[email protected]', 'username' => 'farrelley']),\n new Document('11', ['id' => 1, 'email' => '[email protected]', 'username' => 'farrelley']),\n ];\n $index->addDocuments($docs);\n $index->refresh();\n\n // default limit results (default limit is 10)\n $resultSet = $index->search('farrelley');\n $this->assertEquals(10, $resultSet->count());\n\n // limit = 1\n $resultSet = $index->search('farrelley', ['limit' => 1]);\n $this->assertEquals(1, $resultSet->count());\n }", "public function force($defaults) : Arr {\n\n $arr = $defaults;\n if (gettype($arr) == 'Arr') {\n $arr = $defaults->getArray();\n }\n\n $keys = array_keys($arr);\n foreach($this as $k => $v) {\n if (!in_array($k, $keys)) {\n unset($this[$k]);\n }\n }\n\n foreach($arr as $k => $v)\n {\n if (!isset($this[$k])) {\n $this[$k] = $arr[$k];\n }\n }\n return $this;\n }", "public function applyDefaultValues()\n {\n $this->deleted = false;\n $this->amount = 1;\n $this->amountevaluation = 0;\n $this->defaultstatus = 0;\n $this->defaultdirectiondate = 0;\n $this->defaultenddate = 0;\n $this->defaultpersoninevent = 0;\n $this->defaultpersonineditor = 0;\n $this->maxoccursinevent = 0;\n $this->showtime = false;\n $this->ispreferable = true;\n $this->isrequiredcoordination = false;\n $this->isrequiredtissue = false;\n $this->mnem = '';\n }", "public function getDefaultIndex()\n {\n return $this->defaultIndex;\n }", "function get_index()\r\n\t{\r\n\r\n\t}", "public function fillupDefault()\n {\n\n foreach (static::$cols as $key => $col) {\n if ('' != $col[self::COL_DEFAULT]) {\n $this->data[$key] = $col[self::COL_DEFAULT];\n }\n }\n\n }", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function create_default()\n {\n return method_exists($this, 'matrix') ? app()->call([$this, 'matrix']) : app()->call([$this, 'matrix_default']);\n }", "public function func_refindex() {}", "public function offsetGet($index)\n {\n }", "public function initializeDefaults()\n {\n }", "private function respect_settings_for_robots() {\n\t\t// Force override to respect the WP settings.\n\t\tif ( 0 === absint( get_option( 'blog_public' ) ) || isset( $_GET['replytocom'] ) ) {\n\t\t\t$this->robots['index'] = 'noindex';\n\t\t\t$this->robots['follow'] = 'nofollow';\n\t\t}\n\n\t\t// Noindex for sub-pages.\n\t\tif ( is_paged() && Helper::get_settings( 'titles.noindex_archive_subpages' ) ) {\n\t\t\t$this->robots['index'] = 'noindex';\n\t\t}\n\t}", "public function functionalIndexes() {\n\t\treturn false;\n\t}", "function acf_maybe_get($array = array(), $key = 0, $default = \\null)\n{\n}", "protected function defaultParams()\r\n\t{\r\n\t\treturn array();\r\n\t}", "protected function getDefaults(){\n\t\treturn array();\n\t}", "public function defaultData();", "function tf_array_first_set()\r\n {\r\n $key_list = func_get_args();\r\n $array = array_shift($key_list);\r\n $default = array_pop($key_list);\r\n \r\n foreach ($key_list as $key)\r\n if (isset($array[$key]))\r\n return $array[$key];\r\n\r\n return $default;\r\n }", "protected function _defaults($arr)\n\t{\n\t\t$defaults = array(\n\t\t\t'enable_realtime' => false, \n\t\t\t'check_callbacks' => true, \n\t\t\t'qbxml_version' => '4.0',\n\t\t\t'qbxml_onerror' => 'stopOnError', \n\t\t\t'map_create_handler' => null, \n\t\t\t'map_to_quickbooks_handler' => null,\n\t\t\t'map_to_application_handler' => null,\n\t\t\t'map_to_editsequence_handler' => null, \n\t\t\t);\n\t\t\t\n\t\treturn array_merge($defaults, $arr);\n\t}", "function idx(array $array, $key, $default = null) {\n // isset() is a micro-optimization - it is fast but fails for null values.\n if (isset($array[$key])) {\n return $array[$key];\n }\n\n // Comparing $default is also a micro-optimization.\n if ($default === null || array_key_exists($key, $array)) {\n return null;\n }\n\n return $default;\n}", "public function get_default_params()\n {\n }", "function define_indexes()\n {\n\t\tif( !isset($this->input['st']) )\n\t\t{\n\t\t\t$this->input['st'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['t']) )\n\t\t{\n\t\t\t$this->input['t'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['p']) )\n\t\t{\n\t\t\t$this->input['p'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['pid']) )\n\t\t{\n\t\t\t$this->input['pid'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['gopid']) )\n\t\t{\n\t\t\t$this->input['gopid'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['L']) )\n\t\t{\n\t\t\t$this->input['L'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['f']) )\n\t\t{\n\t\t\t$this->input['f'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['cal_id']) )\n\t\t{\n\t\t\t$this->input['cal_id'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['code']) )\n\t\t{\n\t\t\t$this->input['code'] = '';\n\t\t}\n\t\t\n\t\tif( !isset($this->input['CODE']) )\n\t\t{\n\t\t\t$this->input['CODE'] = '';\n\t\t}\n\t}" ]
[ "0.63405526", "0.6250408", "0.6250408", "0.6250408", "0.5995161", "0.59739393", "0.5924114", "0.5857008", "0.571377", "0.5694022", "0.56317025", "0.5582356", "0.5579831", "0.5545679", "0.5544567", "0.55301076", "0.5496537", "0.54830736", "0.5432381", "0.5416375", "0.541372", "0.54014665", "0.5371675", "0.53679645", "0.53679645", "0.53356576", "0.53266096", "0.5318198", "0.53131557", "0.53128904", "0.5307766", "0.5306362", "0.53051656", "0.5292054", "0.52749974", "0.52640045", "0.5263619", "0.52526885", "0.52501446", "0.5242425", "0.5226203", "0.52235174", "0.5203633", "0.51996565", "0.5199616", "0.5199541", "0.51775956", "0.5155247", "0.51536703", "0.51532614", "0.5143024", "0.5142349", "0.512849", "0.51224893", "0.51209146", "0.51161534", "0.5112701", "0.51070404", "0.51056117", "0.50860846", "0.5079102", "0.50759166", "0.50734216", "0.5070154", "0.50581473", "0.5050165", "0.5049117", "0.50477636", "0.504413", "0.5043768", "0.50375867", "0.50336486", "0.50166804", "0.5014305", "0.5000993", "0.49969673", "0.4994178", "0.4986866", "0.4986866", "0.4986866", "0.49861282", "0.49861282", "0.49861282", "0.4985158", "0.49846733", "0.49846733", "0.49733508", "0.49612078", "0.49554166", "0.49504995", "0.4946723", "0.49467185", "0.49433586", "0.4941916", "0.49416924", "0.49323887", "0.49311244", "0.49297065", "0.49148875", "0.49069065", "0.49058193" ]
0.0
-1
Constructs a new NodeRevisionDeleteForm.
public function __construct(EntityStorageInterface $node_storage, EntityStorageInterface $node_type_storage, Connection $connection, DateFormatterInterface $date_formatter) { $this->nodeStorage = $node_storage; $this->nodeTypeStorage = $node_type_storage; $this->connection = $connection; $this->dateFormatter = $date_formatter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteForm()\n\t{\n\t\t$form = new \\IPS\\Helpers\\Form( 'form', 'delete' );\n\t\t$form->addMessage( 'node_delete_blurb_no_content' );\n\t\t\n\t\treturn $form;\n\t}", "function kala_revision_batch_delete_form() {\n // Initialize Vars.\n $form = array();\n\n // Date text field.\n $form['date'] = array(\n '#type' => 'textfield',\n '#title' => t('Delete nodes revisions before this time.'),\n '#description' => t('Enter as a -1 day, 1-year, etc. Defaults to -90 days.'),\n '#default_value' => t('-90 days'),\n '#required' => TRUE,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Delete These Revisions!'),\n '#submit' => array('kala_revision_batch_delete_form_submit'),\n );\n\n return $form;\n}", "private function createDeleteForm(Releve $releve)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('releve_delete', array('id' => $releve->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Entrepot $entrepot)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('entrepot_delete', array('idEntrepot' => $entrepot->getIdentrepot())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(TaskEvent $taskEvent)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('taskevent_delete', array('id' => $taskEvent->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "protected function createComponentDeletePrihozForm()\n {\n $form = new Nette\\Application\\UI\\Form;\n \n $form->addText('id_nemovitost')\n ->setAttribute('style', 'display:none');\n \n $form->addSubmit('send', 'Odeslat formulář')\n ->setAttribute('class', 'btn btn-primary');\n\n $form->onSuccess[] = $this->deletePrihozFormSucceeded;\n return $form;\n }", "protected function createComponentDeleteForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addSubmit('delete', 'Smazat')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno');\r\n\t\t$form->onSuccess[] = callback($this, 'deleteFormSubmitted');\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "private function createDeleteForm(NatureOp $priorite)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('back_natureop_delete', array('id' => $priorite->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(VerbTranslation $verbTranslation)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('verbtranslation_delete', array('id' => $verbTranslation->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Orden $orden)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('orden_delete', array('id' => $orden->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function deleteSubmitHandler(array &$form, FormStateInterface $form_state) {\n $node_id = $form_state->getValue('article_title');\n $node = Node::load($node_id)->delete();\n }", "function mongo_node_page_delete($form, $form_state, $entity_type, $entity) {\n $form['#entity'] = $entity;\n $uri = entity_uri($entity_type, $entity);\n\n return confirm_form($form,\n t('Are you sure you want to delete %title', array('%title' => $entity->title)),\n $uri['path'],\n t('This action cannot be undone'),\n t('Delete'),\n t('Cancel')\n );\n}", "private function createDeleteForm(view $view)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('view_delete', array('id' => $view->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Reserver $reserver)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('reserver_delete', array('idreservation' => $reserver->getIdreservation())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_blog_post_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Delete',\n 'attr' => array(\n 'class' => 'btn btn-danger'\n )\n ))\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('vluchten_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(RhythmMaterial $rhythmMaterial)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('rhythmmaterial_delete', array('id' => $rhythmMaterial->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Event $event)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('event_delete', array('id' => $event->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Event $event)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('event_delete', array('id' => $event->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Event $event)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('event_delete', array('id' => $event->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Efunction $efunction)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('efunction_delete', array('id' => $efunction->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('rubrique_delete', array('id' => $id)))\r\n// ->setMethod('DELETE')\r\n ->add('submit', SubmitType::class, array('label' => 'Supprimer la rubrique courante'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('visiteur_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(CargoSubDivisao $vaga)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pessoal_gerenciar_vagas_delete', array('id' => $vaga->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Events $event) {\n\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('events_delete', array('id' => $event->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(NomDpa $nomdpa)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dpa_delete', array('id' => $nomdpa->getIddpa())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(PhpposPeople $phpposPerson)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('phppospeople_delete', array('id' => $phpposPerson->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm( $entityName, $instance)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('entity_delete',\n [\n 'entityName' => $entityName,\n 'id' => $instance->getId()\n ]))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Notes $note)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('notes_delete', ['id' => $note->getId()]))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('thread_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(Evennements $evennement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('evennements_delete', array('id' => $evennement->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Acte $acte)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('acte_delete', array('id' => $acte->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Dependencia $dependencium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dependencia_delete', array('id' => $dependencium->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Copy $copy)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_copy_delete', array('id' => $copy->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Beer $beer)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('beer_delete', array('id' => $beer->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Reglement $reglement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('reglement_delete', array('codeRegl' => $reglement->getCoderegl())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(PostStatus $postStatus)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_post-status_delete', array('id' => $postStatus->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Stable $stable)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('stable_delete', array('id' => $stable->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n\t{\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('admin_element_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', SubmitType::class, array('label' => 'Удалить', 'attr' => array(\n\t\t\t\t'class' => 'btn btn-danger',\n\t\t\t\t'data-delete' => ''\n\t\t\t)))\n\t\t\t->getForm();\n\t}", "private function createDeleteForm($id){\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('reserva_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', 'submit', array('label' => 'Eliminar Reserva', 'attr' => array('class'=>'btn btn-danger btn-block')))\n\t\t\t->getForm()\n\t\t;\n\t}", "private function createDeleteForm(Event $event)\n {\n // $this->enforceUserSecurity('ROLE_USER');\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('event_delete', array('slug' => $event->getSlug())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('invoice_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "private function createDeleteForm(update_logs $update_log)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('Admin_Logs_delete', array('id' => $update_log->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n \n $form = $this->createFormBuilder(null, array('attr' => array('id' => 'entrada_detalles_eliminar_type')))\n ->setAction('')\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'icon' => 'trash', 'attr' => array('class' => 'btn-danger')))\n ->getForm()\n ;\n \n return $form;\n \n \n }", "private function createDeleteForm(News $news) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('news_delete', array('id' => $news->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_partners_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Supprimer',\n 'attr' => array(\n 'class' => 'btn btn-danger'\n )))\n ->getForm();\n }", "private function createDeleteForm(CvCdoComparendo $cvCdoComparendo)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cvcdocomparendo_delete', array('id' => $cvCdoComparendo->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Personnage $personnage)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnage_delete', array('id' => $personnage->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(InvProveedor $invProveedor)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_invproveedor_delete', array('id' => $invProveedor->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('member_intrestconfig_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', 'submit', array('label' => 'Delete'))\n\t\t\t->getForm()\n\t\t;\n\t}", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ligne_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_syntaxon_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ordering_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('resident_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder(array('id' => $id))\n ->add('id', 'hidden')\n ->setAction($this->generateUrl('chofer_destroy', ['id' => $id]))\n ->getForm()\n ;\n }", "private function createDeleteForm(Person $person)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_person_delete', ['id' => $person->getId()]))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('estadofondo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'BORRAR'))\n ->getForm()\n ;\n }", "function node_delete_confirm(&$form_state, $node) {\n $form['nid'] = array(\n '#type' => 'value',\n '#value' => $node->nid,\n );\n\n return confirm_form($form,\n t('Are you sure you want to delete %title?', array('%title' => $node->title)),\n isset($_GET['destination']) ? $_GET['destination'] : 'node/'. $node->nid,\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('identification_module_admin_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'form.common.btn.delete','attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "private function createDeleteForm(news $news)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('news_delete', array('id' => $news->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('object_objecttype_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Удалить'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tipuscentre_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('entreprise_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "function mongo_node_type_delete_form($form, $form_state, $entity_type) {\n $form = array();\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $path = '/admin/structure/mongo-node';\n\n $extist_entity_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type));\n if ($count) {\n $extist_entity_content = t('%type is used by %count piece of content on your site. If you remove this entity type, you will not be able to edit the %type content and it may not display correctly.', array('%type' => $entity_type, '%count' => $count));\n $extist_entity_content .= '<br/><br/>';\n }\n return confirm_form($form, t('Delete entity type'), $path, $extist_entity_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_type_delete');\n}", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fileops_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('usertotask_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('endroit_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('memberrequest_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Record $record)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('eval_record_delete', array('id' => $record->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('behalf_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "function mongo_node_page_delete_submit($form, &$form_state) {\n if ($form_state['values']['confirm']) {\n $entity = $form['#entity'];\n $entity->delete();\n\n $entity_type = $entity->entityType();\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label'];\n\n drupal_set_message(t('@label %title deleted',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title)\n )\n );\n }\n\n $form_state['redirect'] = '<front>';\n}", "public function createDeleteForm($id){\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('rsp_delete',array('id'=>$id)))\n ->setMethod('DELETE')\n ->add('submit','submit',array('label'=>'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(CMS $cM)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cms_delete', array('id' => $cM->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Eventos $evento)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('eventos_delete', array('id' => $evento->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Post $post)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('post_delete', array('id' => $post->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Mensajes $mensaje)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('mensajes_delete', array('id' => $mensaje->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('annonce_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('solmantenimientoidentificacion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar','attr'=>array('class'=>'btn btn-danger btn btn-danger btn-lg btn-block')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('timerecord_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('mecz_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('utente_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('invoice_accountentry_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(Vertif $vertif)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('vertif_delete', array('id' => $vertif->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('logger_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('viaje_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administracion_servicio_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('bien_delete', array('id' => $id)))\n ->setMethod('DELETE')\n // ->add('submit', 'submit', array('label' => 'Delete'))\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger'),))\n ->getForm()\n ;\n }", "private function createDeleteForm(Post $post)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('post_delete', array('id' => $post->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnelpersonnel_delete', array('id' => $id)))\n ->setMethod('DELETE')\n // ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "private function createDeleteForm(News $news)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('news_delete', array(\n 'id' => $news->getId(),\n )))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('menu_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder(null, array('attr' => array( 'id' => 'pts_del')))\n ->setAction($this->generateUrl('morus_accetic_inventory_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $this->get('translator')->trans('btn.delete')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('gdpmails_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm($slug)\n {\n return $this->createFormBuilder(array('slug' => $slug))\n ->add('slug', 'hidden')\n ->getForm();\n }", "private function createDeleteForm(Evenement $evenement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_evenement_delete', array('id' => $evenement->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('adtiposcomision_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('data_recipe_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(Post $post)\n {\n return $this->createFormBuilder()\n ->setAction(\n $this->generateUrl('post_delete', ['id' => $post->getId()])\n )\n ->setMethod('DELETE')\n ->getForm();\n }", "function mongo_node_bundle_delete_form($form, $form_state, $entity_type, $bundle) {\n $form = array();\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $form['bundle'] = array(\n '#type' => 'value',\n '#value' => $bundle,\n );\n\n $path = '/admin/structure/mongo-node/' . $entity_type;\n\n $extist_bundle_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type, '_bundle' => $bundle));\n if ($count) {\n $extist_bundle_content = t('%bundle is used by %count piece of content on your site. If you remove this bundle, you will not be able to edit the %bundle content and it may not display correctly.', array('%bundle' => $bundle, '%count' => $count));\n $extist_bundle_content .= '<br/><br/>';\n }\n\n return confirm_form($form, t('Delete entity bundle'), $path, $extist_bundle_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_bundle_delete');\n}", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ingrediente_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('bill_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }" ]
[ "0.71726966", "0.662137", "0.6137234", "0.61005753", "0.60496396", "0.6048721", "0.60043895", "0.5985221", "0.5976912", "0.5975743", "0.5926906", "0.592176", "0.58923095", "0.5874214", "0.58601123", "0.58413726", "0.5826029", "0.5809899", "0.5809899", "0.5809899", "0.5808734", "0.57943976", "0.5792606", "0.578053", "0.5777558", "0.57715607", "0.5766922", "0.5761917", "0.5761063", "0.57530546", "0.5751368", "0.5746029", "0.5733917", "0.5724268", "0.57025325", "0.56979424", "0.5690913", "0.56883967", "0.56883276", "0.5686645", "0.5680848", "0.56795293", "0.56737417", "0.5672386", "0.56604534", "0.5650794", "0.5644065", "0.56434584", "0.56395864", "0.5639244", "0.5635139", "0.56335855", "0.56305945", "0.56280065", "0.56275564", "0.56267333", "0.56247205", "0.56214434", "0.5620708", "0.56200755", "0.561846", "0.5616471", "0.5615996", "0.56114763", "0.5609859", "0.5608609", "0.5606846", "0.56057274", "0.56048596", "0.56035244", "0.5603125", "0.560163", "0.55983585", "0.55938005", "0.5591192", "0.55874956", "0.5587196", "0.5587083", "0.55866766", "0.55850345", "0.5582609", "0.5582196", "0.5580872", "0.55768085", "0.55739975", "0.55696493", "0.55696005", "0.5566815", "0.5566255", "0.55653423", "0.5564301", "0.5563472", "0.5561715", "0.55610615", "0.5554884", "0.55548424", "0.5553635", "0.5550368", "0.5549066", "0.55489475", "0.5545009" ]
0.0
-1
Gets the abridged version.
public function getDisplayLink() { return $this->displayLink; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBridgeApiVersion() {\n return $this->bridgeApiVersion;\n }", "public function get_version();", "abstract public function get_version();", "public function getCurrentVersion();", "function get_version() {\n\n\t\treturn $this->version;\n\n\t}", "public function retrieveVersion()\n {\n return $this->start()->uri(\"/api/system/version\")\n ->get()\n ->go();\n }", "protected function getFromVersion()\n {\n $version = $this->loadFromVersion();\n $this->log('The from version is detected as ' . implode(' ', $version));\n return $version;\n }", "public function getVersion(): string\n\t{\n\t\tif (isset($this->dataCache['version']))\n\t\t{\n\t\t\treturn $this->dataCache['version'];\n\t\t}\n\n\t\tif (empty($this->firebird))\n\t\t{\n\t\t\t$this->initialize();\n\t\t}\n\n\t\treturn $this->dataCache['version'] = $this->firebird->server_info;\n\t}", "public function getVersion() \n\t{\n\t\t$url = \"http://{$this->wnServer}/webnative/portalDI?action=version\";\n\t\treturn $this->curlObj->fetch_url($url);\n\t}", "public function get_version(): string\n {\n return $this->version;\n }", "public function get_version() {\n return $this->version;\n }", "public function get_version() { \n\n\t\treturn $this->version; \n\n\t}", "public function get_version()\n {\n return $this->version;\n }", "public function get_version()\n {\n return $this->version;\n }", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function latest_version();", "public function getLatestVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->get(self::VERSION);\n }", "function getBridgeSoftwareVersion() {\n return $this->bridgeSoftwareVersion;\n }", "function ajan_get_db_version_raw() {\n\t\t$ajan = activitynotifications();\n\t\treturn !empty( $ajan->db_version_raw ) ? $ajan->db_version_raw : 0;\n\t}", "public function getVersion()\n {\n return $this->get(self::_VERSION);\n }", "public function getVersion()\n {\n return $this->sendrequest('version', null);\n }", "public function get_version(){\n return $this->_version;\n }", "public function getVersion(): string;", "public function getVersion(): string;", "public static function get_version() {\n return self::$version;\n }", "public function getVersion() {\n\t\tif($this->version == \"\")\n\t\t$this->version = \"0.0.0\";\n\t\treturn $this->version;\n\t}", "protected function getLatestVersion()\n {\n $latestVersion = trim($this->rfs->getContents($this->getOriginName(), $this->getBaseUrl() . '/version', false));\n\n return $latestVersion;\n }", "public function getVersion()\n {\n return $version;\n }", "public static function getCurrent() {\n return new amvonetroom_Version(AMVONETROOM_PROTOCOL_VERSION);\n }", "function ajan_get_version() {\n\t\treturn activitynotifications()->version;\n\t}", "public function getAppVersion() : string {\n return $this->configVars['version-info']['version'];\n }", "abstract public function getIntegrationVersion();", "public function get_version()\n\t{\n\t\treturn $this->version;\n\t}", "public function getVersion(){\n\t\treturn $this->version;\n\t}", "public function getVersion() {\n return isset($this->data['version']) ? $this->data['version'] : null;\n }", "public function getVersion(): string\n {\n return $this->version;\n }", "public function getVersion(): string\n {\n return $this->version;\n }", "public static function getVersion()\n {\n global $application_version;\n return $application_version;\n }", "function getVersion ()\n {\n return $this->_version;\n }", "function get_version() {\n return self::VERSION;\n }", "function get_version() {\n return self::VERSION;\n }", "public function getVersion(){\n $client = Yii::$app->infoServices;\n return $client->getVersion()->return->version;\n }", "function &getNewVersion() {\n\t\treturn $this->newVersion;\n\t}", "public function getVersion()\n {/*{{{*/\n return $this->_version;\n }", "public function getVersion()\r\n {\r\n return $this->version;\r\n }", "public function getLocalVersion(){\n\t\t\n\t\treturn getJSON( 'version.php' );\n\t}", "public function getVersion() {\r\n return $this->version;\r\n }", "public function getVersion(): string\n {\n return $this->rawData['version'];\n }", "public function getVersion() {\r\n return $this->versione;\r\n }", "public function getVersion(): string {}", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion() {\n\t\treturn $this->version;\n\t}", "function &getCurrentVersion() {\n\t\treturn $this->currentVersion;\n\t}", "public function getVersion(): string\n {\n return $this->data->version;\n }", "function getCurrentVersion() {\n return json_decode(file_get_contents(storage_path('app/version.json')), true);\n}", "public function getVersion()\n {\n return $this->values[\"version\"];\n }", "public final function getVersion() : string\n {\n return $this->version;\n }", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();" ]
[ "0.6712791", "0.66478693", "0.6558857", "0.6549252", "0.65477484", "0.6508815", "0.6446503", "0.64388424", "0.64146364", "0.63896656", "0.6376324", "0.63636196", "0.6360713", "0.6360713", "0.6352183", "0.6352183", "0.6352183", "0.6352183", "0.6352183", "0.6352183", "0.6352183", "0.6352183", "0.6352183", "0.6352183", "0.6347109", "0.6343", "0.63345665", "0.63169765", "0.6310535", "0.62878925", "0.6286282", "0.6278122", "0.624785", "0.624785", "0.6237136", "0.62345856", "0.62243485", "0.62222743", "0.6194522", "0.61818427", "0.6178856", "0.6170231", "0.61669844", "0.6148815", "0.61479264", "0.61461776", "0.61461776", "0.61354595", "0.61255795", "0.61230904", "0.61230904", "0.61185884", "0.60795116", "0.6073919", "0.6073725", "0.60677654", "0.606641", "0.60659945", "0.60658747", "0.6065576", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6060144", "0.6055532", "0.6054824", "0.6041253", "0.6028159", "0.60223734", "0.6020847", "0.6020398", "0.6020398", "0.6020398", "0.6020398", "0.6020398" ]
0.0
-1
Determines if the subscribed link has block objects.
public function hasBodyLines() { return count($this->getBodyLines()) > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasBlocks(): bool\n {\n return $this->blocks->isNotEmpty();\n }", "public function hasBlocks()\n {\n return (count($this->getBlocks())) ? true : false;\n }", "public function hasBlock(): bool\n {\n return $this->blockAttr !== NULL;\n }", "public function getIsBlock();", "public function hasLink() {\n return $this->link!=null;\n }", "private function hasEventLinks()\n {\n return !empty($this->eventlinks);\n }", "public function is_block ()\n {\n return is_a( $this, __NAMESPACE__ . '\\\\Block' );\n }", "public function hasLinks(){\n return $this->_has(9);\n }", "public function has_links(){\n return count( $this->links ) == 0 ? false : true;\n }", "public function hasBlockLength()\n {\n return $this->block_length !== null;\n }", "public function hasSub()\n {\n if(is_null($this->items) || !count($this->items)) return false;\n return true;\n }", "public function hasLinkImage()\n {\n return $this->LinkImage()->exists();\n }", "public function hasOnlySeatedBlocks(){\n /** @var Block $block */\n foreach ($this->getBlocks() as $block){\n if ($block->getType() === Block::UP){\n return false;\n }\n }\n return true;\n }", "public function hasBlocked()\n {\n return $this->blocked !== null;\n }", "public function everSubscribed()\n {\n return !empty($this->billing_subscription);\n }", "public function hasSubItems() {\n return count($this->subItems) > 0;\n }", "public function hasSubscribers(){\n return $this->subscriber_count > 1;\n }", "public function hasItems()\n {\n return $this->getItemsCount() > 0;\n }", "public function hasBlockOffset()\n {\n return $this->block_offset !== null;\n }", "public function has_items() {\n\n\t\treturn count( $this->items ) > 0;\n\t}", "public function is_single()\r\n\t{\r\n\t\treturn $this->block == NULL;\r\n\t}", "public function isSubscribed()\n {\n return null !== $this->queue;\n }", "public static function hasItems() {\n\t\treturn self::itemCount() > 0;\n\t}", "public function hasLink(): bool\n {\n return ! is_null($this->link);\n }", "public function hasReferenceSets(){\n return $this->_has(1);\n }", "public function isCollection()\n {\n if (Checkout::config()->click_and_collect) {\n $type = Session::get(\"Checkout.Delivery\");\n \n return ($type == \"collect\") ? true : false;\n } else {\n return false;\n }\n }", "public function hasChain(/* ... */)\n {\n return (null !== $this->_parent);\n }", "public function isTopicsLoaded()\n {\n return null !== $this->collTopics;\n }", "function has_blocks($post = \\null)\n {\n }", "public function hasUnsquaredBlock(){\n foreach ($this->blocks as $block){\n if ($block->isNotSquared()){\n return true;\n }\n }\n return false;\n }", "public function hasReferenceIds(){\n return $this->_has(2);\n }", "public function isSubscribedToMailchimpList();", "public function hasLinkedIn(): bool;", "public function hasItems(){\n return $this->_has(4);\n }", "public function isBlockGenerationOn()\n {\n return $this->query('getgenerate', false) === 'true';\n }", "public function hasNetworks() {\n return $this->_has(1);\n }", "function has_block($block_name, $post = \\null)\n {\n }", "public function has_items()\n {\n }", "public function isProductLinksCanBePurchasedSeparately()\n {\n return (bool) $this->locator->getProduct()->getData('links_purchased_separately');\n }", "public function needBlockPaging()\n {\n if ($this->getCountPage() > 3 * $this->getBlockItem()) {\n return true;\n }\n\n return false;\n }", "public function isSigMember()\n {\n return $this->sigs()->where('main', 0)->count() > 0;\n }", "public function isReferencingCollection(): bool;", "public function hasItems(): bool\n {\n return count($this->items) > 0 ? true : false;\n }", "public function hasNestedSlots()\n {\n return count($this->nestedSlots) > 0;\n }", "public function hasBlock(string $name): bool\n {\n return array_key_exists($name, $this->blocks);\n }", "public function hasBU()\n {\n return $this->get(self::BU) !== null;\n }", "public function hasReferences(){\n return $this->_has(1);\n }", "public function HasDisplays(): bool\n {\n return $this->DisplayLinks()->count() > 1;\n }", "public function isLinked() {\n if ($this->credential->getAccessToken() == null)\n return false;\n else\n return true;\n }", "public function hasInvoiceItems(): bool\n {\n return ($this->invoices()->count() !== 0) ? true : false;\n }", "public function hasAttachments()\n {\n return !empty($this->_attachments);\n }", "public function hasObject();", "public function hasNetworks() {\n return $this->_has(4);\n }", "public function isSubscribed(): bool;", "public function has_items() {\n\t\tif ( $this->{$this->loop_vars['item_count']} ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function isWithinCachedBlock(Mage_Core_Block_Abstract $block) {\n\t\t$step = $block;\n\t\twhile ($step instanceof Mage_Core_Block_Abstract) {\n\t\t\tif (!is_null($step->getCacheLifetime())) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t$step = $step->getParentBlock();\n\t\t}\n\t\treturn false;\n\t}", "public function isNeeded() {\n if ($this->isFacebookLinked() || $this->isTwitterLinked() || $this->isLinkedInLinked()) {\n return TRUE;\n }\n return FALSE;\n }", "public function hasAttachments() {\n return $this->_has(14);\n }", "public function isNew()\n\t{\n\t return (count($this->getContentBlocks()) == 0);\n\t}", "protected function hasCreatedPackSubscription(): bool\n {\n return !!$this->packSubscription;\n }", "private static function lp_check_is_block_editor() {\n\n // Check if Guteberg plugin available.\n if ( function_exists( 'is_gutenberg_page' ) && is_gutenberg_page() ) {\n return true;\n }\n\n $current_screen = get_current_screen();\n\n if ( method_exists( $current_screen, 'is_block_editor' ) && $current_screen->is_block_editor() ) {\n return true;\n }\n\n return false;\n }", "public function hasItems () {\n\n $order = $this->getOrder();\n\n if ( !$order ) {\n return false;\n }\n\n return $order->hasItems();\n }", "public function hasAncestors();", "public function hasObject()\n {\n return (bool)!empty($this->object);\n }", "public function hasAttachments()\n {\n return $this->isMultipart() && $this->countParts() > 0;\n }", "public function hasItems(){\n return $this->_has(13);\n }", "public function hasFromBoxId()\n {\n return $this->FromBoxId !== null;\n }", "public function hasBlock($name)\n {\n return isset($this->blocks[(string) $name]);\n }", "public function hasAttachments() {\n return $this->_has(10);\n }", "public function isSubscribed()\n {\n // TODO there seems to be an inconsistency when getting database records via Repository or via ObjectStorage\n // TODO when getting via Repository, a Typo3bb-FrontendUser is returned\n // TODO when getting via ObjectStorage, IglarpTemplate-FrontendUser is returned\n $user = FrontendUserUtility::getCurrentUser();\n if (is_null($user)) {\n return false;\n } else {\n return $this->subscribers->contains($user);\n }\n }", "public function hasNetworks() {\n return $this->_has(5);\n }", "public function attached()\n {\n return ( ! is_null($this->memory));\n }", "public function available() {\r\n\t\t// All streams were read\r\n\t\tif($this->_streamsCount===0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// The current stream has more data\r\n\t\tif(reset($this->_streams)->available()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// Check the other streams, if they have data\r\n\t\tforeach($this->_streams as $stream) {\r\n\t\t\tif($stream->available()) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public function is_shareable() {\n\t\tif ( $this instanceof Module_With_Owner && $this->is_connected() ) {\n\t\t\t$datapoints = $this->get_datapoint_definitions();\n\t\t\tforeach ( $datapoints as $details ) {\n\t\t\t\tif ( ! empty( $details['shareable'] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function isBlackListed($location) {\n\t\tif($block = $this->master->getBlock($location->block)){\n\t\t\treturn $this->blacklist->isInBlackList($block->modid,$block->blockid,$block->metadata);\n\t\t}\n\n\n\n\n\t\tvar_dump($location);\n\t\techo 'cant get block from master!'.\"\\n\";\n\t\treturn true;\n\t}", "function hasAttachments() {\n\t\t$attachments =& $this->getAttachments();\n\t\treturn ($attachments != null && count($attachments) != 0);\n\t}", "public function isMultishippingCheckoutAvailable(){\n $multishippingFlag = parent::isMultishippingCheckoutAvailable();\n if(Mage::getSingleton('mysubscription/cart')->getMsquote()->hasItems()){\n return false;\n }\n return $multishippingFlag;\n }", "public function hasContent(): bool\n {\n return !empty($this->getAssetId());\n }", "public function hasReferences() {}", "public function hasBactive(){\n return $this->_has(6);\n }", "public function hasAttachments(): bool\n {\n return $this->attachments->isNotEmpty();\n }", "public function isRelatedToNewsletter(): bool\n {\n return false;\n }", "public function hasSections()\n {\n return null !== @$this->sections;\n }", "public function hasAttachments() {\n return $this->_has(20);\n }", "public function hasWishlistItems()\n {\n return $this->getWishlistItemsCount() > 0;\n }", "public function exists() {\n return $this->shareData !== false;\n }", "public function hasTopics() {\n\t\treturn $this->topics()->count() > 0;\n\t}", "public function hasShopgateConnections()\n {\n return $this->getShopgateConnections()->getSize();\n }", "public function getCanShowAdditionalBooks()\n {\n return $this->helper->getCanShowAdditionalSubscriptions(\n $this->getCustomer()->getStore()->getWebsite()\n );\n }", "public function hasBlive(){\n return $this->_has(5);\n }", "public function hasAdditionalInfosList()\n {\n return $this->AdditionalInfos !== null;\n }", "public function isEmptyBlockVisible()\n {\n $this->waitFormToLoad();\n return $this->_rootElement->find($this->empty)->isVisible();\n }", "protected function isLink() {}", "public function has_items() {\n global $DB;\n if (!is_null($this->cards)) {\n return !empty($this->cards);\n }\n $result = $DB->count_records('swipe_item', array('swipeid' => $this->cm->instance));\n return !empty($result);\n }", "public function isBlockable()\n {\n if ($this->_hasVar('user_blockable')) {\n return (boolean) $this->_getVar('user_blockable');\n } else {\n return true;\n }\n }", "public function hasParentRelayCount()\n {\n return $this->parent_relay_count !== null;\n }", "public function hasRelations()\n {\n return 0 !== count($this->relations);\n }", "public function isBlocked() {\n return $this->user !== null && $this->user->blocked;\n }", "public function isSubscribedInviteReminder(){\n\n\t\t// check if the object has been hydrated\n\t\tif(null === $this->id){\n\t\t\t$this->load();\n\t\t}\n\n\t\t// this method only available for email obj w/template = 'inviteReminder'\n\t\tif('inviteReminder' !== $this->template) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// look for the corresponding \"unsubscribe\" email record for this gift/email. If it exists, they have unsubscribed\n\t\t$sql = \"\n\t\t\tSELECT \t`id`\n\t\t\tFROM \t`emails`\n\t\t\tWHERE \t`emailDigest` = '$this->emailDigest'\n\t\t\tAND \t`giftId` = $this->giftId\n\t\t\tAND \t`template` = 'inviteReminderUnsubscribe'\n\t\t\";\n\n\t\t$result = db::query($sql);\n\t\t$recordCount = mysql_num_rows($result);\n\t\treturn (0 === $recordCount);\n\n\t}", "function checkBlockDefinitionsComplete() {\n for ($blockNo=0; $blockNo < $this->blockTabCnt; $blockNo++) {\n $btr =& $this->blockTab[$blockNo];\n if ($btr['definitionIsOpen']) {\n $this->triggerError (\"Missing \\$EndBlock command in template for block \" . $btr['blockName'] . \".\");\n return false; }}\n if ($this->currentNestingLevel != 0) {\n $this->triggerError (\"Block nesting level error at end of template.\");\n return false; }\n return true; }", "public function hasPartsToIssue(): bool\n {\n return count($this->issuedItems) > 0;\n }" ]
[ "0.69219816", "0.6662812", "0.6546309", "0.64016914", "0.6349995", "0.61806804", "0.6134335", "0.60716873", "0.6052961", "0.60414016", "0.6039339", "0.5993973", "0.5971793", "0.59312606", "0.58708566", "0.58666676", "0.584865", "0.58463985", "0.5841576", "0.57711387", "0.57599", "0.57240224", "0.5717772", "0.5717422", "0.5653458", "0.56188405", "0.5605051", "0.56049484", "0.5603303", "0.5597805", "0.5571491", "0.55635124", "0.55539614", "0.5539752", "0.55362076", "0.5534313", "0.5511132", "0.5510875", "0.5495168", "0.5488542", "0.5472258", "0.5471431", "0.54675883", "0.54646134", "0.54589397", "0.54427", "0.54416174", "0.5435804", "0.5428371", "0.54176795", "0.5416748", "0.54045224", "0.54006916", "0.53998977", "0.539681", "0.5390176", "0.53858024", "0.5381402", "0.5364924", "0.53648263", "0.5361466", "0.53562796", "0.53542167", "0.5348315", "0.53461945", "0.53441346", "0.5339849", "0.5337193", "0.5336444", "0.5316714", "0.53081524", "0.53048813", "0.5291008", "0.5278117", "0.5277079", "0.52760535", "0.5275046", "0.52717173", "0.5267026", "0.52650887", "0.52642214", "0.526311", "0.5261037", "0.5252143", "0.52470964", "0.52459437", "0.52436787", "0.5237015", "0.5233166", "0.5228698", "0.52221036", "0.52195877", "0.521724", "0.52064246", "0.519706", "0.51944935", "0.5194422", "0.51927525", "0.5187537", "0.51811504", "0.5180725" ]
0.0
-1
Gets the block objects.
public function getBodyLines() { return $this->bodyLines; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GetAll() {\n\t\treturn $this->BlockList;\n\t}", "public function getBlocks(): Collection;", "public function get_blocks ()\n {\n return $this->_blocks;\n }", "public function blocks() { return $this->_m_blocks; }", "protected function getBlocks()\n\t{\n\t\treturn blx()->entries->getAllBlocks();\n\t}", "public function getBlocks()\n {\n return $this->blocks;\n }", "public function getBlocks()\n {\n return $this->blocks;\n }", "public function blocks()\n {\n return $this->blocks ?: $this->blocks = $this->loadBlocks();\n }", "public function all(): array\n {\n return $this->blocks->all();\n }", "public function getBlocks(): Collection\n {\n return $this->blocks;\n }", "public function getBlocks() : array {\n\n\t\t\treturn $this->blocks;\n\t\t}", "protected function fetchBlocks()\n {\n if (null === $this->blocks)\n {\n $this->blocks = array();\n\n $allBlocks = ContentBlockQuery::create()\n ->find()\n ;\n\n foreach ($allBlocks as $block)\n {\n /* @var $block ContentBlock */\n $this->blocks[$block->getName()][$block->getLocale()] = $block;\n }\n }\n }", "public function getRelatedBlocks() {\n $blockLib = new \\Cx\\Modules\\Block\\Controller\\BlockLibrary();\n $blocks = $blockLib->_getBlocksForPageId($this->getId());\n return $blocks;\n }", "protected function loadBlocks()\n {\n $blocks = [];\n\n if ($pcosBlocks = $this->pcos('blocks')) {\n foreach ($pcosBlocks as $pcos) {\n $blocks[] = $this->newBlock($pcos);\n }\n }\n\n return $this->newBlockCollection($blocks);\n }", "public function availableBlocks(): array\n {\n return Billingo::get('invoices/blocks');\n }", "public function getCachedBlocks()\n {\n return $this->cachedBlocks;\n }", "public function getObjects()\n {\n return $this->objects;\n }", "function getObjects() {\n return $this->objects;\n }", "public function getThemeBlocks()\n {\n return $this->blocks;\n }", "public function getAllBlocks()\n\t{\n\t\treturn $this->m_regionBlocks;\n\t}", "public function load_blocks_list() {\n $tmp_blocks = apply_filters('wpucacheblocks_blocks', array());\n $blocks = array();\n foreach ($tmp_blocks as $id => $block) {\n /* Path ex : /tpl/header/block.php */\n if (!isset($block['fullpath']) && !isset($block['path'])) {\n /* A path should always be defined */\n continue;\n }\n /* Full path to the file */\n if (!isset($block['fullpath'])) {\n $block['fullpath'] = get_stylesheet_directory() . $block['path'];\n }\n\n /* Reload hooks */\n if (!isset($block['reload_hooks']) || !is_array($block['reload_hooks'])) {\n $block['reload_hooks'] = array();\n } else {\n /* Keep a list of all hooks used */\n foreach ($block['reload_hooks'] as $hook) {\n $this->reload_hooks[$hook] = $hook;\n }\n }\n\n if (!isset($block['minify'])) {\n $block['minify'] = true;\n }\n\n /* Expiration time */\n if (!isset($block['expires'])) {\n $block['expires'] = 3600;\n } else {\n /* Allow infinite lifespan for a cached block ( no front reload ) */\n if ($block['expires'] == 0) {\n $block['expires'] = false;\n }\n }\n $blocks[$id] = $block;\n }\n return $blocks;\n }", "public function blocks()\n {\n return $this->belongsToMany(Block::class);\n }", "public abstract function getObjects();", "public function getall($args)\n {\n // create an empty items array\n $items = array();\n\n // Security check\n if (!SecurityUtil::checkPermission('Blocks::', '::', ACCESS_OVERVIEW)) {\n return $items;\n }\n\n $dbtable = DBUtil::getTables();\n $blockstable = $dbtable['blocks'];\n $blockscolumn = $dbtable['blocks_column'];\n $sort = isset($args['sort']) && $args['sort'] ? $args['sort'] : '';\n $sortdir = isset($args['sortdir']) && $args['sortdir'] ? $args['sortdir'] : 'ASC';\n if ($sort) {\n $sort .= \" $sortdir\";\n } else {\n $sort = 'title';\n }\n\n // backwards parameter compatability\n if (isset($args['modid']) && is_numeric($args['modid'])) {\n $args['module_id'] = $args['modid'];\n }\n\n // initialise the where arguments array\n $whereargs = array();\n\n // filter by block position\n if (isset($args['blockposition_id']) && is_numeric($args['blockposition_id']) && $args['blockposition_id']) {\n $where = \"pid = $args[blockposition_id]\";\n $bids = DBUtil::selectFieldArray('block_placements', 'bid', $where);\n $bidList = $bids ? implode(',', $bids) : -1;\n $whereargs[] = \"$blockscolumn[bid] IN ($bidList)\";\n }\n\n // filter by active block status\n if (isset($args['inactive']) && $args['inactive']) {\n $args['active_status'] = 0;\n }\n if (isset($args['active_status']) && is_numeric($args['active_status']) && $args['active_status']) { // new logic\n $whereargs[] = \"$blockscolumn[active] = \" . ($args['active_status'] == 1 ? '1' : '0');\n }\n\n // filter by module\n if (isset($args['module_id']) && is_numeric($args['module_id']) && $args['module_id']) {\n $whereargs[] = \"$blockscolumn[mid] = '\" . DataUtil::formatForStore($args['module_id']) . \"'\";\n }\n\n // filter by language\n if (isset($args['language']) && $args['language']) {\n $whereargs[] = \"$blockscolumn[language] = '\" . DataUtil::formatForStore($args['language']) . \"'\";\n }\n\n // construct the where clause\n $where = '';\n if (!empty($whereargs)) {\n $where = 'WHERE ' . implode(' AND ', $whereargs);\n }\n\n $permFilter = array();\n $permFilter[] = array(\n 'component_left' => 'Blocks',\n 'component_middle' => '',\n 'component_right' => '',\n 'instance_left' => 'bkey',\n 'instance_middle' => 'title',\n 'instance_right' => 'bid',\n 'level' => ACCESS_OVERVIEW);\n\n $joinInfo = array();\n $joinInfo[] = array(\n 'join_table' => 'modules',\n 'join_field' => 'name',\n 'object_field_name' => 'module_name',\n 'compare_field_table' => 'mid',\n 'compare_field_join' => 'id');\n\n return DBUtil::selectExpandedObjectArray('blocks', $joinInfo, $where, $sort, -1, -1, '', $permFilter);\n }", "public function blocklistAction()\n {\n // Module name\n $name = $this->params('name', '');\n\n $rowset = Pi::model('block')->select(['module' => $name]);\n $blocks = [];\n foreach ($rowset as $row) {\n if ('tab' == $row->type) {\n continue;\n }\n $blocks[] = [\n 'id' => $row->id,\n 'name' => $row->name,\n 'caption' => $row->title,\n 'description' => $row->description,\n ];\n }\n\n return [\n 'status' => 1,\n 'data' => $blocks,\n ];\n }", "public function getBlocks() {\n // Get blocks definition.\n $definitions = $this->blockManager->getFilteredDefinitions('block_ui', $this->contextRepository->getAvailableContexts());\n foreach ($this->getRestrictedBlocks() as $plugin_id) {\n if (isset($definitions[$plugin_id])) {\n unset($definitions[$plugin_id]);\n }\n }\n\n return $definitions;\n }", "public static function get_block_data()\n {\n }", "public function getBlockList() {\n\t\t\n\t\treturn $this->_getResponse(self::URL_USERS_BLOCK_LIST, $this->_query);\n\t}", "public function blocks()\n {\n return $this->hasMany(Models\\AccountBlock::class, 'account_id');\n }", "public function getThemeBlocks();", "public function getMazeBlocks() {\n return $this->mazeBlockArray;\n }", "public function actionGetBlocks()\n {\n $this->requirePostRequest();\n $this->requireAjaxRequest();\n\n // get elemendIds from POST\n $elemendIds = craft()->request->getPost('elemendIds');\n\n $criteria = craft()->elements->getCriteria(ElementType::MatrixBlock);\n $criteria->id = $elemendIds;\n $blocks = $criteria->find();\n\n\n // return blockTypeIdsByElementId or false\n if ( $blocks ) {\n $this->returnJson(array(\n 'success' => true,\n 'blocks' => $blocks\n ));\n } else {\n $this->returnJson(array(\n 'success' => false\n ));\n }\n }", "public function getBlockTypes(){\n\t\n\t\tif( empty($this->_block_types) ){\n\t\n\t\t\t$query\t= $this->_db->getQuery(true);\n\t\t\t\n\t\t\t$query->select( 't.content_type_id AS value, t.content_type_name AS text' );\n\t\t\t$query->from( '#__zbrochure_content_types AS t' );\n\t\t\t$query->where( 't.content_type_published = 1' );\n\t\t\t\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_block_types = $this->_db->loadObjectList();\n\n\t\t}\n\t\t\n\t\treturn $this->_block_types;\n\t\n\t}", "public function getBlock(){\n\t\n\t\tif( empty($this->_block) ){\n\t\n\t\t\t$query\t= $this->_db->getQuery(true);\n\t\t\t\n\t\t\t$query->select( 'b.*, t.*, u.*, m.email AS modified_email, m.username AS modified_username, m.name AS modified_name' );\n\t\t\t\n\t\t\t$query->from( '#__zbrochure_content_blocks AS b' );\n\t\t\t\n\t\t\t$query->join( 'LEFT', '#__users AS u ON u.id = b.content_block_created_by' );\n\t\t\t$query->join( 'LEFT', '#__users AS m ON m.id = b.content_block_modified_by' );\n\t\t\t$query->join( 'LEFT', '#__zbrochure_content_types AS t ON t.content_type_id = b.content_block_type' );\n\t\t\t\n\t\t\t$query->where( 'b.content_block_id = '.$this->_id );\n\t\t\t\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_block = $this->_db->loadObject();\n\t\t\t\n\t\t\t$this->_block->render\t= $this->_getContent();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $this->_block;\n\t\n\t}", "function getBlockOutputs() {\n\tglobal $settings;\n\t//echo \"getting blocks\";\n\t\n\t$blockOutput = array();\n\t\n\t$blocksTmp = file_get_contents($settings['channelMemoryMapsFile']);\n\t\n\t//print_r($blocksTmp);\n\t\n\t$blocks = explode(\"\\n\",$blocksTmp);\n\t\n\t//print_r($blocks);\n\t$blockIndex=0;\n\t\n\tfor($blockIndex =0; $blockIndex<=count($blocks)-1;$blockIndex++) {\n\t\t$blockParts = explode(\",\",$blocks[$blockIndex]);\n\t\t$blockOutput[] = $blockParts[0];\n\t\t//$blockIndex++;\n\t\t//$blockOutput [] =\n\t}\n\t//print_r($blockOutput);\n\t\n\treturn $blockOutput;\n}", "public function getBlockListType()\n {\n $includeUncommitted = $this->_includeUncommittedBlobs;\n $includeCommitted = $this->_includeCommittedBlobs;\n\n return self::$_listType[$includeUncommitted][$includeCommitted];\n }", "public function loadAllContentBlocksForRender()\n\t{\n\t\t$lang = $this->getCurrentLang();\n\t\t$contentBlocks = ContentBlockTable::getInstance()->loadAllCurrentVersions($this->id, $lang);\n\n\t\tforeach ($contentBlocks as $contentBlock)\n\t\t{\n\t\t\t// We have to link the ContentBlock back to this group - it needs to know about the group for its definition\n\t\t\t$contentBlock->ContentGroup = $this;\n\n\t\t\t// We have constructed the query so that Versions just contains the current version\n\t\t\t$currentContentBlockVersion = $contentBlock->Versions->getFirst();\n\n\t\t\t// The ContentBlockVersion needs to be linked back to the ContentBlock, as it gets its definitions from there\n\t\t\t$currentContentBlockVersion->ContentBlock = $contentBlock;\n\t\t\t$contentBlockLang = $contentBlock->getCurrentLang();\n\n\t\t\t// By setting this, the ContentBlock will not need to do an additional DB query to load its current version.\n\t\t\t$contentBlock->setCurrentVersionsCache($currentContentBlockVersion, $contentBlockLang);\n\t\t}\n\n\t\t$this->ContentBlocks = $contentBlocks;\n\t}", "public function getBlockDefinitions(){\n\t\tif($this->blockDefinitions->isEmpty() && count($this->sections)){\n\t\t\t$this->loadBlockDefinitions();\n\t\t}\n\n\t\treturn $this->blockDefinitions;\n\t}", "function retrieve_reporting_blocks($condition = null, $offset = null, $max_objects = null, $order_by = null)\r\n {\r\n return $this->retrieve_objects(ReportingBlock :: get_table_name(), $condition, $offset, $max_objects, $order_by, ReportingBlock :: CLASS_NAME);\r\n }", "public function get_latest_blocks()\n {\n try {\n $response = $this->client->get(\"blocks\");\n } catch (RequestException $e) {\n throw new ToshiException($e->getResponse()->getbody());\n }\n\n return json_decode($response->getBody());\n }", "public static function getAll() : array {\n return self::$objects;\n }", "function get_blocks( $content, $post_id = 0 ) {\n\t$output = [];\n\t$blocks = parse_blocks( $content );\n\n\tforeach ( $blocks as $block ) {\n\t\t$block_data = handle_do_block( $block, $post_id );\n\t\tif ( $block_data ) {\n\t\t\t$output[] = $block_data;\n\t\t}\n\t}\n\n\treturn $output;\n}", "private static function getBlockItems($xmlobject) {\n\t\t$data = array ();\n\t\t$i = 0;\n\t\tif (count ( $xmlobject )) {\n\t\t\tforeach ( $xmlobject as $blocks ) {\n\t\t\t\tforeach ( $blocks->block as $block ) {\n\t\t\t\t\t$data [$i] ['block'] ['name'] = ( string ) $block;\n\t\t\t\t\t$data [$i] ['action'] = ( string ) $block ['action'];\n\t\t\t\t\t$data [$i] ['side'] = ( string ) $block ['side'];\n\t\t\t\t\t$data [$i] ['position'] = ( string ) $block ['position'];\n\t\t\t\t\t$i ++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (! empty ( $data ) && is_array ( $data )) {\n\t\t\tself::$blocks = array_merge ( self::$blocks, $data );\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function index() {\n return $this->systemManager->getBlockContents();\n }", "public function getObjects()\n {\n return get_object_vars($this);\n }", "public function getObjects()\n {\n return get_object_vars($this);\n }", "public function blocks()\n {\n return $this->hasMany('Secondnetwork\\VoyagerPageBlocks\\PageBlock');\n }", "public function getBlocksByPool($pool) {\n return $this->processSimpleBlockJSON($this->blockchain->get('blocks/'.$pool, array('format'=>'json')));\n }", "public function loadCollectionReferences(Block $block): array;", "public function loadCollections(Block $block): array;", "public function all() {\r\n\t\t$objects = []\r\n\t\twhile($this->hasNext()) {\r\n\t\t\t$next = $this->next();\r\n\t\t\tif($next == FALSE) break;\r\n\t\t\t$objects->push($next);\r\n\t\t}", "public function getChunksList(){\n return $this->_get(2);\n }", "private function buildBlocks($body){\n\n return $body['blocks'];\n }", "public function getBlockInfo();", "public function getProcessingBlocks()\n {\n static $resultBlocks = array();\n\n if (empty($resultBlocks)) {\n $blocks = explode(';', $this->getStoreConfig(self::XML_PATH_OTHER_BLOCKS));\n\n $resultBlocks = array();\n foreach ($blocks as $blockName) {\n $blockName = trim($blockName);\n if (!empty($blockName)) {\n $resultBlocks[] = $blockName;\n }\n }\n }\n\n return $resultBlocks;\n }", "public function getAllObjectConfigurations(): array\n {\n return $this->objects;\n }", "public function getBzList() {\n if ($this->cached['Bz']) return array_values($this->cache['Bz']);\n return XPClass::forName('de.uska.db.Progress')\n ->getMethod('getPeer')\n ->invoke()\n ->doSelect(new Criteria(\n array('bz_id', $this->getBz_id(), EQUAL)\n ));\n }", "public function getBlockNames()\n {\n return array_keys($this->blocks);\n }", "public static function getBlockRenderList()\n {\n return ['onePageBlock'];\n }", "protected function _getBlockArray()\n {\n return array(\n \n /*\n * Minicart section\n */\n array(\n 'version' => '0.0.1',\n 'identifier' => 'header_contact_information',\n 'stores' => [0],\n 'title' => 'Header Contact Information',\n 'content' => <<<HTML\n<div id=\"phone-hrs\">\n <a href=\"https://goo.gl/maps/seJQCD3gzao\" target=\"_blank\">Visit Us</a> or Call Us: <a id=\"phone-number\" href=\"tel:+18009387925\">(800) 938-7925</a> &nbsp;&nbsp; Today's Hours: 7:00am - 6:00pm\n</div>\nHTML\n ),\n array(\n 'version' => '0.0.3',\n 'identifier' => 'home_sidebar',\n 'stores' => [0],\n 'title' => 'Home Sidebar',\n 'content' => <<<HTML\n<div class=\"sidebar\">\n <div class=\"home-side-menu\">\n <h2 class=\"side-menu-title\">CATEGORIES</h2>\n {{block class=\"Smartwave\\Megamenu\\Block\\Topmenu\" name=\"sw.sidenav\" template=\"Smartwave_Megamenu::sidemenu.phtml\" ttl=\"3600\"}} </div>\n <!-- start -->\n <div id=\"ads-slider-demo-9\">\n <div class=\"item\">\n <h2><a href=\"#\">Blog Articles</a></h2>\n <ul class=\"recent-blog\" style=\"list-style:none; padding-inline-start:12px; padding-right:12px;\">\n <li><a title=\"Bosch Laser Level - GLL3-330CG\" href=\"https://www.masterwholesale.com/blog/bosch-green-line-laser-level-review/\" target=\"_blank\">Review: Bosch Green Line Laser Level</a></li>\n <li><a title=\"Makita LXT Lithium Ion Cordless Brushless Angle Grinder\" href=\"https://www.masterwholesale.com/blog/makita-18v-lxt-lithium-ion-cordless-brushless-angle-grinder-review/\" target=\"_blank\">Review: Makita&nbsp;<span>LXT Cordless Brushless Angle Grinder&nbsp;</span></a></li>\n <li><a title=\"Mixing Laticrete PermaColor Grout\" href=\"https://www.masterwholesale.com/blog/how-to-mix-small-batch-laticrete-permacolor-select-grout/\" target=\"_blank\">How to Mix a Small Batch of Laticrete PermaColor Grout</a></li>\n <li><a title=\"Polishing Tile Edges with Diamond Hand Polishing Pads\" href=\"https://www.masterwholesale.com/blog/polish-stone-porcelain-tile-diamond-hand-polishing-pads/\" target=\"_blank\">How to Polish Tile Edges w/ Diamond Hand Polishing Pads</a></li>\n <li><a title=\"Stoning Porcelain and Stone Tile\" href=\"https://www.masterwholesale.com/blog/stone-edge-porcelain-tile-stone/\" target=\"_blank\">How to Stone or Edge Porcelain and Stone Tiles</a></li>\n <li><a title=\"Bridge Saw vs Sliding Table Saw\" href=\"https://www.masterwholesale.com/blog/366-2/\" target=\"_blank\">Bridge Saw vs Sliding Table Saw</a></li>\n <li><a title=\"How to Core with a Diamond Core Drill Bit\" href=\"https://www.masterwholesale.com/blog/dry-core-drill-tile-stone/\" target=\"_blank\">How to Dry Core Drill on Stone or Tile</a></li>\n <li><a title=\"How to Reopen a diamond Core Bit \" href=\"https://www.masterwholesale.com/blog/master-wholesale-reopen-diamond-core-bit/\" target=\"_blank\">How to Sharpen or Reopen a Diamond Core Bit</a></li>\n <li><a title=\"Resin Glass Blade Shootout\" href=\"https://www.masterwholesale.com/blog/resin-glass-blade-shootout/\" target=\"_blank\">Resin Glass Blade Shootout with Blake Adsero</a></li>\n <li><a title=\"Makita Polishing Kit\" href=\"https://www.masterwholesale.com/blog/makita-pw5001c-wet-polishing-kit-master-wholesale/\" target=\"_blank\">How to Polish an Exposed Edge on Stone Tile</a></li>\n <li><a title=\"Deluxe Dry Polishing Kit\" href=\"https://www.masterwholesale.com/blog/?p=254\" target=\"_self\">MWI Deluxe Dry Polishing Kit Demo</a></li>\n <li><a title=\"Laser Level Shootout\" href=\"https://www.masterwholesale.com/blog/laser-level-shootout/\" target=\"_self\">Laser Level Shootout</a></li>\n <li><a title=\"Ishii Tile Cutters\" href=\"https://www.masterwholesale.com/blog/how-to-assemble-and-use-the-ishii-blue-tile-cutters/\" target=\"_self\">How to Assemble and Use Ishii BlueTile Cutters</a></li>\n <li><a title=\"Diamond Blade Shootout\" href=\"https://www.masterwholesale.com/blog/tile-saw-diamond-blade-shootout/\" target=\"_self\">Tile Saw Diamond Blade Shootout</a></li>\n </ul>\n </div>\n </div>\n <!-- end --> \n <!-- start -->\n <div id=\"ads-slider-demo-9\" class=\"owl-carousel\">\n <div class=\"item\" style=\"text-align:center;\"> <img src=\"\" alt=\"\" style=\"display:inline-block;\"/> </div>\n </div>\n <!-- end --> \n <!-- start -->\n <div id=\"ads-slider-demo-9\">\n <div class=\"item\" style=\"text-align:center;\"> {{block class=\"Magento\\Framework\\View\\Element\\Template\" name=\"single_special\" template=\"Magento_Catalog::product/view/single_special.phtml\" ttl=\"3600\"}} </div>\n </div>\n <!-- end --> \n </div>\nHTML\n ),\n );\n }", "public function getObjects()\n {\n return $this->hasMany(Object::className(), ['address_id' => 'id']);\n }", "function get_block_types() {\n\treturn array(\n\t\t'Text'=>TextBlock::GetLabel(),\n\t\t'RSS'=>RSSBlock::GetLabel(),\n\t\t'Timeline'=>TimelineBlock::GetLabel(),\n\t\t'Quote'=>QuoteBlock::GetLabel(),\n\t\t'Links'=>LinksBlock::GetLabel(),\n\t\t'Calendar'=>CalendarBlock::GetLabel()\n\t);\n}", "function expose_blocks($content) {\n $raw_blocks = parse_blocks($content);\n $blocks = array();\n\n foreach ($raw_blocks as $block) {\n if ($block['blockName']) { \n $block['content'] = render_block($block);\n $blocks[] = $block;\n }\n }\n\n return $blocks;\n}", "public function blocks($settings = array())\n { \n $data = false;\n // MAKE API CALL\n $defaults = array(\n 'debug' => false,\n 'details' => false,\n 'method' => 'block/latest',\n 'chain' => $this::$blockchain,\n 'base' => $this::$options['blockchains'][$this::$blockchain]['base'],\n 'id' => 5,\n 'showtxn' => 1,\n 'showtxnio' => 0\n );\n $options = array_merge($defaults, $settings);\n $key = 'blocks_'.$options['chain'].'_'.$options['id'];\n $results = $this::$cache->read($key, 'shortterm');\n if(!$results){\n $results = $this->get($options);\n $this::$cache->write($key, $results, 'shortterm');\n }\n elseif($options['debug'] === true)\n {\n $this->url($options);\n }\n if($options['details'] === true)\n {\n $data = $results;\n }\n else if(isset($results['status']) && $results['status'] == 'success')\n {\n $blocks = $results['data']['blocks'];\n $data = $blocks;\n }\n return $data;\n }", "public function getBlockLoader()\n {\n return $this['pantono.service.blocks'];\n }", "public function chunks() { return $this->_m_chunks; }", "public function getObjects()\n {\n throw new Exception('To be implemented');\n }", "public function nethash(): Collection\n {\n return $this->get('api/blocks/getNethash');\n }", "public static function GET_AREA_BLOCKS(){\n\t $SQL_String = \"SELECT * FROM area_block WHERE am_id=:amid AND _keep=1 ORDER BY ab_id ASC\";\n\t return $SQL_String;\n\t}", "public function getBlock()\n {\n return $this->block;\n }", "public function getBlocks($id)\n {\n $board = $this->boards->where('id', '=', $id)->first();\n // Check if the board exists\n if (is_null($board))\n {\n return App::abort(404);\n }\n\n //get blocks\n $blockbytimes = $board->posts()->orderBy('created_at', 'ASC')->get();\n $i = 1;\n \n foreach ($blockbytimes as $blockbytime) {\n if($blockbytime->ordered === 1) {\n $i++;\n }\n }\n\n\n $user = Auth::user();\n $subscribed = $user->relationships()->where('boards_id', '=', $id)->first();\n $canPost = false;\n if ($user) {\n $canPost = true;\n }\n\n\n\n\n foreach ($blockbytimes as $blockbytime) {\n if($blockbytime->ordered === 0) {\n $blockbytime->block_order = $i;\n $blockbytime->order_original = $i;\n $i++;\n $blockbytime->ordered = 1;\n ($blockbytime->save());\n }\n else {\n $blockbytime->order_original = $blockbytime->block_order;\n ($blockbytime->save());\n }\n }\n\n $blocks = $board->posts()->orderBy('block_order', 'ASC')->get();\n\n \n\n\n return View::make('user/boards/view_board', compact('board', 'blocks', 'user', 'canPost', 'subscribed'));\n }", "protected function loadThemeBlocks()\n {\n $this->blocks = [];\n $blocksDirectory = new DirectoryIterator($this->getFolder() . '/blocks');\n foreach ($blocksDirectory as $entry) {\n if ($entry->isDir() && ! $entry->isDot()) {\n $blockSlug = $entry->getFilename();\n $block = new ThemeBlock($this, $blockSlug);\n $this->blocks[$blockSlug] = $block;\n }\n }\n }", "public function getGroupedBlocks() {\n $definitions = $this->getBlocks();\n $definitions = $this->blockManager->getGroupedDefinitions($definitions);\n $keys = array_map(function ($key) {\n return preg_replace('@[^a-z0-9-]+@', '_', strtolower($key));\n }, array_keys($definitions));\n\n return array_combine($keys, array_values($definitions));\n }", "public function getLoadedItems($block)\n\t{\t\n\t\t/**\n\t\t * Try to get loaded items\n\t\t * \n\t\t * @var [] $items\n\t\t */\n\t\t$items = $block->getLoadedItems();\n\t\t\n\t\t/**\n\t\t * Check items. They could be null in Magento EE\n\t\t */\n\t\tif (!$items)\n\t\t{\n\t\t\t$items = $block->getAllItems();\t\n\t\t}\n\t\t\n\t\tif ($items)\n\t\t{\n\t\t\treturn $items;\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public function getBlocks($user)\n\t{\n\t\t$staff = $user->staff;\n\n\t\t// Start an array for storing the blocks\n\t\t$blocks = array();\n\n\t\tif ($staff)\n\t\t{\n\t\t\tif ($staff->appointments->count() > 0)\n\t\t\t{\n\t\t\t\t// Get today\n\t\t\t\t$today = Date::now();\n\n\t\t\t\treturn $staff->appointments->filter(function($a) use ($today)\n\t\t\t\t{\n\t\t\t\t\treturn (int) $a->service_id === 1 and $a->start->startOfDay() >= $today->startOfDay();\n\t\t\t\t})->sortBy(function($a)\n\t\t\t\t{\n\t\t\t\t\treturn $a->start;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn new Collection;\n\t\t}\n\n\t\treturn new Collection;\n\t}", "public static function availableObjects() {\n\t\treturn self::$registeredObjects;\n\t}", "public function getOrderedBlocks($checkBlockDefinitions = false)\n\t{\n\t\t$this->initialiseBlocks($checkBlockDefinitions);\n\t\t$contentBlocks = $this->ContentBlocks;\n\n\t\t// make array indexed by identifier\n\t\t$blocksByIdentifier = array();\n\n\t\tif (!empty($contentBlocks))\n\t\t{\n\t\t\tforeach ($contentBlocks as $contentBlock)\n\t\t\t{\n\t\t\t\t$blocksByIdentifier[$contentBlock->identifier] = $contentBlock;\n\t\t\t}\n\t\t}\n\n\t\t// make ordered array\n\t\t$orderedBlocks = array();\n\n\t\tforeach ($this->getBlockDefinitions() as $identifier => $defn)\n\t\t{\n\t\t\t$contentBlock = $blocksByIdentifier[$identifier];\n\t\t\t$contentBlock->ContentGroup = $this;\n\t\t\t$orderedBlocks[$identifier] = $contentBlock;\n\t\t}\n\n\t\treturn $orderedBlocks;\n\t}", "public function getItems(): object\n {\n return $this->items;\n }", "public function all()\n\t{\n\t\treturn $this->boxes;\n\t}", "public function getAll()\n {\n $query = $this->m_building_block_status->getAll();\n\n // Return the result\n return $query;\n }", "public function getSellerBlocks($contentId = '')\r\n {\r\n $blockCollectionObj = $this->_blockCollectionFactory->create();\r\n $blockCollectionObj->addFieldToFilter(\r\n 'seller_id',\r\n ['eq'=>$this->_mpHelper->getCustomerId()]\r\n );\r\n return $blockCollectionObj->addFieldToFilter(\r\n 'content_type',\r\n ['eq'=>$contentId]\r\n );\r\n }", "function TIL ()\n {\n \n return Tilnet_Blocks::instance();\n }", "function get_global_content_blocks()\n {\n #global $db_settings, $pdo;\n $gcb_result = Database::$content->query(\"SELECT id, identifier, content FROM \".Database::$db_settings['gcb_table'].\" ORDER BY id ASC\");\n while($row = $gcb_result->fetch())\n {\n $gcb[$row['identifier']] = $row['content'];\n #if($row['content_formatting']==1) $gcb[$row['id']] = auto_html($gcb[$row['id']]);\n }\n if(isset($gcb))\n {\n return $gcb;\n }\n return false;\n }", "public function getSubBlocks();", "public function getAllBlocksByGroup($groupid, $asobject = true, $side = null, $visible = null, $orderby = \"b.weight,b.bid\", $isactive = 1)\r\n {\r\n global $xoopsDB;\r\n $db = $xoopsDB;\r\n $ret = array();\r\n if (!$asobject) {\r\n $sql = 'SELECT b.bid ';\r\n } else {\r\n $sql = 'SELECT b.* ';\r\n }\r\n $sql .= \"FROM \" . $db->prefix(\"newblocks\") . \" b LEFT JOIN \" . $db->prefix(\"group_permission\") . \" l ON l.gperm_itemid=b.bid WHERE gperm_name = 'block_read' AND gperm_modid = 1\";\r\n if (is_array($groupid)) {\r\n $sql .= \" AND (l.gperm_groupid=\" . $groupid[0] . \"\";\r\n $size = count($groupid);\r\n if ($size > 1) {\r\n for ($i = 1; $i < $size; $i++) {\r\n $sql .= \" OR l.gperm_groupid=\" . $groupid[$i] . \"\";\r\n }\r\n }\r\n $sql .= \")\";\r\n } else {\r\n $sql .= \" AND l.gperm_groupid=\" . $groupid . \"\";\r\n }\r\n $sql .= \" AND b.isactive=\" . $isactive;\r\n if (isset($side)) {\r\n // get both sides in sidebox? (some themes need this)\r\n if ($side == XOOPS_SIDEBLOCK_BOTH) {\r\n $side = \"(b.side=0 OR b.side=1)\";\r\n } elseif ($side == XOOPS_CENTERBLOCK_ALL) {\r\n $side = \"(b.side=3 OR b.side=4 OR b.side=5 OR b.side=7 OR b.side=8 OR b.side=9 )\";\r\n } else {\r\n $side = \"b.side=\" . $side;\r\n }\r\n $sql .= \" AND \" . $side;\r\n }\r\n if (isset($visible)) {\r\n $sql .= \" AND b.visible=$visible\";\r\n }\r\n $sql .= \" ORDER BY $orderby\";\r\n $result = $db->query($sql);\r\n $added = array();\r\n while ($myrow = $db->fetchArray($result)) {\r\n if (!in_array($myrow['bid'], $added)) {\r\n if (!$asobject) {\r\n $ret[] = $myrow['bid'];\r\n } else {\r\n $ret[] = new XoopsBlock($myrow);\r\n }\r\n array_push($added, $myrow['bid']);\r\n }\r\n }\r\n return $ret;\r\n }", "public function getBlock() : Block {\n // return the private property as-is\n return $this->block;\n }", "public function getBuiltItems() {\n return $this->objects;\n }", "public function getCacheReferencedObjects() {}", "function GetBlocks($thing) {\n\t\n\t\n\t\t//query here to find the most liked \n\t\t$thingID = $thing->ID;\n\t\t\n\t\t$innerQuery = \"\tSELECT `image`, MAX(likes) AS HighestBlock \n\t\t\t\tFROM `blocks`\n\t\t\t\tWHERE `thing_id` = $thingID \n\t\t\t\t\";\n\t\t\t\t\n\t\tglobal $db;\n\t\t\t\t\n\t\t$blocks = $db->select($innerQuery);\n\t\t\n\t\tif(count($blocks)!=0){\n\t\t\t$topBlockImage = $blocks[0]->image;\n\t\t}\n\t\n\t\t$keyValuePairs = array(\n\t\t\n\t\t\t\"id\" \t\t\t=> \t$thingID,\n\t\t\t\"title\"\t\t\t=> \t$thing->title,\n\t\t\t\"post_time\"\t\t=>\t$thing->post_time,\n\t\t\t\"image\"\t\t\t=>\t$topBlockImage\n\t\t);\n\t\t\n\t\treturn $keyValuePairs;\n\t}", "public function status(): Collection\n {\n return $this->get('api/blocks/getStatus');\n }", "public static function init()\n\t{\n\t\treturn new BlockManager();\n\t}", "public function getBlocking($stringify_ids = null, $cursor = null)\n\t{\n\t\t// Check the rate limit for remaining hits\n\t\t$this->checkRateLimit('blocks', 'ids');\n\n\t\t$data = array();\n\n\t\t// Check if stringify_ids is specified\n\t\tif (!is_null($stringify_ids))\n\t\t{\n\t\t\t$data['stringify_ids'] = $stringify_ids;\n\t\t}\n\n\t\t// Check if cursor is specified\n\t\tif (!is_null($stringify_ids))\n\t\t{\n\t\t\t$data['cursor'] = $cursor;\n\t\t}\n\n\t\t// Set the API path\n\t\t$path = '/blocks/ids.json';\n\n\t\t// Send the request.\n\t\treturn $this->sendRequest($path, 'GET', $data);\n\t}", "public function get_content() {\n global $USER, $COURSE, $CFG, $OUTPUT, $DB;\n\n // If content has already been generated, don't waste time generating it again.\n if ($this->content !== null) {\n return $this->content;\n }\n $this->content = new stdClass;\n $this->content->text = '';\n $this->content->footer = '';\n $blockinstancesonpage = array();\n\n // Guests do not have any progress. Don't show them the block.\n if (!isloggedin() or isguestuser()) {\n return $this->content;\n }\n\n // Draw the multi-bar content for the Dashboard and Front page.\n if (!$CFG->enablecompletion) {\n $this->content->text .= get_string('completion_not_enabled', 'block_courses_available');\n return $this->content;\n }\n\n // Show a message when the user is not enrolled in any courses.\n $courses = enrol_get_my_courses();\n if (($this->page->user_is_editing() || is_siteadmin()) && empty($courses)) {\n $this->content->text = get_string('nocourses', 'block_courses_available');\n return $this->content;\n }\n \n $courseinstances = array();\n \n foreach ($courses as $courseid => $course) {\n // Get specific course completion data\n $completion = new completion_info($course);\n if ($course->visible && $completion->is_enabled()) {\n $context = CONTEXT_COURSE::instance($course->id);\n $params = array('contextid' => $context->id, 'pagetype' => 'course-view-%');\n \n $courseinstance = new stdClass();\n \n $courseinstance->course = $course;\n $courseinstance->activities = block_courses_available_get_activities($course->id);\n $courseinstance->activities = block_courses_available_filter_visibility($courseinstance->activities,\n $USER->id, $course->id);\n \n $courseinstances[] = $courseinstance;\n }\n }\n \n $renderer = $this->page->get_renderer('block_courses_available');\n \n if (!empty($courseinstances)) {\n $toStartTable = array();\n $inProgressTable = array();\n $completedTable = array();\n \n \n $table = new html_table();\n $table->attributes = array('class'=>'availablecoursestable');\n $table->align = array ('left', 'left', 'right', 'right');\n \n foreach ($courseinstances as $courseinstance) {\n $course = get_course($courseinstance->course->id);\n \n $row = array();\n \n $row[] = $renderer->get_course_title($course->fullname);\n \n $row[] = $renderer->get_summary($course);\n \n $submissions = block_courses_available_student_submissions($course->id, $USER->id);\n $completions = block_courses_available_completions($courseinstance->activities, $USER->id, $course, $submissions);\n \n $json = block_courses_available_json(\n $courseinstance->activities,\n $completions,\n $this->config,\n $USER->id,\n $courseid,\n $this->instance->id);\n \n $completion_data = json_decode($json);\n \n $row[] = $renderer->get_course_link($course, $completion_data);\n \n $progress = intval($completion_data->percentage);\n \n if ($progress == 100) {\n $completedTable[] = $row;\n } elseif ($progress == 0) {\n $toStartTable[] = $row;\n } else {\n $inProgressTable[] = $row;\n }\n \n }// foreach\n \n $table->data = array_merge($inProgressTable, $toStartTable, $completedTable);\n $this->content->text = html_writer::table($table);\n }\n \n // Show a message explaining lack of buttons, but only while editing is on.\n if ($this->page->user_is_editing() && $this->content->text == '') {\n $this->content->text = get_string('nocourses', 'block_courses_available');\n }\n\n return $this->content;\n }", "public function height(): Collection\n {\n return $this->get('api/blocks/getHeight');\n }", "public function getDefaultBlocks()\n\t{\n\t\t$sections = [];\n\t\tforeach($this->sections as $section_def){\n\t\t\t$section = [ 'name' => $section_def['name'], 'blocks' => []];\n\t\t\tif(isset($section_def['defaultBlocks']) && !empty($section_def['defaultBlocks'])){\n\t\t\t\tforeach($section_def['defaultBlocks'] as $block_id){\n\t\t\t\t\t$block_def = Block::fromDefinitionFile(Block::locateDefinition($block_id));\n\t\t\t\t\tif($block_def){\n\t\t\t\t\t\t$section['blocks'][] = $block_def->getDefaultData($this->name, $section_def['name']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$sections[] = $section;\n\t\t}\n\t\treturn $sections;\n\t}", "function db_list_blocks() {\n\n $query = db_select('block', 'b');\n $result = $query\n ->fields('b')\n// ->condition('b.status', 1)\n// ->condition('b.module', \"capa\")\n ->orderBy('b.module')\n ->groupBy(\"b.delta\")\n ->execute();\n\n//echo \"<pre>\";\n//var_dump($result->fetchAll());\n//die;\n return $result->fetchAll();\n}", "public function block(string $id): Collection\n {\n return $this->get('api/blocks/get', compact('id'));\n }", "public function getObjectArray()\n {\n $this->_cache->load($this->_cache_key, $this->_data_version);\n\n return $this->_cache->objects;\n }", "public function get_default_blocks() {\n return array(\n BLOCK_POS_LEFT => array(),\n BLOCK_POS_RIGHT => array()\n );\n }", "function jsonSerialize()\n {\n $blockSerialized = [];\n foreach ($this->blocks as $block)\n {\n $blockSerialized[] = $block->jsonSerialize();\n }\n\n return $blockSerialized;\n }", "public function get_object()\n {\n return $this->_object;\n }" ]
[ "0.7438673", "0.7231587", "0.7120659", "0.70964736", "0.70659983", "0.70158255", "0.70158255", "0.6979849", "0.69151515", "0.68567485", "0.68358064", "0.6835496", "0.6793833", "0.6779184", "0.6695098", "0.66527295", "0.6499171", "0.64834154", "0.6457472", "0.63945657", "0.6296822", "0.628522", "0.6220601", "0.6214609", "0.61747825", "0.612934", "0.6125819", "0.61232585", "0.6101605", "0.60963154", "0.6093312", "0.605099", "0.5899895", "0.5884394", "0.58679974", "0.5844571", "0.58296365", "0.5828235", "0.5825604", "0.5822731", "0.58077484", "0.57922375", "0.5792018", "0.57902503", "0.57825065", "0.57825065", "0.578094", "0.57488173", "0.5744448", "0.57325387", "0.5679319", "0.56687856", "0.5660974", "0.56485444", "0.56311804", "0.560779", "0.5592578", "0.5579798", "0.5566685", "0.5562778", "0.55526906", "0.55448586", "0.5528598", "0.55091834", "0.54888874", "0.54879105", "0.5484652", "0.5471735", "0.54647136", "0.5461507", "0.5458313", "0.54556185", "0.5451207", "0.54480046", "0.5423567", "0.54141927", "0.54062086", "0.54035145", "0.5399952", "0.5398657", "0.53951484", "0.5390678", "0.53882587", "0.53858614", "0.5382941", "0.5373526", "0.5363052", "0.5323505", "0.53213876", "0.5303706", "0.5277685", "0.52754855", "0.52749276", "0.52676475", "0.52635086", "0.5246853", "0.5244688", "0.52379876", "0.5235665", "0.52298045", "0.5218493" ]
0.0
-1
Gets the image associated with the subscribed link.
public function getImage() { return $this->image; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLinkImage()\n\t{\n\t\treturn $this->link_image;\n\t}", "final public function getPublicEmailAsImageUrl() {\r\n\t\t$cache = new ResultCache(\r\n\t\t\t$this->wrappedTopic->getConfig(),\r\n\t\t\t$this->wrappedTopic->getTopicFactory() );\r\n\r\n\t\treturn $cache->getCachedUrl(\r\n\t\t\tfunction($email) {\r\n\t\t\t\treturn ImageUtils::emailToImage($email);\r\n\t\t\t}, $this->getPublicEmail()->getFieldValue() );\r\n\t}", "public function get_image_link()\n {\n }", "public function getImg()\n {\n return $this->imgLink;\n }", "public function getImage(){\n\t\t//Message is absent\n\t\tif(!$this->thumbnail){\n\t\t\treturn false;\n\t\t}\n\t\treturn asset(\"downloads/{$this->thumbnail}\");\n\t}", "public function getImage() {\n\t\tif (array_key_exists('channels', $this->feedElements)) {\n\t\t\treturn $this->feedElements['channels']['image'];\n\t\t}\n\t\treturn null;\n\t}", "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 getImageUrl();", "public function getThumbnailUrl();", "public function getLinkToImg()\n {\n return ImgUpload::getLinkToImg($this);\n }", "public function getImageUrl()\n {\n return $this->info->thumbnail_url ? $this->info->thumbnail_url : null;\n }", "public function getImage()\n {\n return $this->get('image');\n }", "public function getImageUrl()\n {\n return $this->image_url;\n }", "public function getImageUrl()\n {\n return $this->image_url;\n }", "public function get_image() {\r\n return $this->image;\r\n }", "public function getShareImage() {\n if ($this->item_image == null) {\n return Yii::app()->request->baseUrl . \"/images/box/fbdefault.jpg\";\n } else {\n return Yii::app()->request->baseUrl . \"/images/box/\" . $this->item_image;\n }\n }", "public function getImage() {\n return Mage::helper('landingpage/image')->getImageUrl($this->getData('image'));\n }", "public function getImageUrl()\n {\n return (string)$this->_getImageHelper()->init($this, 'image')->resize(265);\n }", "public function get_image_url()\n {\n }", "public function getImageUrl()\n {\n return WEB_SERVER_BASE_URL . '/badges/images/' . $this->data['id'];\n }", "public function getImageUrl() {\n return $this->image_url;\n\n }", "public function getImageUrl()\n {\n return $this->imageUrl;\n }", "public function getImageUrl(): string\n {\n return $this->imageUrl;\n }", "public function getSenderPicUrl()\n {\n if (count($this->sender()->first()) > 0)\n return URL::to($this->sender->user_pic);\n else\n return URL::to('/img/profiles/default.png');\n }", "public function Image()\n {\n if ($this->Buyable()) {\n return $this->Buyable()->Image();\n }\n }", "public function getImageURL() {\n\n return $this->image_url;\n }", "public function getProfileImage(){\n\t\t// To hook into this function we could use a an event:\n\t\t// $event = new CEvent();\n\t\t// $this->onGetProfileImage($event)\n\t\t// // then if the event has been handled \n\t\t// if($event->handled)\n\t\t// // we know another function has handled the event and found us an image url for this user\n\t\t// // it could store this in the event object\n\t\t// return $event->params->imageUrl \n\t\t\n\t\t// Display guest photo\n\t\treturn Yii::app()->controller->createWidget('nii.widgets.Gravatar',array('email'=>$this->email))->getUrl();\n\t}", "public function getImage(){\n $images = $this->getImageUrls($this->image_size);\n return Utils::saveImage($images->attr('data-url'));\n }", "public function getMediaImageUrl() {\n return $this->objectManager->get ( 'Magento\\Store\\Model\\StoreManagerInterface' )->getStore ()->getBaseUrl ( \\Magento\\Framework\\UrlInterface::URL_TYPE_MEDIA ) . 'catalog/product';\n }", "function wprss_get_feed_image( $source_id ) {\n return get_post_meta( $source_id, 'wprss_feed_image', true );\n }", "public function getImageUrl(){\n return $this->image_url;\n }", "public function get_image() {\n\n return $this->image_id !== null ? $this->image->full_src() : null;\n }", "public function getImageUrl()\n {\n return isset($this->image_url) ? $this->image_url : null;\n }", "public function getImageUrl()\n\t{\n\t\treturn $this->image_url;\n\t}", "protected function getImageUrl() {\r\n\t\treturn $this->imageUrl;\r\n\t}", "public function getPromoImage()\n {\n if ($fid = $this->get('promo_image')) {\n return File::load(reset($fid));\n }\n\n return false;\n }", "public function getImageFile()\n {\n $link = $this->link;\n return empty( $this->owner->$link ) ? null : \\Yii::getAlias(\n '@storage/' . $this->directory . '/' . $this->owner->$link\n );\n }", "public function getAvatar()\n {\n return $this->getFirstMediaUrl() ?: get_gravatar($this->email);\n }", "public function getImage()\n {\n return $this->getValue('nb_catalog_item_lang_image');\n }", "public function getImage()\r\n {\r\n return $this->image;\r\n }", "public function getImage()\r\n {\r\n return $this->image;\r\n }", "public function getSrcMediaImage()\n {\n return $this->_designerHelper->getSrcMediaImage();\n }", "public function getImage()\n {\n return $this->_image;\n }", "public function getImageResource()\n {\n return $this->image;\n }", "public function src(){\n return $this->imageFirstInContent;\n }", "public function getThumbnail() {\n return Mage::helper('landingpage/image')->getImageUrl($this->getData('thumbnail'));\n }", "function wcs_get_image_asset_url( $file_name ) {\n\treturn plugins_url( \"/assets/images/{$file_name}\", WC_Subscriptions::$plugin_file );\n}", "public function getImage() {\n return $this->image;\n }", "public function getImage() {\n if ($this->item_image == null) {\n return Yii::app()->request->baseUrl . \"/images/box/default.jpg\";\n } else {\n return Yii::app()->request->baseUrl . \"/images/box/\" . $this->item_image;\n }\n }", "public function getImage() {\n //return the value image\n return $this->AdvertImage;\n }", "public function mainImageURL()\n {\n if ($this->image) {\n $imageLocation = $this->image->location;\n } else {\n // If the image cannot be displayed, show a generic image.\n $imageLocation = 'generic/generic1.jpg';\n }\n\n return Storage::url($imageLocation);\n }", "function getImage()\n {\n return $this->_image;\n }", "public function getImage()\n {\n if (isset($this->response['image']) && isset($this->response['image']['url']))\n {\n return (!empty($this->response['image']['url'])) ? $this->response['image']['url'] : null;\n }\n\n return null;\n }", "public function getPictureUrl()\n {\n return $this->getImageurl();\n }", "public function getImageUrl()\n {\n $baseUrl = $this->getBaseImageUrl();\n if ($baseUrl) {\n $dimensions = $this->getImageDimensions();\n $imageData = $this->getImageData();\n $width = Kwf_Media_Image::getResponsiveWidthStep($dimensions['width'],\n Kwf_Media_Image::getResponsiveWidthSteps($dimensions, $imageData['file']));\n $ret = str_replace('{width}', $width, $baseUrl);\n $ev = new Kwf_Component_Event_CreateMediaUrl($this->getData()->componentClass, $this->getData(), $ret);\n Kwf_Events_Dispatcher::fireEvent($ev);\n return $ev->url;\n }\n return null;\n }", "public function getImage()\n {\n return $this->image;\n }", "public function getImage()\n\t{\n\t\treturn $this->image;\n\t}", "public function getImage()\n\t{\n\t\treturn $this->image;\n\t}", "public function getImageUrl() \n {\n // return a default image placeholder if your source avatar is not found\n $imagen = isset($this->imagen) ? $this->imagen : 'default_product.jpg';\n return Url::to('@web/img/producto/'). $imagen;\n }", "public function getImage()\n {\n return $this->image;\n }", "public function getImage()\n {\n return $this->Image;\n }", "public function getImage() {\n\t\treturn $this->image;\n\t}", "public function getImage() {\n\t\treturn $this->image;\n\t}", "public function getImage() {\n\t\treturn $this->image;\n\t}", "public function getPosterImageAttribute() {\n if($this->playlistVideos()->where('is_active', 1)->count()) {\n $videoInfo = $this->playlistVideos()->where('is_active', 1)->first();\n if(!empty($videoInfo)) {\n $video = Video::where('id', $videoInfo['video_id'])->first();\n if(!empty($video)) {\n return $video->thumbnail_image;\n }\n }\n }\n return '';\n }", "public function getImage() : string\n {\n return $this->image;\n }", "public function getImageUrl(bool $dummy = true)\n {\n $link = $this->link;\n return empty( $this->owner->$link ) ? ( $dummy ? $this->dummy_path : null ) : '/storage/' . $this->directory . '/' . $this->owner->$link;\n }", "public function getImageSrc()\n {\n return $this->imageSrc;\n }", "public function getUrlImage(): ?string\n {\n return $this->url_image;\n }", "public function picture_url() {\n return $this->_adaptee->user_photo(\"\", true);\n }", "public static function insertNotificationImageAsAttachment() {\n $url = '';\n if(isset($_FILES['image'])) {\n $file = wp_upload_bits($_FILES['image']['name'], null, file_get_contents($_FILES['image']['tmp_name']));\n if($file['error'] === false) {\n $url = $file['url'];\n }\n }\n return $url;\n }", "static public function getImageURL() {\n\t\treturn self::$image_url;\n\t}", "static public function getCurrentImageURL() {\n\t\tif (self::checkSSL()) {\n\t\t\treturn self::getSecureImageURL();\n\t\t} else {\n\t\t\treturn self::getImageURL();\n\t\t}\n\t}", "function getImage() {\n\t\treturn $this->_image;\n\t}" ]
[ "0.6743", "0.6536325", "0.6532911", "0.648258", "0.64089173", "0.62715656", "0.6178828", "0.6107334", "0.6086842", "0.6002543", "0.597445", "0.59502095", "0.59448534", "0.59448534", "0.5944302", "0.5924803", "0.591342", "0.5884116", "0.5871855", "0.58716357", "0.58598024", "0.58579963", "0.5848397", "0.58464205", "0.58384323", "0.58381826", "0.5832486", "0.58286446", "0.5821696", "0.58204186", "0.58138216", "0.5800695", "0.579485", "0.57869995", "0.57549644", "0.57422626", "0.5730109", "0.57217294", "0.5721708", "0.5709526", "0.5709526", "0.57026726", "0.5701141", "0.5688704", "0.5674518", "0.5674492", "0.5657497", "0.5645292", "0.5611549", "0.5609043", "0.5603148", "0.55987716", "0.5595898", "0.5585498", "0.558462", "0.55807865", "0.5569812", "0.5569812", "0.5564524", "0.5558445", "0.55555695", "0.55437845", "0.55437845", "0.55437845", "0.55326456", "0.55240226", "0.5520721", "0.5520469", "0.55196863", "0.5509902", "0.5506284", "0.5496857", "0.54805857", "0.5472153" ]
0.5715125
61
persiste dados no repositorio
public function save (ValueObjectAbstract $valueObject);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function persist() {}", "public function persist();", "public function persist()\n {\n //\n }", "public function persist()\n {\n }", "function persist() ;", "public function persist($data);", "public function persist() {\n $bd = BD::getConexion();\n $sqlInsertUsuario = \"insert into usuarios (nomUsuario, clave) values (:nomUsuario, :clave)\";\n $sthSqlInsertUsuario = $bd->prepare($sqlInsertUsuario);\n $result = $sthSqlInsertUsuario->execute([\":nomUsuario\" => $this->nomUsuario, \":clave\" => $this->clave]);\n $this->id = (int) $bd->lastInsertId();\n }", "public function persist (){\n \n $this->query = \"INSERT INTO libros(titulo,autor,editorial) VALUES (:titulo, :autor, :editorial)\";\n\n // $this->parametros['id']=$user_data[\"id\"];\n $this->parametros['titulo']=$this->titulo;\n $this->parametros['autor']=$this->autor;\n $this->parametros['editorial']=$this->editorial;\n \n $this->get_results_from_query();\n\n\n $this->mensaje = \"Libro agregado exitosamente\";\n \n }", "public function persistAll() {}", "public function persist() {\n $bd = BD::getConexion();\n $sql = \"insert into usuarios (nombre, clave) values (:nombre, :clave)\";\n $sthSql = $bd->prepare($sqlInsertUsuario);\n $result = $sthSql->execute([\":nombre\" => $this->nombre, \":clave\" => $this->clave]);\n $this->id = (int) $bd->lastInsertId();\n }", "static protected function persist() {\n\t\t$objectManager = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(\\TYPO3\\CMS\\Extbase\\Object\\ObjectManager::class);\n\t\t$persistanceManager = $objectManager->get(\\TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager::class);\n\t\t$persistanceManager->persistAll();\n\t}", "function persistAll() ;", "public function persist(array $data)\n {\n }", "protected function persistObjects() {}", "public function persist() {\n\n $classenta = new cl_assenta();\n\n $classenta->h16_regist = $this->getMatricula();\n $classenta->h16_assent = $this->getTipoAssentamento();\n $classenta->h16_dtconc = ($this->getDataConcessao() instanceof DBDate ? $this->getDataConcessao()->getDate() : $this->getDataConcessao());\n $classenta->h16_histor = $this->getHistorico();\n $classenta->h16_nrport = $this->getCodigoPortaria();\n $classenta->h16_atofic = $this->getDescricaoAto();\n $classenta->h16_quant = $this->getDias();\n $classenta->h16_perc = ($this->getPercentual()) ? $this->getPercentual() : '0';\n $classenta->h16_dtterm = ($this->getDataTermino() instanceof DBDate ? $this->getDataTermino()->getDate() : $this->getDataTermino());\n $classenta->h16_hist2 = $this->getSegundoHistorico();\n $classenta->h16_login = ($this->getLoginUsuario()) ? $this->getLoginUsuario() : '1';\n $classenta->h16_dtlanc = ($this->getDataLancamento() instanceof DBDate ? $this->getDataLancamento()->getDate() : $this->getDataLancamento());\n $classenta->h16_conver = ((bool)(int)$this->isConvertido()) == false ? 'false' : 'true';\n $classenta->h16_anoato = $this->getAnoPortaria();\n $classenta->h16_hora = $this->getHora();\n\n if(empty($this->iCodigo)) {\n\n $classenta->incluir(null);\n\n if ($classenta->erro_status == \"0\") {\n return $classenta->erro_msg;\n }\n\n $this->setCodigo($classenta->h16_codigo);\n } else {\n\n $classenta->h16_codigo = $this->getCodigo();\n $classenta->alterar($this->getCodigo());\n\n if ($classenta->erro_status == \"0\") {\n return $classenta->erro_msg;\n }\n }\n\n return $this;\n }", "public function persistir(ProductoInventario $productoInventario);", "public function persist()\n {\n Channel::from(auth()->user())\n ->contribute($this->all());\n }", "public function persist($data)\n {\n dd($data);\n $this->entityManager->persist($data);\n $this->entityManager->flush();\n }", "private function persist() {\n $session = new Session();\n $items = $this->getItems();\n $session->set('inspiration_board', json_encode($items));\n }", "public function save()\n {\n $ins = $this->valores();\n unset($ins[\"idInscription\"]);\n\n $ins['idUser'] = $this->userO->idUser;\n unset($ins[\"userO\"]);\n\n $ins['idProject'] = $this->project->idProject;\n unset($ins[\"project\"]);\n\n if (empty($this->idInscription)) {\n $this->insert($ins);\n $this->idInscription = self::$conn->lastInsertId();\n } else {\n $this->update($this->idInscription, $ins);\n }\n }", "public function persistir(Consulta $consulta);", "public function save()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n if ($entity->getMarkedAsDeleted())\n {\n $entity->delete();\n } \n else if ($entity->getMarkedAsUpdated())\n {\n $entity->saveWithDetails();\n }\n }\n }\n );\n }", "public function persist()\n {\n $uid = $this->getIdentifier() == 0 ? 'NEW' . rand(100000, 999999) : $this->getIdentifier();\n $data = [\n trim(static::$storageTableName) => [\n $uid => $this->getPersistableDataArray()\n ]\n ];\n // New records always must have a pid\n if ($this->getIdentifier() == 0) {\n $data[trim(static::$storageTableName)][$uid]['pid'] = 0;\n }\n /** @var \\TYPO3\\CMS\\Core\\DataHandling\\DataHandler $tce */\n $tce = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(\\TYPO3\\CMS\\Core\\DataHandling\\DataHandler::class);\n $tce->start($data, []);\n $tce->process_datamap();\n }", "public function persist()\n {\n\n $this->persistor->persist(\n $this->event,\n $this->relatedEntities,\n $this->eventRequest->getApplication(),\n $this->eventRequest->getAccount(),\n $this->eventRequest->getProduct(),\n $this->eventRequest->appendCustomer\n );\n\n }", "public function save()\n {\n $this->persist($this->state);\n }", "public function persistir($entidade, $setarDataEHora = true) {\n try {\n if ($setarDataEHora) {\n $entidade->setDataEHoraDeCriacao();\n }\n $this->getEntityManager()->persist($entidade);\n $this->getEntityManager()->flush($entidade);\n } catch (Exception $exc) {\n echo $exc->getMessage();\n }\n }", "function save() {\r\n foreach ($this->_data as $v)\r\n $v -> save();\r\n }", "public function persist()\n {\n $this->eventManager->dispatchEvent(['persist_before'], [get_class($this)]);\n if (!empty($this->handlerInterface)) {\n $result = $this->handlerFactory->create($this->handlerInterface)->persist($this);\n if (!empty($result)) {\n foreach ($result as $key => $value) {\n $this->data[$key] = $value;\n }\n }\n }\n $this->eventManager->dispatchEvent(['persist_after'], [get_class($this)]);\n }", "function salva()\n\t{\n\t\trestauraConObj($this->mapa,$this->postgis_mapa);\n\t\t$this->mapa->save($this->arquivo);\n\t}", "public function save()\n {\n $project = $this->valores();\n unset($project['idProject']);\n\n $project['idUser'] = $this->userO->idUser;\n unset($project['userO']);\n\n if (empty($this->idProject)) {\n $this->insert($project);\n $this->idProject = self::$conn->lastInsertId();\n } else {\n $this->update($this->idProject, $project);\n }\n }", "public function persist($obj)\r\n {\r\n }", "public function persist($entity)\n {\n }", "public function persist(Commande $commande)\n {\n parent::save($commande); // TODO: Change the autogenerated stub\n }", "public function persist(mixed $data)\n {\n }", "public function save()\n\t{\n\t\t$this->container->save($this);\n\t}", "public function save()\n {\n // datos obligatorios para la insercion/modificacion\n $data = [\n \"propietario\" => $this->owner,\n \"estado\" => $this->state,\n \"nombre\" => $this->name\n ];\n\n // datos opcionales, que pueden no estar establecidos para la \n // insercion/modificacion\n if (isset($this->description)) $data[\"descripcion\"] = $this->description;\n\n // si idProduct no es null, entonces es un update\n if (isset($this->idProduct))\n return $this->dao->update($data, [\"idProducto\" => $this->idProduct]);\n\n // sino, es un insert\n return $this->dao->insert($data);\n }", "public function store()\n {\n if( $this->isPersistent() )\n {\n $this->update();\n }\n else\n {\n $this->insert();\n }\n }", "public function store()\n\t{\n\t\t$importador = new ImportadorProyecto('/uploads/proyectos/temp.txt');\n\t\t$importador->extraer();\n\n\t\t$urg = Urg::whereUrg($importador->urg)->get(array('id'));\n\t\t$fondo = Fondo::whereFondo($importador->fondo)->get(array('id'));\n\n\t\t$arr_inicio = explode(\"/\", $importador->inicio);\n\t\t$arr_fin = explode(\"/\", $importador->fin);\n\n\t\t$proyecto = new Proyecto();\n\t\t$proyecto->proyecto = $importador->proy;\n\t\t$proyecto->d_proyecto = $importador->d_proyecto;\n\t\t$proyecto->monto = $importador->monto_proy;\n\t\t$proyecto->urg_id = $urg[0]->id;\n\t\t$proyecto->tipo_proyecto_id = 1;\n\t\t$proyecto->aaaa = $importador->aaaa;\n\t\t$proyecto->inicio = $arr_inicio[2].\"-\".$arr_inicio[1].\"-\".$arr_inicio[0];\n\t\t$proyecto->fin = $arr_fin[2].\"-\".$arr_fin[1].\"-\".$arr_fin[0];\n\t\t$proyecto->save();\n\n\t\t//Inserta datos @fondo_proyecto\n\t\t$proyecto->fondos()->attach($fondo[0]->id);\n\n\t\t$arr_objetivos = array();\n\t\tforeach($importador->arr_recursos as $partida => $val){\n\t\t\t//Buscar objetivo en key del arreglo\n\t\t\t$objetivo_id = array_search($val['objetivo'], $arr_objetivos);\n\n\t\t\t//Si no se encuentra\n\t\t\tif( empty($objetivo_id) ) {\n\t\t\t\t$objetivo = new Objetivo();\n\t\t\t\t$objetivo->objetivo = $val['objetivo'];\n\t\t\t\t$objetivo->d_objetivo = $val['d_objetivo'];\n\t\t\t\t$objetivo->save();\n\t\t\t\t$objetivo_id = $objetivo->id;\n\t\t\t\t$arr_objetivos[$objetivo->id] = $val['objetivo'];\n\t\t\t}\n\n\t\t\t$cog = Cog::whereCog($val['cog'])->get();\n\t\t\t$rm = new Rm();\n\t\t\t$rm->rm = $partida;\n\t\t\t$rm->proyecto_id = $proyecto->id;\n\t\t\t$rm->objetivo_id = $objetivo_id;\n\t\t\t$rm->actividad_id = 1;\n\t\t\t$rm->cog_id = $cog[0]->id;\n\t\t\t$rm->fondo_id = $fondo[0]->id;\n\t\t\t$rm->monto = $val['monto'];\n\t\t\t$rm->d_rm = \"\";\n\t\t\t$rm->save();\n\t\t}\n\n\t\treturn redirect()->action('ProyectosController@index');\n\t}", "public function persist()\n {\n persistableCollection::getInstance($this->resourceName)->persistObject($this);\n $this->loaded = true;\n $this->persisted = true;\n }", "public function persist()\n {\n //using eloquent insert or update to mass insert\n $tagCollection = collect($this->data)->map( fn($item) => [\n 'name' => strtolower($item),\n 'slug' => Str::slug($item)\n ] )->unique('name');\n Tag::upsert($tagCollection->toArray(), ['name'], ['name']);\n\n// $tags = $this->fetch();\n// $dataCollection = $this->getCollectionInLowerCase();\n// $filtered = $this->removeDuplicate($dataCollection,$tags)->getNewCollection();\n//\n// if($filtered->isNotEmpty()){\n// return $this->tag->insert($filtered->toArray());\n// }\n\n //before for reference\n// $filtered = $dataCollection\n// ->reject( fn($value, $key) => $tags->contains($value) )\n// ->unique()\n// ->map(function($item){\n// $data['name'] = $item;\n// $data['slug'] = Str::slug($item);\n// $data['created_at'] = now();\n// $data['updated_at'] = now();\n// return $data;\n// })->values();\n }", "public function store()\n {\n $this->filtrarCampos();\n\n // verifica se tem ID ou se existe na base de dados\n if (empty($this->data['id']) or (!$this->load($this->id))) {\n // incrementa o ID\n $this->id = $this->getLast() + 1;\n // cria uma instruo de insert\n $sql = new TSqlInsert;\n $sql->setEntity($this->getEntity());\n // percorre os dados do objeto\n foreach ($this->data as $key => $value) {\n // passa os dados do objeto para o SQL\n $sql->setRowData($key, $this->$key);\n }\n } else {\n // instancia instruo de update\n $sql = new TSqlUpdate;\n $sql->setEntity($this->getEntity());\n // cria um critrio de seleo baseado no ID\n $criteria = new TCriteria;\n $criteria->add(new TFilter('id', '=', $this->id));\n $sql->setCriteria($criteria);\n // percorre os dados do objeto\n foreach ($this->data as $key => $value) {\n if ($key !== 'id') // o ID no precisa ir no UPDATE\n {\n // passa os dados do objeto para o SQL\n $sql->setRowData($key, $this->$key);\n }\n }\n }\n // inicia transao\n if ($conn = TTransaction::get()) {\n\n // faz o log e executa o SQL\n TTransaction::log($sql->getInstruction());\n $result = $conn->exec($sql->getInstruction());\n\n // retorna o resultado\n return $result;\n } else {\n // se no tiver transao, retorna uma exceo\n throw new \\Exception('No h transao ativa !!');\n }\n }", "private function saveTracker(): void {\n try {\n $this->getEntityManager()->persist($this->engagement);\n $this->getEntityManager()->flush($this->engagement);\n } catch (OptimisticLockException $e) {\n } catch (ORMException $e) {\n } catch (ForeignKeyConstraintViolationException $e){\n }\n }", "function saveData() {\n\n\t\t$this->getMapper()->saveData();\t\n\t\t\n\t\t\n\t}", "public static function guardar($datos){\n $producto = new Producto($datos['producto']);\n $producto->categoria = $producto->srtCategoria($datos['categorias']);\n $producto->save();\n $producto->categorias()->attach($datos['categorias']);\n $idsDimensiones = $producto->arrDimensiones($datos);\n $articulos = $producto->arrArticulos($datos['colores'], $idsDimensiones, $producto->id);\n DB::table('articulos')->insert($articulos);\n }", "public function persist($object);", "public function save() {}", "public function save() {}", "public function save() {}", "public function saveEntidad(){\n\t\t$conexion = new Database();\n if ($this->codigo){\n $query = sprintf('UPDATE agenda_entidades SET entidad = \"%s\" WHERE entidad_id = %d',\n $this->entidad,\n $this->codigo);\n $rows = $conexion->exec( $query );\n }\n else{\n $query = sprintf('INSERT INTO agenda_entidades(entidad) VALUES (\"%s\")',\n $this->usuario);\n\t\t\t$rows = $conexion->exec( $query );\n $this->codigo = $conexion->lastInsertId();\n }\n }", "public function __destruct() {\n $this->persist();\n }", "public function markAsPersisted(): void;", "public function saveData()\r\n {\r\n \r\n }", "public function save()\n {\n // If deposit is new, will get assigned database ID.\n $this->dbID = $this->db->saveDeposit($this);\n }", "function persist($batch)\n {\n // TODO: Implement persist() method.\n }", "public function saveToDB()\n {\n }", "public function persist($data, array $context = [])\n {\n $this->em->persist($data);\n $this->em->flush();\n return $data;\n }", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "private function persist()\n {\n $content = $this->adapter->read();\n\n $content = $this->builder->apply($content);\n\n return $this->adapter->write($content);\n }", "public function store($data)\n {\n $this->pagamento = $data['pagamento'];\n $this->sconto = $data['sconto'];\n self::save();\n }", "public function store()\r\n\t{\r\n\t\t$jsonData = $this->getAll();\r\n\r\n\t $data = array(\r\n\t\t\t'username'=> $this->user->username,\r\n\t\t\t'post'=> $this->post,\r\n\t\t\t'date'=> $this->date,\r\n\t );\r\n\r\n\t\tarray_unshift($jsonData, $data);\r\n\r\n\t\t$this->save($jsonData);\r\n\t}", "public function _store()\n {\n try{\n if (count($this->data) == 0)\n {\n $this->data = $this->request->all();\n }\n $this->object = $this->model->create($this->data);\n\n Log::info('Guardado');\n return response()->json(['status'=>true,\n 'msj'=>$this->name. 'Guardado',\n $this->name=>$this->object], 200);\n\n }catch (\\Exception $e){\n Log::critical(\"Error, archivo del peo: {$e->getFile()}, linea del peo: {$e->getLine()}, el peo: {$e->getMessage()}\");\n return response()->json([\"msj\"=>\"Error de servidor\"], 500);\n }\n }", "public function persist($entity)\n {\n $visited = [];\n $this->doPersist($entity, $visited);\n }", "public function save(Persistable $persistable) : void;", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n {\n //tododev: terminar esto\n $this->execute('Chenkacrud\\Projects\\PublishProjectCommand');\n try\n {\n } catch (\\Exception $e)\n {\n dd('error');\n }\n }", "public function postPersist($entity);", "public function store()\n\t{\n $data = Input::all();\n $dataCuotas = $data['cuota'];\n $prestamoRepo = $this->prestamosRepo->newPrestamo();\n $prestamoManager = new PrestamosManager($prestamoRepo,$data);\n $prestamoManager->save();\n\n $id = $prestamoRepo->id;\n\n $this->saveCuotas($dataCuotas, $id);\n\n OrdenesPago::save($id,1,$data['monto'],\"Pago de Prestamo $id\",$prestamoRepo->created_at);\n\n return Redirect::route('prestamos.edit',$id)->with('mensaje_exito','Prestamo Creado Correctamente!');\n\n\t}", "public function persistData($data_obj)\n\t{\n\t\t$new_instance = new writer();\n\t\t$new_instance->setName($data_obj->getName());\n\t\t$new_instance->setLastName($data_obj->getLastName());\n\t\t$new_instance->setCountry($data_obj->getCountry());\t\t\t\t\n\t\t$new_instance->setWebUrl($data_obj->getWebUrl());\t\t\t\n\t\t$new_instance->setDescription($data_obj->getDescription());\t\t\t\n\t\t$em = $this->controller_obj->getDoctrine()->getManager();\n\t\t$em->persist($new_instance);\n\t\t$em->flush();\n\t}", "public function store(){\n \n // comprueba que llegue el formulario con los datos\n if(empty($_POST['guardar']))\n throw new Exception('No se recibieron datos');\n \n $mascota = new Mascotas(); //crear el nuevo usuario\n \n $mascota->nombre = DB::escape($_POST['nombre']);\n $mascota->sexo = DB::escape($_POST['sexo']);\n $mascota->biografia = DB::escape($_POST['biografia']);\n $mascota->fechanacimiento = DB::escape($_POST['fechanacimiento']);\n $mascota->fechafallecimiento = DB::escape($_POST['fechafallecimiento']);\n $mascota->idusuario = Login::get()->id;\n $mascota->idraza = intval($_POST['raza']);\n \n \n \n if(!$mascota->guardar())\n throw new Exception(\"No se pudo guardar $mascota->nombre\");\n \n $mensaje=\"Guardado la mascota $mascota->nombre\";\n include 'views/exito.php'; //mostrar éxito\n }", "public function persist($data, array $context = [])\n {\n\n $userConect = $this->tokenStorage->getToken()->getUser();\n $nineauser = $userConect->getPartenaire()->getNinea();\n if ($userConect->getRoles()[0] == \"ROLE_ADMIN_PARTENAIRE\" || \n $userConect->getRoles()[0] == \"ROLE_PARTENAIRE\")\n {\n \n $data->setUserQuiAffecte($userConect);\n\n//Récupération date début date fin\n // dd($data->getDateDebut());\n $dateDebut = $data->getDateDebut()->format('Y-m-d'); //Récupération date début et formatage\n $dateFin = $data->getDateFin()->format('Y-m-d'); //Récupération date fin\n $dateCourent = date('Y-m-d'); // Récupération date systéme \n \n //comparaison pour savoir le la date courante est compris entre la date de début et la detae de fin\n\n if ($dateDebut <= $dateCourent && $dateCourent <= $dateFin) \n {\n //condition portant sur les utilisateurs qui peuvent bénéficier d'une affectation de compte\n //dd($data->getUserComptePartenaire()->getPartenaire()->getNinea());\n if ($data->getUserComptePartenaire()->getRoles()[0] == \"ROLE_ADMIN_SYSTEME\" ||\n $data->getUserComptePartenaire()->getRoles()[0] == \"ROLE_CAISSIER\" ||\n $data->getUserComptePartenaire()->getRoles()[0] == \"ROLE_ADMIN\" )\n {\n throw new HttpException(403, \"cet utilisateur ne peut pas étre affecter à un compte\");\n\n //l'utilisateur doit qu'on affecte le compte doit appartenir aux agence que l'utilisateur qui lui affecte le compte\n \n }elseif ($data->getUserComptePartenaire()->getPartenaire()->getNinea() != $nineauser) {\n \n throw new HttpException(403, \"cet utilisateur n'appartient pas à cette Agence \");\n\n }\n\n $listcompte = $userConect->getPartenaire()->getComptes();\n //dd($listcompte);\n $tabCompte = $listcompte->toArray();\n // dd($tabCompte);\n\n for ($i=0; $i < count($tabCompte) ; $i++) { \n // dd($data->getCompte()->getPartenaire());\n if ( $tabCompte[$i]->getPartenaire() == $data->getCompte()->getPartenaire()) { \n $data->setCompte($data->getCompte());\n }else{\n throw new HttpException(403, \"le partenaire ne dispose pas de ce compte\");\n }\n }\n\n //Controler si userPartenaire courant est affecte a un compte compte dans cette mm periode \n\n $affectCompte = $this->affectCompteRepo->findAll();\n \n // dd($affectCompte);\n for ($i=0; $i <count($affectCompte) ; $i++) { \n $dateDebut = $affectCompte[$i]->getDateDebut();\n // dd($dateDebut);\n $dateFin = $affectCompte[$i]->getDateFin();\n $userAffect = $affectCompte[$i]->getUserComptePartenaire();\n \n if ($userAffect == $data->getUserComptePartenaire() &&( ($dateDebut <= $data->getDateDebut() && $dateFin >= $data->getDateDebut) || $dateFin == $data->getDateFin() )\n {\n throw new HttpException(403, \"Cet utilisateur est dèja affecté à un compte dans même periode\");\n }\n }\n \n }else {\n\n throw new HttpException(403, \"la durée d'utilisation de ce compte est terminé\");\n }\n\n }else{\n \n throw new HttpException(403, \"vous n'étes pas autorisé à ce service veiullez vous rapprocher de vos supérieur\");\n \n }\n \n $this->entityManager->persist($data);\n $this->entityManager->flush();\n \n }", "public function persist()\n {\n return 1;\n }", "public function store(Request $request)\n {\n $produtos = Produto::all()->where(\"ativo\", \"!=\", 0);\n $dados = new Produto();\n $estoque = new Estoque();\n $dados->nome = ($request->nome) ? $request->nome : null;\n $dados->marca = ($request->marca) ? $request->marca : \"-\";\n $dados->tipo_produto = ($request->tipo_produto) ? $request->tipo_produto : null;\n $dados->observacoes = ($request->observacoes) ? $request->observacoes : \"-\";\n if ($request->nome == null) {\n session()->put(\"info\", \"Insira o nome do produto!\");\n return view(\"produto.create\", [\"dados\" => $dados]);\n }\n if ($request->tipo_produto == null) {\n session()->put(\"info\", \"Selecione o tipo de produto!\");\n return view(\"produto.create\", [\"dados\" => $dados]);\n }\n foreach ($produtos as $produto) {\n if ($produto->nome == $dados->nome && $produto->marca == $dados->marca) {\n if ($produto->tipo_produto == $dados->tipo_produto) {\n session()->put(\"info\", \"Produto já registrado!\");\n return view(\"produto.create\", [\"dados\" => $dados]);\n }\n }\n }\n DB::beginTransaction();\n try {\n $dados->save();\n $estoque->quantidade = 0;\n $estoque->preco = 0;\n $estoque->id_produto = $dados->id;\n $estoque->save();\n DB::commit();\n } catch (\\Throwable $e) {\n DB::rollback();\n $erro = $e->errorInfo[1];\n session()->put(\"info\", \"Erro ao salvar! ($erro)\");\n return view(\"produto.create\", [\"dados\" => $dados]);\n }\n $listaDados = Produto::all()->where(\"ativo\", \"!=\", 0);\n session()->put(\"info\", \"Registro salvo!\");\n return view(\"produto.index\", [\"listaDados\" => $listaDados]);\n }", "public function save(Propriete $propriete)\n {\n $this->em->persist($propriete);\n $this->em->flush();\n }", "protected function saveState(): void\n {\n $em = $this->getEntityManager();\n $em->flush();\n }", "public function save() {\n }", "public function save() {\n }", "public function store(){\n\n if(Input::get('_token') != Session::get('_token')){\n Log::info('El token no es el mismo!!!');\n return Redirect::to('/ofvirtual/notario')->with('error','El envío de datos ya no es válido, otra forma se ha enviado previamente.');\n }\n\n $manifestacion = Input::get('manifestacion');\n\n //Validamos los datos de ideentificación del documento o tramite\n $v = Validator::make($manifestacion, $this->validaIdentificacion);\n if(!$v->passes()) {\n return Redirect::back()->withInput()->withErrors($v);\n }\n\n //Validamos los datos en datos de registro publico\n\n DB::transaction(function() {\n\n $manifestacion = Input::get('manifestacion');\n $enajenante = Input::get('enajenante');\n $domicilio_enajenante = Input::get('domicilioEnajenante');\n $adquiriente = Input::get('adquiriente');\n $domicilio_adquiriente = Input::get('domicilioAdquiriente');\n\n $direccion_predio_urbano = Input::get('direccion_predio_urbano');\n $direccion_predio_rustico = Input::get('direccion_predio_rustico');\n\n\n $datos_construccion = Input::get('datos_construccion');\n\n $dConstrucciones = json_decode($datos_construccion);\n\n //print_r($s->construcciones);\n $dConstrucciones = (array) $dConstrucciones;\n if(isset($dConstrucciones['construcciones'])){\n $dConstrucciones = $dConstrucciones['construcciones'];\n }\n\n //// Enajenantes y adquirientes\n $en = new personas();\n $en->fill($enajenante);\n $en->save();\n\n $endir = new Domicilio();\n $endir->fill($domicilio_enajenante);\n $endir->save();\n\n $ad = new personas();\n $ad->fill($adquiriente);\n $ad->save();\n\n $addir = new Domicilio();\n $addir->fill($domicilio_adquiriente);\n $addir->save();\n\n //// La manifestacion\n $m = new Manifestacion();\n $m->fill($manifestacion);\n\n $m->clave = \"27-\" . $m->municipio . \"-\" . $m->clave_zona . \"-\" . $m->clave_manzana . \"-\" . $m->clave_predio;\n $m->cuenta = substr($m->municipio,1) . \"-\" . $m->tipo_predio . \"-\" . $m->cuenta_predio;\n\n $m->enajenante()->associate($en);\n $m->domicilioEnajenante()->associate($endir);\n\n $m->adquiriente()->associate($ad);\n $m->domicilioAdquiriente()->associate($addir);\n\n\n /*TODO: ver lo de la direccion del predio rustico y el predio urbano\n $m->direccionRustico()->associate($dir_rustico);\n $m->direccionUrbano()->associate($dire_urbano);\n */\n\n $m->save();\n //print_r($s->contrucciones);\n\n /// Estos datos dependen del manifestacion_id\n $Colindancias = [];\n foreach (Input::get('colindancias', []) as $colindancia) {\n $colindancia['manifestacion_id'] = $m->id;\n $Colindancias[] = new ManifestacionColindancia($colindancia);\n }\n\n $m->colindancias()->saveMany($Colindancias);\n\n $Servicios = [];\n foreach (Input::get('manifestacion_servicios', []) as $servicio_id) {\n $Servicios[] = new ManifestacionServicio(['servicio_id'=>$servicio_id, 'manifestacion_id'=>$m->id]);\n }\n $m->colindancias()->saveMany($Servicios);\n\n $Construcciones = [];\n foreach($dConstrucciones as $construccion){\n $aConstruccion = (array) $construccion;\n $aConstruccion['manifestacion_id'] = $m->id;\n $Construcciones[] = new ManifestacionConstruccion($aConstruccion);\n }\n $m->construcciones()->saveMany($Construcciones);\n\n Session::forget('_token');\n\n });\n\n return Redirect::to('/ofvirtual/notario')->with('success','Se ha creado la manifestación');\n }", "public function store(){\n\n if(Input::get('_token') != Session::get('_token')){\n Log::info('El token no es el mismo!!!');\n return Redirect::to('/ofvirtual/notario')->with('error','El envío de datos ya no es válido, otra forma se ha enviado previamente.');\n }\n\n $manifestacion = Input::get('manifestacion');\n\n //Validamos los datos de ideentificación del documento o tramite\n $v = Validator::make($manifestacion, $this->validaIdentificacion);\n if(!$v->passes()) {\n return Redirect::back()->withInput()->withErrors($v);\n }\n\n //Validamos los datos en datos de registro publico\n\n DB::transaction(function() {\n\n $manifestacion = Input::get('manifestacion');\n $enajenante = Input::get('enajenante');\n $domicilio_enajenante = Input::get('domicilioEnajenante');\n $adquiriente = Input::get('adquiriente');\n $domicilio_adquiriente = Input::get('domicilioAdquiriente');\n\n $direccion_predio_urbano = Input::get('direccion_predio_urbano');\n $direccion_predio_rustico = Input::get('direccion_predio_rustico');\n\n\n $datos_construccion = Input::get('datos_construccion');\n\n $dConstrucciones = json_decode($datos_construccion);\n\n //print_r($s->construcciones);\n $dConstrucciones = (array) $dConstrucciones;\n if(isset($dConstrucciones['construcciones'])){\n $dConstrucciones = $dConstrucciones['construcciones'];\n }\n\n //// Enajenantes y adquirientes\n $en = new personas();\n $en->fill($enajenante);\n $en->save();\n\n $endir = new Domicilio();\n $endir->fill($domicilio_enajenante);\n $endir->save();\n\n $ad = new personas();\n $ad->fill($adquiriente);\n $ad->save();\n\n $addir = new Domicilio();\n $addir->fill($domicilio_adquiriente);\n $addir->save();\n\n //// La manifestacion\n $m = new Manifestacion();\n $m->fill($manifestacion);\n\n $m->clave = \"27-\" . $m->municipio . \"-\" . $m->clave_zona . \"-\" . $m->clave_manzana . \"-\" . $m->clave_predio;\n $m->cuenta = substr($m->municipio,1) . \"-\" . $m->tipo_predio . \"-\" . $m->cuenta_predio;\n\n $m->enajenante()->associate($en);\n $m->domicilioEnajenante()->associate($endir);\n\n $m->adquiriente()->associate($ad);\n $m->domicilioAdquiriente()->associate($addir);\n\n\n /*TODO: ver lo de la direccion del predio rustico y el predio urbano\n $m->direccionRustico()->associate($dir_rustico);\n $m->direccionUrbano()->associate($dire_urbano);\n */\n\n $m->save();\n //print_r($s->contrucciones);\n\n /// Estos datos dependen del manifestacion_id\n $Colindancias = [];\n foreach (Input::get('colindancias', []) as $colindancia) {\n $colindancia['manifestacion_id'] = $m->id;\n $Colindancias[] = new ManifestacionColindancia($colindancia);\n }\n\n $m->colindancias()->saveMany($Colindancias);\n\n $Servicios = [];\n foreach (Input::get('manifestacion_servicios', []) as $servicio_id) {\n $Servicios[] = new ManifestacionServicio(['servicio_id'=>$servicio_id, 'manifestacion_id'=>$m->id]);\n }\n $m->colindancias()->saveMany($Servicios);\n\n $Construcciones = [];\n foreach($dConstrucciones as $construccion){\n $aConstruccion = (array) $construccion;\n $aConstruccion['manifestacion_id'] = $m->id;\n $Construcciones[] = new ManifestacionConstruccion($aConstruccion);\n }\n $m->construcciones()->saveMany($Construcciones);\n\n Session::forget('_token');\n\n });\n\n return Redirect::to('/ofvirtual/notario')->with('success','Se ha creado la manifestación');\n }", "public function store(Request $request)\n {\n $status = 'error';\n $data = null;\n\n try{ \n \n DB::beginTransaction();\n \n $id=$request->get('idEstacionamiento'); \n if(! empty($id)){ \n $estacionamiento = Estacionamiento::find($id);\n }else{ \n $estacionamiento = new Estacionamiento; \n } \n $estacionamiento->id_tipo_propiedad=$request->get('txt_idTipopropiedad');\n $estacionamiento->id_tipo_estacionamiento=$request->get('txt_idTipoEstacionamiento');\n $estacionamiento->nombre=$request->get('nombre');\n $estacionamiento->direccion=$request->get('direccion'); \n $estacionamiento->latitud=$request->get('latitud');\n $estacionamiento->longitud=$request->get('longitud'); \n $estacionamiento->estado='1'; \n $estacionamiento->id_usuario = $request->get('idUsuario');\n $estacionamiento->save(); \n\n\n //$fechaSeleccionada = Carbon::now('America/Lima');\n $dia=$request->get('dia');\n $fechaSeleccionada=$request->get('fechaSeleccionada'); \n $hora_ingreso=$request->get('h_ingreso');\n $hora_salida=$request->get('h_salida');\n $tarifa=$request->get('tarifa');\n $idEstacionamientoHorario=$request->get('id_estacionamiento_horario');\n\n \n \n $count = 0; \n \n while ($count < count($dia)){\n\n if($idEstacionamientoHorario[$count]!=\"\"){ \n $estacionamientoHorario = EstacionamientoHorario::find($idEstacionamientoHorario[$count]);\n }else{ \n $estacionamientoHorario = new EstacionamientoHorario();\n } \n $estacionamientoHorario->id_estacionamiento= $estacionamiento->id;\n $estacionamientoHorario->dia=$dia[$count];\n $estacionamientoHorario->fecha_calendario=$fechaSeleccionada[$count];\n $estacionamientoHorario->hora_ingreso=$hora_ingreso[$count];\n $estacionamientoHorario->hora_salida=$hora_salida[$count]; \n $estacionamientoHorario->tarifa=$tarifa[$count];\n $estacionamientoHorario->reservado=0; \n $estacionamientoHorario->save();\n\n $count = $count + 1;\n } \n\n \n $status = 'ok';\n $data = $estacionamiento;\n DB::commit();\n\n\n }catch(\\Exception $e){ \n DB::rollback();\n dd('ERROR BASE DATOS : '.$e);\n return \"ERROR AL REGISTRAR\";\n }\n\n \n //return Redirect::to('estacionamiento.create'); \n return response()->json([\n 'status' => $status,\n 'data' => $data\n ]);\n\n }", "public function store(Request $request)\n {\n DB::beginTransaction(); \n $modulos = Modulo::all();\n try {\n $rules = ['nombre' => 'required'];\n\n $validator = Validator::make($request->all(), $rules);\n if ($validator->fails()) {\n return response()->json(['errors'=>$validator->errors()]);\n }\n /*-- validacion por nombres y apellidos --*/\n $var_per = Str::upper($request->get('nombre'));\n $perfil = Perfil::where('nombre',$var_per)->count();\n if($perfil > 0){\n return response()->json(['errors'=>['PERFIL ' => 'Ya existe un perfil con estos datos : '.$request->get('nombre')]]);\n } \n\n $perfil = new Perfil($request->all());\n\n $perfil->nombre = Str::upper($perfil->nombre);\n $perfil->save();\n\n /* ---- Guardamos los modulos del perfil ---*/\n foreach ($modulos as $key => $value){\n $perfil->modulos()->attach($value['id'],['state' => 0]);\n }\n\n DB::commit(); \n return;\n }\n catch(Exception $e){\n DB::rollback();\n return response()->json(\n ['status' => $e->getMessage()], 422\n );\n }\n }", "public function save(){\n }", "public function save()\n {\n }", "public function save()\n {\n if ($this->id === null) {\n $this->insert();\n } else {\n $this->update();\n }\n }", "protected function persistEntity($entity)\n { \n parent::persistEntity($entity);\n \n $administradores = $this->getDoctrine()\n ->getRepository(Contenido::class)\n ->findBy(array('codigo'=>'correo_superadmin'));\n \n $soporte_mail = $this->getDoctrine()\n ->getRepository(Contenido::class)\n ->findOneByCodigo('soporte_mail');\n \n if ($soporte_mail) {\n $soporte_mail = $soporte_mail->getTexto();\n } else {\n $soporte_mail = '';\n }\n \n // obtengo ahora el nro de telefono del soporte \n $soporte_tel = $this->getDoctrine()\n ->getRepository(Contenido::class)\n ->findOneByCodigo('soporte_tel');\n \n if ($soporte_tel) {\n $soporte_tel = $soporte_tel->getTexto();\n } else {\n $soporte_tel = '';\n }\n \n // Envio correo al administrador\n if (false === $this->isGranted('ROLE_SUPER_ADMIN')) {\n foreach ($administradores as $administrador) {\n $message = (new \\Swift_Message('Nueva noticia'))\n ->setFrom('[email protected]')\n ->setSubject('Nueva noticia creada: '.$entity->getTitulo())\n ->setTo($administrador->getTexto())\n ->setBody(\n $this->renderView(\n 'mails/aviso_entrada.html.twig',\n array(\n 'soporte_tel' => $soporte_tel, \n 'soporte_mail'=> $soporte_mail,\n 'entrada'=>$entity,\n 'tipo'=>1\n )), 'text/html'\n );\n \n $this->get('mailer')->send($message);\n }\n }\n }" ]
[ "0.7907571", "0.7867304", "0.7664455", "0.760681", "0.7465931", "0.74560267", "0.7340374", "0.732015", "0.72916275", "0.72656894", "0.71269345", "0.70736027", "0.70161843", "0.6981761", "0.68192315", "0.6761506", "0.6714606", "0.66606426", "0.66339755", "0.6604049", "0.6575224", "0.6555304", "0.65421444", "0.651842", "0.6517787", "0.6516029", "0.65090674", "0.65003043", "0.6500167", "0.6469725", "0.6456126", "0.6434277", "0.64310974", "0.64267194", "0.6399586", "0.63802713", "0.6327626", "0.6307904", "0.6301641", "0.62981796", "0.6291464", "0.6277812", "0.62698936", "0.6256273", "0.6239236", "0.6221382", "0.6221382", "0.62212706", "0.6204095", "0.61978126", "0.6193843", "0.616592", "0.6144873", "0.6144323", "0.61279476", "0.6106795", "0.60952646", "0.60952646", "0.60952646", "0.60952646", "0.60952646", "0.60952646", "0.60952646", "0.60952646", "0.60952646", "0.60952646", "0.60952646", "0.60952646", "0.60952646", "0.60952646", "0.60952646", "0.60952646", "0.60952646", "0.60952646", "0.60933644", "0.6091895", "0.60863286", "0.6083416", "0.6076166", "0.60563534", "0.6010214", "0.60090363", "0.6004864", "0.600439", "0.59845436", "0.5983641", "0.59785384", "0.59710145", "0.59645617", "0.593023", "0.59250355", "0.5924918", "0.5924918", "0.59211135", "0.59211135", "0.59210825", "0.5919433", "0.59173113", "0.5912905", "0.5911849", "0.59114605" ]
0.0
-1
altera dados no repositorio
public function update (ValueObjectAbstract $valueObject);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function change()\n {\n \n $this->execute('DELETE FROM cotz_cotizaciones_catalogo WHERE id = 12');\n \n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Abierta', etiqueta='abierta' WHERE id = '7'\");\n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Ganada', etiqueta='ganada' WHERE id = '9'\");\n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Perdida', etiqueta='perdida' WHERE id = '10'\");\n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Anulada', etiqueta='anulada' WHERE id = '11'\");\n \n $this->execute(\"UPDATE cotz_cotizaciones SET estado='abierta' WHERE estado = 'aprobado'\");\n $this->execute(\"UPDATE cotz_cotizaciones SET estado='ganada' WHERE estado = 'ganado'\");\n $this->execute(\"UPDATE cotz_cotizaciones SET estado='perdida' WHERE estado = 'perdido'\");\n $this->execute(\"UPDATE cotz_cotizaciones SET estado='anulada' WHERE estado = 'anulado'\");\n }", "protected function migrarDados()\n {\n $serviceDemanda = $this->getService('OrdemServico\\Service\\DemandaFile');\n try {\n $serviceDemanda->begin();\n $arrUsuario = $this->getService('OrdemServico\\Service\\UsuarioFile')->fetchPairs([], 'getNoUsuario', 'getIdUsuario');\n $OrdemSevicoSevice = $this->getService('OrdemServico\\Service\\OrdemServicoDemandaFile');\n $arrDemanda = $serviceDemanda->findBy([], ['id_demanda' => 'asc']);\n $serviceDemanda::setFlush(false);\n foreach ($arrDemanda as $demanda) {\n $intIdUsuario = $arrUsuario[$demanda->getNoExecutor()];\n if ($intIdUsuario) {\n $demanda->setVlComplexidade(null)\n ->setVlImpacto(null)\n ->setVlCriticidade(null)\n ->setVlFatorPonderacao(null)\n ->setVlFacim(null)\n ->setVlQma(null)\n ->setIdUsuario($intIdUsuario);\n $serviceDemanda->getEntityManager()->persist($demanda);\n $arrDemandaServico = $OrdemSevicoSevice->findBy(['id_demanda' => $demanda->getIdDemanda()]);\n if ($arrDemandaServico) {\n $ordemServicoDemanda = reset($arrDemandaServico);\n $ordemServicoDemanda->setIdUsuarioAlteracao($demanda->getIdUsuario())\n ->setDtAlteracao(Date::convertDateTemplate($demanda->getDtAbertura()));\n $OrdemSevicoSevice->getEntityManager()->persist($demanda);\n }\n }\n }\n $serviceDemanda::setFlush(true);\n $serviceDemanda->commit();\n } catch (\\Exception $exception) {\n $serviceDemanda->rollback();\n var_dump($exception->getMessage());\n die;\n }\n }", "public function atualizar(){\r\n return (new Database('cartao'))->update(' id = '.$this->id, [\r\n 'bandeira' => $this->bandeira,\r\n 'numero' => $this->numero,\r\n 'doador' => $this->doador,\r\n ]);\r\n }", "function alterarPessoa(){\r\n $banco = conectarBanco();\r\n $sql = \"UPDATE pessoa SET\"\r\n .\" nome='{$_POST[\"nome\"]}', \"\r\n .\" nascimento='{$_POST[\"nascimento\"]}', \"\r\n .\" endereco='{$_POST[\"endereco\"]}', \"\r\n .\" telefone='{$_POST[\"telefone\"]}'\"\r\n .\" WHERE id='{$_POST[\"id\"]}'\";\r\n $banco->query($sql); // Passa a query fornecida em $sql para o banco de dados\r\n $banco->close(); // Fecha o banco de dados\r\n voltarMenu(); // Volta para a pagina inicial da agenda\r\n}", "public function actualizar() {\n $ord = $this->orden;\n $this->cargarPersonas($ord);\n }", "public function actualizar($data)\n {\n try \n {\n \t$sql = \"UPDATE pedidos SET \n \t\t\t\testado = ?, \n \t\t\t\tcliente \t= ?,\n \t\t \tfecha \t\t= ?\n \t\t \tWHERE id = ?\";\n\n \t$this->pdo->prepare($sql)\n \t ->execute(\n \t\tarray(\n \t\t\t$data->__GET('estado'), \n \t\t\t$data->__GET('cliente'), \n \t\t\t$data->__GET('fecha'),\n \t\t\t$data->__GET('id')\n \t\t\t)\n \t\t);\n } catch (Exception $e) \n {\n \tdie($e->getMessage());\n }\n }", "public function alterarDados($conexao,$id_pessoa){\n $query = \"update empresa_startup set modelo_negocio = ?,publico_alvo = ?, momento = ?, segmento_principal = ?, segmento_secundario = ?, tamanho_time = ?, faturamento_anual = ? where id_pessoa = ?;\";\n $stmt = $conexao->prepare($query);\n $stmt->execute([$this->getModeloNegocio(),$this->getPublicoAlvo(),$this->getMomento(),$this->getSegmentoPricipal(),$this->getSegmentoSecundario(),$this->getTamanhoTime(),$this->getFaturamentoAnual(),$id_pessoa]);\n }", "public function alterarRede($conexao,$id_pessoa){\n $query = \"update empresa_startup set website = ?,linkedin = ?, facebook = ?, app_store = ?, google_play = ?, youtube = ?, instagram = ? where id_pessoa = ?;\";\n $stmt = $conexao->prepare($query);\n $stmt->execute([$this->getWebsite(),$this->getLinkedin(),$this->getFacebook(),$this->getAppStore(),$this->getGooglePlay(),$this->getYoutube(),$this->getInstagram(),$id_pessoa]);\n }", "public function alterarResponsavel($idPessoaResponsavel, Responsavel $responsavel) {\n $obj_conecta = new bd();\n $obj_conecta->conecta();\n $obj_conecta->seleciona_bd();\n\n //echo \"<br> Chegou no metodo IdPessoaResponsavel = [\".$idPessoaResponsavel.\"] <br><br>\";\n\n $sql = \"UPDATE `sigar`.`responsavel` SET `categoria` = '\" . $responsavel->getCategoria() . \"', `telefoneTrabalho` = '\" . $responsavel->getTelTrabalho() . \"' WHERE `responsavel`.`idPessoa` =\" . $idPessoaResponsavel . \";\";\n\n $alteraTabResponsavel = mysql_query($sql);\n if ($alteraTabResponsavel) {\n //echo \"<br> Tabela RESPONSAVEL alterado com sucesso <br>\";\n } else {\n //echo \"<br> ERRO alteração tabela RESPONSAVEL <br>\"; \n }\n\n\n $sql = \"UPDATE `pessoa` SET `nome` = '\" . $responsavel->getNome() . \"', `email` = '\" . $responsavel->getEmail() . \"', `telefoneResidencial` = '\" . $responsavel->getTelefoneResidencial() . \"', \n `telefoneCelular` = '\" . $responsavel->getCelular() . \"', `sexo` = '\" . $responsavel->getSexo() . \"', `dataNascimento` = '\" . $responsavel->getNascimento() . \"', `cpf` = '\" . $responsavel->getCpf() . \"' WHERE `pessoa`.`idPessoa` = \" . $idPessoaResponsavel . \";\";\n\n $alteraTabPessoaResp = mysql_query($sql);\n if ($alteraTabPessoaResp) {\n //echo \" <br> Tabela PESSOARESPONSAVEL alterado com sucesso <br>\";\n } else {\n //echo \"<br> EROO alteração tabela PESSOARESPONSAVEL <br>\"; \n }\n }", "public function testUpdate()\n {\n $id = $this->tester->grabRecord('common\\models\\Comentario', ['id_receita' => 2]);\n $receita = Comentario::findOne($id);\n $receita->descricao = 'novo Comentario';\n $receita->update();\n $this->tester->seeRecord('common\\models\\Comentario', ['descricao' => 'novo Comentario']);\n }", "public function alterarDadosGerais($conexao,$id_pessoa){\n $query = \"update empresa_startup set nome = ?, razao_social = ?, cnpj = ?, email = ?, data_fundacao = ?, telefone = ? where id_pessoa = ?;\";\n $stmt = $conexao->prepare($query);\n $stmt->execute([$this->getNome(),$this->getRazaoSocial(),$this->getCnpj(),$this->getEmail(),$this->getDataFundacao(),$this->getTelefone(),$id_pessoa]);\n }", "public function atualizar(){\r\n return (new Database('atividades'))->update('id = '.$this->id,[\r\n 'titulo' => $this->titulo,\r\n 'descricao' => $this->descricao,\r\n 'ativo' => $this->ativo,\r\n 'data' => $this->data\r\n ]);\r\n }", "public function mudar(){\n\n\t\t//$stmt = $conn->prepare(\"UPDATE tb_produtos SET nome = :NOME, qte = :QTE, cod = :COD, dtCadastro = :DTCADASTRO, preco = :PRECO, valorTotal = :VALORTOTAL WHERE nome = :NOMEID OR cod = :NOMEID \");\n\n\t\t$this->nomeId = $_POST['nomeId'];\n\t\t$this->nome = $_POST['nomeProduto'];\n\t\t$this->qte = $_POST['qteProduto'];\n\t\t$this->cod = $_POST['cod'];\n\t\t$this->ordCod = $this->cod;\n\t\t$this->dtCadastro = $_POST['dtCadastro'];\n\t\t$this->preco = (100 * $_POST['valor']);\n\t\t$this->valorTotal = ($this->qte * $this->preco);\n\n\n\t\t//$stmt->bindParam(\":NOME\", $this->nome);\n\t\t//$stmt->bindParam(\":QTE\", $this->qte);\n\t\t//$stmt->bindParam(\":COD\", $this->cod);\n\t\t//$stmt->bindParam(\":DTCADASTRO\", $this->dtCadastro);\n\t\t//$stmt->bindParam(\":PRECO\", $this->preco);\n\t\t//$stmt->bindParam(\":VALORTOTAL\", $this->valorTotal);\n\t\t//$stmt->bindParam(\":NOMEID\", $this->nomeId);\n\n\t\t//$stmt->execute();\n\n\n\t\t$conn = new Sql();\n\n\t\t$stmt = $conn->query(\"UPDATE tb_produtos SET nome = :NOME, qte = :QTE, cod = :COD, ordCod = :ORDCOD, dtCadastro = :DTCADASTRO, preco = :PRECO, valorTotal = :VALORTOTAL WHERE nome = :NOMEID OR cod = :NOMEID \", array(\n\t\t\t':NOMEID'=>$this->nomeId,\n\t\t\t':NOME'=>$this->nome,\n\t\t\t':QTE'=> $this->qte,\n\t\t\t':COD' => $this->cod,\n\t\t\t':ORDCOD'=>$this->ordCod,\n\t\t\t':DTCADASTRO' => $this->dtCadastro,\n\t\t\t':PRECO'=> $this->preco,\n\t\t\t':VALORTOTAL'=>$this->valorTotal\n\t\t));\n\t}", "public function atualizando($data){\n $this->db->where('coluna_id', $data['dados_id']);\n //vai na coluna tal e atualiza pra tal\n $this->db->set('coluna', $data['dados']);\n //nome da tabela\n $this->db->update('tabela'); \n //echo $this->db->last_query();\n }", "public function change(): void\n {\n $leads = $this->table('leads');\n $leads->addColumn('id_proyecto', 'integer')\n ->addColumn('status', 'integer')\n ->addColumn('comentarios', 'text')\n ->addColumn('created_at', 'timestamp')\n ->addColumn('updated_at', 'timestamp')\n ->addForeignKey('id_proyecto', 'proyectos', 'id', ['delete' => 'NO_ACTION', 'update' => 'NO_ACTION'])\n ->create();\n\n $datos = $this->table('datos');\n $datos->addColumn('id_lead', 'integer')\n ->addColumn('campo', 'string', ['limit' => 250])\n ->addColumn('valor', 'string', ['limit' => 250])\n ->addColumn('created_at', 'timestamp')\n ->addColumn('updated_at', 'timestamp')\n ->addForeignKey('id_lead', 'leads', 'id', ['delete' => 'CASCADE', 'update' => 'CASCADE'])\n ->create();\n }", "function modificaProyecto($proyecto){\n include 'dbdatos.php';\n mysql_pconnect($dbhost, $dbuname, $dbpass);\n @mysql_select_db(\"$dbname\") or die (\"Imposible acceder a la BD en modificaProyecto\");\n $query= \"update proyecto set\n estado='\".$proyecto->getEstadoNumerico().\"' where\n nproyecto='\".$proyecto->getNproyecto().\"'\";\n $sel=mysql_query($query) or die(\"Error en modificaProyecto proyectoDao\");\n mysql_close();\n }", "public function alterarDescricao($conexao,$id_pessoa){\n $query = \"update empresa_startup set descricao_curta = ?, descricao = ?, tags = ? where id_pessoa = ?;\";\n $stmt = $conexao->prepare($query);\n $stmt->execute([$this->getDescricaoCurta(),$this->getDescricao(),$this->getTags(),$id_pessoa]);\n }", "function Alterar() {\n $SQL = \"UPDATE dd_dados_domicilio SET \n IDTIPOLOGRADOURO ='\" . $this->IDTIPOLOGRADOURO . \"',\n NOMELOGRADOURO ='\" . $this->NOMELOGRADOURO . \"',\n NUMDOMICILIO ='\" . $this->NUMDOMICILIO . \"',\n COMPLEMENTO ='\" . $this->COMPLEMENTO . \"',\n BAIRRO ='\" . $this->BAIRRO . \"',\n CEP ='\" . $this->CEP . \"',\n IDESTADO ='\" . $this->IDESTADO . \"',\n IDMUNICIPIO ='\" . $this->IDMUNICIPIO . \"',\n REFERENCIA ='\" . $this->REFERENCIA . \"',\n IDCONSTRUCAO ='\" . $this->IDCONSTRUCAO . \"',\n IDESTCONSERVACAO ='\" . $this->IDESTCONSERVACAO . \"',\n IDUTILIZACAO ='\" . $this->IDUTILIZACAO . \"',\n IDTIPOUSO ='\" . $this->IDTIPOUSO . \"',\n IDESPECIEDOMICILIO ='\" . $this->IDESPECIEDOMICILIO . \"',\n DATAINICIOMORARMUNICIP ='\" . $this->DATAINICIOMORARMUNICIP . \"',\n DATAINICIOMORARDOMICILIO ='\" . $this->DATAINICIOMORARDOMICILIO . \"',\n QUANTCOMODOS ='\" . $this->QUANTCOMODOS . \"',\n QUANTDORMIT ='\" . $this->QUANTDORMIT . \"',\n IDTIPOMATERIALPISOINT ='\" . $this->IDTIPOMATERIALPISOINT . \"',\n IDTIPOMATERIALPAREDEEXT ='\" . $this->IDTIPOMATERIALPAREDEEXT . \"',\n QTAGUACANALIZADA ='\" . $this->QTAGUACANALIZADA . \"',\n IDFORMAABASTECIMENTO ='\" . $this->IDFORMAABASTECIMENTO . \"',\n IDFORMAESCOASANITARIO ='\" . $this->IDFORMAESCOASANITARIO . \"',\n IDDESTINOLIXO ='\" . $this->IDDESTINOLIXO . \"',\n IDILUMINACAOCASA ='\" . $this->IDILUMINACAOCASA . \"',\n VALAGUAESGOTO ='\" . $this->VALAGUAESGOTO . \"',\n VALENERGIA ='\" . $this->VALENERGIA . \"',\n VALALUGUEL ='\" . $this->VALALUGUEL . \"',\n NUMFAMILIAS ='\" . $this->NUMFAMILIAS . \"',\n IDDADOSOLICITANTE ='\" . $this->IDDADOSOLICITANTE . \"'\n WHERE IDDADODOMICILIO='\" . $this->codigo . \"'\";\n\n //die($SQL);\n\n $con = new gtiConexao();\n $con->gtiConecta();\n $con->gtiExecutaSQL($SQL);\n $con->gtiDesconecta();\n }", "public function actualizar_modulo($id, $data)\n {\n //----------------------------------------------------------------------\n //-Migracion MongoDB\n $id_modulo = new MongoDB\\BSON\\ObjectId($id);\n $id_usuario = new MongoDB\\BSON\\ObjectId($this->session->userdata('id_usuario'));\n $fecha = new MongoDB\\BSON\\UTCDateTime();\n $modificar1 = $this->mongo_db->where(array('_id'=>$id_modulo))->set($data)->update($this->nombre_tabla);\n if($modificar1){\n //--Auditoria\n $data_auditoria = array(\n 'cod_user'=>$id_usuario,\n 'nom_user'=>$this->session->userdata('nombre'),\n 'fecha'=>$fecha,\n 'accion'=>'Modificar modulo',\n 'operacion'=>''\n );\n $mod_auditoria = $this->mongo_db->where(array('_id'=>$id_modulo))->push('auditoria',$data_auditoria)->update($this->nombre_tabla);\n }\n //----------------------------------------------------------------------\n }", "public function edit($data=array()) {\n foreach ($data as $campo=>$valor) {\n $$campo = $valor;\n }\n \n $this->parametros = array($banc_codigo,$banc_nombre);\n $this->sp = \"str_consultaBanco_upd\";\n $this->executeSPAccion();\n if($this->filasAfectadas>0){\n $this->mensaje=\"Banco modificado exitosamente\";\n }else{\n $this->mensaje=\"No se ha actualizado el banco\";\n }\n }", "public function atualizar()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"UPDATE MinisterioTemDiscipulo SET \t ministerioId= ? , funcaoId = ?\n WHERE discipuloId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->ministerioId );\n $stm->bindParam(2, $this->funcaoId );\n $stm->bindParam(3, $this->discipuloId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n //var_dump($erro);\n //exit();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "public function atualizar()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"UPDATE MinisterioTemDiscipulo SET \t ministerioId= ? , funcaoId = ?\n WHERE discipuloId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->ministerioId );\n $stm->bindParam(2, $this->funcaoId );\n $stm->bindParam(3, $this->discipuloId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n //var_dump($erro);\n //exit();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "function alterar($id_operacao,$codigo,$descricao,$papeis,$dbhw){\n\tglobal $convUTF, $esquemaadmin;\n\tif ($convUTF != true){\n\t\t$descricao = utf8_decode($descricao);\n\t}\n\t$dataCol = array(\n\t\t\"codigo\" => $codigo,\n\t\t\"descricao\" => $descricao\n\t);\n\t$resultado = i3GeoAdminUpdate($dbhw,\"i3geousr_operacoes\",$dataCol,\"WHERE id_operacao = $id_operacao\");\n\tif($resultado === false){\n\t\treturn false;\n\t}\n\t//apaga todos os papeis\n\t$resultado = excluirPapeis($id_operacao,$dbhw);\n\tif($resultado === false){\n\t\treturn false;\n\t}\n\tif(!empty($papeis)){\n\t\t//atualiza papeis vinculados\n\t\tforeach($papeis as $p){\n\t\t\t$resultado = adicionaPapel($id_operacao,$p,$dbhw);\n\t\t\tif($resultado === false){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn $id_operacao;\n}", "public function atualizar()\r\n {\r\n return (new Database('instituicao'))->update('id=' . $this->id, [\r\n 'nome' => $this->nome,\r\n 'datacriacao' => $this->datacriacao,\r\n 'tipo' => $this->tipo\r\n\r\n ]);\r\n }", "public function darBaixa($nomeIdb,$nomeb,$qteb,$codb,$dtCadastrob,$valorb){\n\n\t\t//$stmt = $conn->prepare(\"UPDATE tb_produtos SET nome = :NOME, qte = :QTE, cod = :COD, dtCadastro = :DTCADASTRO, preco = :PRECO, valorTotal = :VALORTOTAL WHERE nome = :NOMEID OR cod = :NOMEID \");\n\n\t\t$this->nomeId = $nomeIdb;\n\t\t$this->nome = $nomeb;\n\t\t$this->qte = $qteb;\n\t\t$this->cod = $codb;\n\t\t$this->ordCod = $this->cod;\n\t\t$this->dtCadastro = $dtCadastrob;\n\t\t$this->preco = $valorb;\n\t\t$this->valorTotal = ($this->qte * $this->preco);\n\n\t\t//var_dump($this->nomeId);\n\t\t//var_dump($this->nome);\n\t\t//var_dump($this->qte);\n\t\t//var_dump($this->cod);\n\t\t//var_dump($this->dtCadastro);\n\t\t//var_dump($this->preco);\n\t\t//var_dump($this->valorTotal);\n\n\n\t\t//$stmt->bindParam(\":NOME\", $this->nome);\n\t\t//$stmt->bindParam(\":QTE\", $this->qte);\n\t\t//$stmt->bindParam(\":COD\", $this->cod);\n\t\t//$stmt->bindParam(\":DTCADASTRO\", $this->dtCadastro);\n\t\t//$stmt->bindParam(\":PRECO\", $this->preco);\n\t\t//$stmt->bindParam(\":VALORTOTAL\", $this->valorTotal);\n\t\t//$stmt->bindParam(\":NOMEID\", $this->nomeId);\n\n\t\t//$stmt->execute();\n\n\n\t\t$conn = new Sql();\n\n\t\t$stmt = $conn->query(\"UPDATE tb_produtos SET nome = :NOME, qte = :QTE, cod = :COD, ordCod = :ORDCOD, dtCadastro = :DTCADASTRO, preco = :PRECO, valorTotal = :VALORTOTAL WHERE nome = :NOMEID OR cod = :NOMEID \", array(\n\t\t\t':NOMEID'=>$this->nomeId,\n\t\t\t':NOME'=>$this->nome,\n\t\t\t':QTE'=> $this->qte,\n\t\t\t':COD' => $this->cod,\n\t\t\t':ORDCOD'=>$this->ordCod,\n\t\t\t':DTCADASTRO' => $this->dtCadastro,\n\t\t\t':PRECO'=> $this->preco,\n\t\t\t':VALORTOTAL'=>$this->valorTotal\n\t\t));\n\t}", "public function actualizaEstado(){\n $this->estado = 'Completo';\n // $this->cotiza = $this->generarCustomID();\n $this->save();\n }", "public function editarProducto($datos){\n $con= new conectar();\n $conexion= $con->conexion();\n $sql= \"UPDATE producto set nombre='$datos[0]',descripcion='$datos[1]',imagen='$datos[2]', \n codigo_categoria='$datos[3]', stock='$datos[4]', precio='$datos[5]' WHERE id='$datos[6]'\";\n return $result= mysqli_query($conexion, $sql);\n }", "public function update($tarConvenio);", "public function atualizar()\n {\n return (new Database('vagas'))->update('id = '.$this->id, [\n 'titulo' => $this->titulo,\n 'descricao' => $this->descricao,\n 'ativo' => $this->ativo,\n 'data' => $this->data \n ]);\n }", "function actualizar_palabra_asociada_archivo_repositorio($file_id,$id_palabra) {\n\n\t\t$UpdateRecords = \"UPDATE repositorio_archivos SET id_palabra='$id_palabra'\n\t\tWHERE file_id='$file_id'\";\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($UpdateRecords); \t\n\t\tmysql_close($connection);\n\t}", "protected function alterar(){\n header(\"Content-type: text/html;charset=utf-8\");\n $sql = \"SHOW FULL FIELDS FROM \" . $this->table;\n $execute = conexao::toConnect()->executeS($sql);\n $sets = \"\";\n $id_registro = '';\n $contador = \"\";\n $count = 1;\n foreach ($execute as $contar) {\n if ($contar->Key != 'PRI') {\n $atributos_field = $contar->Field;\n $select_p = substr(strtoupper($atributos_field), 0, 1);\n $select_t = substr($atributos_field, 1);\n $get = 'get' . $select_p . $select_t;\n if ($this->$get() != null) {\n $contador = $contador + 1;\n }\n }\n }\n foreach ($execute as $key => $attr){\n if ($attr->Key != 'PRI') {\n $atributos_field = $attr->Field;\n $select_p = substr(strtoupper($atributos_field), 0, 1);\n $select_t = substr($atributos_field, 1);\n $get = 'get' . $select_p . $select_t;\n if ($this->$get() != null) {\n if ($count != $contador) {\n $sets .= $attr->Field . \" = '\" . $this->$get() . \"',\";\n } else {\n $sets .= $attr->Field . \" = '\" . $this->$get().\"'\";\n }\n $count = $count + 1;\n }\n }else{\n $id_registro = $attr->Field;\n }\n }\n $update = \"UPDATE \".$this->table.\" SET \".$sets.\" WHERE \".$id_registro.\" = \".$this->getIdTable();\n\n $execute_into = conexao::toConnect()->executeQuery($update);\n if (count($execute_into) > 0) {\n return $execute_into;\n }else{\n return false;\n }\n }", "public function change(): void\n {\n if(!$this->hasTable(\"expostion\")){\n\n $this->table(\"expostion\", [\"id\"=>\"id_expos\"])\n ->addColumn(\"code_expos\", \"string\", [\"limit\"=>225, \"null\"=>true, \"comment\"=>\"Code de l'exposition\"])\n ->addColumn(\"image_expos\", \"string\", [\"limit\"=>225, \"null\"=>true, \"comment\"=>\"Image de l'exposition\"])\n ->addColumn(\"titre_expos\", \"string\", [\"limit\"=>225, \"null\"=>true, \"comment\"=>\"Titre de l'exposition\"])\n ->addColumn(\"soustitre_expos\", \"string\", [\"limit\"=>225, \"null\"=>true, \"comment\"=>\"Sous-titre de l'exposition\"])\n ->addColumn(\"prix_expos\", \"float\", [\"limit\"=>10, \"null\"=>true, \"comment\"=>\"prix article de l'exposition\"])\n ->addColumn(\"details_expos\", \"text\", [\"limit\"=>MysqlAdapter::TEXT_MEDIUM, \"comment\"=>\"Details de l'article de l'exposition\"])\n\n ->addIndex(\"code_expos\", [\"unique\"=>true, \"name\"=>\"indexExposition\"])\n\n ->create();\n }\n }", "public function actualizar(){\n }", "public function actualizar(){\n }", "public function actualizar(){\n }", "function modifyComentario($id_evento,$id_comentario,$contenido){\n $mysqli = Conectar();\n strip_tags($contenido);\n $mysqli -> query(\"Update comentarios Set comentario='$contenido' Where id_evento=$id_evento and id_comentario=$id_comentario\");\n }", "function actualizar($id_libro, $nombre_libro, $paginas_libro, $codigo_libro, $version_libro, $id_editorial, $id_estado_libro){\n\n\t\tinclude 'data_bd.inc';\n\t\tinclude 'databaseClass.php';\n\t\t//creo mi cadena de conexion\n\t\t$conexion = new DB($host, $user, $pass, $bd);\n\t\t//Creo mi conexión\n\t\t$status = $conexion->conectar();\n\t\t//En caso de que devuelva una falla\n\t\tif($status === FALSE){\n\t\t\tdie('No se pudo conectar');\n\t\t}\n\t\t//Creo mi query\n\t\t$consulta = \"UPDATE\n\t\t\t\t\tlibro\n\t\t\t\t\tSET nombre_libro = '$nombre_libro',\n\t\t\t\t\t\tpaginas_libro = '$paginas_libro',\n\t\t\t\t\t\tcodigo_libro = '$codigo_libro',\n\t\t\t\t\t\tversion_libro = '$version_libro',\n\t\t\t\t\t\tid_editorial = '$id_editorial',\n\t\t\t\t\t\tid_estado_libro = '$id_estado_libro'\n\t\t\t\t\tWHERE id_libro='$id_libro'\n\t\t\t\t\t\t\";\n\t\t//Ejecuto la consulta\n\t\t$resultado = $conexion -> ejecutarConsulta($consulta);\n\t\t//Si fue una falla\n\t\tif($conexion === FALSE){\n\t\t\t$conexion -> cerrar();\t\n\t\t\treturn FALSE;\n\t\t}\n\t\t//Cierro la conexion\n\t\t$conexion -> cerrar();\n\t\tif($resultado == TRUE)\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\telse {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function editar($datos){\r\n\t\t$array = array(\r\n\t\t\t'name' => $datos[\"nombre\"],\r\n\t\t\t'hora_inicio' => $datos[\"horainicio\"],\r\n\t\t\t'hora_final' => $datos[\"horafinal\"]);\r\n\t\t$this->db->where('idUsuario', $datos[\"idUsuario\"]);\r\n\t\t$this->db->update('turnos_laborales', $array);//Se llama a la funcion de insertar datos y se le pasa el array asociativo\t\t\t\r\n\t\t\r\n\t}", "public function change()\n {\n $table = $this->table('libros');\n $table->addColumn('autor', 'string', [\n 'default' => null,\n 'limit' => 100,\n 'null' => true,\n ]);\n $table->addColumn('titulo', 'string', [\n 'default' => null,\n 'limit' => 150,\n 'null' => true,\n ]);\n $table->addColumn('traductor', 'string', [\n 'default' => null,\n 'limit' => 100,\n 'null' => true,\n ]);\n $table->addColumn('ciudad', 'string', [\n 'default' => null,\n 'limit' => 50,\n 'null' => true,\n ]);\n $table->addColumn('anio_edicion', 'integer', [\n 'default' => null,\n 'null' => true,\n ]);\n $table->addColumn('edicion', 'string', [\n 'default' => null,\n 'limit' => 10,\n 'null' => true,\n ]);\n $table->addColumn('primera_edicion', 'integer', [\n 'default' => null,\n 'null' => true,\n ]);\n $table->addColumn('editorial', 'string', [\n 'default' => null,\n 'limit' => 50,\n 'null' => true,\n ]);\n $table->addColumn('tema_id', 'integer', [\n 'default' => null,\n 'null' => true,\n ]);\n $table->addColumn('tipo', 'string', [\n 'default' => null,\n 'limit' => 10,\n 'null' => true,\n ]);\n $table->addColumn('topografia', 'string', [\n 'default' => null,\n 'limit' => 15,\n 'null' => true,\n ]);\n $table->addColumn('paginas', 'integer', [\n 'default' => null,\n 'null' => true,\n ]);\n $table->addColumn('tomos', 'integer', [\n 'default' => null,\n 'null' => true,\n ]);\n $table->addColumn('idioma', 'string', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n $table->addColumn('observaciones', 'text', [\n 'default' => null,\n 'null' => true,\n ]);\n $table->addColumn('baja', 'boolean', [\n 'default' => null,\n 'null' => true,\n ]);\n $table->addColumn('created', 'datetime', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addColumn('modified', 'datetime', [\n 'default' => null,\n 'null' => false,\n ]);\n\n $table->create();\n\n $current_timestamp = Carbon::now();\n // Inserta artículos de la base de datos antigua\n $this->execute('insert into libros (id, autor, titulo, traductor, ciudad, anio_edicion, edicion, primera_edicion, editorial, tema_id, tipo, topografia, paginas, tomos, idioma, observaciones, baja, created, modified) select id, lAutor, lTitulo, lTraductor, lCiudad, lAnioEdicion, lEdicion, lPrimeraEdicion, lEditorial, subtema_id+30, lTipo, lTopografia, lPaginas, lTomos, lIdioma, lObservaciones, lBaja, \"' . $current_timestamp . '\", \"' . $current_timestamp . '\" from old_libros');\n }", "public function update(){\n $sql = \"update \".self::$tablename.\" set correlativo=\\\"$this->correlativo\\\",nombre_instalador=\\\"$this->nombre_instalador\\\",nombre_proyecto=\\\"$this->nombre_proyecto\\\",localizacion=\\\"$this->localizacion\\\",contrato_orden_trabajo=\\\"$this->contrato_orden_trabajo\\\",sector_trabajo=\\\"$this->sector_trabajo\\\",area_aceptada=\\\"$this->area_aceptada\\\",fecha_proyecto=\\\"$this->fecha_proyecto\\\" where id_usuario=$this->id_usuario\";\n Executor::doit($sql);\n }", "public function syncToDB($data=null){\n\t\tglobal $dbh;\n\t\t// ojo con el orden ...\n\t\t$fields = array(\n\t\t\t\"usuario\",\n\t\t\t\"contrasena\",\n\t\t\t\"rut\",\n\t\t\t\"nombre\",\n\t\t\t\"apellido\",\n\t\t\t\"correo\",\n\t\t\t\"fechaNacimiento\",\n\t\t\t\"genero\",\n\t\t\t\"fono\",\n\t\t\t\"esEmpresa\",\n\t\t\t\"razon\",\n\t\t\t\"rutEmpresa\",\n\t\t\t\"giro\",\n\t\t\t\"id\"\n\t\t);\n\t\t// ... por esto\n\t\t$query = \"UPDATE cliente SET usuario=?,contrasena=?,rut=?,nombre=?,apellido=?,correo=?,fechaNacimiento=?,genero=?,fono=?,esEmpresa=?,razon=?,rutEmpresa=?,giro=? WHERE id=?;\";\n\t\t$update = array();\n\t\tif( $data!=null && is_array($data) ){\n\t\t\tforeach( $fields as $field ){\n\t\t\t\t$update[$field] = null;\n\t\t\t\tif( isset($data[$field]) && (!empty($data[$field]) || $data[$field]=='' || $data[$field]=='0') ){\n\t\t\t\t\t$update[$field] = $data[$field];\n\t\t\t\t} else {\n\t\t\t\t\tif( isset($this->data[$field]) && !empty($this->data[$field]) ){\n\t\t\t\t\t\t$update[$field] = $this->data[$field];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tforeach( $fields as $field ){\n\t\t\t\t$update[$field] = null;\n\t\t\t\tif( isset($this->data[$field]) && !empty($this->data[$field]) ){\n\t\t\t\t\t$update[$field] = $this->data[$field];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif( is_array($update['fechaNacimiento']) ){\n\t\t\t$update['fechaNacimiento'] = $update['fechaNacimiento']['year'].\"-\".$update['fechaNacimiento']['month'].\"-\".$update['fechaNacimiento']['day'];\n\t\t}\n\t\t$res = $dbh->query($query,array_values($update));\n\t\treturn $res;\n\t}", "function modificarHistorial($id_diario, $id_poi, $fechaVisitaPoi, $estaEnPoi, $texto, $foto, $video) {\n $sql = \"UPDATE historial SET fechaVisitaPoi='\" . $fechaVisitaPoi . \"',estaEnPoi='\" . $estaEnPoi . \"',texto='\" . $texto . \"',\"\n . \"foto='\" . $foto . \"',video='\" . $video . \"' WHERE id_diario='\" . $id_diario . \"' AND id_poi='\" . $id_poi . \"'\";\n $con = new DB();\n $result = $con->exec($sql);\n $con = null;\n }", "public function updateDB()\n {\n\n }", "public function change()\n {\n\n\n\n $this->table('familles$des$articles', HTML_Phinx::id_default())\n ->addColumn(HTML_Phinx::id())\n ->addColumn(HTML_Phinx::text_master('familles$des$articles'))\n ->addColumn(HTML_Phinx::textarea('note'))\n ->addColumn(HTML_Phinx::datetime('date_ajoute'))\n ->addColumn(HTML_Phinx::datetime('date_modifier'))\n ->create();\n\n\n $faker = Faker\\Factory::create('fr_FR');\n $date = date(\"Y-m-d H:i:s\", $faker->unixTime('now'));\n $data = [\n [\n 'familles$des$articles' => \"filtre\",\n\n \"note\" => \"Certaines opérations sont exonérées de TVA. Découvrez les secteurs d'activités et les opérations concernées par cette exonération.\",\n \"date_ajoute\" => $date,\n \"date_modifier\" => $date\n ], [\n 'familles$des$articles' => \"pc\",\n\n \"note\" => \"La taxe sur la valeur ajoutée ou TVA est un impôt indirect sur la consommation.\",\n \"date_ajoute\" => $date,\n \"date_modifier\" => $date\n ]];\n\n $this->table('familles$des$articles')->insert($data)->save();\n }", "function evt__enviar(){\n if($this->dep('datos')->tabla('mesa')->esta_cargada()){\n $m = $this->dep('datos')->tabla('mesa')->get();\n // print_r($m);\n $m['estado'] = 2;//Cambia el estado de la mesa a Enviado\n $this->dep('datos')->tabla('mesa')->set($m);\n // print_r($m['id_mesa']);\n $this->dep('datos')->tabla('mesa')->sincronizar();\n // $this->dep('datos')->tabla('mesa')->resetear();\n \n $m = $this->dep('datos')->tabla('mesa')->get_listado($m['id_mesa']);\n if($m[0]['estado'] == 2){//Obtengo de la BD y verifico que hizo cambios en la BD\n //Se enviaron correctamente los datos\n toba::notificacion()->agregar(utf8_decode(\"Los datos fueron enviados con éxito\"),\"info\");\n }\n else{\n //Se generó algún error al guardar en la BD\n toba::notificacion()->agregar(utf8_decode(\"Error al enviar la información, verifique su conexión a internet\"),\"info\");\n }\n }\n \n }", "function Editar(Docente $docente, $lista_formacao, $lista_pesquisa){\n $conn = Conexao::getconexao(); \n \n try { \n $conn->beginTransaction();\n $sql = \"UPDATE users set nome = :nome, email = :email, senha = :senha where id = :id\";\n $stmt = $conn->prepare($sql);\n $stmt->bindValue(':id', $docente->getId(), PDO::PARAM_INT); \n $stmt->bindValue(':nome', $docente->getNome(), PDO::PARAM_STR);\n $stmt->bindValue(':email', $docente->getEmail(), PDO::PARAM_STR);\n $stmt->bindValue(':senha', $docente->getSenha(), PDO::PARAM_STR);\n $result[1] = $stmt->execute();\n \n \n $sql = \"UPDATE docentes set especialidade = :especialidade, cursos_id = :cursos_id where users_id = :id\";\n $stmt = $conn->prepare($sql);\n $stmt->bindValue(':id', $docente->getId(), PDO::PARAM_INT); \n $stmt->bindValue(':especialidade', $docente->getEspecialidade(), PDO::PARAM_STR);\n $stmt->bindValue(':cursos_id', $docente->getCurso(), PDO::PARAM_INT);\n $result[0] = $stmt->execute();\n \n \n if($lista_formacao != null){\n \n $lista_formacao = FuncaoDados::addLinha($lista_formacao, array('users_id' => $docente->getId()));\n \n $result[2] = FuncaoDados::pdoMultiInsert(\"formacoes\", $lista_formacao,$conn);\n }else{\n \n $result[2] = true;\n }\n \n \n if($lista_pesquisa != null){\n \n \n foreach ($lista_pesquisa as $key => $value ){\n $params[] = \"(?,?)\";\n \n } \n $sql = \"INSERT INTO pesquisa (nome, users_id) VALUES \";\n $sql .= implode(\",\",$params);\n \n \n $lista_pesquisa = FuncaoDados::addLinha($lista_pesquisa, array('users_id' => $docente->getId())); \n $stmt = $conn->prepare($sql);\n $result[3] = $stmt->execute($lista_pesquisa);\n \n \n }else{\n \n $result[3] = true;\n }\n \n \n \n \n if($result[0] == true && $result[1] == true && $result[2] == true && $result[3] == true){\n $conn->commit(); \n return true;\n } else {\n \n $conn->rollBack();\n return false;\n } \n } catch( Exception $e ){\n echo $e->getMessage();\n $conn->rollBack();\n return false;\n }\n }", "public function actualizar($datos){\n $this->fill($datos['producto']);\n $this->categoria = $this->srtCategoria($datos['categorias']);\n $this->save();\n $this->categorias()->sync($datos['categorias']);\n \n $arrIdsColoresBorrar = $this->idsColoresBorrar($datos);\n if (count($arrIdsColoresBorrar) > 0) \n $this->colores()->detach($arrIdsColoresBorrar); \n\n $arrIdsDescripciones = $this->idsDescripcionesBorrar($datos);\n if (count($arrIdsDescripciones) > 0) {\n $this->descripciones()->detach($arrIdsDescripciones);\n DescripcionProducto::destroy($arrIdsDescripciones);\n }\n\n $this->actualizarDescripciones($datos);\n \n if (isset($datos['dimensiones_nuevas'])) {\n $idsDimensiones = $this->arrDimensionesNuevas($datos);\n $articulos = $this->arrArticulos($datos['colores'], $idsDimensiones, $this->id);\n DB::table('articulos')->insert($articulos);\n }\n\n if (isset($datos['colores_nuevos'])) {\n $idsDimensiones = collect($datos['dimensiones_actuales'])->pluck('id')->all();\n $articulos = $this->arrArticulos($datos['colores_nuevos'], $idsDimensiones, $this->id);\n DB::table('articulos')->insert($articulos);\n }\n }", "public function modificar($datosCampos) {\n $guardar = new SqlQuery(); //instancio objeto de la clase sqlQuery\n (string) $tabla = get_class($this); //obtengo el nombre de la clase para poder realizar la consulta\n $id = $datosCampos[\"id\"];\n switch ($datosCampos[\"acceso\"]) //cambio los dato que vienen de la vista\n {\n case \"total\":\n $datosCampos[\"acceso\"] = 1;\n break;\n case \"restringido\":\n $datosCampos[\"acceso\"] = 2;\n break;\n default:\n $datosCampos[\"acceso\"] = 0;\n break;\n }\n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza la transacción \n $arrayCabecera = $guardar->meta($tabla);//armo el array con la cabecera de los datos\n $sentencia = $guardar->armarSentenciaModificar($arrayCabecera, $tabla);//genero sentencia\n $array = $guardar->armarArray($arrayCabecera, $datosCampos);//Armo el array con los datos que vienen de la vista y la cabecera de la BD\n array_shift($array);//elimino primer elemento del array que es el id\n array_push($array, $id);//agrego el id al final del array para realizar la consulta\n $this->refControladorPersistencia->ejecutarSentencia($sentencia, $array);//genero la consulta a la BD \n $this->refControladorPersistencia->get_conexion()->commit(); //si todo salió bien hace el commit \n } catch (PDOException $excepcionPDO) {\n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si hay algún error hace rollback\n }\n $respuesta = $this->getUsuario($id);\n return $respuesta;\n }", "public function save()\n {\n $project = $this->valores();\n unset($project['idProject']);\n\n $project['idUser'] = $this->userO->idUser;\n unset($project['userO']);\n\n if (empty($this->idProject)) {\n $this->insert($project);\n $this->idProject = self::$conn->lastInsertId();\n } else {\n $this->update($this->idProject, $project);\n }\n }", "public function setRepositories() {\n }", "public function actualizar()\n\t{\n\n $datos = Input::all();\n\n foreach($datos['cuota'] as $dato ){\n $repo = $this->prestamosCuotasRepo->find($dato['id']);\n $manager = new PrestamosCuotasManager($repo,$dato);\n $manager->save();\n }\n\n return Redirect::back()->with('mensaje_exito','Prestamo Editado Correctamente!');\n\n\n\n\t}", "public function modify ($est){\r\n \r\n $sql = \"UPDATE ESTADO_USUARIO SET cod_estado = \".$est->getCod_estado().\", \r\n nom_estado = '\".$est->getNom_estado().\"' \r\n where cod_estado = \".$est->getCod_estado().\";\";\r\n pg_Exec($this->conexion,$sql);\r\n }", "function actualizarDetalles (){\n\t\t$x = $this->pdo->prepare('UPDATE detalles SET estado = ?\n\t\t\tWHERE detalles = ?');\n\t\t$x-> execute(array($this->estado,$this->detalles));\n\t\treturn $x;\n\t}", "public function flush() {\n if ($this->c_owner) {\n if ($this->update('owner', $this->owner, Project::$tableName)) {\n $this->c_owner = false;\n }\n }\n if ($this->c_name) {\n if ($this->update('name', $this->name, Project::$tableName)) {\n $this->c_name = false;\n }\n }\n if ($this->c_description) {\n if ($this->update('description', $this->description, Project::$tableName)) {\n $this->c_description = false;\n }\n }\n \n if ($this->c_deadline) {\n if ($this->update('deadline', $this->deadline, Project::$tableName)) {\n $this->c_deadline = false;\n }\n }\n if ($this->c_time) {\n if ($this->update('time', $this->time, Project::$tableName)) {\n $this->c_time = false;\n }\n }\n }", "function runUpdate($repo)\n{\n $updNoodle = new Noodle();\n $updNoodle->noodleID = 17;\n $updNoodle->brand = 'FLAVOURS OF THE SUN';\n $updNoodle->flavour = 'COSMIC DUST';\n $updNoodle->instant = 1;\n $updNoodle->nationality = 'OUT OF THIS WORLD';\n $repo->update($updNoodle);\n}", "function edit($param) {\n extract($param);\n $sql = \"UPDATE operario SET fk_usuario='$id_usuario', nombres='$nombres', apellidos='$apellidos' WHERE fk_usuario='$id_usuario';\n UPDATE usuario SET id_usuario='$id_usuario', direccion='$direccion', telefonos='$telefonos', correos='$correos', contrasena='$contrasena' WHERE id_usuario = '$id_usuario'; \"; // <-- el ID de la fila asignado en el SELECT permite construir la condición de búsqueda del registro a modificar\n $conexion->getPDO()->exec($sql);\n echo $conexion->getEstado();\n }", "public function actualizarusuario($codigo,$nombre,$precio,$cantidad){\r\n//Preparamos la conexión a la bdd:\r\n\t$pdo=Database::connect();\r\n\t$sql=\"update usuario set nombre=?,precio=?,cantidad=? where codigo=?\";\r\n\t$consulta=$pdo->prepare($sql);\r\n//Ejecutamos la sentencia incluyendo a los parametros:\r\n\t$consulta->execute(array($nombre,$precio,$cantidad,$codigo));\r\n\tDatabase::disconnect();\r\n}", "public function atualizaBD($Tabela,$Set,$Condicao,$Parametros){\n $this->prepareStatments(\"UPDATE {$Tabela} SET {$Set} WHERE {$Condicao}\", $Parametros);\n return $this->crud;\n }", "public function add_data()\n {\n try\n {\n if($this->id_producto!=NULL) //Identificar si llega un ID nulo o declarado\n {\n $sql=\"UPDATE productos set proveedores_id_proveedor=?,categoria_id_Categoria=?,nom_producto=?,pre_producto=?,can_producto=? WHERE id_producto = ?\";\n \n }else{\n $sql=\"INSERT into productos Values(0,?,?,?,?,?)\";\n }\n $consulta = $this->con->prepare($sql);\n $consulta->bindParam(1,$this->proveedores_id_proveedor);\n $consulta->bindParam(2,$this->categoria_id_Categoria);\n $consulta->bindParam(3,$this->nom_producto);\n $consulta->bindParam(4,$this->pre_producto);\n $consulta->bindParam(5,$this->can_producto); \n if($this->id_producto!=null)//Se asigna el valor del ID si esta declarado\n {\n $consulta->bindParam(6,$this->id_producto); \n }\n $consulta->execute();\n $this->con=null; \n }catch(PDOException $e)//mensaje de error en caso de fallo\n {\n print \"Error: \".$e->getMessage(); \n } \n }", "public function actualizarUnidadModel($data){\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE unidades SET nombre=:nombre, fecha_inicio = :fecha_inicio, fecha_fin = :fecha_fin WHERE id=:id\");\n\t\t$stmt->bindParam(\":nombre\", $data['nombre']);\n\t\t$stmt->bindParam(\":fecha_inicio\", $data['fecha_inicio']);\n\t\t$stmt->bindParam(\":fecha_fin\", $data['fecha_fin']);\n\t\t$stmt->bindParam(\":id\", $data['id']);\n\t\tif($stmt->execute())\n\t\t\treturn \"success\";\n\t\telse\n\t\t\treturn \"error\";\n\t\t$stmt->close();\n\n\n\t}", "public function update($permiso);", "public function actualizar_estado() {\n }", "public function update($dato, $datoNuevo){\n }", "function updateMembroDao(objetoMembro $ace){\r\n \r\n require_once (\"conexao.php\");\r\n \r\n $obj = Connection::getInstance();\r\n $ret=3;\r\n \r\n $matricula = $ace->getMatricula(); $nome = $ace->getNome(); $sexo=$ace->getSexo(); $data=$ace->getData(); $rg=$ace->getRg(); $cpf=$ace->getCpf(); $estadocivil=$ace->getEstadocivil();\r\n\t $natural=$ace->getNatural(); $profissao=$ace->getProfissao(); $escola=$ace->getEscola(); $pai=$ace->getPai(); $mae=$ace->getMae(); $necessidade=$ace->getNecessidade();\r\n\t $fone=$ace->getFone(); $filho=$ace->getFilho(); $formacao=$ace->getFormacao(); $membrasia=$ace->getMembrasia(); $funcao=$ace->getFuncao(); $participou=$ace->getParticipou();\r\n\t $trabalhando=$ace->getTrabalhando(); $viajando=$ace->getViajando(); $congrega=$ace->getCongrega(); $rua=$ace->getRua(); $bairro=$ace->getBairro(); $casa=$ace->getCasa(); $status=$ace->getStatus();$email=$ace->getEmail();\r\n $data1 = date($data); $lider=$ace->getLider();\r\n \r\n $inse = \"UPDATE membros SET Nome = '$nome',Sexo = '$sexo',DataNascimento1 = '$data1',Naturalidade= '$natural',Escolaridade= '$escola',Profissao= '$profissao',Rg = '$rg',Cpf= '$cpf',EstadoCivil= '$estadocivil',Pai= '$pai',Mae= '$mae',NecessidadeEspeciais= '$necessidade',Filho= '$filho',fone= '$fone',formacaoEclesiatica= '$formacao',IntegracaoMembrasia= '$membrasia',Funcao= '$funcao',JaParticipou= '$participou',EstadoAtual= '$viajando',Trabalhando= '$trabalhando',Congrega= '$congrega',Rua= '$rua',Casa= '$casa',Bairro= '$bairro',Status= '$status',tx_email='$email',LiderCelula='$lider' WHERE Matricula = '$matricula'\";\r\n $result = mysql_query($inse) or die (\"Falha na insercao da celula\".mysql_error());\r\n \r\n if ($result)\r\n {\r\n $ret = 1;\r\n \r\n }else{ \r\n $ret = 2;\r\n }\r\n \r\n $obj->freebanco();\r\n \r\n return $ret;\r\n \r\n }", "public function presupuestoModificado(){\n $this->iPresupuestoModificado = $this->iPresupuestoInicial;\n $this->save();\n }", "public function alterarstatus ($dados) {\n\n $c = new CRUD();\n $fim = [];\n\n if ($_SESSION['tipo_id'] > 4) {\n\n $verifica = $c->Selecionar(\"*\", \"agendamento\", \" where status = 3 and tecnico_id = {$_SESSION['id']}\");\n\n if (count($verifica) > 0 and $dados['status'] == 3) {\n $fim['msg'] = \"Não é possível concluir essa ação. Uma solicitação encontra-se em andamento.\";\n } else {\n if ($dados['status'] == 1) {\n $data = date(\"Y-m-d H:i:s\");\n $valores = \"status = '{$dados['status']}', conclusao = '{$data}'\";\n } else {\n $data = null;\n $valores = \"status = '{$dados['status']}', conclusao = '{$data}'\";\n }\n\n $s = $c->Update(\"agendamento\", $valores, \" where id =\" . $dados['id']);\n if ($s > 0) {\n $fim['msg'] = \"Salvo.\";\n }\n }\n\n } else {\n if ($dados['status'] == 1) {\n $data = date(\"Y-m-d H:i:s\");\n $valores = \"status = '{$dados['status']}', conclusao = '{$data}'\";\n } else {\n $data = null;\n $valores = \"status = '{$dados['status']}', conclusao = '{$data}'\";\n }\n\n\n $s = $c->Update(\"agendamento\", $valores, \" where id =\" . $dados['id']);\n if ($s > 0) {\n $fim['msg'] = \"Salvo.\";\n }\n }\n\n\n return $fim;\n\n }", "private function distribuidores_after_save($id='') {\n\t\t$tabla = \"distribuidores_usuarios\"; $key=\"id_distribuidor\"; \n\t\t$dataupdte[\"estado_epedidos\"] = \"0\";\n\t\t$this->Global_model->update_data($tabla,$dataupdte,array($key=>$id));\t\n\t\t\n\t}", "public function mudarStatus(){\n //CO_STATUS = 5 se refere ao caso clinico Disponivel na base publica\n\n //busca e atualiza todos os casos clinicos que tenham CO_STATUS = 4 para o CO_STATUS = 5\n CasoClinico::where('CO_STATUS', '=', 4)->update(['CO_STATUS' => '5']);\n }", "private function sync_pedido()\n {\n //listar os pedidos\n $this->get_pedidos();\n //verificar se existe em shopify\n\n //update no shopfy\n }", "function modificarAnuncio($titulo, $descripcion, $imagen, $id_poi, $id_usuario) {\n $sql = \"UPDATE anuncio SET titulo='\" . $titulo . \"',descripcion='\" . $descripcion . \"',imagen='\" . $imagen\n . \"' WHERE id_usuario='\" . $id_usuario . \"' AND id_poi='\" . $id_poi . \"'\";\n $con = new DB();\n $result = $con->exec($sql);\n $con = null;\n }", "public function updateRepositories() {\n $projects = $this->loadProjects();\n if (!$projects)\n return;\n\n $this->m_authors = $this->loadAuthors();\n\n foreach ($projects as $project)\n $this->updateProject($project);\n }", "function evt__pantallas_ei__modificacion($datos)\n\t{\n\t\t$busqueda = $this->get_entidad()->tabla('objetos_pantalla')->nueva_busqueda();\n\t\t$busqueda->set_padre('pantallas', $this->get_pant_actual());\n\t\t$ids = $busqueda->buscar_ids();\n\t\tforeach ($ids as $id) {\n\t\t\t$this->get_entidad()->tabla('objetos_pantalla')->eliminar_fila($id);\n\t\t}\n\n\t\t//Seteo los cursores correspondientes y doy de alta los registros\n\t\t$this->get_entidad()->tabla('pantallas')->set_cursor($this->get_pant_actual());\n\t\t$orden = 0;\n\t\tforeach ($datos as $dato) {\n\t\t\t$id = $this->get_entidad()->tabla('dependencias')->get_id_fila_condicion(array('identificador' => $dato['dependencia']));\n\t\t\t$this->get_entidad()->tabla('dependencias')->set_cursor(current($id));\n\t\t\t$this->get_entidad()->tabla('objetos_pantalla')->nueva_fila(array('orden' => $orden, 'dependencia' => $dato['dependencia']));\n\t\t\t$orden++;\n\t\t}\n\t\t//Reseteo el cursor asi no se queda apuntando a donde no debe\n\t\t$this->get_entidad()->tabla('dependencias')->resetear_cursor();\n\t}", "public function editAction(Request $request,DatParteDesvio $datparte)\n {\n $savedIncidencias = clone $datparte->getIncidencias();\n $em = $this->getDoctrine()->getManager();\n $entsuebs = $em->getRepository('NomencladorBundle:NomEntidad')->getEntidadesTiposAcopioyUEB();\n $form = $this->createForm('ParteDiarioBundle\\Form\\DatParteDesvioType', $datparte, array('valores' => $entsuebs));\n $form->handleRequest($request);\n\n if ($form->isSubmitted()) {\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->beginTransaction();\n try {\n // Se eliminan las incidencias que están guardados en la base de datos\n // y fueron quitados en la vista\n foreach ($savedIncidencias as $savedIncidencia) {\n if ($datparte->getIncidencias()->contains($savedIncidencia) === false) {\n $em->remove($savedIncidencia);\n }\n }\n $em->persist($datparte);\n $em->flush();\n $em->commit();\n\n return $this->redirectToRoute('partedesvio_index');\n } catch (\\Exception $ex) {\n $em->rollback();\n }\n }\n }\n\n\n\n// $enviado = $request->request->get('enviado');\n// if (!empty($enviado)) {\n// $parte = $request->request->get('partediario');\n//\n// $um = $em->getRepository('NomencladorBundle:NomUnidadmedida')->find($parte['um']);\n// $pro = $em->getRepository('NomencladorBundle:NomProducto')->find($parte['producto']);\n// $datparte->setFecha(date_create_from_format('d/m/Y', $parte['fecha']));\n// $datparte->setProducto($pro);\n// $datparte->setUm($um);\n// $datparte->setUeb($parte['ueb']);\n// $datparte->setDestino($parte['destino']);\n// $datparte->setCantidad($parte['cantidad']);\n// $datparte->setTipo($parte['tipo']);\n// $em->flush();\n// return new JsonResponse(\"0\");\n// }\n return $this->render('ParteDiarioBundle:datpartedesvio:new.html.twig', array(\n 'datParte' => $datparte,\n 'form' => $form->createView(),\n 'action' => 'Editar',\n ));\n }", "public function alterarTipoServico($tipoServico){\r\n \r\n try {\r\n \r\n $this->validarDadosTipoServico($tipoServico);\r\n return $this->tipoServicoDAO->update($tipoServico);\r\n } catch (DataException $e) {\r\n throw $e; \r\n } \r\n }", "public function testUpdateServiceData()\n {\n\n }", "public function updateAction(Request $request, $id)\n{\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('gemaBundle:Productosprogramas')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Productosprogramas entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n $editForm = $this->createEditForm($entity);\n $editForm->handleRequest($request);\n $accion = ' ';\n $this->get(\"gema.utiles\")->traza($accion);\n $em->flush();\n\n \n \n\n \n return $this->redirect($this->generateUrl('admin_productosprogramas_edit', array('id' => $id)));\n \n}", "public function update(){\n return (new Database('cliente'))->update('id = '.$this->id, [\n 'name' => $this->name,\n 'address' => $this->address,\n 'zip' => $this->zip,\n 'phone' => $this->phone,\n 'mPhone' => $this->mPhone,\n 'email' => $this->email,\n 'gender' => $this->gender,\n 'obs' => $this->obs,\n ]);\n }", "public function change()\n {\n ## Alter Jenis Izin ##\n $table = $this->table('jenis_izin');\n $table\n ->changeColumn('oss_id', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ])\n ->renameColumn('oss_id', 'kode_oss');\n $table->update();\n\n ## BEGIN - Create Table data_sinc ##\n $table = $this->table('data_sinc');\n\n $table->addColumn('instansi_id', 'biginteger', [\n 'default' => null,\n 'null' => true,\n ])->addIndex(['instansi_id']);\n\n $table->addColumn('dibuat_oleh', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ]);\n\n $table->addColumn('tgl_dibuat', 'datetime', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n\n $table->addColumn('tgl_diubah', 'datetime', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n\n $table->addColumn('diubah_oleh', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ]);\n\n $table->addColumn('key', 'string', [\n 'default' => null,\n 'limit' => 1000,\n 'null' => false,\n ])->addIndex(['key']);\n\n $table->addColumn('keterangan', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n ]);\n\n $table->addColumn('parent_id', 'biginteger', [\n 'default' => null,\n 'null' => true,\n ])->addIndex(['parent_id']);\n\n $table->addColumn('index', 'string', [\n 'default' => null,\n 'limit' => 100,\n 'null' => false,\n ])->addIndex(['index']);\n\n $table->create();\n\n ## BEGIN - Create Table data_sinc_detail ##\n $table = $this->table('data_sinc_detail');\n\n $table->addColumn('instansi_id', 'biginteger', [\n 'default' => null,\n 'null' => true,\n ])->addIndex(['instansi_id']);\n\n $table->addColumn('dibuat_oleh', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ]);\n\n $table->addColumn('tgl_dibuat', 'datetime', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n\n $table->addColumn('tgl_diubah', 'datetime', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n\n $table->addColumn('diubah_oleh', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ]);\n\n $table->addColumn('data_sinc_id', 'biginteger', [\n 'default' => null,\n 'null' => true,\n ])->addIndex(['data_sinc_id']);\n\n $table->addColumn('data_kolom_id', 'biginteger', [\n 'default' => null,\n 'null' => false,\n ])->addIndex(['data_kolom_id']);\n\n $table->addColumn('oss_type_kolom', 'string', [\n 'default' => null,\n 'limit' => 5,\n 'null' => false,\n ])->addIndex(['oss_type_kolom']);\n\n $table->addColumn('oss_kolom', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ])->addIndex(['oss_kolom']);\n\n $table->create();\n\n ## BEGIN - Create Table nib ##\n $table = $this->table('nib');\n\n $table->addColumn('instansi_id', 'biginteger', [\n 'default' => null,\n 'null' => true,\n ])->addIndex(['instansi_id']);\n\n $table->addColumn('dibuat_oleh', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ]);\n\n $table->addColumn('tgl_dibuat', 'datetime', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n\n $table->addColumn('tgl_diubah', 'datetime', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n\n $table->addColumn('diubah_oleh', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ]);\n\n $table->addColumn('alamat_investasi', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n ]);\n\n $table->addColumn('daerah_investasi', 'string', [\n 'default' => null,\n 'limit' => 10,\n 'null' => true,\n ]);\n\n $table->addColumn('status_penanaman_modal', 'string', [\n 'default' => null,\n 'limit' => 2,\n 'null' => true,\n ])->addIndex(['status_penanaman_modal']);\n\n $table->addColumn('status_badan_hukum', 'string', [\n 'default' => null,\n 'limit' => 2,\n 'null' => true,\n ])->addIndex(['status_badan_hukum']);\n\n $table->addColumn('jangka_waktu', 'datetime', [\n 'default' => null,\n 'null' => true,\n ]);\n\n $table->addColumn('oss_id', 'string', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ])->addIndex(['oss_id']);\n\n $table->addColumn('nib', 'string', [\n 'default' => null,\n 'limit' => 14,\n 'null' => false,\n ])->addIndex(['nib']);\n\n $table->create();\n }", "function modificarDatosUsuario($id, $username, $email, $poblacion, $idioma, $telefono, $url, $foto, $textoPresentacion) {\n $sql = \"UPDATE usuario SET username='\" . $username . \"',email='\" . $email . \"',poblacion='\" . $poblacion . \"',\"\n . \"idioma='\" . $idioma . \"',telefono='\" . $telefono . \"',url='\" . $url . \"',foto='\" . $foto . \"',\"\n . \"textoPresentacion='\" . $textoPresentacion . \"' WHERE id='\" . $id . \"'\";\n $con = new DB();\n $result = $con->exec($sql);\n $con = null;\n }", "function Alterar($id) {\n if($this->GetClienteCPF($this->getCli_cpf())>0 && $this->getCli_cpf() <> $_SESSION['CLI']['cli_cpf']):\n echo '<div class=\"alert alert-danger\" id=\"erro_mostra\">Este CPF já esta cadastrado ';\n Sistema::VoltarPagina();\n echo '</div>';\n exit();\n endif;\n \n //se o email for diferente da sessao----------------------\n if($this->GetClienteEmail($this->getCli_email())>0 && $this->getCli_email() <> $_SESSION['CLI']['cli_email']):\n echo '<div class=\"alert alert-danger\" id=\"erro_mostra\">Este Email já esta cadastrado ';\n Sistema::VoltarPagina();\n echo '</div>';\n exit();\n endif;\n \n \n \n //Caso passou na verificação os dados serão gravados no banco-------------------------\n $query = \"UPDATE \".$this->prefix.\"clientes SET cli_nome=:cli_nome,\n cli_sobrenome=:cli_sobrenome,\n cli_data_nasc=:cli_data_nasc,\n cli_rg=:cli_rg,\n cli_cpf=:cli_cpf,\n cli_ddd=:cli_ddd,\n cli_fone=:cli_fone,\n cli_celular=:cli_celular,\n cli_endereco=:cli_endereco,\n cli_numero=:cli_numero,\n cli_bairro=:cli_bairro,\n cli_cidade=:cli_cidade,\n cli_uf=:cli_uf,\n cli_cep=:cli_cep,\n cli_email=:cli_email,\n cli_data_cad=:cli_data_cad,\n cli_hora_cad=:cli_hora_cad,\n cli_pass=:cli_senha \n WHERE cli_id =:cli_id\";\n \n \n $params = array(\n ':cli_nome'=> $this->getCli_nome(),\n ':cli_sobrenome'=> $this->getCli_sobrenome(),\n ':cli_data_nasc'=> $this->getCli_data_nasc(),\n ':cli_rg'=> $this->getCli_rg(),\n ':cli_cpf'=> $this->getCli_cpf(),\n ':cli_ddd'=> $this->getCli_ddd(),\n ':cli_fone'=> $this->getCli_fone(),\n ':cli_celular'=> $this->getCli_celular(),\n ':cli_endereco'=> $this->getCli_endereco(),\n ':cli_numero'=> $this->getCli_numero(),\n ':cli_bairro'=> $this->getCli_bairro(),\n ':cli_cidade'=> $this->getCli_cidade(),\n ':cli_uf'=> $this->getCli_uf(),\n ':cli_cep'=> $this->getCli_cep(),\n ':cli_email'=> $this->getCli_email(),\n ':cli_data_cad'=> $this->getCli_data_cad(),\n ':cli_hora_cad'=> $this->getCli_hora_cad(),\n ':cli_senha'=> $this->getCli_senha(),\n ':cli_id' => (int)$id\n \n \n );\n \n //echo $query;\n \n \n if($this->ExecuteSQL($query, $params)):\n return true;\n else:\n return false;\n endif;\n \n \n }", "function actualizarConvenio(){\n \n $nombrePrograAca = $_POST['nombrePrograAca'];\n $fechaIni = $_POST['fechaIni'];\n $fechaFin = $_POST['fechaFin'];\n $codRecaudo = $_POST['codrecaudo'];\n $inversion = $_POST['inversion'];\n $id=$_POST[\"id\"];\n\n\t\t\t//Se consultan todos los convenios\n\t\t\t$conexion=Conexion::getInstance();\n\t\t\t$consulta=\"update programaacademico set `nomprogramaacademico`='$nombrePrograAca', \n `fechainicioprogaca`='$fechaIni', `fechafinprogaca`='$fechaFin', `codigorecaudo`='$codRecaudo', \n `inversion`='$inversion' where `idprogramaacademico`='$id'\";\n \n $res= $conexion->actualizar($consulta);\n if ($res==1){\n echo \"<h2><strong>Actualización exitosa!!!</strong></h2>\";\n }\n\t\t //fin de la funcion\n\t\t}", "public function updateIngrediente($dados)\n {\n try {\n $sql = $this->conexao->prepare(\"update \" . TABLENAME . \" peso = (?), custo = (?), nom = (?) where cod = (?)\");\n $sql->execute($dados);\n } catch (PDOException $e) {\n echo \"Erro inserir: \" . $e->getMessage();\n }\n }", "public function set_needed_repos(): void {}", "public function set_needed_repos(): void {}", "public function ModificarEstado()\n\t{\n\t\t$query=\"UPDATE estado SET idpais=$this->id_pais, estado='$this->estado' , descripcion='$this->descripcion' WHERE idestado=$this->id_estado\";\n\t\t$resp=$this->db->consulta($query);\n\t}", "abstract function ActualizarDatos();", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set Origen='$this->Origen',Fechap='$this->Fechap',Horap='$this->Horap',Cod_Referencia='$this->Referencia',Nombre_Referencia='$this->Nombre',Ref_Tela='$this->Reftela',Pinta='$this->Pinta',Color='$this->Color',Proceso='$this->Proceso',Ubicacion='$this->Ubicacion',SKU='$this->Sku',Maquina='$this->Maquina',Longitud_Inicial='$this->Longitudini',Longitud_Final='$this->Longitudfin',Peso='$this->Peso',Grados_PFoAT800K='$this->Plancha',Grados_Plato='$this->Plato',Grados_Pie='$this->Pie',Grados_Aire_S='$this->Airesup',Grados_Aire_I='$this->Aireinf',Caudal_Sup='$this->Caudalsup',Caudal_Inf='$this->Caudalinf',Presion='$this->Presion',Velocidad='$this->Velocidad',Velocidad_Sup='$this->Velocidad_Sup',Velocidad_Inf='$this->Velocidad_Inf',Intensidad='$this->Intensidad',Tiempo_Exp='$this->Tiempo',Resultado='$this->Resultado',Dinamometro='$this->Dinamometro',Observaciones1='$this->Observaciones' where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function actualizar_servicios_membresia($where_array,$data){\n $fecha = new MongoDB\\BSON\\UTCDateTime();\n\n $id_usuario = new MongoDB\\BSON\\ObjectId($this->session->userdata('id_usuario'));\n //--\n $res_jornadas = $this->mongo_db->where($where_array)->set($data)->update(\"membresia\"); \n \n var_dump($res_jornadas);die(''); \n //Auditoria...\n $data_auditoria = array(\n 'cod_user'=>$id_usuario,\n 'nom_user'=>$this->session->userdata('nombre'),\n 'fecha'=>$fecha,\n 'accion'=>'Modificar servicio membresia ',\n 'operacion'=>''\n );\n $mod_auditoria = $this->mongo_db->where($where_array)->push('servicios.$.auditoria',$data_auditoria)->update(\"membresia\");\n }", "function ActuzalizarMascotas($nombre_mascota, $idgenero, $idraza, $sexo, $tipo_sangre, $color, $fecha_creo, $usuario_creo){\n $conexion = Conectar();\n $sql = \"UPDATE mascotas SET nombre_mascota=:nombre_mascota and idgenero=:idgenero and idraza=:idraza and sexo=:sexo and tipo_sangre=:tipo_sangre and color=:color and fecha_creo=:fecha_creo and usuario_creo=:usuario_creo\";\n $statement = $conexion->prepare($sql);\n $statement->bindParam(':nombre_mascota', $nombre_mascota);\n $statement->bindParam(':idgenero', $idgenero);\n $statement->bindParam(':idraza', $idraza);\n $statement->bindParam(':sexo', $sexo);\n $statement->bindParam(':tipo_sangre', $tipo_sangre);\n $statement->bindParam(':color', $color);\n $statement->bindParam(':fecha_creo', $fecha_creo);\n $statement->bindParam(':usuario_creo', $usuario_creo);\n $statement->execute();\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $res=$statement->fetchAll();\n return $res;\n}", "public function actualizar_servicios_jornadas($where_array,$data){\n $fecha = new MongoDB\\BSON\\UTCDateTime();\n\n $id_usuario = new MongoDB\\BSON\\ObjectId($this->session->userdata('id_usuario'));\n //--\n $res_jornadas = $this->mongo_db->where($where_array)->push('servicios',$data)->update(\"jornadas\"); \n //var_dump($res_jornadas);die(''); \n //Auditoria...\n /*$data_auditoria = array(\n 'cod_user'=>$id_usuario,\n 'nom_user'=>$this->session->userdata('nombre'),\n 'fecha'=>$fecha,\n 'accion'=>'Modificar trabajador membresia ',\n 'operacion'=>''\n );\n $mod_auditoria = $this->mongo_db->where($where_array)->push('servicios.$.auditoria',$data_auditoria)->update(\"jornadas\");*/\n }", "function restablecer()\n {\n $this->_datos = null;\n $this->_errores = array();\n }", "public function actionAlterar($id)\n {\n $model=$this->loadModel($id);\n\n if(isset($_POST['CompraCartao']))\n {\n $model->attributes=$_POST['CompraCartao'];\n if ($model -> save())\n {\n Yii::app()->user->setFlash('success', 'Dados Alterados.');\n $this->redirect($this->createUrl('compracartao/index'));\n }\n }\n\n $this->_model = $model;\n $this->actionIndex();\n }", "public function reset_rezultati()\n {\n $query = $this->query(\"SELECT * FROM rezultati;\");\n foreach ($query->getResultArray() as $row)\n {\n $this->delete($row['idrezultati']);\n }\n }", "public function change(): void\n {\n $foreign_keys = [\n 'session_expiration' => ['column' => 'session_id', 'table' => 'session'],\n ];\n foreach ($foreign_keys as $table => $key) {\n $this->table($table)\n ->dropForeignKey($key['column'])\n ->save();\n }\n // update all the primary key id columns\n $primary_keys = [\n 'cron', 'datastore', 'defex', 'email', 'email_unsubscribe',\n 'filestore', 'locking', 'page', 'page_link', 'page_slug',\n 'rich_media', 'search_index', 'session', 'session_expiration',\n 'user', 'user_group', 'user_group_membership', 'user_source'\n ];\n foreach ($primary_keys as $table) {\n $this->table($table)\n ->changeColumn('id', 'integer', ['signed' => false, 'null' => false, 'identity' => true])\n ->changePrimaryKey('id')\n ->save();\n }\n // re-add all the foreign keys that reference primary key id columns\n foreach ($foreign_keys as $table => $key) {\n $this->table($table)\n ->changeColumn($key['column'], 'integer', ['null' => false, 'signed' => false])\n ->addForeignKey($key['column'], $key['table'])\n ->save();\n }\n }", "function modificarGrupo($name,$descripcion)\n\t\t{\n\t\t\t$mysqli=$this->conexionBD();\n\t\t\t$query=\"UPDATE `grupo` SET `DESCRIPCION`='$descripcion' where `NOMBRE_GRUPO`='$name'\";\n\t\t\t$mysqli->query($query);\n\t\t\t$mysqli->close();\n\t\t}", "public function persist (){\n \n $this->query = \"INSERT INTO libros(titulo,autor,editorial) VALUES (:titulo, :autor, :editorial)\";\n\n // $this->parametros['id']=$user_data[\"id\"];\n $this->parametros['titulo']=$this->titulo;\n $this->parametros['autor']=$this->autor;\n $this->parametros['editorial']=$this->editorial;\n \n $this->get_results_from_query();\n\n\n $this->mensaje = \"Libro agregado exitosamente\";\n \n }", "public function actualizar($data){\n\t\t\t\t$this->db->where('id_tarea', $data['id_tarea']);\n\t\t\t\treturn $this->db->update('tareas',array(\n\t\t\t\t'titulo'=>$data['titulo'],\n\t\t\t\t'descripcion'=>$data['descripcion'],\n\t\t\t\t'id_estado'=>$data['id_estado'],\n\t\t\t\t'fecha_alta'=>date('Y-m-d H:i:s'),\n\t\t\t\t'fecha_modificacion'=>date('Y-m-d H:i:s')\n\t\t\t)\n\t\t\t);\n\n\t\t\t\n\t\t\techo \"</br></br>\";print_r($this->db->last_query()); echo \"</br></br>\";\n\t\t}", "public static function updateProduct( $data )\n {\n $consulta = DataBase::consulta(\"select * from productos where producto = \\\"\".$data[\"editNameProduct\"].\"\\\"\");\n //Adquirir el id de la empresa\n $idEmpresa = DataBase::consulta(\n \"select idEmpresa from empresa\n inner join persona on empresa.idEmpresa = persona.empresa\n inner join user on user.idUser = persona.idPersona\n where idUser = \".$_SESSION[\"userLogin\"][0][\"idUser\"]\n );\n //Comprobar si el nuevo producto editado existe\n if(count($consulta) > 0 ) {\n\n DataBase::insertar('\n update productosEmpresa set\n idproducto = '.$consulta[0][\"idProducto\"].',\n idempresa = '.$idEmpresa[0][\"idEmpresa\"].',\n precio = '.$data[\"editPrecioProduct\"].',\n stock = '.$data[\"editStockProduct\"].',\n plazoEntrega= '.$data[\"editEntregaProduct\"].',\n comprar = '.$data[\"editCheckProduct\"].',\n iva = '.$data[\"editIvaProduct\"].',\n referencia = \"'.$data[\"editRefProduct\"].'\",\n precioCoste = '.$data[\"editPrecioCostProduct\"].',\n imagen = \"'.$data[\"imagenProducto\"].'\"\n where referencia = \"'.$data[\"hiddenRefProduct\"].'\"'\n );\n\n } else {\n\n DataBase::insertar('\n insert into productos (producto, categoria)\n values (\"'.$data[\"editNameProduct\"].'\", '.$data[\"editCategoryProduct\"].')\n ');\n $idProducto = DataBase::consulta(\"\n select idProducto from productos\n where producto = \\\"\".$data[\"editNameProduct\"].\"\\\"\n \");\n\n DataBase::insertar('\n update productosEmpresa set\n idproducto = '.$idProducto[0][\"idProducto\"].',\n idempresa = '.$idEmpresa[0][\"idEmpresa\"].',\n precio = '.$data[\"editPrecioProduct\"].',\n stock = '.$data[\"editStockProduct\"].',\n plazoEntrega= '.$data[\"editEntregaProduct\"].',\n comprar = '.$data[\"editCheckProduct\"].',\n iva = '.$data[\"editIvaProduct\"].',\n referencia = \"'.$data[\"editRefProduct\"].'\",\n precioCoste = '.$data[\"editPrecioCostProduct\"].',\n imagen = \"'.$data[\"imagenProducto\"].'\"\n where referencia = \"'.$data[\"hiddenRefProduct\"].'\"'\n );\n }\n }", "public function change()\n {\n $table = $this->table('articles');\n $table\n //Categories has been moved to a table.\n ->removeColumn('category')\n //Should be datetime for sorting the article by date.\n ->removeColumn('publish_date')\n ->save();\n\n $table\n ->addColumn('publish_date', 'datetime', ['after' => 'modified_by'])\n ->save();\n }", "public function desativar()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"UPDATE EncontroComDeus SET \t ativo = 0\n WHERE id = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->id );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n //var_dump($erro);\n //exit();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n }", "public function gravaComentario(int $idUsuario, int $idTarefa, String $textoComentario){\n $usuarioComentario = $this->getEm()->getRepository('MyClasses\\Entities\\AclUsuario')\n ->findOneBy(array(\"id\"=>$idUsuario));\n $tarefa = $this->getEm()->getRepository('MyClasses\\Entities\\Tarefa')\n ->findOneBy(array(\"id\"=>$idTarefa));\n $comentario = new \\MyClasses\\Entities\\DialogoUsuarioTarefa();\n $comentario->setUsuario($usuarioComentario);\n $comentario->setTarefa($tarefa);\n $comentario->setComentario($textoComentario);\n $comentario->setData();\n $this->getEm()->persist($comentario);\n $this->getEm()->flush();\n if ($comentario->getId()){\n /*$equipe = $tarefa->getProjeto()->getEquipe();\n //if is a team project, notify all user's team that the task was updated\n if ($equipe != null)\n foreach ($equipe->getUsuarios() as $usuario)\n $usuario->setNovasTarefas(true);\n $em->flush();*/\n $tarefa->setModificado();\n $this->getEm()->flush(); \n \n foreach ($usuarioComentario->getEquipes() as $equipe)\n $idsEquipes[] = $equipe->getId();\n $hoje = new \\DateTime();\n $nSemanaHoje = date(\"w\");\n $inicioSemana = new \\DateTime(\"-\".$nSemanaHoje.\" days\");\n $fimSemana = new \\DateTime(\"+\".(6-$nSemanaHoje).\" days\");\n $atualizar[0] = false; //if true, signs to update personal projects\n $atualizar[1] = false; //if true, signs to update team projects\n $atualizar[2] = false; //if true, signs to update today projects\n $atualizar[3] = false; //if true, signs to update week projects\n if (!$atualizar[0] && $tarefa->getUsuario() == $usuarioComentario)\n $atualizar[0] = true;\n if (!$atualizar[1] && $tarefa->getProjeto()->getEquipe()!=null && in_array($tarefa->getProjeto()->getEquipe()->getId(), $idsEquipes))\n $atualizar[1] = true;\n if (!$atualizar[2] && $tarefa->getVencimento()->format('Y/m/d') == $hoje->format('Y/m/d'))\n $atualizar[2] = true;\n if (!$atualizar[3] && ($tarefa->getVencimento()->format('Y/m/d') >= $inicioSemana->format('Y/m/d')\n && $tarefa->getVencimento()->format('Y/m/d') <= $fimSemana->format('Y/m/d')) )\n $atualizar[3] = true;\n \n return array(\n 0 => '['.(string) $comentario->getData().']'.\n '<i>'.mb_convert_encoding($usuarioComentario->getNome(),'UTF-8').'</i>: '.\n mb_convert_encoding($comentario->getComentario(),'UTF-8'),\n 1 => $atualizar\n );\n }else\n return null;\n /*I don't know why this didn't work, somehow the XML got mixed\n array( 0 => $this->projetosPessoais($idUsuario, true),\n 1 => $this->projetosEquipes($idUsuario, true),\n 2 => $this->projetosHoje($idUsuario, true),\n 3 => $this->projetosSemana($idUsuario, true),\n 4 => '['.(string) $comentario->getData().']'.\n '<i>'.$usuario->getNome().'</i>: '.\n $comentario->getComentario()\n );*/\n }" ]
[ "0.61048025", "0.60472345", "0.59212965", "0.591724", "0.58632284", "0.5807111", "0.5786723", "0.5739889", "0.5731392", "0.5727093", "0.57014513", "0.5655117", "0.56248486", "0.5616638", "0.5616297", "0.5605044", "0.5584933", "0.55838645", "0.55800635", "0.5576717", "0.5570971", "0.5570971", "0.55548316", "0.5553882", "0.55460113", "0.55439186", "0.55348176", "0.552099", "0.5517489", "0.5511222", "0.5495342", "0.5488226", "0.548314", "0.54718447", "0.54718447", "0.54476374", "0.5445649", "0.5441209", "0.5437732", "0.54293", "0.5425116", "0.54188335", "0.541601", "0.541494", "0.54120046", "0.54071057", "0.53982687", "0.53914756", "0.53911257", "0.5388816", "0.5382411", "0.5373157", "0.5359479", "0.5353808", "0.5351702", "0.5350469", "0.5348578", "0.53455627", "0.5338593", "0.5336241", "0.5334599", "0.5318831", "0.53155273", "0.5309583", "0.5306757", "0.5306215", "0.53041136", "0.5303011", "0.5300272", "0.5291866", "0.5275379", "0.52748936", "0.52744263", "0.5270362", "0.52623874", "0.5246757", "0.5246539", "0.5244535", "0.5238166", "0.52379924", "0.52350765", "0.5232491", "0.5232245", "0.5232245", "0.52319664", "0.5229851", "0.5229512", "0.52276677", "0.5221478", "0.52128977", "0.5206617", "0.519936", "0.5195283", "0.51920843", "0.5188719", "0.518734", "0.5185206", "0.5184244", "0.51838154", "0.51800364", "0.5177415" ]
0.0
-1
deleta dados no repositorio
public function delete (ValueObjectAbstract $valueObject);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clear()\n {\n $this->repository = array();\n }", "function cvs_delete_repository($cvs_project) {\r\n global $cvs_root;\r\n \r\n //We really don't want to delete the repository,\r\n //just erase the passwd file...\r\n\r\n $cvs_passwd_file = $cvs_root.\"/\".$cvs_project.\"/CVSROOT/passwd\";\r\n unlink( $cvs_passwd_file);\r\n\r\n $cvs_deleted_file = $cvs_root.\"/\".$cvs_project.\"/DELETED\";\r\n touch( $cvs_deleted_file);\r\n}", "public function Departamento()\n\t{\n\t\t$this->cn = new datos();\n\t\t$this->log = new Log();\n\t}", "public function clear()\n {\n $this->repository->clear();\n }", "public function clear()\n {\n foreach ($this->objectsRepository as $repository) {\n if ($repository instanceof Repository) {\n $repository->clear();\n }\n }\n parent::clear();\n $this->objectsRepository = [];\n }", "function restablecer()\n {\n $this->_datos = null;\n $this->_errores = array();\n }", "function runDelete($repo)\n{\n $delBar = new ChocolateBar();\n $delBar->chocoID= 15;\n $repo->delete($delBar);\n}", "public function reset_rezultati()\n {\n $query = $this->query(\"SELECT * FROM rezultati;\");\n foreach ($query->getResultArray() as $row)\n {\n $this->delete($row['idrezultati']);\n }\n }", "public function delall()\n {\n }", "public function desativar()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"UPDATE EncontroComDeus SET \t ativo = 0\n WHERE id = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->id );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n //var_dump($erro);\n //exit();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n }", "public function clean(){\n\t\t$sql = 'DELETE FROM compra_coletiva';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "function deleteProyecto($proyecto){\n //no implementado por no requerimiento del proyecto\n }", "public function dropAllData()\n {\n $database_name = $this->conn->getDatabase();\n\n $tables = $this->conn->query(\"SELECT concat('DROP TABLE IF EXISTS ', table_name, ';') FROM information_schema.tables WHERE table_schema = '$database_name';\")->fetchAll();\n\n $queries = \"SET FOREIGN_KEY_CHECKS=0;\\n\";\n\n foreach ($tables as $aTable){\n $queries .= reset($aTable);\n }\n\n $this->conn->executeQuery($queries);\n\n $editora_structure = file_get_contents(__DIR__ .'/../../../../data/editora.sql');\n\n $this->conn->executeQuery($editora_structure);\n }", "function set_deputados() {\n\n\t\ttry {\n\n\t\t\t$dadosAbertosClient = new dadosAbertosClient;\n\n\t\t\t// legislatura de valor 18 foi definida pois eh o periodo onde estao os deputados vigentes no ano de 2017\n\t\t\t$listaDeputados = $dadosAbertosClient->listaDeputadosPorLegislatura(18);\n\n\t\t\tforeach ($listaDeputados as $deputado) {\n\n\t\t\t\t$deputado = Deputado::findByIdDeputado($deputado['id']);\t\n\n\t\t\t\tif($deputado)\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$deputadoData = [\n\t\t\t\t\t'id_deputado' => $deputado->id,\n\t\t\t\t\t'nome' => $deputado->nome,\n\t\t\t\t\t'partido' => $deputado->partido,\n\t\t\t\t\t'tag_localizacao' => $deputado->tagLocalizacao\n\t\t\t\t];\n\n\t\t\t\tDeputado::create($deputadoData);\n\t\t\t}\n\n\t\t} catch (Exception $e) {\n\t\t\techo $e->getMessage();\n\t\t}\n\n\t}", "public function detalhe ()\n {\n try {\n // Define a ação de detalhe\n $acao = Orcamento_Business_Dados::ACTION_DETALHE;\n \n // Retorna parâmetros informados via get, após validações\n $parametros = $this->trataParametroGet ( 'cod' );\n \n // Busca os dados a exibir, após validações\n $registro = $this->trataRegistro ( $acao, $parametros );\n \n // Exibe o registro retornado\n $this->view->dados = $registro;\n } catch ( Exception $e ) {\n // Gera o erro\n throw new Zend_Exception ( $e->getMessage () );\n }\n }", "public function restore()\n {\n //Query Builder\n DB::table('users')->delete();\n DB::table('respuestas')->delete();\n \n echo \"Realizado\";\n }", "function del($param) {\n extract($param);\n $conexion->getPDO()->exec(\"DELETE FROM operario WHERE fk_usuario = '$id'; \n DELETE FROM usuario WHERE id_usuario='$id'\");\n echo $conexion->getEstado();\n }", "public function EliminarDetallesCompras()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\t\t$sql = \" select * from detallecompras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 1)\n\t\t{\n\n\t\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t$sql4 = \"select * from compras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$paea[] = $row;\n\t\t\t}\n\t\t$subtotalivasic = $paea[0][\"subtotalivasic\"];\n\t\t$subtotalivanoc = $paea[0][\"subtotalivanoc\"];\n\t\t$iva = $paea[0][\"ivac\"]/100;\n\t\t$descuento = $paea[0][\"descuentoc\"]/100;\n\t\t$totalivac = $paea[0][\"totalivac\"];\n\t\t$totaldescuentoc = $paea[0][\"totaldescuentoc\"];\n\n\t$sql3 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'SI'\";\n $stmt = $this->dbh->prepare($sql3);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($rowp = $stmt->fetch())\n {\n $p[] = $rowp;\n }\n $importeivasi = ($rowp[\"importe\"]== \"\" ? \"0\" : $rowp[\"importe\"]);\n\n$sql5 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'NO'\";\n $stmt = $this->dbh->prepare($sql5);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($roww = $stmt->fetch())\n {\n $pw[] = $roww;\n }\n $importeivano = ($roww[\"importe\"]== \"\" ? \"0\" : $roww[\"importe\"]);\n\n if(base64_decode($_GET[\"ivaproductoc\"])==\"SI\"){\t\n\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivasic = ?, \"\n\t\t\t .\" totalivac = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaliva);\n\t\t$stmt->bindParam(3, $totaldescuentoc);\n\t\t$stmt->bindParam(4, $total);\n\t\t$stmt->bindParam(5, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivasi);\n $totaliva= rount($subtotal*$iva,2);\n\t\t$tot= rount($subtotal+$subtotalivanoc+$totaliva,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\n\t\t\n\t\t } else {\n\t\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivanoc = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaldescuentoc);\n\t\t$stmt->bindParam(3, $total);\n\t\t$stmt->bindParam(4, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivano);\n\t\t$tot= rount($subtotal+$subtotalivasic+$totalivac,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\t\t\n\t\t }\t\t\t\t\t\n\n\t\theader(\"Location: detallescompras?mesage=2\");\n\t\texit;\n\n\t\t}\n\t\telse\n\t\t{\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from compras where codcompra = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$codcompra = base64_decode($_GET[\"codcompra\"]);\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t\theader(\"Location: detallescompras?mesage=2\");\n\t\t\texit;\n\t\t}\n\t}\n\telse\n\t{\n\t\theader(\"Location: detallescompras?mesage=3\");\n\t\texit;\n\t}\n}", "public function __destruct()\n {\n unset($this->idDetalleOrden);\n unset($this->valorInventario);\n unset($this->valorVenta);\n unset($this->cantidad);\n unset($this->idOrden);\n unset($this->idProducto);\n unset($this->estado);\n unset($this->fechaCreacion);\n unset($this->fechaModificacion);\n unset($this->idUsuarioCreacion);\n unset($this->idUsuarioModificacion);\n unset($this->conn);\n }", "public function eraseData()\n {\n $s = 'DELETE FROM `commitMessage` WHERE `user`=\"%s\"';\n $params = array($this->vcsLogin);\n $this->conn->query($s, $params);\n\n $s = 'DELETE FROM `work` WHERE `userID`=%d';\n $params = array($this->userID);\n $this->conn->query($s, $params);\n\n $s = 'DELETE FROM `patches` WHERE `userID`=%d';\n $params = array($this->userID);\n $this->conn->query($s, $params);\n\n $s = 'DELETE FROM `users` WHERE `userID`=%d';\n $params = array($this->userID);\n $this->conn->query($s, $params);\n }", "public function EliminarProductos($ids)\n {\n $resultado = array();\n $em = $this->getDoctrine()->getManager();\n\n if ($ids != \"\") {\n $ids = explode(',', $ids);\n $cant_total = 0;\n $cant_eliminada = 0;\n foreach ($ids as $producto_id) {\n if ($producto_id != \"\") {\n $cant_total++;\n $entity = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->find($producto_id);\n if ($entity != null) {\n\n //Cotizaciones\n $cotizaciones = $this->getDoctrine()->getRepository('IcanBundle:CotizacionProducto')\n ->ListarCotizaciones($producto_id);\n if (count($cotizaciones) == 0) {\n //Eliminar foto\n $foto_eliminar = $entity->getImagen();\n if ($foto_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $foto_eliminar)) {\n unlink($dir . $foto_eliminar);\n //unlink($dir . \"portada-\" . $foto_eliminar);\n //unlink($dir . \"thumb-\" . $foto_eliminar);\n }\n }\n //Eliminar ficha\n $ficha_eliminar = $entity->getFicha();\n if ($ficha_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $ficha_eliminar)) {\n unlink($dir . $ficha_eliminar);\n }\n }\n\n //Eliminar las imagenes\n $productoimagenes = $this->getDoctrine()->getRepository('IcanBundle:ProductoImagen')\n ->ListarImagenes($producto_id);\n foreach ($productoimagenes as $productoimagen) {\n //Eliminar foto\n $foto_eliminar = $productoimagen->getImagen();\n if ($foto_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $foto_eliminar)) {\n unlink($dir . $foto_eliminar);\n //unlink($dir . \"portada-\" . $foto_eliminar);\n //unlink($dir . \"thumb-\" . $foto_eliminar);\n }\n }\n $em->remove($productoimagen);\n }\n\n //Eliminar los productos relacionados\n $relacionados = $this->getDoctrine()->getRepository('IcanBundle:ProductoRelacion')\n ->ListarRelacionados($producto_id);\n foreach ($relacionados as $relacionado) {\n $em->remove($relacionado);\n }\n\n //Eliminar los productos relacionados\n $productorelacionados = $this->getDoctrine()->getRepository('IcanBundle:ProductoRelacion')\n ->ListarProductosRelacionado($producto_id);\n foreach ($productorelacionados as $relacionado) {\n $em->remove($relacionado);\n }\n\n //Eliminar vistas\n $producto_views = $this->getDoctrine()->getRepository('IcanBundle:ProductoView')\n ->ListarViewsDeProducto($producto_id);\n foreach ($producto_views as $producto_view) {\n $em->remove($producto_view);\n }\n\n //Eliminar descuentos\n $descuentos = $this->getDoctrine()->getRepository('IcanBundle:DescuentoProducto')\n ->ListarDescuentos($producto_id);\n foreach ($descuentos as $descuento) {\n $em->remove($descuento);\n }\n\n $em->remove($entity);\n $cant_eliminada++;\n }\n\n }\n }\n }\n }\n $em->flush();\n if ($cant_eliminada == 0) {\n $resultado['success'] = false;\n $resultado['error'] = \"No se pudo eliminar los productos, porque tienen cotizaciones asociadas\";\n } else {\n $resultado['success'] = true;\n\n $mensaje = ($cant_eliminada == $cant_total) ? \"La operación se ha realizado correctamente\" : \"La operación se ha realizado correctamente. Pero atención no se pudo eliminar todos los productos asociados porque tienen cotizaciones asociadas\";\n $resultado['message'] = $mensaje;\n }\n return $resultado;\n }", "public function clean(){\n\t\t$sql = 'DELETE FROM aluno';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function clean(){\n\t\t$sql = 'DELETE FROM ano_letivo';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "function eliminarRelacionProceso(){\n $this->objFunc=$this->create('MODObligacionPago');\n $this->res=$this->objFunc->eliminarRelacionProceso($this->objParam);\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "public function delete_data_to_tombstone(){\n }", "public function excluir()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"DELETE FROM EncontroComDeus WHERE id = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->id );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "function Eliminar()\n{\n /**\n * Se crea una instanica a Concesion\n */\n $Concesion = new Titulo();\n /**\n * Se coloca el Id del acuifero a eliminar por medio del metodo SET\n */\n $Concesion->setId_titulo(filter_input(INPUT_GET, \"ID\"));\n /**\n * Se manda a llamar a la funcion de eliminar.\n */\n echo $Concesion->delete();\n}", "public function borrar_dispositivos($id_pds)\n {\n $sql = \"SELECT * FROM devices_pds WHERE status ='Alta'\n\t\t\t\tAND id_pds ='\".$id_pds.\"'\";\n $resultado = $this->db->query($sql)->result();\n\n foreach ($resultado as $device) {\n /*Insertar en el historico de tienda el estado del dispositivo*/\n $elemento = array(\n 'id_devices_pds' => $device->id_devices_pds,\n 'fecha' => date('Y-m-d H:i:s'),\n 'status' => 'Baja',\n 'motivo' => CIERRE_TIENDA\n );\n // print_r($elemento); echo \"<br>\";\n $this->insert_historico_devicesPDS($elemento);\n }\n\n $sql = \"UPDATE devices_pds SET status ='Baja' WHERE id_pds ='\".$id_pds.\"'\";\n $this->db->query($sql);\n }", "public function __destruct()\n {\n $this->console('init BaseRepository __destruct');\n $this->recycleResource();\n }", "public function Sumilla_Delete()\n {\n\t\t$datos = [\n\t\t\t\t\t\"cod_curso\"=> \"100048\", \n\t\t\t\t\t\"plan\" => env('PLAN'),\n\t\t\t\t\t\"texto\" => \"Lorem Ipsum\"\n\t\t\t\t]; \t\n \t$sumilla = Sumilla::create($datos);\n\t\t$request = [\n\t\t\t\"data\"=> [\n\t\t\t\t\"tipo\"=>\"sumillas\",\n\t\t\t\t\"id\"=> \"1\",\n\t\t\t\t\"cod_curso\"=> \"100048\",\n\t\t\t\t\"plan\" => env('PLAN'), \n\t\t\t\t\"semestre\" => env('SEMESTRE'),\n\t\t\t\t],\n\t\t\t];\n\t\t$this->post('api/deleteData', $request);\n\n\t\t$this->assertDatabaseMissing('sumillas',[ \n\t\t\t\t\t\"id\"=>1, \n\t\t\t\t\t\"cod_curso\"=> \"100048\", \n\t\t\t\t\t\"plan\" => env('PLAN'),\n \t\t\t\t\"texto\"=>\"Nuevo texto\"\n\t\t\t\t]);\n\n\n }", "function deletarPA($id)\n {\n\t $this->db->where('projetoID', $id);\n\t $this->db->delete('Projeto_Artefato');\n\n\t}", "public function EliminarProducto($producto_id)\n {\n $resultado = array();\n $em = $this->getDoctrine()->getManager();\n\n $entity = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->find($producto_id);\n\n if ($entity != null) {\n\n //Cotizaciones\n $cotizaciones = $this->getDoctrine()->getRepository('IcanBundle:CotizacionProducto')\n ->ListarCotizaciones($producto_id);\n if (count($cotizaciones) > 0) {\n $resultado['success'] = false;\n $resultado['error'] = \"No se pudo eliminar el producto, porque tiene cotizaciones asociadas\";\n return $resultado;\n }\n\n //Eliminar foto\n $foto_eliminar = $entity->getImagen();\n if ($foto_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $foto_eliminar)) {\n unlink($dir . $foto_eliminar);\n //unlink($dir . \"portada-\" . $foto_eliminar);\n //unlink($dir . \"thumb-\" . $foto_eliminar);\n }\n }\n //Eliminar ficha\n $ficha_eliminar = $entity->getFicha();\n if ($ficha_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $ficha_eliminar)) {\n unlink($dir . $ficha_eliminar);\n }\n }\n\n //Eliminar las imagenes\n $productoimagenes = $this->getDoctrine()->getRepository('IcanBundle:ProductoImagen')\n ->ListarImagenes($producto_id);\n foreach ($productoimagenes as $productoimagen) {\n //Eliminar foto\n $foto_eliminar = $productoimagen->getImagen();\n if ($foto_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $foto_eliminar)) {\n unlink($dir . $foto_eliminar);\n //unlink($dir . \"portada-\" . $foto_eliminar);\n //unlink($dir . \"thumb-\" . $foto_eliminar);\n }\n }\n $em->remove($productoimagen);\n }\n\n //Eliminar los productos relacionados\n $relacionados = $this->getDoctrine()->getRepository('IcanBundle:ProductoRelacion')\n ->ListarRelacionados($producto_id);\n foreach ($relacionados as $relacionado) {\n $em->remove($relacionado);\n }\n\n //Eliminar los productos relacionados\n $productorelacionados = $this->getDoctrine()->getRepository('IcanBundle:ProductoRelacion')\n ->ListarProductosRelacionado($producto_id);\n foreach ($productorelacionados as $relacionado) {\n $em->remove($relacionado);\n }\n\n //Eliminar vistas\n $producto_views = $this->getDoctrine()->getRepository('IcanBundle:ProductoView')\n ->ListarViewsDeProducto($producto_id);\n foreach ($producto_views as $producto_view) {\n $em->remove($producto_view);\n }\n\n //Eliminar descuentos\n $descuentos = $this->getDoctrine()->getRepository('IcanBundle:DescuentoProducto')\n ->ListarDescuentos($producto_id);\n foreach ($descuentos as $descuento) {\n $em->remove($descuento);\n }\n\n $em->remove($entity);\n\n $em->flush();\n $resultado['success'] = true;\n } else {\n $resultado['success'] = false;\n $resultado['error'] = \"No existe el registro solicitado\";\n }\n\n return $resultado;\n }", "public function clean(){\n\t\t$sql = 'DELETE FROM conta_a_pagar';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "function delete() {\n db_begin_work();\n \n $delete = parent::delete();\n if($delete && !is_error($delete)) {\n cache_remove('companies_id_name'); // remove ID - name map from cache\n \n $users = $this->getUsers();\n if(is_foreachable($users)) {\n foreach($users as $user) {\n $user->delete();\n } // foreach\n } // if\n \n Projects::resetByCompany($this);\n \n db_commit();\n } else {\n db_rollback();\n } // if\n return $delete;\n }", "function borrarInscrito() {\n //Creamos la evaluacion\n leerClase('Evaluacion');\n leerClase('Estudiante');\n leerClase('Proyecto_dicta');\n $estudiante = new Estudiante($this->estudiante_id);\n $evaluacion = new Evaluacion($this->evaluacion_id);\n $protecto=$estudiante->getProyecto();\n $sql = \"select p.id as id from \" . $this->getTableName('Proyecto_dicta') . \" as p where p.proyecto_id = '$protecto->id' and p.dicta_id = '$this->dicta_id' \";\n $resultado = mysql_query($sql);\n\n $proyecto_array = mysql_fetch_array($resultado);\n $proyecto_dicta = new Proyecto_dicta($proyecto_array);\n $proyecto_dicta->delete();\n $evaluacion->delete();\n $this->delete();\n }", "public function uninstall(){\n MergeRequestComment::dropTable();\n MergeRequest::dropTable();\n CommitCache::dropTable();\n Repo::dropTable();\n Project::dropTable();\n }", "public function __destruct() {\n\t\t // close the database connection\n\t\t $this->orgModel = null;\n\t }", "function delete(){\r\n\t\t//Connect\r\n\t\t$sql = new DataBase;\r\n\t\t$sql->connect();\r\n\t}", "public function tearDown()\n {\n unset($this->commonDataClassRepository);\n }", "public function reset()\n {\n $this->getDb()->exec('delete from media');\n //pictures and vignettes deletion\n $this->deleteMedias();\n //backup deletion\n $this->deleteBackup();\n }", "public function devolverTodo() {\n $con = \"select * from departamentos\";\n $stmt=parent::$conexion->prepare($con);\n\n try {\n $stmt->execute();\n } catch (PDOException $ex) {\n die(\"Error al devolver los departamentos, \".$ex->getMessage());\n }\n return $stmt;\n }", "public function eliminarusuario($codigo){\r\n\t//Preparamos la conexion a la bdd:\r\n\t$pdo=Database::connect();\r\n\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t$sql=\"delete from usuario where codigo=?\";\r\n\t$consulta=$pdo->prepare($sql);\r\n//Ejecutamos la sentencia incluyendo a los parametros:\r\n\t$consulta->execute(array($codigo));\r\n\tDatabase::disconnect();\r\n}", "public function consultarTodos()\n\t{\n\t\t$sql = \t' SELECT colores.* '.\n\t\t\t\t' FROM colores '.\n\t\t\t\t' ORDER BY nombre ';\n\t\n\t\t$stmt = $this->getEntityManager()->getConnection()->prepare($sql);\n\t\t$stmt->execute();\n\t\t$result = $stmt->fetchAll(); //Se utiliza el fecth por que es un registro\n\t\t\n\t\t//Elimina los espacios\n\t\tforeach($result as &$reg)\n\t\t{\n\t\t\t$reg['nombre'] = trim($reg['nombre']);\n\t\t}//end foreach\n\t\n\t\treturn $result;\n\t}", "public function posteliminar() {\n $model = (new PaisRepository())->Obtener($_POST['id']);\n\n $rh = (new PaisRepository())->Eliminar($model);\n\n print_r(json_encode($rh));\n }", "function deletar($id)\n {\n\t $this->db->where('auditoriaID', $id);\n\t $this->db->delete('Auditoria');\n\n\t}", "public function del()\n {\n }", "public function clearAuditorias()\n\t{\n\t\t$this->collAuditorias = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function setRepositories() {\n }", "public function borrarResultados()\n {\n $this->resultados = array();\n }", "public function excluir()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"DELETE FROM EquipeDiscipulos WHERE discipuloId = ?\n AND equipeId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->discipuloId );\n $stm->bindParam(2, $this->equipeId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "public function actualizar() {\n $ord = $this->orden;\n $this->cargarPersonas($ord);\n }", "protected function migrarDados()\n {\n $serviceDemanda = $this->getService('OrdemServico\\Service\\DemandaFile');\n try {\n $serviceDemanda->begin();\n $arrUsuario = $this->getService('OrdemServico\\Service\\UsuarioFile')->fetchPairs([], 'getNoUsuario', 'getIdUsuario');\n $OrdemSevicoSevice = $this->getService('OrdemServico\\Service\\OrdemServicoDemandaFile');\n $arrDemanda = $serviceDemanda->findBy([], ['id_demanda' => 'asc']);\n $serviceDemanda::setFlush(false);\n foreach ($arrDemanda as $demanda) {\n $intIdUsuario = $arrUsuario[$demanda->getNoExecutor()];\n if ($intIdUsuario) {\n $demanda->setVlComplexidade(null)\n ->setVlImpacto(null)\n ->setVlCriticidade(null)\n ->setVlFatorPonderacao(null)\n ->setVlFacim(null)\n ->setVlQma(null)\n ->setIdUsuario($intIdUsuario);\n $serviceDemanda->getEntityManager()->persist($demanda);\n $arrDemandaServico = $OrdemSevicoSevice->findBy(['id_demanda' => $demanda->getIdDemanda()]);\n if ($arrDemandaServico) {\n $ordemServicoDemanda = reset($arrDemandaServico);\n $ordemServicoDemanda->setIdUsuarioAlteracao($demanda->getIdUsuario())\n ->setDtAlteracao(Date::convertDateTemplate($demanda->getDtAbertura()));\n $OrdemSevicoSevice->getEntityManager()->persist($demanda);\n }\n }\n }\n $serviceDemanda::setFlush(true);\n $serviceDemanda->commit();\n } catch (\\Exception $exception) {\n $serviceDemanda->rollback();\n var_dump($exception->getMessage());\n die;\n }\n }", "public function cleanUp();", "public function cleanUp();", "public function cleanUp();", "public function desconectar(){\n mysqli_close($this->conexion);\n }", "public static function getListado(){\n return Dispositivo::model()->findAll();\n }", "function removePacote($campos){\n\t\t\t$listDel = $campos['InputDelPacote'];\t\t\t\n\t\t\t\t\n\t\t\t\tif(!empty($listDel)){\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<sizeof($listDel);$i++){\n\t\t\t\t\t\tif($listDel[$i] != 0){\n\t\t\t\t\t\t\t\t$sql = \" DELETE FROM vekttor_venda_pacote WHERE pacotes_id = '$listDel[$i]' AND vekttor_venda_id = '$campos[venda_id]'\";\n\t\t\t\t\t\t\t\t//echo $sql;\n\t\t\t\t\t\t\t\tmysql_query($sql);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t/*Seleciona os pacote para trazer os modulos */\n\t\t\t\t\t$sqlPacote = mysql_query($tn=\" SELECT * FROM pacote_item WHERE pacote_id = '$listDel[$i]' \");\n\t\t\t\t\t\twhile($pct=mysql_fetch_object($sqlPacote)){\n\t\t\t\t\t\t\t\t$modulos[] = $pct->sis_modulo_id;\n\t\t\t\t\t\t}\n\t\t\t\t} /*Fim de For*/\n\t\t\t\t\n\t\t\t\t\tfor($j=0;$j<sizeof($modulos);$j++){\n\t\t\t\t\t\t\t$sqlModulos = \" DELETE FROM usuario_tipo_modulo WHERE modulo_id = '$modulos[$j]' AND usuario_tipo_id = '$campos[id_usuario_tipo]'\";\n\t\t\t\t\t\t\tmysql_query($sqlModulos);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n}", "public function clean(){\n\t\t$sql = 'DELETE FROM grupo_usuario_tabelas';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "private function initRepositories(): void {\n $this->usersRepository = new UsersRepository();\n }", "function eliminar_insumos($objeto){\n\t\t$sql=\"\tDELETE FROM\n\t\t\t\t\t app_producto_material\n\t\t\t\tWHERE\n\t\t\t\t\tid_producto =\".$objeto['id'];\n\t\t// return $sql;\n\t\t$result = $this->query($sql);\n\n\t\treturn $result;\n\t}", "public function delete() {\n $sql = sprintf(\"DELETE FROM project WHERE id=%d\", $this->id);\n self::$connection->execute($sql);\n }", "public function Eliminar_Exp_Laboral($data){\n $modelo = new HojaVida();\n $fechahora = $modelo->get_fecha_actual();\n $datosfecha = explode(\" \",$fechahora);\n $fechalog = $datosfecha[0];\n $horalog = $datosfecha[1];\n $tiporegistro = \"Experiencia Laboral\";\n $accion = \"Elimina una Nueva \".$tiporegistro.\" de el Sistema (Hoja vida) TALENTO HUMANO\";\n $detalle = $_SESSION['nombre'].\" \".$accion.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipolog = 15;\n $idusuario = $_SESSION['idUsuario'];\n //$idusuario = $_POST['id_user'];;\n try {\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); \n //EMPIEZA LA TRANSACCION\n $this->pdo->beginTransaction();\n $sql = \"DELETE FROM th_experiencia_laboral WHERE exp_id = ?\";\n\n $this->pdo->prepare($sql)\n ->execute(\n array(\n $data->id\n )\n ); \n $this->pdo->exec(\"INSERT INTO log (fecha, accion,detalle,idusuario,idtipolog) VALUES ('$fechalog', '$accion','$detalle','$idusuario','$tipolog')\");\n //SE TERMINA LA TRANSACCION \n $this->pdo->commit();\n } catch (Exception $e) {\n $this->pdo->rollBack();\n die($e->getMessage());\n }\n }", "function excluirPessoa(){\r\n $banco = conectarBanco();\r\n $sql = \"DELETE FROM pessoa WHERE id = '{$_POST[\"id\"]}'\";\r\n $banco->query($sql); // Passa a query fornecida em $sql para o banco de dados\r\n $banco->close(); // Fecha o banco de dados\r\n voltarMenu(); // Volta para a pagina inicial da agenda\r\n}", "function EliminarConceptopago($id) {\n $sql = \"UPDATE `conceptopago` SET `estado` = 'INACTIVO' WHERE `id` = '$id'\";\n\n\t$db = new conexion();\n\t$result = $db->consulta($sql);\n $num = $db->encontradas($result);\n\n\t$respuesta->datos = [];\n\t$respuesta->mensaje = \"\";\n\t$respuesta->codigo = \"\";\n\n\tif ($result) {\n\n\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t$respuesta->datos[] = mysql_fetch_array($result);\n\t\t}\n\n\t\t$respuesta->mensaje = \"Registro eliminado con éxito!\";\n\t\t$respuesta->codigo = 1;\n\t} else {\n\t\t$respuesta->mensaje = \"Ha ocurrido un error!\";\n\t\t$respuesta->codigo = 0;\n\t}\n\n\treturn json_encode($respuesta);\n}", "public function detalheAction()\n {\n $id = $this->getRequest()->getParam('id');\n\n $edicao = new Application_Model_Publicacao();\n $edicao->setId($id);\n \n $this->view->revista = $edicao;\n }", "public function desconectar(){\r\n\t\tmysqli_close($this->conexion);\r\n\t}", "public function executeClearAllProjects(sfWebRequest $request)\n {\n $conn = Doctrine_Manager::getInstance();\n $projects = Doctrine_Core::getTable('Project')->findAll();\n $projects->delete();\n \n $this->getUser()->setFlash('notice', 'Projects deleted.');\n $this->redirect('project/tool');\n }", "private function desabilitaPoolIdsObjetosManipulados()\n {\n \t// setando para null o atributo _arrayObjetosManipulados\n \t$this->_arrayObjetosManipulados = null;\n }", "public function __destruct()\n {\n if ($this->project) {\n remove_project_builds($this->project->Id);\n $this->project->Delete();\n }\n }", "public function __destruct()\n {\n if ($this->project) {\n remove_project_builds($this->project->Id);\n $this->project->Delete();\n }\n }", "public function eliminar($objeto){\r\n\t}", "function clean(string $namespace = 'default'): void\n{\n Repository::clean($namespace);\n}", "public function __destruct()\n\t{\n\t\tunset($this -> arrNewData);\n\t\tunset($this -> arrOldData);\n\t\tunset($this -> isCheckModify);\n\t\tunset($this -> tableName);\n\t\tunset($this -> databaseName);\n\t\t\t\n\t}", "public function deleteAllDependents() {\n\t\t$this->dependents = array();\n\t}", "public function updateRepositories() {\n $projects = $this->loadProjects();\n if (!$projects)\n return;\n\n $this->m_authors = $this->loadAuthors();\n\n foreach ($projects as $project)\n $this->updateProject($project);\n }", "public function unload()\n {\n\n $this->synchronized = true;\n $this->id = null;\n $this->newId = null;\n $this->data = [];\n $this->savedData = [];\n $this->orm = null;\n\n $this->multiRef = [];\n $this->i18n = null;\n\n }", "public function readProductosEliminados(){\n $sql='SELECT idProducto, foto, nombre, precio, cantidad, nombreProveedor, producto.estado, producto.estadoEliminacion from producto, proveedor where proveedor.idProveedor=producto.idProveedor AND producto.estadoEliminacion=0';\n $params=array(null);\n return Database::getRows($sql, $params); \n }", "public function desenfocarCamaraPresidencia() {\n\n self::$presidencia->desenfocar();\n\n }", "public function EliminarPromociones($ids)\n {\n $resultado = array();\n $em = $this->getDoctrine()->getManager();\n\n if ($ids != \"\") {\n $ids = explode(',', $ids);\n $cant_total = 0;\n $cant_eliminada = 0;\n foreach ($ids as $promocion_id) {\n if ($promocion_id != \"\") {\n $cant_total++;\n $entity = $this->getDoctrine()->getRepository('IcanBundle:Promocion')\n ->find($promocion_id);\n if ($entity != null) {\n\n //Eliminar foto\n $foto_eliminar = $entity->getImagen();\n if ($foto_eliminar != \"\") {\n $dir = 'uploads/promociones/';\n if (is_file($dir . $foto_eliminar)) {\n unlink($dir . $foto_eliminar);\n //unlink($dir . \"portada-\" . $foto_eliminar);\n //unlink($dir . \"thumb-\" . $foto_eliminar);\n }\n }\n\n // Quitar descuento a los productos relacionados\n $productos = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->ListarProductosDePromocion($promocion_id);\n foreach ($productos as $producto) {\n $producto->setPrecioEspecial(null);\n $producto->setPromocion(null);\n $producto->setPorciento(NULL);\n }\n\n $em->remove($entity);\n $cant_eliminada++;\n\n }\n }\n }\n }\n $em->flush();\n if ($cant_eliminada == 0) {\n $resultado['success'] = false;\n $resultado['error'] = \"No se pudo eliminar los promociones, porque tienen cotizaciones asociadas\";\n } else {\n $resultado['success'] = true;\n\n $mensaje = ($cant_eliminada == $cant_total) ? \"La operación se ha realizado correctamente\" : \"La operación se ha realizado correctamente. Pero atención no se pudo eliminar todos los promociones asociados porque tienen cotizaciones asociadas\";\n $resultado['message'] = $mensaje;\n }\n return $resultado;\n }", "function runEliminar(){\n \n $sql = \"DELETE FROM mec_met WHERE id_mecanismos IN (SELECT id_mecanismos FROM mecanismos WHERE id_componente=\".$this->_datos.\")\";\n $this->QuerySql($sql);\n $sql = \"DELETE FROM mecanismos WHERE id_componente=\".$this->_datos;\n $this->QuerySql($sql);\n $sql = \"DELETE FROM componentes WHERE id_componentes=\".$this->_datos;\n $_respuesta = array('Codigo' => 0, \"Mensaje\" => '<strong> OK: </strong> El registro se ha eliminado.');\n try { \n $this->QuerySql($sql);\n }\n catch (exception $e) {\n $_respuesta = array('Codigo' => 99, \"Mensaje\" => $e->getMessage());\n }\n \n print_r(json_encode($_respuesta));\n }", "static function eliminar_instancia()\n\t{\n\t\tself::$instancia = null;\n\t}", "function cms_delete($id) {\n GLOBAL $db;\n// удаление данных о статье\n $db -> query(\"DELETE FROM content WHERE id='$id'\");\n $db -> query(\"DELETE FROM content WHERE pid = '$id'\");\n// удаление информации о статьях из \"связанных\" таблиц\n $db -> query(\"UPDATE items SET article=REPLACE(article,'|\".$id.\"|','|') WHERE article LIKE '%|\".$id.\"|%'\");\n $db -> query(\"UPDATE spec SET article=REPLACE(article,'|\".$id.\"|','|') WHERE article LIKE '%|\".$id.\"|%'\");\n\n}", "function opcion__eliminar()\n\t{\n\t\t$id_proyecto = $this->get_id_proyecto_actual();\n\t\tif ( $id_proyecto == 'toba' ) {\n\t\t\tthrow new toba_error(\"No es posible eliminar el proyecto 'toba'\");\n\t\t}\n\t\ttry {\n\t\t\t$p = $this->get_proyecto();\n\t\t\tif ( $this->consola->dialogo_simple(\"Desea ELIMINAR los metadatos y DESVINCULAR el proyecto '\"\n\t\t\t\t\t.$id_proyecto.\"' de la instancia '\"\n\t\t\t\t\t.$this->get_id_instancia_actual().\"'\") ) {\n\t\t\t\t$p->eliminar_autonomo();\n\t\t\t}\n\t\t} catch (toba_error $e) {\n\t\t\t$this->consola->error($e->__toString());\n\t\t}\n\t\t$this->get_instancia()->desvincular_proyecto( $id_proyecto );\n\t}", "public function listdAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u=new Cargos($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n $u->delRegistro($id);\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n }\n \n }", "function ElmininarColectivos()\n {\t\n $user = User::where('id', 1)->first();\n \\Auth::loginUsingId($user->id);\n \n $response = $this->json('delete', '/colectivo/71');\n\n $response\n ->assertStatus(200);\n \t$response\n \t\t->assertJsonStructure([\n \t\t\t\t'message',\n \t\t]);\n }", "public function unchangeAll(): void\n {\n $this->entries = [];\n\n if ($this->sourceContainer !== null) {\n foreach ($this->sourceContainer->getEntries() as $entry) {\n $this->entries[$entry->getName()] = clone $entry;\n }\n }\n $this->unchangeArchiveComment();\n }", "public function delete()\n {\n DB::transaction(function () {\n $this->devedores()->delete();\n parent::delete();\n });\n }", "public function destroy($id)\n {\n $facturacion = DB::table('facturacion')->where('id_credito','=',$id)->select('*')->get();\n\n \n foreach ($facturacion as $key => $value) {\n $id_f = $value->id;\n $fac = Facturacion::find($id_f);\n $fac->id_credito = null;\n $fac->save();\n }\n\n $credito = Credito::find($id);\n $credito->delete();\n return redirect()->back();\n }", "public function run()\n {\n DB::table('folio')->delete();\n FoliosDAO::create([\n 'numero' => '1',\n 'documento' => 'Papeleta',\n 'fecha_creado' => date('d/m/Y')\n ]);\n }", "function __destruct(){\r\n $this->conexion->desconexion();\r\n }", "public function desenfocarCamaraAlumnos1() {\n\n self::$alumnos1->desenfocar();\n\n }", "public function clean(){\n\t\t$sql = 'DELETE FROM negociacao_contas';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "protected function cleanCache()\n {\n parent::cleanCache('com_projectfork');\n }", "public function clearAllCommand()\n {\n $this->eventRepository->removeAll();\n $this->eventSourceRepository->removeAll();\n }", "public function deshuso(){\n try{\n $gestion = isset($_GET['gestion']) ? $_GET['gestion'] : date('Y');\n $almacen = isset($_GET['almacen']) ? $_GET['almacen'] : 0;\n $datos = \\DB::table('articulos_movimientos')->join('users', 'articulos_movimientos.id_usuario', '=', 'users.id')\n ->join('movimientos', 'articulos_movimientos.id_movimiento', '=', 'movimientos.id')\n ->join('almacenes', 'articulos_movimientos.id_almacen', '=', 'almacenes.id')\n ->join('aperturas', 'articulos_movimientos.id_apertura', '=', 'aperturas.id')\n ->join('clasificadores', 'articulos_movimientos.id_clasificador','=', 'clasificadores.id')\n ->join('conceptos', 'movimientos.id_concepto', '=', 'conceptos.id')\n ->where('articulos_movimientos.observacion', '!=', '' )\n ->where('articulos_movimientos.id_gestion', '=', $gestion)\n ->where('articulos_movimientos.id_almacen', '=', $almacen)\n ->select('articulos_movimientos.id', 'articulos_movimientos.*', 'movimientos.fecha as movimientoFecha', 'movimientos.movimiento as movimientoTipo',\n 'conceptos.tipo', 'conceptos.concepto', 'users.name', 'movimientos.nro_moviento',\n 'clasificadores.codigo as clasificadorCodigo',\n 'aperturas.codigo as aperturaCodigo', 'aperturas.*',\n 'almacenes.*')\n ->orderBy('articulos_movimientos.id_almacen', 'asc')\n ->get();\n\n $bienes = \\DB::table('bienes')->join('users', 'bienes.id_usuario', '=', 'users.id')\n ->join('unidades', 'bienes.id_unidad', '=', 'unidades.id')\n ->join('articulos_movimientos', 'bienes.id', '=', 'articulos_movimientos.id_bien')\n ->join('clasificadores', 'articulos_movimientos.id_clasificador','=', 'clasificadores.id')\n ->where('articulos_movimientos.observacion', '!=', '' )\n ->where('bienes.id_gestion', '=', $gestion)\n ->select('bienes.id', 'bienes.codigo', 'bienes.bien', 'unidades.unidad', 'users.name',\n 'clasificadores.codigo as clasificadorCodigo', 'articulos_movimientos.id_almacen')\n ->groupBy('bienes.id')->get();\n\n $configuracion = \\DB::table('configuraciones')->first();\n $almacenes = \\App\\Almacenes::find($almacen);\n $gestion = Gestiones::find($gestion);\n\n $pdf = \\PDF::loadView('reporte.deshusoReporte', compact('datos', 'configuracion', 'bienes', 'apertura', 'almacenes', 'gestion') )\n ->setPaper('letter')->setOrientation('portrait')\n ->setOption('page-width', '216mm')\n ->setOption('page-height', '279mm')\n ->setOption('margin-right', '10mm')\n ->setOption('margin-left', '14mm')\n ->setOption('margin-bottom', '25mm')\n ->setOption('header-spacing', 15)\n ->setOption('footer-spacing', 1)\n ->setOption('footer-html', asset('pie.php'));\n\n return $pdf->inline('Codigo4060_Apertura'.date('Ymdhis').'.pdf');\n }catch(\\Exception $e){\n return \"<script> alert('Error R0008: Reporte de bienes en deshuso \\n\".$e->getMessage().\"'); location.href='\".asset('index.php/Reportes').\"'; </script>\";\n }\n }", "public function __destruct()\r\n\t{\r\n\t\tparent::cerrarConexion(); //ejecutamos la simulacion de cierre de conexion\r\n\t}", "public function get_repo_data(){\n\n\t\t\treturn $this->get_repo();\n\n\t\t}", "public function remover() {\n \n $queryVerificaInscricao = '\n select * from tb_inscricao_atividade where id_atividade = :id_atividade \n ';\n \n $stmtInscAtt = $this->conexao->prepare($queryVerificaInscricao);\n $stmtInscAtt->bindValue(':id_atividade', $_GET['id_att']);\n $stmtInscAtt->execute();\n \n $inscAtt = $stmtInscAtt->fetchAll(PDO::FETCH_OBJ);\n \n // echo '<pre>';\n // print_r($inscAtt);\n // echo '</pre>';\n \n if (!empty($inscAtt)) {\n foreach ($inscAtt as $inscAttInd) {\n $queryDeleteInscAtt = 'delete from tb_inscricao_atividade where \n id_atividade = :id_atividadeDel and \n id_evento = :id_eventoDel and \n id_usuario = :id_usuarioDel';\n \n $stmtInscAttDel = $this->conexao->prepare($queryDeleteInscAtt);\n $stmtInscAttDel->bindValue(':id_atividadeDel', $inscAttInd->id_atividade);\n $stmtInscAttDel->bindValue(':id_eventoDel', $inscAttInd->id_evento);\n $stmtInscAttDel->bindValue(':id_usuarioDel', $inscAttInd->id_usuario);\n $stmtInscAttDel->execute();\n }\n }\n\n $queryInscCupomAtt = '\n select * from tb_cupom where id_atividade = :id_atividadeCupDel\n ';\n\n $stmtInscCupomAtt = $this->conexao->prepare($queryInscCupomAtt);\n $stmtInscCupomAtt->bindValue(':id_atividadeCupDel', $_GET['id_att']);\n $stmtInscCupomAtt->execute();\n\n $cupomAtt = $stmtInscCupomAtt->fetchAll(PDO::FETCH_OBJ);\n\n // echo '<pre>';\n // print_r($cupomAtt);\n // echo '</pre>';\n\n if (!empty($cupomAtt)) {\n foreach ($cupomAtt as $cupomAttInd) {\n $queryDeleteCupomAtt = '\n delete from tb_cupom where id = :id_cupomDel\n ';\n\n echo $cupomAttInd->id;\n\n $stmtInscCupomAttDel = $this->conexao->prepare($queryDeleteCupomAtt);\n $stmtInscCupomAttDel->bindValue(':id_cupomDel', $cupomAttInd->id);\n $stmtInscCupomAttDel->execute();\n }\n }\n \n $query = '\n delete from tb_atividade \n where id = :id';\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id', $_GET['id_att']);\n\n return $stmt->execute();\n }", "public function EliminarDetallesVentas()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\n\t\t$sql = \" select * from detalleventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 1)\n\t\t{\n\n\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql2);\n\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t$num = $stmt->rowCount();\n\n\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t$existenciadb = $p[0][\"existencia\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t$sql = \" update productos set \"\n\t.\" existencia = ? \"\n\t.\" where \"\n\t.\" codproducto = ?;\n\t\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindParam(1, $existencia);\n\t$stmt->bindParam(2, $codproducto);\n\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t$existencia = $existenciadb + $cantventa;\n\t$stmt->execute();\n\n\t$sql = \" delete from detalleventas where coddetalleventa = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindParam(1,$coddetalleventa);\n\t$coddetalleventa = base64_decode($_GET[\"coddetalleventa\"]);\n\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindParam(1,$codventa);\n\t$stmt->bindParam(2,$codproducto);\n\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t$stmt->execute();\n\n################## CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS #################\n$sql = \"select * from productosvsingredientes where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($codproducto));\n\t\t$num = $stmt->rowCount();\n if($num>0) {\n\n$sql = \"select * from productosvsingredientes LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente where productosvsingredientes.codproducto = '\".$codproducto.\"'\";\n\n\t$array=array();\n\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t$this->p[] = $row;\n\n\t\t$codproducto = $row['codproducto'];\n\t\t$codingrediente = $row['codingrediente'];\n\t\t$cantracion = $row['cantracion'];\n\t\t$cantingrediente = $row['cantingrediente'];\n\t\t$costoingrediente = $row['costoingrediente'];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codproducto = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$stmt->bindParam(3,$codingrediente);\n\t\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$codingrediente = strip_tags($codingrediente);\n\t\t$stmt->execute();\n\n\t\t$update = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($update);\n\t\t$stmt->bindParam(1, $cantidadracion);\n\t\t$stmt->bindParam(2, $codingrediente);\n\n\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t$racion = rount($cantracion*$cantventa,2);\n\t\t$cantidadracion = rount($cantingrediente+$racion,2);\n\t\t$stmt->execute();\n\n\t\t }\n}\n############ FIN DE CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS REGISTRADOS ##############\n\n\t$sql4 = \"select * from ventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$paea[] = $row;\n\t\t}\n\t\t$subtotalivasive = $paea[0][\"subtotalivasive\"];\n\t\t$subtotalivanove = $paea[0][\"subtotalivanove\"];\n\t\t$iva = $paea[0][\"ivave\"]/100;\n\t\t$descuento = $paea[0][\"descuentove\"]/100;\n\t\t$totalivave = $paea[0][\"totalivave\"];\n\t\t$totaldescuentove = $paea[0][\"totaldescuentove\"];\n\t\t$totaldb = $paea[0][\"totalpago\"];\n\t\t$montopagado = $paea[0][\"montopagado\"];\n\t\t\t\n\t\t\n$sql3 = \"select sum(importe) as importe, sum(importe2) as importe2, sum(preciocompra) as preciocompra from detalleventas where codventa = ? and ivaproducto = 'SI'\";\n\t\t$stmt = $this->dbh->prepare($sql3);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])));\n\t\t$num = $stmt->rowCount();\n\t\t \n\t\t if($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$pae[] = $row;\n\t\t\t}\n\t\t$preciocompraiva = ($pae[0][\"preciocompra\"]== \"\" ? \"0\" : $pae[0][\"preciocompra\"]);\n\t\t$importeivasi = ($pae[0][\"importe\"]== \"\" ? \"0\" : $pae[0][\"importe\"]);\n\t\t$importe2si = ($pae[0][\"importe2\"]== \"\" ? \"0\" : $pae[0][\"importe2\"]);\n\t\n$sql5 = \"select sum(importe) as importe, sum(importe2) as importe2, sum(preciocompra) as preciocompra from detalleventas where codventa = ? and ivaproducto = 'NO'\";\n\t\t$stmt = $this->dbh->prepare($sql5);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])));\n\t\t$num = $stmt->rowCount();\n\t\t \n\t\t if($roww = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[] = $roww;\n\t\t\t}\n\t\t$preciocompra = ($roww[\"preciocompra\"]== \"\" ? \"0\" : $roww[\"preciocompra\"]);\n\t\t$importeivano = ($roww[\"importe\"]== \"\" ? \"0\" : $roww[\"importe\"]);\n\t\t$importe2 = ($roww[\"importe2\"]== \"\" ? \"0\" : $roww[\"importe2\"]);\n\t\t\nif(base64_decode($_GET[\"ivaproducto\"])==\"SI\"){\t\n\n\t\t$sql = \" update ventas set \"\n\t\t\t .\" subtotalivasive = ?, \"\n\t\t\t .\" totalivave = ?, \"\n\t\t\t .\" totaldescuentove = ?, \"\n\t\t\t .\" totalpago= ?, \"\n\t\t\t .\" montodevuelto= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codventa = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaliva);\n\t\t$stmt->bindParam(3, $totaldescuentove);\n\t\t$stmt->bindParam(4, $totalpago);\n\t\t$stmt->bindParam(5, $devuelto);\n\t\t$stmt->bindParam(6, $codventa);\n\t\t\n\t\t$subtotal= strip_tags($importeivasi);\n $totaliva= rount($subtotal*$iva,2);\n\t\t$tot= rount($subtotal+$subtotalivanove+$totaliva,2);\n\t\t$totaldescuentove= rount($tot*$descuento,2);\n\t\t$totalpago= rount($tot-$totaldescuentove,2);\n\t\t$devuelto= ($montopagado== \"0.00\" ? \"0\" : rount($montopagado-$totalpago,2));\n\t\t$codventa = strip_tags($_GET[\"codventa\"]);\n\t\t$stmt->execute();\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\nif (base64_decode($_GET[\"tipopagove\"])==\"CONTADO\"){\n\n$sql = \"select ingresos from arqueocaja where codcaja = '\".strip_tags($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\t$ingreso = ($row['ingresos']== \"\" ? \"0.00\" : $row['ingresos']);\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$calculo=rount($totaldb-$totalpago,2);\n\t\t$txtTotal = rount($ingreso-$calculo,2);\n\t\t$codcaja = strip_tags($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\t}\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\t\t\n\t\t } else {\n\n $sql = \" update ventas set \"\n\t\t\t .\" subtotalivanove = ?, \"\n\t\t\t .\" totaldescuentove = ?, \"\n\t\t\t .\" totalpago= ?, \"\n\t\t\t .\" montodevuelto= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codventa = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaldescuentove);\n\t\t$stmt->bindParam(3, $totalpago);\n\t\t$stmt->bindParam(4, $devuelto);\n\t\t$stmt->bindParam(5, $codventa);\n\t\t\n\t\t$subtotal= strip_tags($importeivano);\n\t\t$tot= rount($subtotal+$subtotalivasive+$totalivave,2);\n\t\t$totaldescuentove= rount($tot*$descuento,2);\n\t\t$totalpago= rount($tot-$totaldescuentove,2);\n\t\t$devuelto= ($montopagado== \"0.00\" ? \"0\" : rount($montopagado-$totalpago,2));\n\t\t$codventa = strip_tags($_GET[\"codventa\"]);\n\t\t$stmt->execute();\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\nif (base64_decode($_GET[\"tipopagove\"])==\"CONTADO\"){\n\n$sql = \"select ingresos from arqueocaja where codcaja = '\".strip_tags($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\t$ingreso = ($row['ingresos']== \"\" ? \"0.00\" : $row['ingresos']);\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$calculo=rount($totaldb-$totalpago,2);\n\t\t$txtTotal = rount($ingreso-$calculo,2);\n\t\t$codcaja = strip_tags($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\t}\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\t\t\n\t } \n\necho \"<div class='alert alert-info'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<center><span class='fa fa-check-square-o'></span> EL DETALLE DE VENTA DE PRODUCTO FUE ELIMINADO EXITOSAMENTE </center>\";\necho \"</div>\";\nexit;\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[] = $row;\n\t\t\t}\n\t\t\t$existenciadb = $p[0][\"existencia\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t\t$sql = \" update productos set \"\n\t\t\t.\" existencia = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codproducto = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $existencia);\n\t\t\t$stmt->bindParam(2, $codproducto);\n\t\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$existencia = $existenciadb + $cantventa;\n\t\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codventa);\n\t\t\t$stmt->bindParam(2,$codproducto);\n\t\t\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$stmt->execute();\n\n\n################## CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS #######################\n$sql = \"select * from productosvsingredientes where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($codproducto));\n\t\t$num = $stmt->rowCount();\nif($num>0) {\n\n\n\t$sql = \"select * from productosvsingredientes LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente where productosvsingredientes.codproducto = '\".$codproducto.\"'\";\n\n\t$array=array();\n\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\n\t\t$codproducto = $row['codproducto'];\n\t\t$codingrediente = $row['codingrediente'];\n\t\t$cantracion = $row['cantracion'];\n\t\t$cantingrediente = $row['cantingrediente'];\n\t\t$costoingrediente = $row['costoingrediente'];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codproducto = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$stmt->bindParam(3,$codingrediente);\n\t\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$codingrediente = strip_tags($codingrediente);\n\t\t$stmt->execute();\n\n\n\t\t$update = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($update);\n\t\t$stmt->bindParam(1, $cantidadracion);\n\t\t$stmt->bindParam(2, $codingrediente);\n\n\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t$racion = rount($cantracion*$cantventa,2);\n\t\t$cantidadracion = rount($cantingrediente+$racion,2);\n\t\t$stmt->execute();\n\n\n\t\t }\n\n}\n################### FIN DE CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS ###################\n\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\tif (base64_decode($_GET[\"tipopagove\"])==\"CONTADO\"){\n\n\t\t$sql4 = \"select * from ventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\n\t\t\tif($roww = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$paea[] = $roww;\n\t\t\t}\n\t\t$totaldb = $roww[\"totalpago\"];\n\n\t\t$sql = \"select ingresos from arqueocaja where codcaja = '\".strip_tags($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\tif (isset($row['ingresos'])) { $ingreso = $row['ingresos']; } else { $ingreso ='0.00'; }\n\t\t//$ingreso = $row['ingresos'];\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$txtTotal = rount($ingreso-$totaldb,2);\n\t\t$codcaja = strip_tags($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\t}\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\n#################### AQUI ACTUALIZAMOS EL STATUS DE MESA ####################\n\t\t$sql = \" update mesas set \"\n\t\t.\" statusmesa = ? \"\n\t\t.\" where \"\n\t\t.\" codmesa = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $statusmesa);\n\t\t$stmt->bindParam(2, $codmesa);\n\n\t\t$statusmesa = strip_tags('0');\n\t\t$codmesa = base64_decode($_GET[\"codmesa\"]);\n\t\t$stmt->execute();\n#################### AQUI ACTUALIZAMOS EL STATUS DE MESA ####################\n\n\t\t$sql = \" delete from ventas where codventa = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$codventa = strip_tags($_GET[\"codventa\"]);\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from detalleventas where coddetalleventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$coddetalleventa);\n\t\t$coddetalleventa = base64_decode($_GET[\"coddetalleventa\"]);\n\t\t$stmt->execute();\n\n\techo \"<div class='alert alert-info'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<center><span class='fa fa-check-square-o'></span> EL DETALLE DE VENTA DE PRODUCTO FUE ELIMINADO EXITOSAMENTE </center>\";\n\techo \"</div>\";\n\texit;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\techo \"<div class='alert alert-info'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<center><span class='fa fa-check-square-o'></span> USTED NO PUEDE ELIMINAR DETALLES EN VENTAS, NO ERES EL ADMINISTRADOR DEL SISTEMA</center>\";\n\techo \"</div>\";\n\texit;\n\t\t}\n\t}", "public function cleanUp() {}" ]
[ "0.6119121", "0.58106834", "0.5779818", "0.57742983", "0.57348275", "0.5726719", "0.5725282", "0.5694065", "0.5668206", "0.5665363", "0.5654355", "0.5638612", "0.5612577", "0.5584601", "0.5531272", "0.54952466", "0.5479441", "0.5470189", "0.54511344", "0.54158854", "0.54129887", "0.5406477", "0.53975415", "0.53904337", "0.535714", "0.53528947", "0.5350967", "0.5350228", "0.5341011", "0.5337698", "0.53354305", "0.5334831", "0.5332486", "0.5327653", "0.53274435", "0.5323294", "0.5315105", "0.5307138", "0.52794343", "0.526836", "0.5251308", "0.5243567", "0.5240297", "0.5239209", "0.52379394", "0.52359647", "0.523525", "0.5231819", "0.52279854", "0.5222868", "0.52194285", "0.5217135", "0.521088", "0.521088", "0.521088", "0.52020174", "0.51946163", "0.51879704", "0.51836884", "0.51811457", "0.51744777", "0.5170201", "0.51614064", "0.5159608", "0.51571697", "0.51556844", "0.5141677", "0.5140307", "0.51391435", "0.5122553", "0.5122553", "0.5121974", "0.51111555", "0.51109344", "0.5107193", "0.51006824", "0.50997615", "0.50978816", "0.50968605", "0.5085022", "0.5084594", "0.5080224", "0.5078495", "0.5077776", "0.50776696", "0.50746554", "0.5071467", "0.506926", "0.50684184", "0.5066349", "0.5059767", "0.5059076", "0.50582707", "0.50572526", "0.50567514", "0.5056317", "0.5054935", "0.5054278", "0.50510776", "0.5047434", "0.5046148" ]
0.0
-1
recupera registro com base em seu ID
public function find ($key);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create($id) //pasamos el id del cliente\n {\n \n }", "public function carregarPorID($id) {\n $sid = \"\\\"$id\\\"\";\n $query = \"SELECT * FROM \" . get_class($this) . \" WHERE id=$sid\";\n $this->ATRIBUTO= bd::executeSqlParaArrayTitulada($query);\n if (is_null($this->ATRIBUTO['id'])) {\n throw new Exception(\"Erro ao carregar item \".get_class($this). \", id $id : Não encontrado.\");\n }\n else {\n $this->id=$this->ATRIBUTO['id'];\n }\n $this->carregarRelacionamentos();\n }", "public function ingresarEmpleadoSinID(){\n $conexion = new Conexion;\n $con = new mysqli($conexion->servername, $conexion->username, $conexion->password, $conexion->dbname);\n $sql = \"INSERT INTO empleado (rut, nombre, password, categoria, estado ) VALUES ('\".$this->rut.\"', '\".$this->nombre.\"','\".$this->password.\"', '\".$this->categoria.\"', 1)\";\n if ($con->connect_error) {\n die(\"Conexión fallida: \" . $con->connect_error);\n } \n if ($con->query($sql) === TRUE) {\n echo \"Empleado ingresada correctamente.\";\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $con->error;\n }\n $con->close();\n }", "function load_id(){\r\n $db = new Database();\r\n $sql = \"select * from \" . Interest::TABLE_NAME . \" where name=:name\";\r\n $stm = $db->pdo->prepare($sql);\r\n $stm->bindParam(':name', $this->name);\r\n $stm->execute();\r\n if ($stm->rowCount() > 0){\r\n $row = $stm->fetch();\r\n $this->id = $row[\"id\"];\r\n }\r\n else{\r\n $this->save();\r\n $this->id = $db->pdo->lastInsertId();\r\n }\r\n }", "public function byId($id);", "public function byId($id);", "public function byId($id);", "public function byId($id);", "public static function registro($id, $edad, $altura, $peso, $imc){\n\t\t\t$imc = $peso / ($altura * $altura);\n\t\t\t$db=DataBase::getConnect();\n\t\t\t$insert=$db->prepare('INSERT INTO '.self::$sql_tabla.' VALUES (NULL, :edad, :altura, :peso, :imc)');\n\t\t\t$insert->bindValue('edad',$edad);\t\t//uso el $objeto-> en lugar de $this-> ...porque objeto se uso como parametro para tomar sus datos\n\t\t\t$insert->bindValue('altura',$altura);\n\t\t\t$insert->bindValue('peso',$peso);\n\t\t\t$insert->bindValue('imc',$imc);\t//aqui continuo usando una variable local, el metodo que ya hizo el calculo\n\t\t\t$insert->execute();\n\t\t\t//var_dump($persona);\t#test\n\t\t}", "public function getId() ;", "public function traer_registro($id)\n {\n $this->db->where('id_usuario', $id)->from('usuarios'); \n\n $query = $this->db->get(); \n\n $usuario = $query->result(); \n\n if ($usuario){\n return $usuario[0];\n }\n else {\n return null;\n }\n }", "function buscarPorId($id) {\r\n \r\n }", "function get_id(){\n return $this -> id;\n }", "function get_id(){\n return $this -> id;\n }", "public function buscarID()\n {\n $sentencia = \"SELECT id, cl FROM tsreportebocadetubo ORDER BY id DESC LIMIT 1\";\n try {\n $stm = $this->db->prepare($sentencia);\n $stm->execute();\n $registros = $stm->fetchAll(PDO::FETCH_OBJ);\n foreach ($registros as $r) {\n $id = $r->id;\n }\n return $id;\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "public function loadId($id){\n\t\t$model=new Model();\n\t\t$resultado=$model->select(\"SELECT * FROM tb_usuarios WHERE idusuario = :ID\",array(\":ID\"=>$id));\n\t\tif (count($resultado)>0) {\n\t\t\t$this->setData($resultado[0]);\n\t\t}\n\t}", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function save(){\n $resultado = null;\n \n if($this->validate()){\n $id = intval(\\Yii::$app->lugar->crearLugar($this->toArray()));\n $resultado = $this->id = $id;\n \n }else{\n $resultado = false;\n } \n \n return $resultado;\n }", "function get($id) {\r\n //devuelve el objeto entero\r\n $parametros = array();\r\n $parametros[\"id\"] = $id;\r\n $this->bd->select($this->tabla, \"*\", \"id =:id\", $parametros);\r\n $fila = $this->bd->getRow();\r\n $mecanico = new Mecanico();\r\n $mecanico->set($fila);\r\n return $mecanico;\r\n }", "abstract public function getId();", "public function save(){\n\t\t$bd=baseDatos::getInstance();\n\t\t$bd=new baseDatos(BD_USUARIO, BD_CONTRASENA, BD_NOMBRE_BD, BD_SERVIDOR);\n\t\t$bd->connect();\n\t\tif($this->id<>null){\n\t\t$columnas= array('idHotel','nombre','descripcion','cantidadEstrellas','ciudad','direccion','telefono','email','ubicacionFotografia');\n\t\t$valores = array($this->id,$this->nombre, $this->descripcion, $this->cantidadEstrellas, $this->ciudad, $this->direccion, $this->telefono, $this->email, $this->ubicacionFotografia);\n\t\t$filtros=array('idHotel'=>$this->id!= null);\n\t\tif (is_numeric($this->id) && $this->id > 0) {\n\t\t\t$bd->update(self::$tabla, $columnas, $valores, $filtros);\n\t\t} else {\n\t\t\t$bd->insert(self::$tabla, $columnas, $valores);\n\t\t}\n\t\t}else{\n\t\t\t$columnas= array('nombre','descripcion','cantidadEstrellas','ciudad','direccion','telefono','email','ubicacionFotografia');\n\t\t\t$valores = array($this->nombre, $this->descripcion, $this->cantidadEstrellas, $this->ciudad, $this->direccion, $this->telefono, $this->email, $this->ubicacionFotografia);\n\t\t\t$filtros=array('idHotel'=>$this->id!= null);\n\t\t\tif (is_numeric($this->id) && $this->id > 0) {\n\t\t\t\t$bd->update(self::$tabla, $columnas, $valores, $filtros);\n\t\t\t} else {\n\t\t\t\t$bd->insert(self::$tabla, $columnas, $valores);\n\t\t\t}\n\t\t}$bd->disconnect();\n\n\t}", "public function id($id = null);", "public function getId(){return $this->id;}", "public function getId($id=null)\n {\n if ($id != null && is_array($this->livres) && count($this->livres)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE id = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$id]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId($d['id']);\n$this->setTitre($d['titre']);\n$this->setDescription($d['description']);\n$this->setDate($d['date']);\n$this->setClivres_id($d['clivres_id']);\n$this->setAuteur($d['auteur']);\n$this->setPhoto($d['photo']);\n$this->setChemin($d['chemin']);\n$this->livres =$data; \n return $this;\n }\n \n } else {\n return $this->id;\n }\n \n }", "public function rechercherId($id)\n {\n }", "public function load($id){\n\t\t$sql = 'SELECT * FROM cbt_nomor_peserta WHERE id_nomor = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->set($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "public function getId ();", "public function get_id();", "public function get_id();", "public function getId() {return $this->id;}", "function buscar_id($id_autor){\n\t\tinclude 'data_bd.inc';\n\t\tinclude 'databaseClass.php';\n\t\t//creo mi cadena de conexion\n\t\t$conexion = new DB($host, $user, $pass, $bd);\n\t\t//Creo mi conexión\n\t\t$status = $conexion->conectar();\n\t\t//En caso de que devuelva una falla\n\t\tif($status === FALSE){\n\t\t\tdie('No se pudo conectar');\n\t\t}\n\t\t//Creo mi query\n\t\t$consulta = \"SELECT\n\t\t\t\t*\n\t\t\t\tFROM\n\t\t\t\tautor\n\t\t\t\tWHERE id_autor='$id_autor'\";\n\t\t//Ejecuto la consulta\n\t\t$resultado = $conexion -> ejecutarConsulta($consulta);\n\t\t//Si fue una falla\n\t\tif($conexion === FALSE){\n\t\t\t$conexion -> cerrar();\t\n\t\t\treturn FALSE;\n\t\t}\n\t\t//Cierro la conexion\n\t\t$conexion -> cerrar();\n\t\tif($resultado == TRUE)\n\t\t{\n\t\t\trequire('autorClass.php');\n\t\t\t$autor = new Autor($resultado[0]['id_autor'], $resultado[0]['nombre_autor']);\n\t\t\t//Regreso los productos\n\t\t\treturn $autor;\n\t\t}\n\t\telse {\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t}", "public function actionCreateDatos($id) {\n $traza = Traza::VerificarTraza($id); // verifica el guardado de la traza\n if ($traza != 2) {\n Generico::renderTraza($id); //renderiza a la traza\n }\n\n $model = Beneficiario::model()->findByPk($id);\n $estado = new Tblestado;\n $municipio = new Tblmunicipio;\n $parroquia = new Tblparroquia;\n $faovPromedio = ConsultaOracle::getFaov($id, 1); //consulta la funcion faov por id de persona, para mostrar el calculo de promedio\n $faovMensual = ConsultaOracle::getFaov($id, 2); //consulta la funcion faov por id de persona, para mostrar el calculo de ingreso mesual\n $model->ingreso_mensual = ($faovMensual) ? $faovMensual : '0.00';\n $model->ingreso_promedio_faov = ($faovPromedio) ? $faovPromedio : '0.00';\n\n// $consulta = UnidadFamiliar::model()->findByAttributes(array('beneficiario_id' => $id)); // consulta a Unidad Familiar por el id_beneficiario \n//\n// $sqlIngreso = \"select sum(ingreso_mensual) as ingreso from grupo_familiar where unidad_familiar_id=\".$consulta->id_unidad_familiar.\"\"; //consulta que suma cuanto es el ingreso de grupo familiar por id_beneficiario\n// $rowingreso = Yii::app()->db->createCommand($sqlIngreso)->queryRow();\n//// echo '<pre>'; var_dump($rowingreso); die(); \n// $consulta->ingreso_total_familiar=$rowingreso['ingreso']; //insert para unidad familiar ingreso_total_familiar\n// \n// $sqlFaov = \"select count(*) as faov from grupo_familiar where unidad_familiar_id=\".$consulta->id_unidad_familiar.\"\"; //consulta que suma cuantos cotizan en faov del grupo familiar por id_beneficiario\n// $rowFaov = Yii::app()->db->createCommand($sqlFaov)->queryRow();\n// \n// $consulta->total_personas_cotizando=$rowFaov['faov']; //insert para unidad familiar total de personas cotizando\n\n\n if (isset($_POST['Beneficiario']['parroquia_id'])) {\n $model->cedula = 'campo';\n $model->attributes = $_POST['Beneficiario'];\n $model->parroquia_id = $_POST['Beneficiario']['parroquia_id'];\n $model->urban_barrio = $_POST['Beneficiario']['urban_barrio'];\n $model->av_call_esq_carr = $_POST['Beneficiario']['av_call_esq_carr'];\n $model->zona = $_POST['Beneficiario']['zona'];\n $model->condicion_trabajo_id = $_POST['Beneficiario']['condicion_trabajo_id'];\n $model->fuente_ingreso_id = $_POST['Beneficiario']['fuente_ingreso_id'];\n $model->condicion_laboral = $_POST['Beneficiario']['condicion_laboral'];\n $model->sector_trabajo_id = $_POST['Beneficiario']['sector_trabajo_id'];\n $model->nombre_empresa = $_POST['Beneficiario']['nombre_empresa'];\n $model->direccion_empresa = $_POST['Beneficiario']['direccion_empresa'];\n $model->telefono_trabajo = $_POST['Beneficiario']['telefono_trabajo'];\n $model->gen_cargo_id = $_POST['Beneficiario']['gen_cargo_id'];\n $model->observacion = $_POST['Beneficiario']['observacion'];\n $model->estatus_beneficiario_id = 222;\n $model->usuario_id_actualizacion = Yii::app()->user->id;\n\n\n if ($model->save()) {\n\n $IdBeneficiarioTmp = $model->beneficiario_temporal_id;\n $n = BeneficiarioTemporal::model()->updateByPk($IdBeneficiarioTmp, array(\n 'estatus' => 79,\n 'usuario_id_actualizacion' => Yii::app()->user->id,\n 'fecha_actualizacion' => 'now()'\n ));\n\n $idtraza = Traza::ObtenerIdTraza($model->id_beneficiario); // pemite la busqueda de la id de la traza \n $delete = Traza::model()->findByPk($idtraza)->delete();\n\n $this->redirect(array('admin'));\n Yii::app()->end();\n }\n }\n\n $this->render('createDatos', array(\n 'model' => $model, 'municipio' => $municipio, 'estado' => $estado, 'parroquia' => $parroquia,\n ));\n }", "public function saveEntidad(){\n\t\t$conexion = new Database();\n if ($this->codigo){\n $query = sprintf('UPDATE agenda_entidades SET entidad = \"%s\" WHERE entidad_id = %d',\n $this->entidad,\n $this->codigo);\n $rows = $conexion->exec( $query );\n }\n else{\n $query = sprintf('INSERT INTO agenda_entidades(entidad) VALUES (\"%s\")',\n $this->usuario);\n\t\t\t$rows = $conexion->exec( $query );\n $this->codigo = $conexion->lastInsertId();\n }\n }", "function get_id($id){\n\t\t$this->id = $id;\n\t}" ]
[ "0.6769127", "0.6654688", "0.66291237", "0.6497269", "0.6496386", "0.6496386", "0.6496386", "0.6496386", "0.64775115", "0.64483666", "0.644692", "0.6405994", "0.6405457", "0.6405457", "0.639221", "0.63912046", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63842565", "0.63664454", "0.63625103", "0.63588554", "0.6347037", "0.633873", "0.6332164", "0.6324793", "0.6324504", "0.63209385", "0.63101614", "0.6309932", "0.6309932", "0.63002545", "0.629312", "0.6288032", "0.6284958", "0.62690824" ]
0.0
-1
retorna Query para entidade inforamada
public function getQuery ($entity);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function query() {\n \n $this->ensure_my_table();\n \n if ($this->options['operator'] == 'in') {\n $keys = array_keys($this->value);\n\n $this->query->add_where(0, $this->table_alias.'.id IN ('. implode(',', $keys).')' );\n }\n\n }", "public function toQuery();", "function createQuery() ;", "abstract public function query();", "public function query();", "public function query();", "public function query();", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM contenidos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM tbl_empleado';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public static function query();", "public function query(Request $request){ \n $findparam = $this->queryparameter($request);\n $findparam->order_by = 'u.cognome,ASC|d.id,DESC';\n\n $queryBuilder = new QueryBuilder(new CandidatoDomanda, $request, $findparam);\n \n return $queryBuilder->build()->paginate(); \n }", "public static function listaQuery()\n {\n $query = self::find();\n\n if (!Yii::$app->user->isGuest) {\n $query->andWhere(['propietario_id' => Yii::$app->user->id]);\n }\n\n return $query;\n }", "public function getListQuery();", "private function query() {\n return ApplicationSql::query($this->_select, $this->_table, $this->_join, $this->_where, $this->_order, $this->_group, $this->_limit, $this->_offset);\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_nomor_peserta';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM alojamientos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public function query()\n {\n $tujuan_id = $this->tujuan_id;\n $query = tDisposisiDokumen::with('tujuan','tujuan.direksi')->whereIn('dest_doc_id',$tujuan_id);\n \n return $this->applyScopes($query);\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "public function _query()\n {\n }", "function searchTableStatique() {\n include_once('./lib/config.php');\n $table = $_POST['table'];\n $tableStatique = Doctrine_Core::getTable($table);\n $columnNames = $tableStatique->getColumnNames();\n $req = '';\n $param = array();\n $premierPassage = true;\n foreach ($columnNames as $columnName) {\n if ($columnName != 'id') {\n $req .= $premierPassage ? $columnName.' like ? ' : 'and '.$columnName.' like ? ';\n $param[] = $_POST[$columnName].'%';\n $premierPassage = false;\n }\n }\n $search = $tableStatique->findByDql($req, $param);\n echo generateContenuTableStatiqueEntab($table, $tableStatique, $search);\n}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM consultation_vp';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public static function query()\n {\n }", "public abstract function get_query();", "public function query()\n {\n $pagamentos = Pagamento::query()\n ->select([\n 'pagamentos.id',\n 'pagamentos.contrato_id',\n 'pagamentos.numero_documento',\n 'pagamentos.data_emissao',\n 'pagamentos.valor',\n 'pagamentos.notas_fiscal_id',\n 'pagamentos.enviado_integracao',\n 'pagamentos.integrado',\n 'obras.nome as obra',\n 'fornecedores.nome as fornecedor',\n 'pagamento_condicoes.codigo',\n 'documento_financeiro_tipos.codigo_mega',\n ])\n ->join('obras','obras.id','pagamentos.obra_id')\n ->join('fornecedores','fornecedores.id','pagamentos.fornecedor_id')\n ->join('pagamento_condicoes','pagamento_condicoes.id','pagamentos.pagamento_condicao_id')\n ->join('documento_financeiro_tipos','documento_financeiro_tipos.id','pagamentos.documento_financeiro_tipo_id')\n ;\n\n return $this->applyScopes($pagamentos);\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_jadwal_ujian';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "protected function getListQuery()\n {\n // Create a new query object. \n $db = JFactory::getDBO();\n $query = $db->getQuery(true);\n // Select some fields\n $query->select('id,name,email,published,ordering,bio,dob,gender,image');\n // From the hello table\n $query->from('#__helloworld_message');\n \n \n \n $name = $this->getState('filter.name');\n\t\t\t\t\tif (!empty($name)) {\n\t\t\t\t\t\t$name = $db->Quote($db->escape($name));\n\t\t\t\t\t\t$query->where('name = '. $name);\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\treturn $query;\n }", "public function query(): QueryBuilder;", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM elementos';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function consult(){\n\t\t\t$para = array(\"1\"=>1);\n\t\t\tif($this->tipodocum_id_tipodocum != null){\n\t\t\t\t$para[\"tipodocum_id_tipodocum\"] = $this->tipodocum_id_tipodocum;\n\t\t\t}\n\t\t\tif($this->documento != null){\n\t\t\t\t$para[\"documento\"] = $this->documento;\n\t\t\t}\n\t\t\t\n\t\t\t$query = $this->db->get_where(\"paciente\",$para);\n\t\t\treturn $query->result();\n\t\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 Query(){\r\n\t\treturn self::get_query();\r\n\t}", "public function query()\n {\n }", "public function query()\n {\n }", "public function query()\n {\n $insumo_query = Insumo::query();\n # OBRA\n $obra = Obra::find($this->request()->get('obra_id'));\n $insumos = $insumo_query->join('orcamentos', 'orcamentos.insumo_id', '=', 'insumos.id')\n ->where('orcamentos.obra_id', $this->request()->get('obra_id'))\n ->where('orcamentos.ativo', 1);\n\n // Verificar se existe OC aberta deste usuário ou se ele está editando alguma OC (SESSÃO)\n\n #dando prioridade a sessão\n $ordem = null;\n// \\Session::forget('ordemCompra');\n// \\Session::flush('ordemCompra');\n// dd(\\Session::get('ordemCompra'));\n if(\\Session::get('ordemCompra')){\n $ordem = OrdemDeCompra::where('id', \\Session::get('ordemCompra'))\n ->where('oc_status_id', 1)\n ->where('user_id', Auth::user()->id)\n ->where('obra_id', $obra->id)->first();\n }else {\n $ordem = OrdemDeCompra::where('oc_status_id', 1)\n ->where('user_id', Auth::user()->id)\n ->where('obra_id', $obra->id)->first();\n }\n\n $insumos->select(\n [\n 'insumos.id',\n 'insumos.codigo',\n 'insumos.nome',\n DB::raw(\"format(orcamentos.qtd_total,2,'de_DE') as qtd_total\"),\n DB::raw(\"CONCAT(insumos_sub.codigo,' - ' ,insumos_sub.nome) as substitui\"),\n 'orcamentos.id as orcamento_id',\n 'insumos.unidade_sigla',\n 'insumos.insumo_grupo_id',\n 'orcamentos.obra_id',\n 'orcamentos.grupo_id',\n 'orcamentos.subgrupo1_id',\n 'orcamentos.subgrupo2_id',\n 'orcamentos.subgrupo3_id',\n 'orcamentos.servico_id',\n 'orcamentos.preco_total',\n 'orcamentos.preco_unitario',\n 'orcamentos.insumo_incluido',\n 'orcamentos.orcamento_que_substitui',\n DB::raw('(SELECT\n CONCAT(codigo, \\' - \\', nome)\n FROM\n grupos\n WHERE\n orcamentos.grupo_id = grupos.id) AS tooltip_grupo'),\n DB::raw('(SELECT\n CONCAT(codigo, \\' - \\', nome)\n FROM\n grupos\n WHERE\n orcamentos.subgrupo1_id = grupos.id) AS tooltip_subgrupo1'),\n DB::raw('(SELECT\n CONCAT(codigo, \\' - \\', nome)\n FROM\n grupos\n WHERE\n orcamentos.subgrupo2_id = grupos.id) AS tooltip_subgrupo2'),\n DB::raw('(SELECT\n CONCAT(codigo, \\' - \\', nome)\n FROM\n grupos\n WHERE\n orcamentos.subgrupo3_id = grupos.id) AS tooltip_subgrupo3'),\n DB::raw('(SELECT\n CONCAT(codigo, \\' - \\', nome)\n FROM\n servicos\n WHERE\n orcamentos.servico_id = servicos.id) AS tooltip_servico'),\n DB::raw('format((\n orcamentos.qtd_total \n -\n (\n IFNULL(\n (\n SELECT sum(ordem_de_compra_itens.qtd) FROM ordem_de_compra_itens\n JOIN ordem_de_compras\n ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE ordem_de_compra_itens.insumo_id = orcamentos.insumo_id\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (\n ordem_de_compra_itens.aprovado IS NULL\n OR\n ordem_de_compra_itens.aprovado = 1\n )\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compra_itens.data_dispensa IS NULL\n AND ordem_de_compras.obra_id ='. $obra->id .'\n AND ordem_de_compras.oc_status_id != 6\n AND ordem_de_compras.oc_status_id != 4\n ),0\n )\n )\n -\n (\n IFNULL(\n IFNULL(\n (\n SELECT sum(ordem_de_compra_itens.valor_total) FROM ordem_de_compra_itens\n JOIN ordem_de_compras\n ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE \n ordem_de_compra_itens.insumo_id in\n (\n SELECT \n insumo_id\n FROM\n orcamentos as OrcSub\n WHERE\n OrcSub.orcamento_que_substitui = orcamentos.id\n )\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (\n ordem_de_compra_itens.aprovado IS NULL\n OR\n ordem_de_compra_itens.aprovado = 1\n )\n AND ordem_de_compra_itens.data_dispensa IS NULL\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compras.obra_id ='. $obra->id .'\n AND ordem_de_compras.oc_status_id != 6\n AND ordem_de_compras.oc_status_id != 4\n ),0\n ),0\n \n / orcamentos.preco_unitario\n \n )\n )\n ),2,\\'de_DE\\') as saldo'),\n // Colocar a OC se existir em aberto ou em sessão\n DB::raw('format((\n SELECT ordem_de_compra_itens.qtd FROM ordem_de_compra_itens\n JOIN ordem_de_compras\n ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE ordem_de_compra_itens.insumo_id = insumos.id\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (\n ordem_de_compra_itens.aprovado IS NULL\n OR\n ordem_de_compra_itens.aprovado = 0\n )\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compras.obra_id ='. $obra->id .'\n AND ordem_de_compras.oc_status_id = 1\n '.($ordem ? ' AND ordem_de_compras.id ='. $ordem->id .' ': 'AND ordem_de_compras.id = 0').'\n ),2,\\'de_DE\\') as quantidade_compra'),\n DB::raw('format((\n SELECT ordem_de_compra_itens.qtd FROM ordem_de_compra_itens\n JOIN ordem_de_compras\n ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE ordem_de_compra_itens.insumo_id = insumos.id\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (\n ordem_de_compra_itens.aprovado IS NULL\n OR\n ordem_de_compra_itens.aprovado = 0\n )\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compras.obra_id ='. $obra->id .'\n AND ordem_de_compras.oc_status_id = 1\n '.($ordem ? ' AND ordem_de_compras.id ='. $ordem->id .' ': 'AND ordem_de_compras.id = 0').'\n ),2,\\'de_DE\\') as quantidade_comprada'),\n DB::raw('(SELECT total FROM ordem_de_compra_itens\n JOIN ordem_de_compras\n ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE ordem_de_compra_itens.insumo_id = insumos.id\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (\n ordem_de_compra_itens.aprovado IS NULL\n OR\n ordem_de_compra_itens.aprovado = 0\n )\n AND ordem_de_compra_itens.aprovado IS NULL\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compras.oc_status_id = 1\n '.($ordem ? ' AND ordem_de_compras.id ='. $ordem->id .' ': 'AND ordem_de_compras.id = 0').'\n AND ordem_de_compra_itens.obra_id ='. $obra->id .' ) as total'),\n DB::raw('(SELECT motivo_nao_finaliza_obra FROM ordem_de_compra_itens\n JOIN ordem_de_compras\n ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE ordem_de_compra_itens.insumo_id = insumos.id\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (\n ordem_de_compra_itens.aprovado IS NULL\n OR\n ordem_de_compra_itens.aprovado = 0\n )\n AND ordem_de_compra_itens.aprovado IS NULL\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compras.oc_status_id = 1\n '.($ordem ? ' AND ordem_de_compras.id ='. $ordem->id .' ': 'AND ordem_de_compras.id = 0').'\n AND ordem_de_compra_itens.obra_id ='. $obra->id .' ) as motivo_nao_finaliza_obra'),\n ]\n )\n ->whereNotNull('orcamentos.qtd_total')\n ->where(DB::raw('IFNULL(\n (SELECT\n ordem_de_compras.oc_status_id\n FROM\n ordem_de_compra_itens\n JOIN\n ordem_de_compras ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE\n ordem_de_compra_itens.insumo_id = orcamentos.insumo_id\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (ordem_de_compra_itens.aprovado IS NULL\n OR ordem_de_compra_itens.aprovado = 1)\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compras.obra_id = '. $obra->id .'\n AND ordem_de_compras.oc_status_id != 6\n AND ordem_de_compras.oc_status_id != 4\n AND orcamentos.orcamento_que_substitui IS NOT NULL\n LIMIT 1\n )\n , 1)'), 1)\n ->where('orcamentos.ativo', 1);\n\n $insumo_query->leftJoin(DB::raw('orcamentos orcamentos_sub'), 'orcamentos_sub.id', 'orcamentos.orcamento_que_substitui');\n //ex: left join insumos insumos_sub on `insumos_sub`.`id` = `orcamentos_sub`.`insumo_id` \n\t\t$insumo_query->leftJoin(DB::raw('insumos insumos_sub'), 'insumos_sub.id', 'orcamentos_sub.insumo_id');\n\t\t$insumo_query->leftJoin(DB::raw('carteira_insumos'), 'insumos.id', 'carteira_insumos.insumo_id');\n\t\t$insumo_query->leftJoin(DB::raw('carteiras'), 'carteiras.id', 'carteira_insumos.carteira_id');\n\n if ($this->request()->get('grupo_id')) {\n if (count($this->request()->get('grupo_id')) && $this->request()->get('grupo_id')[0] != \"\") {\n $insumo_query->where('orcamentos.grupo_id', $this->request()->get('grupo_id'));\n }\n }\n\n if($this->request()->get('subgrupo1_id')){\n if(count($this->request()->get('subgrupo1_id')) && $this->request()->get('subgrupo1_id')[0] != \"\") {\n $insumo_query->where('orcamentos.subgrupo1_id', $this->request()->get('subgrupo1_id'));\n }\n }\n if($this->request()->get('subgrupo2_id')){\n if(count($this->request()->get('subgrupo2_id')) && $this->request()->get('subgrupo2_id')[0] != \"\") {\n $insumo_query->where('orcamentos.subgrupo2_id', $this->request()->get('subgrupo2_id'));\n }\n }\n if($this->request()->get('subgrupo3_id')){\n if(count($this->request()->get('subgrupo3_id')) && $this->request()->get('subgrupo3_id')[0] != \"\") {\n $insumo_query->where('orcamentos.subgrupo3_id', $this->request()->get('subgrupo3_id'));\n }\n }\n if($this->request()->get('servico_id')){\n if(count($this->request()->get('servico_id')) && $this->request()->get('servico_id')[0] != \"\") {\n $insumo_query->where('orcamentos.servico_id', $this->request()->get('servico_id'));\n }\n }\n if($this->request()->get('planejamento_id')){\n if(count($this->request()->get('planejamento_id')) && $this->request()->get('planejamento_id')[0] != \"\") {\n $insumo_query->join('planejamento_compras', function ($join) {\n $join->on('planejamento_compras.grupo_id', 'orcamentos.grupo_id');\n $join->on('planejamento_compras.subgrupo1_id', 'orcamentos.subgrupo1_id');\n $join->on('planejamento_compras.subgrupo2_id', 'orcamentos.subgrupo2_id');\n $join->on('planejamento_compras.subgrupo3_id', 'orcamentos.subgrupo3_id');\n $join->on('planejamento_compras.servico_id', 'orcamentos.servico_id');\n $join->on('planejamento_compras.insumo_id', 'orcamentos.insumo_id');\n })\n ->where('planejamento_compras.planejamento_id', $this->request()->get('planejamento_id'))\n ->whereNull('planejamento_compras.deleted_at');\n }\n }\n\t\t\n if($this->request()->get('insumo_grupos_id')){\n if(count($this->request()->get('insumo_grupos_id')) && $this->request()->get('insumo_grupos_id')[0] != \"\") {\n $insumo_query->where('insumos.insumo_grupo_id', $this->request()->get('insumo_grupos_id'));\n }\n }\n\t\t\n\t\tif($this->request()->get('carteira_id')){\n if(count($this->request()->get('carteira_id')) && $this->request()->get('carteira_id')[0] != \"\") {\n $insumo_query->where('carteiras.id', $this->request()->get('carteira_id'));\n }\n }\n\n//\t\tif($this->request()->get('exibir_por_carteira')){\n// if(count($this->request()->get('exibir_por_carteira')) && $this->request()->get('exibir_por_carteira')[0] != \"\") {\n// $insumo_query->groupBy('carteiras.nome');\n// }\n// }\n\n Session::put(['query['.$this->request()->get('random').']' => $insumo_query->toSql(), 'bindings['.$this->request()->get('random').']' => $insumo_query->getBindings()]);\n\n return $this->applyScopes($insumo_query);\n }", "public function Query() {\n \n }", "protected function getListQuery()\n {\n $db = JFactory::getDBO();\n $query = $db->getQuery(true);\n // Select some fields\n $query->select('*');\n // From the hello table\n $query->from('#__workerstatus_persons');\n return $query;\n }", "function getByEncomienda($encomienda) {\n $db = $this->getAdapter();\n $db->setFetchMode ( Zend_Db::FETCH_OBJ );\n $select = $db->select();\n $select->distinct(true);\n $select->from(array('i' => 'item_encomienda'), array(\"id_item_encomienda\",\"cantidad\", \"detalle\", \"monto\", \"peso\"));\n $select->where(\"i.encomienda='$encomienda' AND i.estado='Activo'\");\n \n// echo $select->__toString();\n $log = Zend_Registry::get(\"log\");\n $log->info(\"recuperando manifiestos :\" . $select->__toString());\n return $db->fetchAll($select);\n }", "public function getQuery()\n {\n throw new \\Exception('No database query in HasOneOrManyBy');\n }", "function queryCobrador_FULL($idCobrador_){\n global $db; \n $dataQuery = array();\n \n $db->where('id_cobrador', $idCobrador_); \n $queryTbl = $db->get (\"cobrador_tbl\", 1, \"id_cobrador, nombre_cobrador, mail_cobrador, tel_uno_cobrador, tel_dos_cobrador, direccion_cobrador, ciudad_cobrador\");\n \n $rowQueryTbl = count($queryTbl);\n if ($rowQueryTbl > 0){ \n foreach ($queryTbl as $qKey) { \n $dataQuery = $qKey;\n } \n return $dataQuery;\n }\n}", "public function query()\n\t{\n\t\t\n\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM recibo';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function query() {\n\n }", "public function newQuery();", "public function Query(){\n\t}", "public function Query(){\n\t}", "public function Query(){\n\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_soal_siswa';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function consulta(){\n\n $this->db->select(\"*\");\n $this->db->from(\"empleados\");\n\n /*\n if( $this->session->userdata('perfil') != \"admin\"){\n $this->db->where( $where );\n }\n */\n\n // El get() se utiliza para ejecutar el query.\n $resultado = $this->db->get();\n\n // El result() se utiliza para enviar solamente los datos de la consulta.\n return $resultado->result();\n\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM telefonos';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM turma_disciplina';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function getQueryBuilder();", "public function getQueryBuilder();", "private function _generateQuery() {\n\t\t// vyhodnoceni odeslanych filtracnich dat\n\t\t$filterObj = $this->getRequest()->getParam(\"_filter\", null);\n\t\t$uuid = $this->getRequest()->getParam(\"id\", null);\n\t\t$uuids = $this->getRequest()->getParam(\"_uuids\", null);\n\t\t\n\t\t// vyhodnoceni stavu\n\t\tif ($uuid) {\n\t\t\t// uuid byl odeslan primo v requestu\n\t\t\t$this->_queryObject = array($uuid);\n\t\t\t\n\t\t\treturn;\n\t\t} elseif ($uuids) {\n\t\t\t// byl odeslan seznam uuid\n\t\t\t$this->_queryObject = (array) $uuids;\n\t\t\t\n\t\t\treturn;\n\t\t} elseif (!$filterObj) {\n\t\t\t// zadna z moznosti nebyla vyuzita\n\t\t\t$this->_queryObject = array();\n\t\t}\n\t\t\n\t\t/**\n\t\t * pokud program dosel az sem, byl odeslan plnohodnotny filtracni objekt\n\t\t */ \n\t\t\n\t\t// reset referenci\n\t\tBB_Db_Query_Reference::clearTables();\n\t\t\n\t\t// vytvoreni filtracniho objektu a ziskani seznamu tabulek\n\t\t$queryObj = BB_Db_Query_Factory::factory($filterObj);\n\t\t$tableNames = BB_Db_Query_Reference::getTables();\n\t\t\n\t\t// vygenerovani seznamu pouzitych sloupcu z index\n\t\t$usedColumns = $this->getRequest()->getParam(\"_uuidColumns\", array());\n\t\t$usedColumns = (array) $usedColumns;\n\t\t\n\t\tif (!$usedColumns) {\n\t\t\t// seznam pouzitych sloupci je prazdny - toto neni pripustne\n\t\t\tthrow new Zend_Exception(\"UUID_COLUMNS_NOT_SET\", 400);\n\t\t}\n\t\t\n\t\t$usedReferences = array();\n\t\t\n\t\tforeach ($usedColumns as $column) {\n\t\t\t$reference = new BB_Db_Query_Reference($column);\n\t\t\t\n\t\t\t// kontrola jestli je tabulka v seznamu\n\t\t\tif (!in_array($reference->getTable(), $tableNames)) {\n\t\t\t\t// tabulka neni v seznamu, vyhodi se chyba\n\t\t\t\tthrow new Zend_Exception(\"UNKNOWN_INDEX_UUID_COLUMN\", 400);\n\t\t\t}\n\t\t\t\n\t\t\t$usedReferences[] = new BB_Db_Query_Reference($column);\n\t\t}\n\t\t\n\t\t// anulace statickych vlastnosti reference\n\t\tBB_Db_Query_Reference::clearTables();\n\t\t\n\t\t// vygenerovani infomraci pro filtraci dat\n\t\t$filterData = new stdClass;\n\t\t\n\t\t$filterData->columns = $usedReferences;\n\t\t$filterData->query = $queryObj;\n\t\t$filterData->tables = $tableNames;\n\t\t\n\t\t// nastaveni objektu\n\t\t$this->_queryObject = $filterData;\n\t\t\n\t\treturn $this;\n\t}", "public function query() {\n /** @var Sql $query */\n $query = $this->query;\n\n $configuration = array(\n 'table' => 'node_field_revision',\n 'field' => 'vid',\n 'left_table' => 'node_field_data',\n 'left_field' => 'vid',\n 'operator' => '=',\n 'type'=>'INNER',\n 'left_query' => 'select max(vid) from node_field_revision where nid = nfr.nid',\n 'extra' => 'node_field_data.nid = nfr.nid',\n );\n\n /** @var Subquery $join */\n $join = Views::pluginManager('join')->createInstance('subquery', $configuration);\n\n $query->addRelationship(\"nfr\", $join ,'node_field_revision' );\n $query->addWhere(0, 'nfr.moderation_state', $this->value, 'IN');\n }", "public function analisa()\n {\n \n $this->db->select('*');\n $this->db->from('analisa');\n \n $query = $this->db->get();\n return $query;\n }", "public function queryBuilder();", "public function queryBuilder();", "function obtener_inf_cliente(){\n $sql=\"select c.id_cliente,c.razon_social \n from cliente c\n \";\n \n $consulta =$this->db->query($sql);\n return $consulta;\n }", "function expedientesQry() {\n $query = $this->db->query(\"select exp.nExpedienteId,exp.nExpedienteCodigo,exp.cExpedienteFechaRegistro,\nexp.cExpedienteSumilla,exp.cExpedienteAsunto,cExpedienteFolios,exp.nPerId,\nconcat(p.cPerApellidoPaterno,' ',p.cPerApellidoMaterno,' ',p.cPerNombres) as \nsolicitante,tipoexp.cTipexpedienteDescripcion,tra.cTramiteTitulo,exp.nEstadoProveido\n,exp.cExpedienteObservacion,exp.cExpedienteEstado\nfrom tb_sistram_expediente as exp inner join tb_sistram_tipo_expediente as \ntipoexp on exp.nTipo_expedienteId = tipoexp.nTipexpedienteId\ninner join tb_sistram_tramite as tra on exp.nTramiteId=tra.nTramiteId \ninner join persona as p on exp.nPerId=p.nPerId\nwhere exp.nEstadoProveido=0 and bPdeEliminado=1 order by exp.cExpedienteFechaRegistro\");\n\n if ($query) {\n if ($query->num_rows() > 0) {\n return $query->result();\n } else {\n return null;\n }\n } else {\n throw new Exception('error al recuperar datos de la BD');\n }\n }", "public function producto_tralado_por_id($id_producto,$id_ingreso){\n $conectar= parent::conexion();\n $sql=\"select p.modelo,p.marca,p.medidas,p.color,e.id_producto,e.id_ingreso,e.categoriaub,e.stock from producto as p inner join existencias as e on p.id_producto=e.id_producto and e.id_producto=? and id_ingreso=?\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1, $id_producto);\n $sql->bindValue(2, $id_ingreso);\n $sql->execute();\n return $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}", "public function opini()\n {\n \n $this->db->select('*');\n $this->db->from('opini');\n \n $query = $this->db->get();\n return $query;\n }", "public function createQuery($data);", "protected function getListQuery() {\n // Create a new query object.\n $db = $this->getDbo();\n $query = $db->getQuery(true);\n\n // Select the required fields from the table.\n $query->select(\n $this->getState(\n 'list.select', 'a.*'\n )\n );\n $query->from('`#__breedable` AS a');\n\n \n\t\t// Join over the users for the checked out user\n\t\t$query->select(\"uc.name AS editor\");\n\t\t$query->join(\"LEFT\", \"#__users AS uc ON uc.id=a.checked_out\");\n\t\t// Join over the category 'breedable_type'\n\t\t$query->select('breedable_type.title AS breedable_type');\n\t\t$query->join('LEFT', '#__categories AS breedable_type ON breedable_type.id = a.breedable_type');\n\t\t// Join over the user field 'created_by'\n\t\t$query->select('created_by.name AS created_by');\n\t\t$query->join('LEFT', '#__users AS created_by ON created_by.id = a.created_by');\n\n \n\n // Filter by search in title\n $search = $this->getState('filter.search');\n if (!empty($search)) {\n if (stripos($search, 'id:') === 0) {\n $query->where('a.id = ' . (int) substr($search, 3));\n } else {\n $search = $db->Quote('%' . $db->escape($search, true) . '%');\n\t\t\t\t$query->where('( a.status LIKE '.$search.' OR a.id LIKE '.$search.' OR a.breedable_name LIKE '.$search.' OR a.mother_name LIKE '.$search.' OR a.father_name LIKE '.$search.' OR a.owner_name LIKE '.$search.' OR a.owner_key LIKE '.$search.' OR a.breedable_gender LIKE '.$search.' )');\n \n }\n }\n\n\t\t//Filtering owner_name\n\t\t$filter_owner_name = $this->state->get(\"filter.owner_name\");\n\t\tif ($filter_owner_name != '') {\n\t\t\t$query->where(\"a.owner_name = '\".$db->escape($filter_owner_name).\"'\");\n\t\t}\n\t\t//Filtering status\n\n\t\t//Filtering generation\n\n\t\t//Filtering breedable_gender\n\t\t$filter_breedable_gender = $this->state->get(\"filter.breedable_gender\");\n\t\tif ($filter_breedable_gender != '') {\n\t\t\t$query->where(\"a.breedable_gender = '\".$db->escape($filter_breedable_gender).\"'\");\n\t\t}\n\n\t\t//Filtering breedable_eyes\n\n\t\t//Filtering breedable_fevor\n\n\t\t//Filtering breedable_pregnant\n\n\n // Add the list ordering clause.\n $orderCol = $this->state->get('list.ordering');\n $orderDirn = $this->state->get('list.direction');\n if ($orderCol && $orderDirn) {\n $query->order($db->escape($orderCol . ' ' . $orderDirn));\n }\n\n return $query;\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM office';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM clientes';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}" ]
[ "0.70795757", "0.66988665", "0.6686787", "0.667608", "0.66729075", "0.66729075", "0.66729075", "0.66333383", "0.6571198", "0.6558071", "0.6552323", "0.654137", "0.6534297", "0.65267986", "0.65240705", "0.65229434", "0.65067303", "0.64471126", "0.64471126", "0.64471126", "0.64471126", "0.64471126", "0.64471126", "0.64471126", "0.64471126", "0.64471126", "0.6392063", "0.6392063", "0.6392063", "0.6390833", "0.63320106", "0.6308254", "0.630741", "0.630319", "0.62901956", "0.62800485", "0.6273425", "0.6265866", "0.625822", "0.62425345", "0.6231461", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6229454", "0.6219774", "0.6215224", "0.6215224", "0.62066746", "0.6206214", "0.62037784", "0.6201252", "0.61898845", "0.61860687", "0.6183282", "0.61785907", "0.6154935", "0.6154119", "0.6147211", "0.6147211", "0.6147211", "0.61386865", "0.6133829", "0.6119421", "0.6115074", "0.61084497", "0.61084497", "0.6107376", "0.60996675", "0.60982233", "0.60884017", "0.60884017", "0.60807997", "0.6066492", "0.6063794", "0.60449433", "0.6040679", "0.6020325", "0.6005528", "0.59938496" ]
0.0
-1
Retorna uma entidade referente ao ValueObject informado, opcionalmente, uma relacao de colunas podera ser informada, limintando a relacao original de Entity. Persistable::getEntity(ValueObjectAbstract $valueObject [, array(string, colunm1, string column2)]) Persistable::getEntity(array(string 'alias' => ValueObjectAbstract $valueObject [, array(string, colunm1, string column2)])
public function getEntity ($entity, array $columns = array());
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function toEntity($value);", "private function createEntityAlias($alias)\n {\n return array_map([$this, 'createEntityValue'], $alias);\n }", "public function getEntity();", "public function getEntity();", "public function getEntity();", "function getEntity() {\n if (!empty($this->entity_id) && !empty($this->entity_type) && entity_get_info($this->entity_type)) {\n // Create an array because array_shift passes in by reference.\n $entities = entity_load($this->entity_type, array($this->entity_id));\n return array_shift($entities);\n }\n }", "abstract protected function getEntity();", "public function getEntity()\n\t{\n\t\treturn new $this->entity();\n\t}", "protected function _rowToEntity($row) {\r\n \t$id = $row->{$this->_getPrimary()};\r\n \t\r\n \tif($this->_hasIdentity($id)) {\r\n \t\t$entity = $this->_getIdentity($id);\r\n \t}\r\n \telse {\r\n \t\t$entity = $this->create();\r\n \t\r\n\t\t\tforeach($entity->getAttributes() as $name) {\r\n\t\t\t\tif($this->_isReference($name)) {\r\n\t\t\t\t\t$refId = $row->{$this->_getReferenceField($name)};\r\n\t \t\t\tif($this->_referenceMap[$name]['earlyLoad']) {\r\n\t \t\t\t\t$entity->{$name} = $this->getReferenceEntity($name, $refId);\r\n\t \t\t\t}\r\n\t \t\t\t// Register the id on the entity for lazy load\r\n\t \t\t\telse {\r\n\t \t\t\t\t$entity->addLazyReference($name, $refId);\r\n\t \t\t\t}\r\n\t \t\t}\r\n\t \t\telseif($this->_isDependence($name)) {\r\n\t \t\t\tif($this->_dependenciesMap[$name]['earlyLoad']) {\r\n\t \t\t\t\t$entity->{$name} = $this->getDependentEntities($name, $id);\r\n\t \t\t\t}\r\n\t \t\t\telse {\r\n\t \t\t\t\t$entity->addLazyDependencies($name);\r\n\t \t\t\t}\r\n\t \t\t}\r\n\t \t\telse {\r\n\t \t\t\t$entity->{$name} = $row->{$name};\r\n\t \t\t}\r\n\t \t}\r\n\t \t$this->_setIdentity($id, $entity);\r\n \t}\r\n \t\r\n \treturn $entity;\r\n }", "public function getEntity($value, array $params = array());", "function _convert_to_entity($stdObject)\n {\n // Add name of the id_field to the entity, and convert\n // the ID to an integer\n $stdObject->id_field = $key = $this->object->get_primary_key_column();\n // Cast columns to their appropriate data type\n $this->cast_columns($stdObject);\n // Strip slashes\n $this->strip_slashes($stdObject);\n // Unserialize columns\n $this->unserialize_columns($stdObject);\n // Set defaults for this entity\n if (!$this->has_default_values($stdObject)) {\n $this->object->set_defaults($stdObject);\n $stdObject->__defaults_set = TRUE;\n }\n return $stdObject;\n }", "public function getEntity()\n\t{\n\t\treturn $this->hasKey() ? $this->database->find($this->key) : null;\n\t}", "abstract function getEntity();", "public function getEntity($name);", "public function getEntity(): object\n {\n $entity = $this->entityManager->getRepository($this->className)->find($this->id);\n if (!$entity) {\n throw new Error('Entity not found for class `' . $this->className . '` and ID `' . $this->id . '`.');\n }\n\n return $entity;\n }", "public function getEntity( )\n {\n\n return $this->entity;\n\n }", "public function getEntity() {\n\t\treturn get_entity($this->entity_guid);\n\t}", "public function current()\n\t{\n\t\t$row = $this->databaseResult->current();\n\n\t\tif ($row === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$entity = clone $this->baseEntity;\n\n\t\t$tableName = $entity->getEntityTableName();\n\n\t\t$entityData = $this->getValuesByKeyPrefix($row, \"{$tableName}:\");\n\n\t\t$entity->hydrateEntity($entityData);\n\t\t$entity->setDatabase($this->databaseConnection);\n\n\t\tif ($entity instanceof RelatedEntity) {\n\n\t\t\t$relationships = $entity->getEntityRelationships();\n\n\t\t\tforeach ($relationships as $relationship) {\n\t\t\t\t\n\t\t\t\t$data = $this->getValuesByKeyPrefix($row, \"{$relationship['name']}:\");\n\n\t\t\t\tif (empty($data)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$relatedEntity = new $relationship['class'];\n\t\t\t\t$relatedEntity->hydrateEntity($data);\n\t\t\t\t$relatedEntity->setDatabase($this->databaseConnection);\n\t\t\t\t\n\t\t\t\t$entity->setRelatedEntity($relationship['name'], $relatedEntity);\n\n\t\t\t\t// TODO: link related entity back to entity\n\t\t\t}\n\n\t\t}\n\n\t\treturn $entity;\n\t}", "public function getEntity()\n\t{\n\t \treturn $this->entity;\n\t}", "public function getEntity() {\n return $this->entity;\n }", "public function treatEntity() {\n foreach ($this->entity as $columnName => &$column) {\n if (($column['contraint'] != 'pk' || $column['is_null'] == 'YES') && empty($column['value'])) {\n $column['value'] = 'NULL';\n } else if (!empty($column['value'])) {\n\n if ($column['type'] == 'numeric') {\n $column['value'] = str_replace('.', '', $column['value']);\n $column['value'] = (float) str_replace(',', '.', $column['value']);\n }\n //\n if ($column['type'] == 'date') {\n $dateExplode = explode(\"/\", $column['value']);\n $column['value'] = \"'\" . implode(\"-\", array_reverse($dateExplode)) . \"'\";\n } elseif ($column['type'] == 'timestamp without time zone' && strpos($column['value'], '/')) {\n $column['value'] = addslashes($column['value']);\n if (strpos($column['value'], ':')) {\n $dateExplode = explode(\" \", $column['value']);\n $dateExplode[0] = explode(\"/\", $dateExplode[0]);\n $column['value'] = \"'\" . implode(\"-\", array_reverse($dateExplode[0])) . ' ' . $dateExplode[1] . \"'\";\n } else {\n $dateExplode = explode(\"/\", $column['value']);\n $column['value'] = \"'\" . implode(\"-\", array_reverse($dateExplode)) . \"'\";\n }\n } else {\n $column['value'] = addslashes($column['value']);\n $column['value'] = \"'{$column['value']}'\";\n }\n }\n }\n }", "public function getEntity()\r\n {\r\n return $this->entity;\r\n }", "public function getEntity()\n {\n return $this->parameters['hipay.entity'];\n }", "public function getEntity()\n {\n return $this->entity;\n }", "public function getEntity()\n {\n return $this->entity;\n }", "public function getEntity()\n {\n return $this->entity;\n }", "protected function getEntity() {\n return $this->getContextValue('entity');\n }", "public function hydrate(string $className, array $data): EntityInterface;", "public function getEntity()\n {\n return $this->_entity;\n }", "abstract public function toEntity(array $data): ?EntityInterface;", "private function getEntity($entityType = '')\n {\n if (empty($this->dataMapperEntity)) {\n if (empty($entityType)) {\n throw new \\Exception(\n 'No entity type given'\n );\n }\n if (!isset($this->dataMappers[$entityType])) {\n throw new \\LogicException(\n 'There is no such data mapper: ' . $entityType\n );\n }\n $dataMapperClass = $this->dataMappers[$entityType];\n $this->dataMapperEntity = $this->objectManager->create($dataMapperClass);\n if (!($this->dataMapperEntity instanceof DataMapperInterface)) {\n throw new \\InvalidArgumentException(\n 'Data mapper must implement \\Magento\\Elasticsearch\\Model\\Adapter\\DataMapperInterface'\n );\n }\n }\n return $this->dataMapperEntity;\n }", "private function createEntityValue($value)\n {\n return new EntityValue($value);\n }", "public function entity()\n {\n $data = $this->morphMany('\\ApprovalSequence\\Models\\Entity', 'entity')->get();\n $data = $data->map(function ($item) {\n return $item->entity;\n });\n return $data;\n }", "public static function &entityInfo($entity_name)\n\t{\n\t\tif(isset(self::$entity_info[$entity_name])) {\n\t\t\treturn self::$entity_info[$entity_name];\n\t\t}\n\t\t\n\t\t$class = Collection::loadEntity($entity_name);\n\t\t\n\t\tif(class_exists($class)) {\n\t\t\t$object = new $class($entity_name);\n\t\t\t\n\t\t\tif(!is_subclass_of($object, Orm::ENTITY_BASE_CLASS) && get_class($object) != Orm::ENTITY_BASE_CLASS) {\n\t\t\t\tthrow new BakedCarrotOrmException(\"Class $class is not a subclass of \" . Orm::ENTITY_BASE_CLASS);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$class = Orm::ENTITY_BASE_CLASS;\n\t\t\t$object = new $class($entity_name);\n\t\t}\n\t\t\n\t\tself::$entity_info[$entity_name] = $object->info();\n\t\t\n\t\tunset($object);\n\t\t\n\t\treturn self::$entity_info[$entity_name];\n\t}", "public function getEntity(): Entity {\n return $this->entity;\n }", "public function asDomainEntity()\n {\n return $this->app['company.repository']->find($this->getUID());\n }", "public function transform(Model $model): EntityInterface;", "protected function getEntityFromStorage() {\n $entity_type = $this->store->get('entity_type');\n $entity_id = $this->store->get('entity_id');\n\n /** @var \\Drupal\\Core\\Entity\\EntityInterface $entity */\n $entity = $this->entityTypeManager()->getStorage($entity_type)\n ->load($entity_id);\n\n return $entity;\n }", "protected abstract function getEntity(): string;", "public function getExistingEntity(string $className, $pkValues): ?object\n {\n if (!is_iterable($pkValues)) {\n $pkValues = [$pkValues];\n }\n\n return $this->entityTracker->getEntity($className, $pkValues);\n }", "public function GetEntity(){\n\t\treturn $this->_entity;\n\t}", "public function getSourceEntity();", "public function entity() {\n\t\t$assoc = ($this->association) ? $this->association : $this->model;\n\t\tif (!empty($this->entityPath)) {\n\t\t\t$path = explode('.', $this->entityPath);\n\t\t\t$count = count($path);\n\t\t\tif ($count !== 3) {\n\t\t\t\treturn parent::entity();\n\t\t\t}\n\t\t\treturn Set::filter($path);\n\t\t}\n\t\treturn parent::entity();\n\t}", "public function toEntity($array);", "public function toEntity($array);", "public function getEntity() {\n\t\tif (!isset($this->_entityInstance)) {\n\t\t\tif (!$this->getEntityId()) {\n\t\t\t\tthrow new Nette\\InvalidStateException(\"\");\n\t\t\t}\n\t\t\t//$entityName = parent::getEntity();\n\t\t\t$entityName = $this->defaultGetter('entity'); // Because of PHP<5.3.4\n\t\t\t$this->_entityInstance = $this->createEntityInstance($entityName);\n\t\t}\n\t\treturn $this->_entityInstance;\n\t}", "public function getEntity()\n {\n return isset($this->entity) ? $this->entity : null;\n }", "public function getEntityValues($pk = true) {\n $entityValues = array();\n foreach ($this->entity as $columnName => $column) {\n\n if (($column['contraint'] == 'pk' && $pk == true) || ($column['contraint'] != 'pk')) {\n $entityValues[$columnName] = $column['value'];\n }\n }\n\n return $entityValues;\n }", "public function getEntity()\n {\n if (empty($this->_data['entity'])) {\n Mage::throwException(Mage::helper('storelocator')->__('Entity is unknown'));\n }\n\n return $this->_data['entity'];\n }", "public function getEntityClone()\n {\n return $this->entity;\n }", "protected function fetchObject(string $className = 'stdClass')\n {\n $row = oci_fetch_object($this->resultID);\n\n if ($className === 'stdClass' || ! $row) {\n return $row;\n }\n if (is_subclass_of($className, Entity::class)) {\n return (new $className())->injectRawData((array) $row);\n }\n\n $instance = new $className();\n\n foreach (get_object_vars($row) as $key => $value) {\n $instance->{$key} = $value;\n }\n\n return $instance;\n }", "public function getEntityMetadata(string $className): Entity\n {\n if (!isset($this->entities[$className])) {\n $originalMetadata = $this->getMetadata($className);\n $fields = $this->getFields($className);\n $identifier = $this->getIdentifier($className, $fields);\n $mappings = $this->getMappings($className);\n $this->entities[$className] = new Entity(\n $className,\n $originalMetadata->getTableName(),\n $identifier,\n $fields,\n $mappings\n );\n }\n return $this->entities[$className];\n }", "public function getId_entity($id_entity=null)\n {\n if ($id_entity != null && is_array($this->entity) && count($this->entity)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE id_entity = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$id_entity]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId_entity($d['id_entity']);\n$this->setLabel($d['label']);\n$this->setDomaine($d['domaine']);\n$this->setEmail($d['email']);\n$this->setPhone_number($d['phone_number']);\n$this->setBp($d['bp']);\n$this->setLocalisation($d['localisation']);\n$this->setVille($d['ville']);\n$this->setUniqueId($d['uniqueId']);\n$this->setCreated_at($d['created_at']);\n$this->setCreated_by($d['created_by']);\n$this->setUpdate_at($d['update_at']);\n$this->setUpdate_by($d['update_by']);\n$this->entity =$data; \n return $this;\n }\n \n } else {\n return $this->id_entity;\n }\n \n }", "public function getBy(array $where): ?IEntity;", "public function entity ()\n {\n return $this->_entity;\n }", "public function entity()\r\n {\r\n return $this->entity;\r\n }", "public function getEntity( $objid = null )\n {\n\n return $this->getEntityWbfsysEntityTag( $objid );\n\n }", "private function _extGetValue($aliasName, $autoNew = false)\n {\n // Como funciona:\n // Usuário chamou ->getValue(categObj) (aliasName definido anteriormente em addExt)\n // O retorno será um objeto, carregado ou não, desse elemento\n //\n // Se o objeto não estiver carregado e categ_id estiver em branco, um novo objeto será\n // criado e disponibilizado para uso.\n //\n // Se o objeto não estiver criado, mas existir categ_id, então o sistema tentará executar\n // um ::load no ID em questão. Em caso de sucesso, um objeto carregado com isLoaded() será\n // retornado. Se o ::load falhar e $autoNew existir, um novo objeto em branco será retornado,\n // e o categ_id será totalmente ignorado (será substituído pelo id deste novo objeto, se o mesmo for salvo)\n //\n // Se o objeto já estiver criado, este objeto será retornado, mantendo sempre o mesmo.\n //\n // Vale lembrar que, se o valor de categ_id for alterado com setValue(categ_id, ...), o objeto\n // criado será eliminado, e dados podem ser perdidos.\n //\n $className = get_called_class();\n $extItem = self::structGet('fieldProps', 'external', $aliasName);\n $extClassName = is_string($extItem['className']) ? $extItem['className'] : $extItem['className']($this);\n $type = $extItem['type'];\n\n // Atualmente, só existe extObj. Talvez um extList no futuro.\n if ($type == 'extObj') {\n // 1. Se existir um objeto instanciado, retorne-o.\n // 2. Se existir um 'not_found' em cache, retorne false*.\n // 3. Se existir um 'id' a ser carregado, tente carregá-lo e retorne-o*.\n // 4. Em qualquer caso, se o retorno for false, verifique a existência do $autoNew.\n\n $itemObj = &$this->extObjects[$aliasName];\n // Valores possível para $itemObj:\n // - (bool) false --> O sistema nunca tentou carregar este objeto.\n // - (string)'**not_found**' --> O sistema já tentou carregar e gravou que ele não existe.\n // - (object) --> O sistema já carregou (ou instanciou um novo) este objeto\n\n if (!$itemObj) {\n // Tente carregar o objeto e retorná-lo, se possível.\n // Se não for possível, grava o cache **not_found** e segue a execução.\n //\n // IMPORTANTE!!!!\n // - $extItem[autoLoad] não se aplica a este momento.\n // - Aqui, o carregamento é feito on-demand. O autoLoad é referente ao método ::load e ::multiLoad.\n //\n\n // Situação a ser analisada/melhorada:\n // 1. Quando dEcProduto::load(1, 'fotoObj') é chamado, podemos utilizar 'extraOn'\n // 2. No entanto, ao carregar sob demanda fotoObj::load(), o campo 'extraOn' simplesmente não faz sentido.\n //\n // Temporariamente, estamos resolvendo da seguinte forma:\n $thisKey = $extItem['thisKey'];\n $targetKey = $extItem['targetKey'] ? $extItem['targetKey'] : $extItem['className']::structGet('primaryKey');\n if (!$this->isAliasEnabled($thisKey)) {\n trigger_error(get_class($this) . \"->_extGetValue({$aliasName}): We are relying on alias <b>{$thisKey}</b>, which has been <b>disabled</b> in the constructor.\");\n return false;\n }\n\n if ($extItem['extraOn']) {\n if (!$this->isLoaded()) {\n if (!$autoNew) {\n trigger_error(get_class($this) . \"->_extGetValue({$aliasName}: This extObj has 'extraOn' setting, but is not loaded yet! So, it cannot be autoloaded.\");\n return false;\n }\n $itemObj = new $extClassName;\n } else {\n $searchSelf = self::load($this->v('id'), array(\n 'onlyFields' => array('id'),\n 'loadExt' => $aliasName,\n ));\n $itemObj = $searchSelf->extObjects[$aliasName];\n }\n } else {\n if ($this->v($thisKey)) {\n // self::log(\"_extGetValue({$aliasName}) - Tentando on-demand {$extClassName}::load({$thisKey}->v({$thisKey}))\");\n $itemObj = $extClassName::load($this->v($thisKey), $targetKey);\n if (!$itemObj && !$autoNew) {\n // Se não for instanciar um novo, então aproveita pra salvar\n // essa informação em cache.\n $itemObj = '**not_found**';\n }\n }\n }\n }\n if (!is_object($itemObj) && $autoNew) {\n $itemObj = new $extClassName;\n }\n if (is_object($itemObj)) {\n if ($extItem['reverseKey']) {\n $itemObj->v($extItem['reverseKey'], $this);\n }\n return $itemObj;\n }\n\n return false;\n }\n\n trigger_error(\"Tipo de external '{$type}' não é conhecido.\");\n return false;\n }", "public function withDataItem(string $identifier, $value): EntityInterface;", "protected function getEntity($key)\n {\n $id = $this->getIdentifierFields();\n\n if (count($id) > 1) {\n // $key is a collection index\n $entities = $this->getEntities();\n return $entities[$key];\n } else if ($this->entities) {\n return $this->entities[$key];\n } else if ($qb = $this->getQueryBuilder()) {\n // should we clone the builder?\n $alias = $qb->getRootAlias();\n $where = $qb->expr()->eq($alias.'.'.current($id), $key);\n\n return $qb->andWhere($where)->getQuery()->getSingleResult();\n }\n\n return $this->getOption('em')->find($this->getOption('class'), $key);\n }", "public function findOneEntity()\n {\n $company = $this->em->getRepository('APICoreBundle:Company')->findOneBy([\n 'title' => 'Test Company'\n ]);\n\n if ($company instanceof Company) {\n return $company;\n }\n\n return $this->createEntity();\n }", "private static function _objectify(DaoQuery $qry, array $row)\n {\n // Populate the focus object\n $fClass = $qry->getFocusClass();\n $newEntity = new $fClass;\n $newEntity->setId($row['id']);\n DaoMap::loadMap(strtolower($fClass));\n foreach (DaoMap::$map[strtolower($fClass)] as $field => $properties)\n {\n //ignore metadata\n if (trim($field) === '_')\n continue;\n //if it's just a private data for this entity class\n if (!isset($properties['rel']))\n $value = $row[$field];\n //if it's a relationship then we need to consider repopulate object(s)\n else if ($properties['rel'] === DaoMap::MANY_TO_ONE || ($properties['rel'] === DaoMap::ONE_TO_ONE))\n {\n //creates a empty object\n $id = $row[$field . 'Id'];\n $cls = DaoMap::$map[strtolower($fClass)][$field]['class'];\n $value = new $cls;\n $value->setId($id);\n $value->setProxyMode(true);\n }\n else if ($properties['rel'] === DaoMap::ONE_TO_MANY || ($properties['rel'] === DaoMap::MANY_TO_MANY))\n {\n $value = array(); //creates an empty array to stand out as an array\n }\n else\n continue;\n self::_setProperty($newEntity, $field, $value);\n }\n return $newEntity;\n }", "public function current($returnEntity = true)\n {\n $data = $this->dataSource->current();\n\n // Return false when no data has been found\n if (!is_array($data)) {\n return false;\n }\n\n $object = clone $this->objectPrototype;\n $objectClassName = get_class($object);\n $entitiesToInject = array();\n $transform = new \\Zend\\Filter\\Word\\UnderscoreToCamelCase();\n $entities = array();\n $entityClasses = array(\n 'base' => $objectClassName\n );\n\n // Create Event Container for the event triggers\n $eventContainer = new Entity\\EventContainer();\n\n if ($returnEntity) {\n $eventContainer->setHydrateType(Entity\\EventContainer::HYDRATE_TYPE_OBJECT);\n } else {\n $eventContainer->setHydrateType(Entity\\EventContainer::HYDRATE_TYPE_ARRAY);\n }\n\n if (empty($this->associations) === false) {\n foreach($this->associations as $association) {\n /* @var $association EntityAssociation */\n $alias = $association->getAlias();\n $entityData = $this->shiftJoinData($alias, $data);\n $entityClassName = get_class($association->getPrototype());\n $entityMapper = $association->getMapper();\n\n // Save classname for the data injection phase\n $entityClasses[$alias] = $entityClassName;\n\n // Fill the event container\n $eventContainer->setData($entityData);\n $eventContainer->setEntityClassName($entityClassName);\n unset($entityData);\n\n // Trigger preHydrate event\n $this->getEventManager()->trigger('preHydrate', $this, $eventContainer);\n\n // Call hydrator only when returning entities\n if ($returnEntity) {\n $prototype = clone $association->getPrototype();\n if ($this->hydrator instanceof Strategy\\ObservableStrategyInterface) {\n $this->hydrator->setIgnoreOriginalOnce();\n }\n $obj = $this->hydrator->hydrate(\n $eventContainer->getData(),\n $prototype\n );\n if (\n $this->hydrator instanceof Strategy\\ObservableStrategyInterface &&\n false === $entityMapper->isEntityEmpty($obj)\n ) {\n $this->hydrator->setChangesCommitted($obj);\n }\n // Hydrate the data\n $eventContainer->setData($obj);\n }\n\n // Trigger postHydrate event\n $this->getEventManager()->trigger('postHydrate', $this, $eventContainer);\n\n // Set the hydrated results to the entities array\n $entities[$alias] = $eventContainer->getData();\n $eventContainer->setData(null);\n\n // Set references for injecting entities after hydrating main object\n $entitiesToInject[] = $association;\n }\n }\n\n // Set eventdata for main object\n $eventContainer->setEntityClassName($objectClassName);\n $eventContainer->setData($data);\n unset($data);\n\n // Trigger preHydrate for main object\n $this->getEventManager()->trigger('preHydrate', $this, $eventContainer);\n\n if ($returnEntity) {\n // Hydrate main object\n $eventContainer->setData(\n $this->hydrator->hydrate(\n $eventContainer->getData(),\n $object\n )\n );\n }\n\n // Trigger postHydrate for main object\n $this->getEventManager()->trigger('postHydrate', $this, $eventContainer);\n\n // Set the base to entities array\n $entities['base'] = $eventContainer->getData();\n $eventContainer->setData(null);\n\n // Inject the entities to the main object\n foreach ($entitiesToInject as $association) {\n /** @var EntityAssociation */\n $parentAlias = $association->getParentAlias() ?: 'base';\n $alias = $association->getAlias();\n $entityIdentifier = $association->getEntityIdentifier();\n $setCall = 'set'.$transform($entityIdentifier);\n\n // Set event parameters\n $eventParams = array(\n 'entity' => $entities[$parentAlias],\n 'value' => $entities[$alias],\n 'call' => $setCall,\n );\n\n // Set parameters in the eventContainer\n $eventContainer->setData($eventParams);\n $eventContainer->setEntityClassName($entityClasses[$parentAlias]);\n\n // We can unset data when we're im array mode\n if ($returnEntity === false) {\n unset($eventParams);\n }\n\n\n // Trigger preInjectEntity\n $this->getEventManager()->trigger('preInjectEntity', $this, $eventContainer);\n\n // Set eventParams when in array mode\n if ($returnEntity === false) {\n $eventParams = $eventContainer->getData();\n\n // Overwrite entities\n $entities[$parentAlias] = $eventParams['entity'];\n $entities[$alias] = $eventParams['value'];\n\n $entities[$parentAlias][$entityIdentifier] = $entities[$alias];\n\n // Rebuild eventParams for array mode\n $eventParams = array(\n 'entity' => $entities[$parentAlias],\n 'value' => $entities[$alias],\n 'call' => $setCall,\n );\n\n $eventContainer->setData($eventParams);\n unset($eventParams);\n } else {\n // Inject the data via OOP\n $entities[$parentAlias]->$setCall($entities[$alias]);\n }\n\n // Trigger postInjectEntity\n $this->getEventManager()->trigger('postInjectEntity', $this, $eventContainer);\n\n // Set eventParams when in array mode\n if ($returnEntity === false) {\n $eventParams = $eventContainer->getData();\n\n // Overwrite entities\n $entities[$parentAlias] = $eventParams['entity'];\n $entities[$alias] = $eventParams['value'];\n }\n }\n return $entities['base'];\n }", "function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('DataObjects_Especificacion',$k,$v); }", "function entity($entity)\n {\n return dechex($entity);\n }", "function entity($entityTypeKey, $entityId = null)\n {\n $entityModel = resolve(entity_class($entityTypeKey));\n return is_null($entityId) ? $entityModel : $entityModel->findOrFail($entityId);\n }", "function convert_post_to_entity($post, $model = FALSE)\n {\n $entity = new stdClass();\n // Unserialize the post_content_filtered field\n if (is_string($post->post_content_filtered)) {\n if ($post_content = $this->object->unserialize($post->post_content_filtered)) {\n foreach ($post_content as $key => $value) {\n $post->{$key} = $value;\n }\n }\n }\n // Unserialize the post content field\n if (is_string($post->post_content)) {\n if ($post_content = $this->object->unserialize($post->post_content)) {\n foreach ($post_content as $key => $value) {\n $post->{$key} = $value;\n }\n }\n }\n // Copy post fields to entity\n unset($post->post_content);\n unset($post->post_content_filtered);\n foreach ($post as $key => $value) {\n $entity->{$key} = $value;\n }\n $this->object->_convert_to_entity($entity);\n return $model ? $this->object->convert_to_model($entity) : $entity;\n }", "public function readFromModel($entity);", "public static function getEntity( $handle ) {\n\t\tif ( !array_key_exists( $handle, self::$entityData ) ) {\n\t\t\tthrow new OutOfBoundsException( \"No entity defined with handle {$handle}\" );\n\t\t}\n\t\t$entity = self::$entityData[ $handle ];\n\n\t\tif ( !is_string( $entity['data'] ) ) {\n\t\t\t$entity['data'] = json_encode( $entity['data'] );\n\t\t}\n\n\t\treturn $entity;\n\t}", "public abstract function fetchCriteriaValue($criteria);", "public function getEntities();", "public function getEntities();", "protected function getEntity($entityId)\n {\n // is entityId is numeric then assume it is a transaction ID\n if (is_numeric($entityId)) {\n return $this->getRepo($this->repo)->fetchById($entityId);\n }\n\n // if not numeric assume it is a transaction reference\n return $this->getRepo($this->repo)->fetchByReference($entityId);\n }", "public function getResultObject(): array\n {\n if (! empty($this->resultObject)) {\n return $this->resultObject;\n }\n\n // In the event that query caching is on, the result_id variable\n // will not be a valid resource so we'll simply return an empty\n // array.\n if (! $this->isValidResultId()) {\n return [];\n }\n\n if ($this->resultArray) {\n foreach ($this->resultArray as $row) {\n $this->resultObject[] = (object) $row;\n }\n\n return $this->resultObject;\n }\n\n if ($this->rowData !== null) {\n $this->dataSeek();\n }\n\n while ($row = $this->fetchObject()) {\n if (! is_subclass_of($row, Entity::class) && method_exists($row, 'syncOriginal')) {\n $row->syncOriginal();\n }\n\n $this->resultObject[] = $row;\n }\n\n return $this->resultObject;\n }", "public function getEntityFromRequest($paramName, $entityName, $entityManagerName = null, $serviceName = null)\n {\n $entity = null;\n \n // get the Dao we need to fetch the right entity\n $dao = $this->getRepository($entityName, $entityManagerName);\n\n // see if the parameter exists\n if( $param = $this->getRequest()->get($paramName) )\n {\n $field = is_int($param) ? 'id' : 'slug';\n\n // support both D1 and D2\n if( $dao instanceof \\Doctrine_Table )\n {\n $entity = $dao->findOneBy($field, $param);\n }\n else if( $dao instanceof \\Doctrine\\ORM\\EntityRepository )\n {\n $entity = $dao->findOneBy(array($field => $param));\n }\n else\n {\n throw new \\LogicException('The DAO given was not of type Doctrine_Table or EntityRepository , class: ' . get_class($dao));\n }\n\n // if we were able to find an entity\n if( $entity )\n {\n // create a service name if not specified\n $parts = explode('\\\\', $entityName);\n $serviceName = $serviceName ? $serviceName : StringUtils::toUnderScore($parts[count($parts)-1]);\n\n // set the entity in the container so we can pass the reference around\n $this->set($serviceName, $entity);\n }\n else\n {\n throw new NotFoundHttpException();\n }\n }\n\n return $entity;\n }", "abstract protected function getEntityClass();", "protected function populateValueObjectFromForm() : IValueObject\n {\n return new SeoValueObject($this->title, $this->description, $this->keywords);\n }", "public function __get($name){\r\n\t\tif ($name=='id'){\r\n\t\t\treturn $this->getID();\r\n\t\t}\r\n\t\tif ($this->definition->relationshipExists($name)) {\t\t\t\r\n\t\t\tif ($this->isNew()){\r\n\t\t\t\tthrow new DBObjectException(__CLASS__,'Attempting to access relationship '.$name.' of '.TextUtils::aOrAn(get_class($this)).' object that has not been saved and therefore does not exist in the database.');\r\n\t\t\t}\r\n\t\t\treturn $this->definition->getRelationship($name)->get($this);\r\n\t\t} else if ($this->values->key_exists($name)){\r\n\t\t\treturn $this->values[$name]->getValue();\r\n\t\t} \r\n\t\t\r\n\t\t$stack = debug_backtrace();\r\n\t\t$call_info = $stack[0];\t\t\r\n\t\t\tthrow new DBObjectException(get_class($this),get_class($this).' does not have '.TextUtils::aOrAn($name).' property.');\r\n\t}", "protected function _getEntityAdapter()\n {\n if (!$this->_entityAdapter) {\n $validTypes = array('storelocator' => array('model' => 'storelocator/import_entity_data', 'Label' => 'Storelocator'));\n\n\n if (isset($validTypes[$this->getEntity()])) {\n try {\n $this->_entityAdapter = Mage::getModel($validTypes[$this->getEntity()]['model']);\n } catch (Exception $e) {\n Mage::logException($e);\n Mage::throwException(\n Mage::helper('storelocator')->__('Invalid entity model')\n );\n }\n\n if (!($this->_entityAdapter instanceof Mage_ImportExport_Model_Import_Entity_Abstract)) {\n Mage::throwException(\n Mage::helper('storelocator')->__('Entity adapter object must be an instance of Mage_ImportExport_Model_Import_Entity_Abstract')\n );\n }\n } else {\n Mage::throwException(Mage::helper('storelocator')->__('Invalid entity'));\n }\n\n // check for entity codes integrity\n if ($this->getEntity() != $this->_entityAdapter->getEntityTypeCode()) {\n Mage::throwException(\n Mage::helper('storelocator')->__('Input entity code is not equal to entity adapter code')\n );\n }\n\n $this->_entityAdapter->setParameters($this->getData());\n }\n\n return $this->_entityAdapter;\n }", "public function getClient(string $searchBy, $value) : ?\\stdClass {\n\t\tif (!$this->entityClient->hasProperty($searchBy)) {\n\t\t\tthrow new \\Exception('Property ' . $searchBy . ' does not exist');\n\t\t}\n\n\t\t$dataOjb = $this->entityClient->getValuesAsObject();\n\t\t$dataOjb->{$searchBy} = $value;\n\t\t$this->entityClient->populateState($dataOjb, true);\n\t\t$client = $this->entityClient->getValuesAsObject();\n\t\tforeach ($client as $key => $value) {\n\t\t\tif (is_null($client->{$key})) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->entityClient->getValuesAsObject();\n\t}", "public function getEntity()\n {\n return $this->entityClass;\n }", "public function entity() {\n\t\t\treturn $this->entity;\n\t\t}", "protected function getEntityResolver()\n {\n return \\Yii::createObject('app\\modules\\queue\\components\\interfaces\\EntityResolverInterface');\n }", "public function getByEntityId(int $entityId): HokodoEntityInterface;", "protected function createEntity($values, $langcode, $bundle_name = NULL) {\n $entity_values = $values;\n $entity_values['langcode'] = $langcode;\n $entity_type = \\Drupal::entityTypeManager()->getDefinition($this->entityTypeId);\n if ($bundle_key = $entity_type->getKey('bundle')) {\n $entity_values[$bundle_key] = $bundle_name ?: $this->bundle;\n }\n $storage = $this->container->get('entity_type.manager')->getStorage($this->entityTypeId);\n if (!($storage instanceof SqlContentEntityStorage)) {\n foreach ($values as $property => $value) {\n if (is_array($value)) {\n $entity_values[$property] = [$langcode => $value];\n }\n }\n }\n $entity = $this->container->get('entity_type.manager')\n ->getStorage($this->entityTypeId)\n ->create($entity_values);\n $entity->save();\n return $entity->id();\n }", "public function getEntity()\n {\n return $this->getTarget();\n }", "function getEntity($server, $args) { \n // get args\n list($e_name) = $args;\n\n $personnel =& PersonnelDB::getInstance();\n $store_name = getEntityStore(strtolower($e_name));\n\n if (!empty($server->params)) {\n // If there are params, use them for filtering\n $entities = $personnel->$store_name->getByFilter($server->params);\n } else {\n // Otherwise, get all entities\n $entities = $personnel->$store_name->getAll();\n }\n\n // return serialized output\n return serializeEntities($entities, $server->contentType);\n}", "function getEntityList()\n\t{\n\t\tif($this->entityList === null)\n\t\t{\n\t\t\t$event = new \\Bitrix\\Main\\Event('main', 'onUserTypeEntityOrmMap');\n\t\t\t$event->send();\n\n\t\t\tforeach($event->getResults() as $eventResult)\n\t\t\t{\n\t\t\t\tif($eventResult->getType() == \\Bitrix\\Main\\EventResult::SUCCESS)\n\t\t\t\t{\n\t\t\t\t\t$result = $eventResult->getParameters(); // [ENTITY_ID => 'SomeTable']\n\t\t\t\t\tforeach($result as $entityId => $entityClass)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(mb_substr($entityClass, 0, 1) !== '\\\\')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$entityClass = '\\\\' . $entityClass;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->entityList[$entityId] = $entityClass;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->entityList;\n\t}", "protected function _getEntity($data) {\n\t\treturn new Entity($data);\n\t}", "public function getEntityProxy()\n {\n return $this->entityProxy;\n }", "function getEavValue($Model, $entity_id, $attribute_name) {\n extract($this->settings[$Model->alias]);\n $eavField = $this->getEavField($Model, $entity_id, $attribute_name);\n if($eavField) {\n $attribute_id = $eavField[$with]['attribute_id'];\n $Model->{$with}->Attribute->id = $attribute_id;\n\n $datatype = $Model->getAttributeById($attribute_id);\n $ValueModel = Inflector::camelize('eav_' . strtolower($datatype['Datatype']['table']));\n\n $eavValue = $Model->{$with}->{$ValueModel}->findById($eavField[$with]['value_id']);\n if (isset($eavValue[$ValueModel]['value'])) {\n return $eavValue[$ValueModel]['value'];\n }\n }\n\n return null;\n }", "public function save (ValueObjectAbstract $valueObject);", "public function get($id, array $params = null, \n $resultType = self::RESULT_TYPE_OBJECT)\n {\n if(!is_int($id)){\n throw new Exception(array(\n 'prop' => '@dataTypeNoInteger', \n 'extend' => 'Verify the entity id'));\n }\n if($params == null){\n //return the Entity\n return $this->_repository->find($id);\n } else {\n //return an array/partial representation of the Entity\n if(!isset($params['fields'])){\n throw new Exception('@dataArrayNoKeyField');\n }\n if(!is_array($params['fields'])){\n throw new Exception(array(\n 'prop' => '@dataTypeNoArray', \n 'extend' => 'Verify \"fields\" parameter' ));\n }\n if($resultType != 'array' && $resultType != 'object'){\n throw new Exception(array(\n 'prop' => '@dataNoValid',\n 'extend' => 'Verify $resultType' ));\n }\n \n if(empty($params['fields'])){\n $props = $this->_metaData->getColumnNames();\n } else {\n $props = $this->_verifyProps($params['fields'], true);\n }\n $dql = $this->_createGetDQL($props);\n $dql .= \" WHERE e1.id = {$id}\";\n $query = $this->_em->createQuery($dql);\n \n $result = $query->getOneOrNullResult(\n ($resultType == self::RESULT_TYPE_ARRAY)?\n \\Doctrine\\ORM\\AbstractQuery::HYDRATE_ARRAY:\n \\Doctrine\\ORM\\AbstractQuery::HYDRATE_OBJECT\n );\n \n return $result;\n }\n }", "private function entityToArray($entity) {\n $reflectedClass = new \\ReflectionClass($entity);\n $objectProperties = $reflectedClass->getProperties();\n $data = array();\n foreach ($objectProperties as $objectProperty) {\n $property = $objectProperty->getName();\n\n $data[$property] = $entity->__get($property);\n }\n\n return $data;\n }", "public function getEntityId();", "public function getEntityId();", "public function getEntityId();", "public static function getData($parameters) {\n\n $entity_type = $parameters['entity_type'];\n $bundle = $parameters['bundle'];\n $conditions = $parameters['conditions'];\n\n $query = new EntityFieldQuery();\n\n $field_conditions = \"\"; $entity_conditions = \"\"; $property_conditions = \"\";\n\n if(!empty($bundle)) {\n $bundle_condition = \"->entityCondition('bundle', '$bundle')\";\n }\n\n if($conditions != \"\") {\n $conditions = $parameters['conditions'];\n foreach ($conditions AS $condition) {\n $field = $condition['field'];\n $column = $condition['column'];\n $value = $condition['value'];\n $value_ini = $condition['value_ini'];\n $value_end = $condition['value_end'];\n $operator = $condition['operator'];\n $delta_group = $condition['delta_group'];\n $language_group = $condition['language_group'];\n\n if($condition['type'] == 'property_condition') {\n // ->propertyCondition($name, $value, $operator = NULL)\n if($operator == 'BETWEEN') {\n $property_conditions .= \"->propertyCondition('$field', array($value_ini, $value_end), '$operator')\";\n } else {\n $property_conditions .= \"->propertyCondition('$field', '$value_ini$value$value_end', '$operator')\";\n }\n }\n else if($condition['type'] == 'field_condition') {\n // ->fieldCondition($field, $column = NULL, $value = NULL, $operator = NULL, $delta_group = NULL, $language_group = NULL)\n $field_conditions .= \"->fieldCondition('$field', '$column', '$value_ini$value$value_end', '$operator')\";\n }\n else if($condition['type'] == 'entity_condition') {\n // ->entityCondition($name, $value, $operator = NULL)\n $entity_conditions .= \"->entityCondition('$field', $value, '$operator')\";\n }\n }\n }\n\n // GET all instances of entity_type, bundle for field conditions\n $composition = '\n $query\n ->entityCondition' . \"('entity_type', '$entity_type')\n $bundle_condition\n $property_conditions\n $field_conditions\n $entity_conditions\n ->execute();\n \";\n\n $entities = NULL;\n eval(\"\\$entities=$composition;\");\n\n if (sizeof($entities) > 0) {\n $entities = entity_load($entity_type, array_keys($entities[$entity_type]));\n\n // GET all field data\n foreach ($entities as $entity) {\n $field_data = array();\n\n if($entity_type == 'node') {\n $field_data['nid'] = $entity->nid;\n $field_data['vid'] = $entity->vid;\n $field_data['title'] = $entity->title;\n $field_data['changed'] = $entity->changed;\n }\n if($entity_type == 'user') {\n $field_data['name'] = $entity->name;\n $field_data['mail'] = $entity->mail;\n }\n\n $field_data['created'] = $entity->created;\n\n foreach ($parameters['fields'] AS $field) {\n\n $is_entity = is_array($field);\n $conditions_to_send = array();\n\n if ( $is_entity ) { // SUB ENTITY\n $entity_id = 0;\n $sss = '$entity->'. $field['field'] . \"[und][0]['target_id']\";\n eval(\"\\$entity_id=$sss;\");\n\n $conditions_to_send[] = array(\n 'type' => 'entity_condition',\n 'field' => 'entity_id',\n 'value' => $entity_id,\n 'operator' => '='\n );\n $params = array(\n 'entity_type' => $field['entity_type'],\n 'bundle' => $field['bundle'],\n 'fields' => $field['fields'],\n 'conditions' => $conditions_to_send\n );\n $field_name = $field['field'];\n\n $field_data[\"$field_name\"] = self::getData($params);\n\n }\n else { // FIELD\n $field_name = $field;\n eval(\"\\$field_data['$field_name']=\" . '$entity->' . $field_name . \"[LANGUAGE_NONE][0][value];\");\n }\n }\n $data[] = $field_data;\n }\n\n }\n else {\n $data = NULL;\n }\n\n //dd($data);\n\n return $data;\n }", "public function getDomaine($domaine=null)\n {\n if ($domaine != null && is_array($this->entity) && count($this->entity)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE domaine = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$domaine]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId_entity($d['id_entity']);\n$this->setLabel($d['label']);\n$this->setDomaine($d['domaine']);\n$this->setEmail($d['email']);\n$this->setPhone_number($d['phone_number']);\n$this->setBp($d['bp']);\n$this->setLocalisation($d['localisation']);\n$this->setVille($d['ville']);\n$this->setUniqueId($d['uniqueId']);\n$this->setCreated_at($d['created_at']);\n$this->setCreated_by($d['created_by']);\n$this->setUpdate_at($d['update_at']);\n$this->setUpdate_by($d['update_by']);\n$this->entity =$data; \n return $this;\n }\n \n } else {\n return $this->domaine;\n }\n \n }", "protected function getEntities() {\n $query = $this->getStorage()->getQuery();\n $keys = $this->entityType->getKeys();\n\n $query->condition($keys['bundle'], $this->bundle)\n ->sort($keys['id']);\n\n $bundle = $this->entityManager->getStorage($this->entityType->getBundleEntityType())\n ->load($this->bundle);\n\n $pager_settings = $bundle->getPagerSettings();\n if (!empty($pager_settings['page_parameter']) && !empty($pager_settings['page_size_parameter'])) {\n $query->pager($pager_settings['default_limit']);\n }\n\n return $this->getStorage()->getResultEntities($query->execute());\n }" ]
[ "0.6168621", "0.6113466", "0.5937295", "0.5937295", "0.5937295", "0.5759876", "0.57164097", "0.5613206", "0.5578789", "0.55780506", "0.5564774", "0.5548554", "0.5533387", "0.55082875", "0.5504279", "0.5457655", "0.54312253", "0.539171", "0.5379372", "0.53581387", "0.53437734", "0.5321815", "0.5304238", "0.52965754", "0.52965754", "0.52965754", "0.5291796", "0.52635837", "0.5250064", "0.52374595", "0.52121246", "0.5205666", "0.5204476", "0.5198028", "0.51610875", "0.5153839", "0.51174164", "0.5115652", "0.5102646", "0.50865996", "0.5084305", "0.5071925", "0.5057568", "0.5049629", "0.5049629", "0.5036568", "0.50352246", "0.5026011", "0.5023307", "0.501868", "0.50036573", "0.49973917", "0.49963897", "0.49908817", "0.49901265", "0.49843615", "0.49804938", "0.4965822", "0.4959795", "0.49478924", "0.49419022", "0.4937708", "0.49333686", "0.49182686", "0.49159077", "0.4914204", "0.49078622", "0.4886446", "0.48725754", "0.486808", "0.4866239", "0.4866239", "0.4864252", "0.48597753", "0.4857437", "0.4851159", "0.48473534", "0.4841143", "0.48391235", "0.48356342", "0.48338032", "0.48210776", "0.48191583", "0.48091015", "0.48077402", "0.47845817", "0.47719318", "0.4769819", "0.47685507", "0.4765359", "0.47611868", "0.4760698", "0.4742947", "0.47425535", "0.47408772", "0.47408772", "0.47408772", "0.47390807", "0.47364295", "0.47364038" ]
0.5165371
34
Returns the name of schema.
public function getSchemaName() { return $this->schemaName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSchemaName()\n {\n return $this->schemaName;\n }", "public function getSchemaName(): string;", "public function getSchemaName()\n {\n return $this->getTable()->getSchema()->getName();\n }", "function getSchemaDisplayName() {\n\t\treturn __('plugins.schemas.dc.schemaName');\n\t}", "public function schema()\r\n {\r\n return $this->getKey('schema', true);\r\n }", "public function guessSchemaName()\n {\n return $this->schema ?: $this->database->getSchema();\n }", "public function getSchemaPath() : string\n {\n return $this->schema;\n }", "public function getSchema()\n {\n if (empty($this->schema)) {\n return 'public';\n } else {\n return $this->schema;\n }\n }", "public function getSchemaType(): string\n {\n /** @var CubridSchema|MssqlSchema|MysqlSchema|OciSchema|PgsqlSchema|SqliteSchema $schema */\n $schema = $this->db->getSchema();\n return Schema::identifySchema($schema);\n }", "public function get_schema() {\n\t\treturn $this->schema;\n\t}", "public function getSchemaID(): string;", "public function schema()\n\t{\n\t\treturn $this->schema;\n\t}", "public function getSchema() {\n return Cool::getInstance()->getSchema($this->databaseName);\n }", "public function getSchema(): string;", "public function getSchema(): string;", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function GetDefaultSchema() {\n if ($cache = fastcache::cache_get('default_schema', 'schema')) {\n $this->defaultSchema = $cache->data;\n return $this->defaultSchema;\n }\n $result = $this->connection->query_direct(\"SELECT SCHEMA_NAME()\")\n ->fetchField();\n fastcache::cache_set('default_schema', $result, 'schema');\n $this->defaultSchema = $result;\n return $this->defaultSchema;\n }", "public function getSchema()\n {\n return $this->get(self::SCHEMA);\n }", "public function getSchema()\n {\n if ($this->schema === null) {\n $this->getSchemaTables();\n }\n\n return $this->schema;\n }", "public function getSchemaType()\n {\n return $this->schemaType;\n }", "public function get_schema()\r\n\t{\r\n\t\t return $this->sql_select_exe('SELECT * FROM sys.Tables', NULL);\r\n\t}", "public function getSchemaName($resourceName)\n {\n return $this->deploymentConfig->get(\n ConfigOptionsListConstants::CONFIG_PATH_DB_CONNECTIONS .\n '/' .\n $resourceName .\n '/dbname'\n );\n }", "public static function get_schema()\n {\n }", "public function get_schema()\n {\n }", "public function getReferencedSchema(): string;", "public function getSchemaPath() {\n\t\tglobal $IP;\n\t\tif ( file_exists( \"$IP/maintenance/\" . $this->getType() . \"/tables.sql\" ) ) {\n\t\t\treturn \"$IP/maintenance/\" . $this->getType() . \"/tables.sql\";\n\t\t} else {\n\t\t\treturn \"$IP/maintenance/tables.sql\";\n\t\t}\n\t}", "public function getSchema();", "public function getSchema();", "public function getSchema();", "protected function _getSchema() {\n\t\treturn $this->__schema;\n\t}", "abstract protected function getSchema(): string;", "public final static function getNames()\n {\n return array_keys(self::$schemas);\n }", "public function getSchema() {}", "public function getMetadataSchemaUri()\n {\n return $this->metadata_schema_uri;\n }", "public function getSchemaNames()\n {\n $statement = $this->_conn->executeQuery(\n \"SELECT nspname FROM pg_namespace WHERE nspname !~ '^pg_.*' AND nspname != 'information_schema'\"\n );\n\n return $statement->fetchAll(FetchMode::COLUMN);\n }", "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "public function getSchema(): ?string;", "public function getSchema()\n {\n return $this->source;\n }", "public function schemas()\n\t{\n\t\treturn $this->execute(\"SELECT nspname as schema FROM pg_namespace WHERE nspname NOT LIKE 'pg_%' AND nspname<>'information_schema'\");\n\t}", "function table_name() {\n\t\tif ($this->table) {\n\t\t\treturn $this->table;\n\t\t} else {\n\t\t\treturn $this->_get_type();\n\t\t}\n\n\t}", "public function qualifiedName ()\n {\n $qualified = $this->_schema;\n\n if ($qualified) {\n $qualified .= \".{$this->_entity}\";\n }\n\n if ($this->_alias) {\n $qualified .= \" AS {$this->_alias}\";\n }\n return $qualified;\n }", "public static function getSchema()\n {\n }", "public function getQualifiedName(): string\n {\n return $this->namespace.'.'.$this->name;\n }", "public function createSchema() : string;", "public function getSchema(): Schema;", "public function getDocumentSchema()\n {\n return $this->document_schema;\n }", "public function dbSchema( $schema = null ) {\n\t\treturn wfSetVar( $this->mSchema, $schema );\n\t}", "public function getTableName()\n {\n return $this->__get(\"table_name\");\n }", "public function getSchema()\r\n {\r\n // if existed (like post): begiresh va be view pass bede\r\n // if not (like blog,index): default schema template\r\n // include schema.view\r\n }", "public function getTableName(): string\n {\n return $this->tableNames[0];\n }", "public function getInstalledSchemaVersion(): string\n {\n return $this->getInfo()->schemaVersion ?: $this->schemaVersion;\n }", "protected function getDefaultSchemaDirectory() {\n /** @var \\Drupal\\Core\\Extension\\ExtensionList $extensionList */\n $extensionList = \\Drupal::service('extension.list.profile');\n $infoFile = $extensionList->getPathname('dkan2');\n\n return dirname($infoFile) . '/schema';\n }", "function getSchemaTargetNamespace() { return $this->_schematargetnamespace; }", "public function getSchema(): Schema\n {\n if ($this->_schema === null) {\n $this->_schema = $this->_initializeSchema($this->getWebservice()->describe($this->getName()));\n }\n\n return $this->_schema;\n }", "public function getSchemeName()\n {\n return $this->scheme_name;\n }", "public function name()\n {\n return 'database';\n }", "public function getTableName() {\n\t\treturn $this -> _name;\n\t}", "public function schema();", "public function get_instance_schema()\n {\n }", "public function get_instance_schema()\n {\n }", "public function get_instance_schema()\n {\n }", "public function get_instance_schema()\n {\n }", "public function get_instance_schema()\n {\n }", "private function resolveSchema() : Schema\n {\n return resolve('Schema');\n }", "private static function get_table_name() {\n\n $class = get_called_class();\n\n return strtolower($class);\n\n }", "private function getDBSchema(){\n\n return \\DB::query('\n SELECT table_name \n FROM information_schema.tables\n WHERE table_type=\"BASE TABLE\" AND table_schema=\"'.\\App::config('DB_DB').'\"\n ');\n\n }", "protected function getTableName()\n {\n return $this->database->getPrefix() . $this->table;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function get_field_schema()\n {\n }", "public function getTableName() {\n if (isset($this->table)) {\n return $this->table;\n } else return $this->name;\n }", "public function getSchema()\n {\n if ($this->schema) {\n return $this->schema;\n }\n\n return $this->schema = resolve(Bakery::getModelSchema($this));\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getName()\n {\n return 'database';\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "function get_table_name()\n {\n global $table_prefix;\n global $wpdb;\n $prefix = $table_prefix;\n if ($wpdb != null && $wpdb->prefix != null) {\n $prefix = $wpdb->prefix;\n }\n return apply_filters('ngg_datamapper_table_name', $prefix . $this->_object_name, $this->_object_name);\n }", "public function getName() {\n\n\t\treturn $this->class->getNamespaceName();\n\t}", "protected function getSchema()\n {\n return '{\n \"$schema\":\"http://json-schema.org/draft-04/schema#\",\n \"title\":\"' . $this->name . ' Schema\",\n \"description\":\"' . $this->description . '\",\n \"type\":\"object\",\n \"additionalProperties\":false,\n \"properties\":{\n \"string\":{\n \"type\":\"string\",\n \"description\": \"The input string to process\"\n }\n },\n \"required\":[\n \"string\"\n ]\n }';\n }", "public function get_table_name()\n {\n return $this->prefix . $this->table;\n }", "public function getName() {\n $path = explode('\\\\', get_class($this->object[\"data\"]));\n return array_pop($path);\n }", "public function getSchemaAttr(): string\n {\n return \"ENGINE={$this->schemaAttr['engine']} DEFAULT CHARSET={$this->schemaAttr['charset']} COLLATE={$this->schemaAttr['collate']} ROW_FORMAT=\" . strtoupper($this->schemaAttr['row_format']);\n }", "public function getTableName( )\n {\n return $this->table_name;\n }", "public function getRoleSchema() {\n return $this->getTypeSchema();\n }", "protected function table () : string {\n return $this->guessName();\n }", "public function getMetadataSchema()\n {\n return isset($this->metadata_schema) ? $this->metadata_schema : null;\n }", "public function getMetricsSchemaUri()\n {\n return $this->metrics_schema_uri;\n }", "protected function getQuotedSchema($schema = null)\n {\n if ($schema === null) {\n return null;\n }\n return $this->quote->quoteIdentifier($schema) . '.';\n }", "public function createSchema($schema_name) {}", "public function getQualifiedName()\r\n {\r\n return $this->getNamespace()->qualify($this->getName());\r\n }", "public static function tablename() {\n\t\t$name = get_called_class();\n\t\t$pos = strrpos($name, '\\\\');\n\t\tif ($pos === false) {\n\t\t\treturn $name;\n\t\t}\n\t\treturn substr($name, $pos + 1);\n\t}" ]
[ "0.88741386", "0.87666196", "0.85139966", "0.8023488", "0.7965228", "0.78538316", "0.75079054", "0.7373762", "0.7346069", "0.7297001", "0.72883636", "0.7172693", "0.7170861", "0.71295214", "0.71295214", "0.70897084", "0.70897084", "0.70897084", "0.70897084", "0.70897084", "0.70897084", "0.698586", "0.69678956", "0.6965172", "0.6960718", "0.69430363", "0.6877443", "0.6818684", "0.6808831", "0.669791", "0.6678258", "0.6609579", "0.6609579", "0.6609579", "0.66014624", "0.653505", "0.6533268", "0.65315384", "0.65030694", "0.6487709", "0.6468952", "0.6468952", "0.6468952", "0.6462272", "0.64315295", "0.6416704", "0.64017147", "0.6381697", "0.63756466", "0.63577044", "0.6351446", "0.63161105", "0.6307499", "0.6301756", "0.62719107", "0.6244934", "0.623484", "0.62281543", "0.6211907", "0.62075", "0.6206346", "0.61887276", "0.61647016", "0.61511517", "0.61454296", "0.61242884", "0.61242884", "0.61242884", "0.61242884", "0.61242884", "0.6124055", "0.61213857", "0.61202615", "0.61184675", "0.61063945", "0.61063945", "0.61063945", "0.60997456", "0.609635", "0.60952383", "0.6092406", "0.6092406", "0.6092406", "0.60801107", "0.6059697", "0.60564286", "0.60354894", "0.6034573", "0.6029068", "0.601766", "0.60121167", "0.60110694", "0.6006158", "0.6005392", "0.60025084", "0.6001147", "0.60010517", "0.5997991", "0.5988428", "0.59864974" ]
0.8812968
1
Returns the name of this table.
public function getTableName() { return $this->tableName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTableName() {\n if (isset($this->table)) {\n return $this->table;\n } else return $this->name;\n }", "public function getTableName() {\n\t\treturn $this -> _name;\n\t}", "function table_name() {\n\t\tif ($this->table) {\n\t\t\treturn $this->table;\n\t\t} else {\n\t\t\treturn $this->_get_type();\n\t\t}\n\n\t}", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function get_table_name() {\n return $this->table_name;\n }", "public function table_name()\n\t{\n\t\treturn $this->table_name;\n\t}", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function get_table_name()\n {\n return $this->prefix . $this->table;\n }", "public function table_name ()\n {\n return $this->app->table_names->entries;\n }", "public function getTableName( )\n {\n return $this->table_name;\n }", "public function get_table_name(){\n return $this->table_name();\n }", "protected function table () : string {\n return $this->guessName();\n }", "public static function name()\n {\n return with(new static)->getTable();\n }", "public function getTableName() {\n return $this->table;\n }", "public function getTableName()\n {\n return $this->__get(\"table_name\");\n }", "public static function get_table_name()\n {\n return self::TABLE_NAME;\n }", "public static function tablename() {\n return self::TABLE;\n }", "public function getTblName()\n {\n return $this->tbl_name;\n }", "function getTableName()\r\n\t{\r\n\t\tif ( $this->table == null ) return (null );\r\n\t\treturn( $this->table->table_name());\r\n\t}", "protected function table(): string\n {\n return $this->tableName;\n }", "public function getTableName(): string\n {\n return $this->tableNames[0];\n }", "protected function getTableName(): string {\n return self::TABLE_NAME;\n }", "public static function getTableName()\n {\n return _DB_PREFIX_ . self::$definition['table'];\n }", "public static function getTableName(){\n\t\treturn self::$table_name;\n\t}", "public static function getTableName()\n {\n return self::getDatabaseName() . '.' . self::NAME;\n }", "public static function getTableName()\n {\n return ((new self)->getTable());\n }", "public function getTableName(){\n\t\treturn $this->_table;\n\t}", "protected static function table_name(): mixed\n\t{\n\t\treturn self::$query->table_name;\n\t}", "public function getTableName()\n {\n return $this->parentTable->getName();\n }", "public function getTableName()\n {\n return $this->tableName;\n }", "public function getTableName()\n {\n return $this->tableName;\n }", "public function getTableName()\n {\n return $this->tableName;\n }", "public function getTableName()\n {\n return $this->tableName;\n }", "public function _tablename() {\n if (isset($this->_table) && !isNull($this->_table)) {\n return $this->_table;\n } else {\n return camel_case_to_underscore(get_class($this));\n }\n }", "public function getTableName() : string\n {\n if ($this->tableName !== null) {\n return $this->tableName;\n }\n\n return $this->reflectionClass->getShortName();\n }", "public function getTableName()\r\n {\r\n return $this->tableName;\r\n }", "public function getTableName() {\n\t\treturn $this->tableName;\n\t}", "public function getTableName() {\n\t\treturn $this->tableName;\n\t}", "protected function getTableName()\n {\n return $this->database->getPrefix() . $this->table;\n }", "public function getTableName(){\n return $this->tableName;\n }", "function getTableName() {\n return $this->tableName;\n }", "public function\n\t\tget_table_name()\n\t{\n\t\tif (!isset($this->table_name)) {\n\t\t\t$sxe = $this->get_simple_xml_element();\n\t\t\t\n\t\t\t$this->table_name = (string)$sxe->table['name'];\n\t\t}\n\t\t\n\t\treturn $this->table_name;\n\t}", "public function getTableName()\n\t{\n\t\treturn $this->tableName;\n\t}", "public function getTableName()\n {\n return $this->_tableName;\n }", "public function getTableName()\n\t{\n\t\treturn $this->getPrefix().$this->tableName;\n\t}", "public static function getTableName() {\n return self::$tableName;\n }", "public function table() {\n\t\treturn static::$table ?: strtolower(Str::plural(class_basename($this)));\n\t}", "public function getTableName(){\n\t\treturn $this->tableName;\n\t}", "public function getTableName(){\r\n\t\treturn strtolower(get_class($this));\r\n\t}", "final public function getTableName()\n\t\t{\n\t\t\treturn $this->_tableName;\n\t\t}", "public function getTableName(): string\n {\n return $this->getEntityDao()->getTableName();\n }", "public function getTableName() {\n return $this->mapping['table'];\n }", "function get_table_name() {\n\n\t\tglobal $wpdb;\n\n\t\treturn $wpdb->prefix . $this->table_name;\n\t}", "public function getTable(): string\n {\n return $this->prefix . $this->table;\n }", "public static function table_name(): string {\n\t\tglobal $wpdb;\n\t\treturn $wpdb->prefix . 'sb_' . static::TABLE;\n\t}", "public function getTableName()\n {\n if ($this->tableName) {\n return $this->tableName;\n }\n\n return $this->namingStrategy->classToTableName($this->name);\n }", "public function getTable()\n {\n if (isset($this->table)) {\n return $this->table;\n }\n\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }", "public function getTable()\n {\n if (! isset($this->table)) {\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }\n\n return $this->table;\n }", "public function getIdentifier() : string {\r\n return $this->table;\r\n }", "public function getTable()\n {\n if (isset($this->table)) {\n return $this->table;\n }\n return str_replace('\\\\', '', Str::snake(Str::singular(class_basename($this))));\n }", "public function getTable(): string\n {\n return $this->table;\n }", "public function getTable(): string\n {\n return $this->table;\n }", "public function getTableKeyName()\r\n\t{\r\n\t\treturn \"id\".$this->getTableName();\r\n\t}", "public function getTable(): string\n {\n return $this->_table;\n }", "protected static function get_table_name() {\n return null;\n }", "public function getTableKeyName()\n\t{\n\t\treturn \"id\".$this->getTableName();\n\t}", "public function table()\n {\n return $this->table;\n }", "function get_table_name () {\r\n\t\treturn $this->wpdb->prefix . $this->_table_name;\r\n\t}", "public function getName()\n\t{\n\t\treturn Craft::t('Event Table');\n\t}", "function get_table_name()\n {\n global $table_prefix;\n global $wpdb;\n $prefix = $table_prefix;\n if ($wpdb != null && $wpdb->prefix != null) {\n $prefix = $wpdb->prefix;\n }\n return apply_filters('ngg_datamapper_table_name', $prefix . $this->_object_name, $this->_object_name);\n }", "private static function get_table_name() {\n\n $class = get_called_class();\n\n return strtolower($class);\n\n }", "public function getTableName() {\n\t\t$dbName = empty($this->_dbName) ? '' : ($this->_dbName . '.');\n\t\t$tableName = $dbName . $this->_tableName;\n\t\treturn ($tableName);\n\t}", "public function tableName() \n {\n return $this->tableName;\n }", "protected function getTableName () {\n $class = explode('\\\\', get_class($this));\n\n return strtolower(end($class));\n }", "public function getTable() {\n if ( isset( $this->table ) ) {\n return $this->table;\n }\n\n $table = str_replace( '\\\\', '', snake_case( str_plural( class_basename( $this ) ) ) );\n\n return $this->getConnection()->db->prefix . $table ;\n }", "public function getTableName(){\n\t\t $table = get_class($this);\n\t\treturn strtolower(substr($table, strripos($table, \"\\\\\")+1));\n\t}", "public function getTable()\n {\n if (! isset($this->table)) {\n return str_replace(\n '\\\\',\n '',\n Str::snake(Str::plural(class_basename(self::class)))\n );\n }\n\n return $this->table;\n }", "public function toString()\n {\n return $this->table_name; // this attribute can be modified\n }", "public static function getTableName() {\n return str_replace(\"-\", '_', self::getFolderName()) . 's';\n }", "public function detailTableName() : string\n {\n return $this->detailTableName;\n }", "public static function getTableName()\n {\n $type = static::getType();\n return $type::getTableName();\n }", "public function tableName()\n {\n return $this->table;\n }", "public function getTable()\n\t{\n\t\treturn empty($this->table) ? $this->table = Db_Inflector::pluralize($this->getSingular()) : $this->table;\n\t}", "public function getTableName() {}", "public function getTableName() {}", "public function getTable()\n\t{\n\t\tif (isset($this->table)) return $this->table;\n\n\t\treturn $this->table = str_replace('\\\\', '', snake_case(str_plural(class_basename($this))));\n\t}", "public static function getTableName()\n {\n return Str::snake(Str::pluralStudly(class_basename(get_called_class())));\n }", "public function dataTableName()\n {\n $tableName = 'pd2_' . Utils::normalizeString($this->product()->name)\n . '__' . Utils::normalizeString($this->name);\n return strtolower($tableName);\n }", "public function getTableName()\n {\n if ($this->getFirstName()) {\n return sprintf('%s, %s', $this->getLastName(), substr($this->getFirstName(), 0, 1));\n }\n \n return $this->getLastName();\n }", "private function getTableName()\n {\n $class = get_class($this);\n\n $mem = new Cache();\n if ($tableName = $mem->get($class . '-table-name')) {\n return $tableName;\n }\n\n $break = explode('\\\\', $class);\n $ObjectName = end($break);\n $className = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $ObjectName));\n $tableName = Inflect::pluralize($className);\n\n $mem->add($class . '-table-name', $tableName, 1440);\n\n return $tableName;\n }", "public function getTableName();", "public function getTableName();", "public static function getTableName()\n {\n return self::getConfig()->get('scheme/tableName');\n }", "function getTableFullName()\n {\n return implode(' ', [$this->table_prefix . $this->table_name, $this->table_alias]);\n }", "public function getTableName() ;" ]
[ "0.84115195", "0.83429444", "0.8341696", "0.83258975", "0.83258975", "0.83258975", "0.8323903", "0.83184475", "0.83115965", "0.82888895", "0.82888895", "0.82888895", "0.8281992", "0.82776093", "0.8277491", "0.82712644", "0.82667065", "0.8254365", "0.8241117", "0.8197876", "0.8184198", "0.8149698", "0.81183034", "0.8072165", "0.80634785", "0.8049976", "0.80312705", "0.8009892", "0.80050087", "0.7985275", "0.79637504", "0.79624003", "0.79232603", "0.79012996", "0.788963", "0.788963", "0.788963", "0.788963", "0.7875826", "0.7859046", "0.7858457", "0.784943", "0.784943", "0.7842223", "0.78416646", "0.7825434", "0.779767", "0.7797635", "0.7791192", "0.7786047", "0.77768123", "0.774411", "0.773172", "0.7715123", "0.7714208", "0.7683295", "0.7683241", "0.7655541", "0.7642045", "0.76417184", "0.76401705", "0.76296914", "0.76213247", "0.76205504", "0.7594247", "0.75863415", "0.75863415", "0.7581287", "0.75698066", "0.7561442", "0.7559867", "0.7548852", "0.7535321", "0.75272006", "0.7526744", "0.752065", "0.7509209", "0.74903333", "0.74857646", "0.7469616", "0.74596345", "0.7458979", "0.7457813", "0.7437498", "0.7418987", "0.7400304", "0.7397116", "0.7389272", "0.7388869", "0.7388869", "0.7378676", "0.73726153", "0.7369345", "0.7363642", "0.73610204", "0.73487455", "0.73487455", "0.73383796", "0.732387", "0.73131776" ]
0.78700745
39
Show the form for creating a new resource.
public function create() { $categories = Category::get(); $brands = Brand::get(); return view('admin.product.create')->with('categories', $categories)->with('brands', $brands); }
{ "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 //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\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 return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\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 $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\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 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 {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "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\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "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}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Bootstrap any package services.
public function boot(): void { if ($this->app->runningInConsole()) { $this->publishes([ __DIR__.'/../config/janus.php' => config_path('janus.php'), ], 'janus'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bootPackages()\n {\n // Get the namespace of the current plugin to use in accessing the Config of the plugin\n $pluginNamespace = str_replace('\\\\', '.', strtolower(__NAMESPACE__));\n\n // Instantiate the AliasLoader for any aliases that will be loaded\n $aliasLoader = AliasLoader::getInstance();\n\n // Get the packages to boot\n $packages = Config::get($pluginNamespace . '::packages');\n\n // Boot each package\n foreach ($packages as $name => $options) {\n // Setup the configuration for the package, pulling from this plugin's config\n if (!empty($options['config']) && !empty($options['config_namespace'])) {\n Config::set($options['config_namespace'], $options['config']);\n }\n\n // Register any Service Providers for the package\n if (!empty($options['providers'])) {\n foreach ($options['providers'] as $provider) {\n App::register($provider);\n }\n }\n\n // Register any Aliases for the package\n if (!empty($options['aliases'])) {\n foreach ($options['aliases'] as $alias => $path) {\n $aliasLoader->alias($alias, $path);\n }\n }\n }\n }", "public function boot()\n {\n $this->bootPackages();\n }", "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrapperList);\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\n {\n $this->package($this->packageName);\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->loadedServices, function ($s) {\n $this->bootService($s);\n });\n\n $this->booted = true;\n }", "public function boot() {\r\n\t\t$hosting_service = HostResolver::get_host_service();\r\n\r\n\t\tif ( ! empty( $hosting_service ) ) {\r\n\t\t\t$this->provides[] = $hosting_service;\r\n\t\t}\r\n\t}", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n //$this->app->loadDeferredProviders();\n\n if (!$this->commandsLoaded) {\n //$this->commands();\n\n $this->commandsLoaded = true;\n }\n }", "protected function boot()\n\t{\n\t\tforeach ($this->serviceProviders as $provider)\n\t\t{\n\t\t\t$provider->boot($this);\n\t\t}\n\n\t\t$this->booted = true;\n\t}", "public function boot()\n {\n $this->setupConfig('delta_service');\n $this->setupMigrations();\n $this->setupConnection('delta_service', 'delta_service.connection');\n }", "public function boot(): void\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->services, function ($service) {\n $this->bootServices($service);\n });\n\n $this->booted = true;\n }", "public function boot() {\n $srcDir = __DIR__ . '/../';\n \n $this->package('baseline/baseline', 'baseline', $srcDir);\n \n include $srcDir . 'Http/routes.php';\n include $srcDir . 'Http/filters.php';\n }", "public function boot()\n {\n $this->bootEvents();\n\n $this->bootPublishes();\n\n $this->bootTypes();\n\n $this->bootSchemas();\n\n $this->bootRouter();\n\n $this->bootViews();\n \n $this->bootSecurity();\n }", "public function boot(): void\n {\n $this->publishAndLoadPackageComponents();\n\n $this->registerAndScheduleCommands();\n\n $this->setPaginatorStyling();\n }", "public function boot()\n {\n include_once('ComposerDependancies\\Global.php');\n //---------------------------------------------\n include_once('ComposerDependancies\\League.php');\n include_once('ComposerDependancies\\Team.php');\n include_once('ComposerDependancies\\Matchup.php');\n include_once('ComposerDependancies\\Player.php');\n include_once('ComposerDependancies\\Trade.php');\n include_once('ComposerDependancies\\Draft.php');\n include_once('ComposerDependancies\\Message.php');\n include_once('ComposerDependancies\\Poll.php');\n include_once('ComposerDependancies\\Chat.php');\n include_once('ComposerDependancies\\Rule.php');\n\n \n include_once('ComposerDependancies\\Admin\\Users.php');\n\n }", "public function boot()\n {\n $this->package('domain/app');\n\n $this->setApplication();\n }", "public function bootstrap(): void\n {\n $globalConfigurationBuilder = (new GlobalConfigurationBuilder())->withEnvironmentVariables()\n ->withPhpFileConfigurationSource(__DIR__ . '/../config.php');\n (new BootstrapperCollection())->addMany([\n new DotEnvBootstrapper(__DIR__ . '/../.env'),\n new ConfigurationBootstrapper($globalConfigurationBuilder),\n new GlobalExceptionHandlerBootstrapper($this->container)\n ])->bootstrapAll();\n }", "public static function boot() {\n\t\tstatic::container()->boot();\n\t}", "public function boot()\n {\n $this->bootModulesMenu();\n $this->bootSkinComposer();\n $this->bootCustomBladeDirectives();\n }", "public function boot()\n {\n $this->app->get('modulizer')->bootstrapFileLoaders();\n\n $this->loadMigrationsFrom($this->app->get(ModulizerRepository::class)->migrations);\n\n $this->loadTranslations(\n collect($this->app->get(ModulizerRepository::class)->translations)\n );\n\n $this->publishes([\n $this->getDefaultConfigFilePath('modulizer') => config_path('modulizer.php'),\n ], 'config');\n\n $this->loadCommands();\n }", "public function boot()\n {\n $this->shareResources();\n $this->mergeConfigFrom(self::CONFIG_PATH, 'amocrm-api');\n }", "public function boot()\r\n {\r\n // Publishing is only necessary when using the CLI.\r\n if ($this->app->runningInConsole()) {\r\n $this->bootForConsole();\r\n }\r\n }", "public function boot() {\n\n\t\t$this->registerProviders();\n\t\t$this->bootProviders();\n\t\t$this->registerProxies();\n\t}", "public function boot()\n {\n $this->bootingDomain();\n\n $this->registerCommands();\n $this->registerListeners();\n $this->registerPolicies();\n $this->registerRoutes();\n $this->registerBladeComponents();\n $this->registerLivewireComponents();\n $this->registerSpotlightCommands();\n\n $this->bootedDomain();\n }", "public function boot()\n {\n self::$packageLocation = dirname(__DIR__);\n\n $this->publishes(\n [\n self::$packageLocation . DIRECTORY_SEPARATOR . 'config'\n . DIRECTORY_SEPARATOR . 'repository.php' => config_path('repository.php')\n ],\n 'config'\n );\n\n // Register commands\n if ($this->app->runningInConsole()) {\n $this->commands(\n [\n InterfaceMakeCommand::class,\n RepositoryMakeCommand::class\n ]\n );\n }\n }", "public function boot()\n {\n $this->setComposerHelpers();\n }", "public function boot() {\n\t\t$this->package('nrs/librarydirectory');\n\t\t$this->setConnection();\n\t\tinclude __DIR__.'/../../routes.php';\n\t\tinclude __DIR__.'/../../filters.php';\n\t}", "public function boot()\n {\n $this->bootSetTimeLocale();\n $this->bootBladeHotelRole();\n $this->bootBladeHotelGuest();\n $this->bootBladeIcon();\n }", "public function boot()\n {\n $path = __DIR__.'/../..';\n\n $this->package('clumsy/cms', 'clumsy', $path);\n\n $this->registerAuthRoutes();\n $this->registerBackEndRoutes();\n\n require $path.'/helpers.php';\n require $path.'/errors.php';\n require $path.'/filters.php';\n\n if ($this->app->runningInConsole()) {\n $this->app->make('Clumsy\\CMS\\Clumsy');\n }\n\n }", "public function boot()\n\t{\n\t\t$this->package('jakjr/keeper');\n\t}", "public function boot()\n {\n $this->makeRepositories();\n }", "public function boot(){\r\n $this->app->configure('sdk');\r\n $this->publishes([\r\n __DIR__.'/../../resources/config/sdk.php' => config_path('sdk.php')\r\n ]);\r\n $this->mergeConfigFrom(__DIR__.'/../../resources/config/sdk.php','sdk');\r\n\r\n $api = config('sdk.api');\r\n foreach($api as $key => $value){\r\n $this->app->singleton($key,$value);\r\n }\r\n }", "public function boot()\n {\n $this->setUpConfig();\n $this->setUpConsoleCommands();\n }", "public function boot()\r\n\t{\r\n\t\t$this->package('estey/hipsupport');\r\n\t\t$this->registerHipSupport();\r\n\t\t$this->registerHipSupportOnlineCommand();\r\n\t\t$this->registerHipSupportOfflineCommand();\r\n\r\n\t\t$this->registerCommands();\r\n\t}", "public function boot()\n {\n $this->strapRoutes();\n $this->strapViews();\n $this->strapMigrations();\n $this->strapCommands();\n\n $this->registerPolicies();\n }", "public function boot()\n {\n $this->callAfterResolving(BladeCompiler::class, function () {\n Blade::component(Hey::class);\n Blade::component(Section::class);\n Blade::component(Card::class);\n });\n }", "public function boot()\n {\n $providers = $this->make('config')->get('app.console_providers', array());\n foreach ($providers as $provider) {\n $provider = $this->make($provider);\n if ($provider && method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot(): void\n {\n try {\n // Just check if we have DB connection! This is to avoid\n // exceptions on new projects before configuring database options\n // @TODO: refcator the whole accessareas retrieval to be file-based, instead of db based\n DB::connection()->getPdo();\n\n if (Schema::hasTable(config('cortex.foundation.tables.accessareas'))) {\n // Register accessareas into service container, early before booting any module service providers!\n $this->app->singleton('accessareas', fn () => app('cortex.foundation.accessarea')->where('is_active', true)->get());\n }\n } catch (Exception $e) {\n // Be quiet! Do not do or say anything!!\n }\n\n $this->bootstrapModules();\n }", "public function boot()\n\t{\n\t\t$this->package('brenelz/craft');\n\t\t\n\t\t$this->app->missing(function(Exception $e) { $this->app->make('Brenelz\\Craft\\Service')->run(); });\n\t\t$this->app->error(function(MethodNotAllowedHttpException $e){ $this->app->make('Brenelz\\Craft\\Service')->run(); });\n\n\t\tAliasLoader::getInstance()->alias('Craft','Brenelz\\Craft\\Facade');\n\t}", "public function boot()\n {\n $this->bootViews();\n $this->bootCanonicalViewComposer();\n $this->registerBlueprints();\n $this->registerViewInactiveMacro();\n $this->bootMacros();\n }", "public function boot()\r\n\t{\r\n\t\t$this->package('bkwld/croppa');\r\n\r\n\t\t// Pass along the Config data so Croppa is decoupled from Laravel\r\n\t\tCroppa::config(array_merge($this->app->make('config')->get('croppa::config'), array(\r\n\t\t\t'host' => $this->app->make('request')->root(),\r\n\t\t)));\r\n\r\n\t\t// Listen for Cropa style URls, these are how Croppa gets triggered\r\n\t\t$this->app->make('router')->get('{path}', function($path) {\r\n\t\t\tCroppa::generate($path);\r\n\t\t})->where('path', Croppa::PATTERN);\r\n\t\t\r\n\t\t// Make it possible to access outside of namespace\r\n\t\tclass_alias('Bkwld\\Croppa\\Croppa', 'Croppa');\r\n\t}", "public function boot()\n {\n $this->setupConfig();\n\n $this->registerCommands();\n\n $this->setupParse();\n }", "public function boot()\n {\n foreach (glob(app_path('/Api/config/*.php')) as $path) {\n $path = realpath($path);\n $this->mergeConfigFrom($path, basename($path, '.php'));\n }\n\n // 引入自定义函数\n foreach (glob(app_path('/Helpers/*.php')) as $helper) {\n require_once $helper;\n }\n // 引入 api 版本路由\n $this->loadRoutesFrom(app_path('/Api/Routes/base.php'));\n\n }", "public function boot()\n {\n $this->setupConfig($this->app);\n }", "protected function bootServiceProviders()\n {\n foreach($this->activeProviders as $provider)\n {\n // check if the service provider has a boot method.\n if (method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->bindCommands();\n $this->registerCommands();\n $this->app->bind(InstallerContract::class, Installer::class);\n\n $this->publishes([\n __DIR__.'/../config/exceptionlive.php' => base_path('config/exceptionlive.php'),\n ], 'config');\n }\n\n $this->registerMacros();\n }", "public function boot()\n {\n /*\n * Registering the helper methods to package\n */\n $this->registerHelpers();\n\n /*\n * Registering the Package Views\n */\n $this->registerViews();\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->registerPublishing();\n }\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n require(__DIR__ . '/../routes/console.php');\n } else {\n // Menus for BPM are done through middleware. \n Route::pushMiddlewareToGroup('web', AddToMenus::class);\n \n // Assigning to the web middleware will ensure all other middleware assigned to 'web'\n // will execute. If you wish to extend the user interface, you'll use the web middleware\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(__DIR__ . '/../routes/web.php');\n \n // If you wish to extend the api, be sure to utilize the api middleware. In your api \n // Routes file, you should prefix your routes with api/1.0\n Route::middleware('api')\n ->namespace($this->namespace)\n ->prefix('api/1.0')\n ->group(__DIR__ . '/../routes/api.php');\n \n Event::listen(ScreenBuilderStarting::class, function($event) {\n $event->manager->addScript(mix('js/screen-builder-extend.js', 'vendor/api-connector'));\n $event->manager->addScript(mix('js/screen-renderer-extend.js', 'vendor/api-connector'));\n });\n }\n\n // load migrations\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n // Load our views\n $this->loadViewsFrom(__DIR__.'/../resources/views/', 'api-connector');\n\n // Load our translations\n $this->loadTranslationsFrom(__DIR__.'/../lang', 'api-connector');\n\n $this->publishes([\n __DIR__.'/../public' => public_path('vendor/api-connector'),\n ], 'api-connector');\n\n $this->publishes([\n __DIR__ . '/../database/seeds' => database_path('seeds'),\n ], 'api-connector');\n\n $this->app['events']->listen(PackageEvent::class, PackageListener::class);\n }", "public function boot(): void\n {\n View::composer(\n '*', CspViewComposer::class\n );\n }", "public function boot()\n\t{\n\t\t$this->package('by-cedric/delegator');\n\t}", "public function boot()\n\t{\n\t\t$this->bindRepositories();\n\t}", "protected function boot()\n {\n foreach ($this->getKernel()->getPlugins() as $plugin) {\n $plugin->boot($this);\n }\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n $this->app->registerConfiguredProvidersInRequest();\n\n $this->fireAppCallbacks($this->bootingCallbacks);\n\n /** array_walk\n * If when a provider booting, it reg some other providers,\n * then the new providers added to $this->serviceProviders\n * then array_walk will loop the new ones and boot them. // pingpong/modules 2.0 use this feature\n */\n array_walk($this->serviceProviders, function ($p) {\n $this->bootProvider($p);\n });\n\n $this->booted = true;\n\n $this->fireAppCallbacks($this->bootedCallbacks);\n }", "public function boot()\n {\n $this->setupConfig();\n //register rotating daily monolog provider\n $this->app->register(MonologProvider::class);\n $this->app->register(CircuitBreakerServiceProvider::class);\n $this->app->register(CurlServiceProvider::class);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()){\n // publish config\n $this->publishes([\n __DIR__.\"/../../config/modulity.php\" => config_path(\"modulity.php\")\n ], \"modulity-config\");\n\n // commands integration\n $this->commands([\n StructureGeneratorCommand::class,\n ServiceGeneratorCommand::class,\n RepositoryGeneratorCommand::class,\n ControllerGeneratorCommand::class,\n ProviderGeneratorCommand::class,\n ]);\n }\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n EnvironmentCommand::class,\n EventGenerateCommand::class,\n EventMakeCommand::class,\n JobMakeCommand::class,\n KeyGenerateCommand::class,\n MailMakeCommand::class,\n ModelMakeCommand::class,\n NotificationMakeCommand::class,\n PolicyMakeCommand::class,\n ProviderMakeCommand::class,\n RequestMakeCommand::class,\n ResourceMakeCommand::class,\n RuleMakeCommand::class,\n ServeCommand::class,\n StorageLinkCommand::class,\n TestMakeCommand::class,\n ]);\n }\n }", "public function boot()\n {\n $configuration = [];\n\n if (file_exists($file = getcwd() . '/kaleo.config.php')) {\n $configuration = include_once $file;\n }\n\n $this->app->singleton('kaleo', function () use ($configuration) {\n return new KaleoService($configuration);\n });\n }", "public function boot()\n {\n $this->app->register(UserServiceProvider::class);\n $this->app->register(DashboardServiceProvider::class);\n $this->app->register(CoreServiceProvider::class);\n $this->app->register(InstitutionalVideoServiceProvider::class);\n $this->app->register(InstitutionalServiceProvider::class);\n $this->app->register(TrainingServiceProvider::class);\n $this->app->register(CompanyServiceProvider::class);\n $this->app->register(LearningUnitServiceProvider::class);\n $this->app->register(PublicationServiceProvider::class);\n }", "public function boot()\n {\n $this->app->when(ChatAPIChannel::class)\n ->needs(ChatAPI::class)\n ->give(function () {\n $config = config('services.chatapi');\n return new ChatAPI(\n $config['token'],\n $config['api_url']\n );\n });\n }", "public function boot()\n {\n $this->mergeConfigFrom(__DIR__ . '/../../config/bs4.php', 'bs4');\n $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'bs');\n $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'bs');\n\n if ($this->app->runningInConsole())\n {\n $this->publishes([\n __DIR__ . '/../../resources/views' => resource_path('views/vendor/bs'),\n ], 'views');\n\n $this->publishes([\n __DIR__ . '/../../resources/lang' => resource_path('lang/vendor/bs'),\n ], 'lang');\n\n $this->publishes([\n __DIR__ . '/../../config' => config_path(),\n ], 'config');\n }\n }", "protected function setupBuiltInServices() {\n // generic services\n ServiceProviderInstaller::setup(new CacheServiceProvider());\n ServiceProviderInstaller::setup(new ConfigServiceProvider());\n ServiceProviderInstaller::setup(new DatabaseServiceProvider());\n ServiceProviderInstaller::setup(new FilesystemServiceProvider());\n ServiceProviderInstaller::setup(new LoggerServiceProvider());\n ServiceProviderInstaller::setup(new MiddlewareQueueServiceProvider());\n ServiceProviderInstaller::setup(new ModulesServiceProvider());\n ServiceProviderInstaller::setup(new RouterServiceProvider());\n ServiceProviderInstaller::setup(new SessionServiceProvider());\n ServiceProviderInstaller::setup(new TranslatorServiceProvider());\n ServiceProviderInstaller::setup(new UrlServiceProvider());\n ServiceProviderInstaller::setup(new VersionUriServiceProvider());\n ServiceProviderInstaller::setup(new VoltServiceProvider());\n // listener services\n $this->di->setShared('dispatcher.listener', new DispatcherListener());\n $this->di->setShared('router.listener', new RouterListener());\n $this->di->setShared('view.listener', new ViewListener());\n $this->di->setShared('db.listener', new DatabaseListener());\n // defaults\n $this->di->setShared('application', new MvcApplication());\n $this->di->setShared('dispatcher', DispatcherFactory::factory(/* module */''));\n $this->di->setShared('view', Factory::html());\n }", "public function boot()\n {\n $this->setupFacades(); \n //$this->setupConfigs(); \n }", "public function boot(): void\n {\n $this->registerPublishing();\n $this->registerCommands();\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/larkeauth-rbac-model.conf' => config_path('larkeauth-rbac-model.conf.larkeauth'),\n __DIR__ . '/../config/larkeauth.php' => config_path('larkeauth.php.larkeauth')\n ], 'larke-auth-config');\n\n $this->commands([\n Commands\\Install::class,\n Commands\\GroupAdd::class,\n Commands\\PolicyAdd::class,\n Commands\\RoleAssign::class,\n ]);\n }\n\n $this->mergeConfigFrom(__DIR__ . '/../config/larkeauth.php', 'larkeauth');\n\n $this->bootObserver();\n }", "public function boot()\n {\n if (!$this->app->runningInConsole()) {\n return;\n }\n\n $this->commands([\n ListenCommand::class,\n InstallCommand::class,\n EventsListCommand::class,\n ObserverMakeCommand::class,\n ]);\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n RabbitEvents::listen($event, $listener);\n }\n }\n }", "public function boot()\n {\n\n $this->app->bind(FileUploaderServiceInterface::class,FileUploaderService::class);\n $this->app->bind(ShopServiceInterface::class,ShopService::class);\n $this->app->bind(CategoryServiceInterface::class,CategoryService::class);\n $this->app->bind(ProductServiceInterface::class,ProductService::class);\n $this->app->bind(ShopSettingsServiceInterface::class,ShopSettingsService::class);\n $this->app->bind(FeedbackServiceInterface::class,FeedbackService::class);\n $this->app->bind(UserServiceInterface::class,UserService::class);\n $this->app->bind(ShoppingCartServiceInterface::class,ShoppingCartService::class);\n $this->app->bind(WishlistServiceInterface::class,WishlistService::class);\n $this->app->bind(NewPostApiServiceInterface::class,NewPostApiService::class);\n $this->app->bind(DeliveryAddressServiceInterface::class,DeliveryAddressService::class);\n $this->app->bind(StripeServiceInterface::class,StripeService::class);\n $this->app->bind(OrderServiceInterface::class,OrderService::class);\n $this->app->bind(MailSenderServiceInterface::class,MailSenderSenderService::class);\n }", "public function boot()\n {\n // Boot here application\n }", "public function boot()\n {\n $this->setupFacades();\n $this->setupViews();\n $this->setupBlades();\n }", "public function boot()\r\n\t{\r\n\t\t$this->package('fideloper/resource-response');\r\n\t}", "public function boot()\n {\n // Ports\n $this->app->bind(\n IAuthenticationService::class,\n AuthenticationService::class\n );\n $this->app->bind(\n IBeerService::class,\n BeerService::class\n );\n\n // Adapters\n $this->app->bind(\n IUserRepository::class,\n UserEloquentRepository::class\n );\n $this->app->bind(\n IBeerRepository::class,\n BeerEloquentRepository::class\n );\n }", "public function boot()\n {\n $source = dirname(__DIR__, 3) . '/config/config.php';\n\n if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {\n $this->publishes([$source => config_path('dubbo_cli.php')]);\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('dubbo_cli');\n }\n\n $this->mergeConfigFrom($source, 'dubbo_cli');\n }", "public function boot()\n {\n require_once __DIR__ . '/../thirdparty/src/autoload.php';\n }", "public function boot(): void\n {\n $this->publishes(\n [\n __DIR__ . '/../config/laravel_entity_services.php' =>\n $this->app->make('path.config') . DIRECTORY_SEPARATOR . 'laravel_entity_services.php',\n ],\n 'laravel_repositories'\n );\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel_entity_services.php', 'laravel_entity_services');\n\n $this->registerCustomBindings();\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n InstallPreset::class,\n ]);\n }\n }", "public function boot(): void\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'imc');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'imc');\n $this->registerPackageRoutes();\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n $this->app->singleton( ShippingAdapterInterface::class, Aramex::class);\n $this->app->singleton( ShippingAdapterInterface::class, DHL::class);\n JsonResource::withoutWrapping();\n }", "public function boot()\n {\n //\n Configuration::environment(\"sandbox\");\n Configuration::merchantId(\"cmpss9trsxsr4538\");\n Configuration::publicKey(\"zy3x5mb5jwkcrxgr\");\n Configuration::privateKey(\"4d63c8b2c340daaa353be453b46f6ac2\");\n\n\n $modules = Directory::listDirectories(app_path('Modules'));\n\n foreach ($modules as $module)\n {\n $routesPath = app_path('Modules/' . $module . '/routes.php');\n $viewsPath = app_path('Modules/' . $module . '/Views');\n\n if (file_exists($routesPath))\n {\n require $routesPath;\n }\n\n if (file_exists($viewsPath))\n {\n $this->app->view->addLocation($viewsPath);\n }\n }\n }", "public function boot()\n {\n $this->package('emayk/ics');\n include __DIR__ . '/routes/root.php';\n include __DIR__ . '/Service/helpers.php';\n include __DIR__ . '/Service/Boot/BootServiceProvider.php';\n include __DIR__ . '/Service/Register/RegisterEvent.php';\n }", "public function boot()\n {\n $this->dispatch(new SetCoreConnection());\n $this->dispatch(new ConfigureCommandBus());\n $this->dispatch(new ConfigureTranslator());\n $this->dispatch(new LoadStreamsConfiguration());\n\n $this->dispatch(new InitializeApplication());\n $this->dispatch(new AutoloadEntryModels());\n $this->dispatch(new AddAssetNamespaces());\n $this->dispatch(new AddImageNamespaces());\n $this->dispatch(new AddViewNamespaces());\n $this->dispatch(new AddTwigExtensions());\n $this->dispatch(new RegisterAddons());\n }", "public function boot() {\n\n\t\t$this->register_cli_commands();\n\n\t\t$this->register_routes();\n\n\t\t$this->apply_sitemap_optimisations();\n\n\t}", "public function boot()\n {\n if (! $this->isRunningInBotManStudio()) {\n $this->loadDrivers();\n }\n }", "public function boot(): void\n {\n $this->app\n ->when(RocketChatWebhookChannel::class)\n ->needs(RocketChat::class)\n ->give(function () {\n return new RocketChat(\n new HttpClient(),\n Config::get('services.rocketchat.url'),\n Config::get('services.rocketchat.token'),\n Config::get('services.rocketchat.channel')\n );\n });\n }", "public function boot()\n {\n $this->loadMacros();\n /*\n * Optional methods to load your package assets\n */\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'paginator');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'paginator');\n // $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/config.php' => config_path('paginator.php'),\n ], 'OMPaginatorConfig');\n\n // Publishing assets.\n $this->publishes([\n __DIR__ . '/../resources/assets' => public_path('vendor/omidmorovati/paginator'),\n ], 'OMPaginatorAssets');\n\n // Publishing the views.\n $this->publishes([\n __DIR__ . '/../resources/views' => resource_path('views/vendor/omidmorovati/paginator'),\n ], 'OMPaginatorViews');\n\n\n // Publishing the translation files.\n /*$this->publishes([\n __DIR__.'/../resources/lang' => resource_path('lang/vendor/paginator'),\n ], 'lang');*/\n\n // Registering package commands.\n $this->commands([Installation::class]);\n }\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->loadMigrations();\n }\n if(config($this->vendorNamespace. '::config.enabled')){\n Livewire::component($this->vendorNamespace . '::login-form', LoginForm::class);\n $this->loadRoutes();\n $this->loadViews();\n $this->loadMiddlewares();\n $this->loadTranslations();\n }\n }", "public function boot(): void\n {\n // routes\n $this->loadRoutes();\n // assets\n $this->loadAssets('assets');\n // configuration\n $this->loadConfig('configs');\n // views\n $this->loadViews('views');\n // view extends\n $this->extendViews();\n // translations\n $this->loadTranslates('views');\n // adminer\n $this->loadAdminer('adminer');\n // commands\n $this->loadCommands();\n // gates\n $this->registerGates();\n // listeners\n $this->registerListeners();\n // settings\n $this->applySettings();\n }", "public function boot()\n {\n // stubs\n $this->publishes([__DIR__ . '/../resources/stubs' => resource_path('stubs/vendor/scaffold')], 'stubs');\n\n // commands\n if ($this->app->runningInConsole()) {\n $this->commands([ScaffoldCreateCommand::class]);\n $this->commands([ScaffoldRemoveCommand::class]);\n }\n }", "public function boot()\r\n\t{\r\n\t\t$this->package('bkwld/croppa');\r\n\r\n\t\t// Pass along the Config data so Croppa is decoupled from Laravel\r\n\t\tCroppa::config(array_merge(Config::get('croppa::config'), array(\r\n\t\t\t'host' => Request::root(),\r\n\t\t)));\r\n\r\n\t\t// Subscribe to 404 events, these are how Croppa gets triggered\r\n\t\tApp::missing(function($e) {\r\n\r\n\t\t\t// Increase memory limit, cause some images require a lot\r\n\t\t\t// too resize\r\n\t\t\tini_set('memory_limit', '128M');\r\n\t\t\t\r\n\t\t\t// Pass Croppa the current URL\r\n\t\t\tCroppa::handle_404(Request::path());\r\n\t\t});\r\n\t\t\r\n\t\t// Make it possible to access outside of namespace\r\n\t\tclass_alias('Bkwld\\Croppa\\Croppa', 'Croppa');\r\n\t}", "public function boot()\n {\n\n $this->loadRoutesFrom(__DIR__ . '/routes.php');\n $this->loadViewsFrom(__DIR__ . '/../views', 'docs');\n\n $this->bootCommands();\n $this->bootPublishes();\n $this->bootAnnotations();\n }", "public function boot()\n {\n $this->bootViews();\n\n $this->bootPublishedFiles();\n }", "public function boot()\n {\n $this->app->bind(IUserService::class, UserService::class);\n $this->app->bind(ISeminarService::class, SeminarService::class);\n $this->app->bind(IOrganizationService::class, OrganizationService::class);\n $this->app->bind(ISocialActivityService::class, SocialActivityService::class);\n }", "public function boot()\r\n\t{\r\n\t\t$this->package('lamarus/stormpath-artisan');\r\n\t}", "public function boot()\n\t{\n\t\t$this->package('atlantis/admin');\n\n\t\t#i: Set the locale\n\t\t$this->setLocale();\n\n $this->registerServiceAdminValidator();\n $this->registerServiceAdminFactory();\n $this->registerServiceAdminDataTable();\n $this->registerServiceModules();\n\n\t\t#i: Include our filters, view composers, and routes\n\t\tinclude __DIR__.'/../../filters.php';\n\t\tinclude __DIR__.'/../../views.php';\n\t\tinclude __DIR__.'/../../routes.php';\n\n\t\t$this->app['events']->fire('admin.ready');\n\t}", "public function boot()\n {\n $this->app->booted(function () {\n $this->callMethodIfExists('jobs');\n });\n }", "public function boot()\n {\n $this->commands(\n array_merge(\n $this->routingCommands(),\n $this->packageCommands(),\n $this->databaseCommands(),\n $this->standardCommands(),\n $this->foundationCommands(),\n $this->packageInternalCommands()\n )\n );\n }", "public function boot()\n {\n parent::boot();\n\n $this->publishes([\n __DIR__.'/Config/config.php' => config_path('sanity.php'),\n ], 'config');\n\n $this->publishes([\n __DIR__.'/Config/phpcs.xml' => base_path('phpcs.xml'),\n ], 'config');\n\n if ($this->app->runningInConsole()) {\n $this->commands([\n \\Sanity\\Commands\\SanityMock::class,\n \\Sanity\\Commands\\SanityReset::class,\n ]);\n }\n }", "public function boot()\n\t{\n\t\t$this->package('indatus/ranger');\n\t}", "public function boot(): void\n {\n $this->loadViews();\n $this->loadTranslations();\n\n if ($this->app->runningInConsole()) {\n $this->publishMultipleConfig();\n $this->publishViews(false);\n $this->publishTranslations(false);\n }\n }", "public function boot()\n {\n $this->publishes([\n __DIR__ . '/../config/layer.php' => $this->app->make('path.config') . '/layer.php'\n ], 'config');\n\n $this->app->bind('Aosmak\\Laravel\\Layer\\Sdk\\Services\\LayerServiceInterface', function ($app) {\n $service = $app->make('Aosmak\\Laravel\\Layer\\Sdk\\Services\\LayerService');\n $service->setConfig($app['config']['layer']);\n\n return $service;\n });\n }", "public function boot()\n\t{\n\t\t$this->package('raymondidema/user-package');\n include __DIR__.'/../../routes.php';\n include __DIR__.'/../../filters.php';\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Check::class,\n Clear::class,\n Fix::class,\n Fresh::class,\n Foo::class,\n Ide::class,\n MakeDatabase::class,\n Ping::class,\n Version::class,\n ]);\n }\n }" ]
[ "0.76586616", "0.74863476", "0.73925996", "0.7310707", "0.72389156", "0.7210699", "0.7075735", "0.70725244", "0.70640147", "0.70606387", "0.70435154", "0.70326304", "0.70036054", "0.70030606", "0.6988627", "0.69814014", "0.6981051", "0.69792324", "0.69761664", "0.69684076", "0.69659674", "0.69612765", "0.69564945", "0.6946546", "0.69279665", "0.6920839", "0.691705", "0.6912895", "0.69025815", "0.6892542", "0.6888029", "0.6864986", "0.68437797", "0.6824717", "0.68225884", "0.6813089", "0.6811547", "0.67857355", "0.67788553", "0.67747056", "0.6764794", "0.6746892", "0.674498", "0.6744978", "0.6744008", "0.6742721", "0.6738666", "0.6737535", "0.6728479", "0.67238164", "0.67189795", "0.67146873", "0.67125493", "0.6709333", "0.67045915", "0.66961384", "0.6693303", "0.66825825", "0.66808647", "0.6680349", "0.66794115", "0.66785586", "0.66767824", "0.66742957", "0.6672332", "0.66722286", "0.6670865", "0.6669013", "0.66658396", "0.66648984", "0.66612345", "0.6657103", "0.6652025", "0.6651237", "0.6645329", "0.66417164", "0.6640037", "0.66350925", "0.6634825", "0.6634716", "0.66323686", "0.6629718", "0.66275454", "0.6625593", "0.662442", "0.6613123", "0.66108996", "0.66076", "0.6597881", "0.65931946", "0.6586106", "0.65789163", "0.6578119", "0.65757304", "0.65749276", "0.6568662", "0.6566109", "0.65643406", "0.65640527", "0.6562943", "0.6561925" ]
0.0
-1
Register any package services.
public function register(): void { $this->mergeConfigFrom(__DIR__.'/../config/janus.php', 'janus'); $this->app->singleton(Janus::class, Janus::class); $this->app->alias(Janus::class, 'janus'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function registerServices(): void\n {\n $this->registerKernels();\n $this->registerFactories();\n $this->registerMicroServices();\n }", "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n // Only Environment local\n if ($this->app->environment() !== 'production') {\n foreach ($this->services as $serviceClass) {\n $this->registerClass($serviceClass);\n }\n }\n\n // Register Aliases\n $this->registerAliases();\n }", "public function register()\n {\n $this->registerAliases();\n $this->registerFormBuilder();\n\n // Register package commands\n $this->commands([\n 'CoreDbCommand',\n 'CoreSetupCommand',\n 'CoreSeedCommand',\n 'EventEndCommand',\n 'ArchiveMaxAttempts',\n 'CronCommand',\n 'ExpireInstructors',\n 'SetTestLock',\n 'StudentArchiveTraining',\n 'TestBuildCommand',\n 'TestPublishCommand',\n ]);\n\n // Merge package config with one in outer app \n // the app-level config will override the base package config\n $this->mergeConfigFrom(\n __DIR__.'/../config/core.php', 'core'\n );\n\n // Bind our 'Flash' class\n $this->app->bindShared('flash', function () {\n return $this->app->make('Hdmaster\\Core\\Notifications\\FlashNotifier');\n });\n\n // Register package dependencies\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Bootstrapper\\BootstrapperL5ServiceProvider');\n $this->app->register('Codesleeve\\LaravelStapler\\Providers\\L5ServiceProvider');\n $this->app->register('PragmaRX\\ZipCode\\Vendor\\Laravel\\ServiceProvider');\n $this->app->register('Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider');\n\n $this->app->register('Zizaco\\Confide\\ServiceProvider');\n $this->app->register('Zizaco\\Entrust\\EntrustServiceProvider');\n }", "public function register(){\n $this->registerDependencies();\n $this->registerAlias();\n $this->registerServiceCommands();\n }", "private function registerServices() {\n // Modules\n $this->addService('modules', 'MyTravel\\Core\\Service\\Modules::setService');\n // Routing\n $this->addService('routing', 'MyTravel\\Core\\Service\\Routing::setService');\n // Event dispatcher\n $this->serviceContainer\n ->register('events', 'Symfony\\Component\\EventDispatcher\\EventDispatcher');\n // Database\n $this->addService('db', 'MyTravel\\Core\\Service\\Db::setService');\n // Access\n $this->addService('access', 'MyTravel\\Core\\Service\\Access::setService');\n }", "public function register()\n {\n // Register all repositories\n foreach ($this->repositories as $repository) {\n $this->app->bind(\"App\\Repository\\Contracts\\I{$repository}\",\n \"App\\Repository\\Repositories\\\\{$repository}\");\n }\n\n // Register all services\n foreach ($this->services as $service) {\n $this->app->bind(\"App\\Service\\Contracts\\I{$service}\", \n \"App\\Service\\Modules\\\\{$service}\");\n }\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n {\n $this->app->bind(\n Services\\UserService::class,\n Services\\Implementations\\UserServiceImplementation::class\n );\n $this->app->bind(\n Services\\FamilyCardService::class,\n Services\\Implementations\\FamilyCardServiceImplementation::class\n );\n }", "public function register()\n {\n $this->app->register('ProAI\\Datamapper\\Providers\\MetadataServiceProvider');\n\n $this->app->register('ProAI\\Datamapper\\Presenter\\Providers\\MetadataServiceProvider');\n\n $this->registerScanner();\n\n $this->registerCommands();\n }", "protected function registerServices()\n {\n $this->app->singleton('components', function($app) {\n $path = $app['config']->get('components.paths.components');\n\n return new Repository($app, $path);\n });\n }", "public function register()\n {\n \n //require __DIR__ . '/../vendor/autoload.php';\n\n // use when developing\n //require __DIR__ . '/../../slack/src/SlackServiceProvider.php';\n\n // find out what this does\n //$this->mergeConfigFrom( __DIR__ . '/config/base.php', 'providers' );\n\n // register package dependency \n $this->app->register('Baytree\\Slack\\SlackServiceProvider');\n\n // register package events\n $this->app->register('Baytree\\KnowItFirst\\EventServiceProvider');\n }", "public function register()\r\n {\r\n $this->app->bind(\r\n ViberServiceInterface::class,\r\n ViberService::class\r\n );\r\n\r\n $this->app->bind(\r\n ApplicantServiceInterface::class,\r\n ApplicantService::class\r\n );\r\n }", "public function register()\n {\n\n $this->app->register(HookProvider::class);\n $this->app->register(RouteProvider::class);\n// $this->app->register(InstallModuleProvider::class);\n }", "public function register()\n {\n /**\n * Register additional service\n * providers if they exist.\n */\n foreach ($this->providers as $provider) {\n if (class_exists($provider)) {\n $this->app->register($provider);\n }\n }\n }", "public function register()\n {\n $this->app->bind(AttributeServiceInterface::class,AttributeService::class);\n $this->app->bind(ProductServiceIntarface::class,ProductService::class);\n\n\n }", "public function register()\n {\n // Bind Credential Contract with Service\n $this->app->bind(Credentials::class, function ($app){\n return new CredentialsManger($app->make('filesystem.disk'), $app->make('encrypter'));\n });\n\n // Bind Caption Contract with Service\n $this->app->bind(Configuration::class, function ($app){\n return new ConfigurationManager($app->make('filesystem.disk'));\n });\n\n // Inject dependencies into Auth Service.\n $this->app->singleton(Post::class, function ($app){\n return new PostService(new Instagram(true, true), $app->make(Credentials::class));\n });\n\n // Inject Guzzle Into Reddit Service\n $this->app->singleton(Scraper::class, function ($app){\n return new ScraperService(new Client(['base_uri' => 'http://www.reddit.com']), $app->make(Configuration::class), $app->make('filesystem.disk'));\n });\n\n $this->app->bind(Caption::class, function ($app){\n return new CaptionManager($app->make('filesystem.disk'), $app->make('encrypter'));\n });\n }", "public function register()\n {\n $this->app->bind(\n ClientServiceInterface::class,\n ClientService::class\n );\n\n $this->app->bind(\n ProjectServiceInterface::class,\n ProjectService::class\n );\n\n $this->app->bind(\n ActionServiceInterface::class,\n ActionService::class\n );\n }", "public function register(): void {\n $this->app->bind(ItemAffixService::class, function ($app) {\n return new ItemAffixService();\n });\n\n $this->app->bind(AssignSkillService::class, function ($app) {\n return new AssignSkillService();\n });\n\n $this->app->bind(UpdateCharacterStatsService::class, function ($app) {\n return new UpdateCharacterStatsService();\n });\n\n $this->app->bind(UserService::class, function($app) {\n return new UserService();\n });\n\n $this->app->bind(ItemsService::class, function($app) {\n return new ItemsService();\n });\n\n $this->app->bind(QuestService::class, function() {\n return new QuestService();\n });\n\n $this->app->bind(InfoPageService::class, function() {\n return new InfoPageService();\n });\n\n $this->app->bind(GuideQuestService::class, function() {\n return new GuideQuestService();\n });\n\n $this->app->bind(LocationService::class, function($app) {\n return new LocationService($app->make(CoordinatesCache::class));\n });\n\n $this->commands([CreateAdminAccount::class, GiveKingdomsToNpcs::class]);\n }", "public function register()\n {\n // Config\n $this->mergeConfigFrom( __DIR__ . '/../config/package.php', 'package');\n\n // Controllers\n $this->app->make('Nabeeljavaid\\Package\\Controllers\\PackageController');\n }", "public function register()\n {\n // merge in df config, https://laravel.com/docs/5.4/packages#resources\n $configPath = __DIR__ . '/../config/config.php';\n $this->mergeConfigFrom($configPath, 'df');\n\n // Add our service types.\n $this->app->resolving('df.service', function (ServiceManager $df){\n $df->addType(\n new ServiceType([\n 'name' => 'local_file',\n 'label' => 'Local File Storage',\n 'description' => 'File service supporting the local file system.',\n 'group' => ServiceTypeGroups::FILE,\n 'config_handler' => LocalFileConfig::class,\n 'factory' => function ($config){\n return new LocalFileService($config);\n },\n ])\n );\n\n $df->addType(\n new ServiceType([\n 'name' => 'ftp_file',\n 'label' => 'FTP File Storage',\n 'description' => 'File service supporting the FTP protocol.',\n 'group' => ServiceTypeGroups::FILE,\n 'config_handler' => FTPFileConfig::class,\n 'factory' => function ($config){\n return new FTPFileService($config);\n },\n ])\n );\n\n $df->addType(\n new ServiceType([\n 'name' => 'sftp_file',\n 'label' => 'SFTP File Storage',\n 'description' => 'File service supporting the SFTP protocol.',\n 'group' => ServiceTypeGroups::FILE,\n 'config_handler' => SFTPFileConfig::class,\n 'factory' => function ($config){\n return new SFTPFileService($config);\n },\n ])\n );\n\n $df->addType(\n new ServiceType([\n 'name' => 'webdav_file',\n 'label' => 'WebDAV File Storage',\n 'description' => 'File service supporting WebDAV.',\n 'group' => ServiceTypeGroups::FILE,\n 'config_handler' => WebDAVFileConfig::class,\n 'factory' => function ($config){\n return new WebDAVFileService($config);\n },\n ])\n );\n });\n }", "public function register()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\n $loader->alias('Laratrust', 'Laratrust\\LaratrustFacade');\n $loader->alias('Form', 'Collective\\Html\\FormFacade');\n $loader->alias('Html', 'Collective\\Html\\HtmlFacade');\n $loader->alias('Markdown', 'BrianFaust\\Parsedown\\Facades\\Parsedown');\n\n $this->app->register('Baum\\Providers\\BaumServiceProvider');\n $this->app->register('BrianFaust\\Parsedown\\ServiceProvider');\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Laravel\\Scout\\ScoutServiceProvider');\n $this->app->register('Laratrust\\LaratrustServiceProvider');\n\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\AuthServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\EventServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\ViewServiceProvider');\n\n $this->registerCommands();\n }", "public function register()\n {\n // Automatically apply the package configuration\n if (!$this->app->isLocal()) {\n if (class_exists(\\Laravel\\Telescope\\TelescopeServiceProvider::class)) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n }\n \n if (class_exists(Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class)) {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n }\n }", "public function register()\n {\n if ($this->app->isLocal()) {\n $this->app->register(TelescopeServiceProvider::class);\n $this->app->register(DuskServiceProvider::class);\n }\n }", "public function register()\n {\n $this->app->bind(\n PegawaiServiceContract::class,\n PegawaiService::class \n );\n\n $this->app->bind(\n RiwayatPendidikanServiceContract::class,\n RiwayatPendidikanService::class \n );\n\n $this->app->bind(\n ProductionHouseServiceContract::class,\n ProductionHouseService::class\n );\n\n $this->app->bind(\n MovieServiceContract::class,\n MovieService::class\n );\n\n $this->app->bind(\n PangkatServiceContract::class,\n PangkatService::class \n );\n\n }", "public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n\n\n\n $this->app->register(ResponseMacroServiceProvider::class);\n $this->app->register(TwitterServiceProvider::class);\n }", "public function register() {\n\t\t$this->app->bind(SymfonyContract::class, function () {\n\t\t\t$api = app(GithubAPIContract::class);\n\t\t\treturn new SymfonyService($api);\n\t\t});\n\t}", "public function register()\n {\n $this->app->singleton(\n FileImportServiceInterface::class,\n FileImportService::class\n );\n $this->app->singleton(\n CustomerServiceInterface::class,\n CustomerService::class\n );\n }", "public function register()\n\t{\n\t\t$this->app->register('Tlr\\Menu\\Laravel\\MenuServiceProvider');\n\t\t$this->app->register('Tlr\\Routing\\EventServiceProvider');\n\t\t$this->app->register('Tlr\\Auth\\AuthServiceProvider');\n\t\t$this->app->register('Tlr\\Types\\TypeServiceProvider');\n\n\t\t$this->commands('Tlr\\Cms\\InstallCommand');\n\n\t\t$this->app->register('Barryvdh\\Debugbar\\ServiceProvider');\n\t}", "public function register()\n {\n $this->app->registerDeferredProvider(GeneratorServiceProvider::class);\n $this->app->registerDeferredProvider(AccessServiceProvider::class);\n $this->app->register(ThemeServiceProvider::class);\n $this->app->register(PaymentServiceProvider::class);\n if ($this->app->runningInConsole()) {\n $this->commands([\n ClearCommand::class,\n GenerateJsRouteCommand::class,\n GeneratePermissionCommand::class,\n ]);\n }\n\n self::addMacros();\n }", "public function register()\n {\n // $this->app->bind('AuthService', AuthService::class);\n }", "public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }", "public function register()\n {\n $this->app->bind('activity', function () {\n return new ActivityService(\n $this->app->make(Activity::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('views', function () {\n return new ViewService(\n $this->app->make(View::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('setting', function () {\n return new SettingService(\n $this->app->make(Setting::class),\n $this->app->make(Repository::class)\n );\n });\n\n $this->app->bind('images', function () {\n return new ImageService(\n $this->app->make(Image::class),\n $this->app->make(ImageManager::class),\n $this->app->make(Factory::class),\n $this->app->make(Repository::class)\n );\n });\n }", "public function register()\n {\n $this->app->bind(SoapService::class, PhpSoapService::class);\n\n $this->registerSaman();\n\n $this->app->singleton(NikPayFactory::class, function () {\n return new NikPayFactory();\n });\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerCommand();\n $this->registerSchedule();\n $this->registerDev();\n\n }", "public function register()\n {\n //Bind all interfaces with repositories\n $this->app->bind(UserRepository::class, UserRepositoryImpl::class);\n $this->app->bind(ProductRepository::class, ProductRepositoryImpl::class);\n }", "public function register(): void\n {\n $this->configure();\n $this->registerServices();\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\UtilitiesServiceProvider');\n $this->registerLogViewer();\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\CommandsServiceProvider');\n }", "public function register()\n {\n $this->registerFlareFacade();\n $this->registerServiceProviders();\n $this->registerBindings();\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'StartMeUp\\Services\\Registrar'\n\t\t);\n\n\t\t$repositories = [\n\t\t\t'Company',\n\t\t];\n\t\tforeach ($repositories as $repository) {\n\t\t\t$this->bindRepository($repository);\n\t\t}\n\n\t}", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }", "public function registerServices()\n {\n $this->app->bind('helpers.lib', function($app) {\n return new LibHelper;\n });\n $this->app->bind('helpers.theme', function($app) {\n return ThemeHelper::instance();\n });\n $this->app->bind('helpers.acf', function($app) {\n $helper = AcfHelper::instance();\n $helper->setThemeHelper($this->app['helpers.theme']);\n $helper->setLib($this->app['helpers.lib']);\n\n return $helper;\n });\n }", "public function register()\n {\n $this->registerRepositories();\n }", "public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(MailConfigServiceProvider::class);\n }", "public function register()\r\n {\r\n Passport::ignoreMigrations();\r\n\r\n $this->app->singleton(\r\n CityRepositoryInterface::class,\r\n CityRepository::class\r\n );\r\n\r\n $this->app->singleton(\r\n BarangayRepositoryInterface::class,\r\n BarangayRepository::class\r\n );\r\n }", "public function register() \n { \n $this->app->bind(PoBomInterface::class, PoBomRepository::class);\n $this->app->bind(EmployeeInterface::class, EmployeeRepository::class);\n $this->app->bind(SalaryInterface::class, SalaryRepository::class);\n $this->app->bind(BonusInterface::class, BonusRepository::class);\n $this->app->bind(AttendanceProcessInterface::class, AttendanceProcessRepository::class);\n }", "public function register()\n {\n\n $this->app->register(RepositoryServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('maxfactor', Maxfactor::class);\n $this->app->bind('mx-countries', Countries::class);\n $this->app->bind('mx-format', Format::class);\n $this->app->bind('mx-video', Video::class);\n $this->app->bind('mx-search', Search::class);\n\n $this->publishConfigs();\n }", "public function register()\n {\n foreach (static::$repositories as $repository) {\n $this->app->singleton(\n $repository[0],\n $repository[1]\n );\n }\n }", "public function register()\n {\n $this->app->bind(\n 'Larafolio\\Http\\HttpValidator\\HttpValidator',\n 'Larafolio\\Http\\HttpValidator\\CurlValidator'\n );\n\n $this->app->register(ImageServiceProvider::class);\n }", "public function register()\n {\n $this->registerServices();\n $this->setupStubPath();\n $this->registerProviders();\n }", "public function register()\n {\n $this->app->bind('App\\Services\\UserService');\n $this->app->bind('App\\Services\\PostService');\n $this->app->bind('App\\Services\\MyPickService');\n $this->app->bind('App\\Services\\FacebookService');\n $this->app->bind('App\\Services\\LikeService');\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(AuthServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(HttpClient::class, function ($app) {\n return new HttpClient();\n });\n\n $this->app->bind(SeasonService::class, function ($app) {\n return new SeasonService($app->make(HttpClient::class));\n });\n\n $this->app->bind(MatchListingController::class, function ($app) {\n return new MatchListingController($app->make(SeasonService::class));\n });\n\n }", "public function register()\n {\n $this->app->singleton(CriteriaInterface::class, CriteriaService::class);\n $this->app->bind(UserRepositoryContract::class, UserRepository::class);\n $this->app->bind(CheckAttributeRepositoryContract::class, CheckAttributeRepository::class);\n $this->app->bind(CheckRepositoryContract::class, CheckRepository::class);\n $this->app->bind(RatingRepositoryContract::class, RatingRepository::class);\n $this->app->bind(PharmacyRepository::class, PharmacyRepository::class);\n }", "public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(\n IMEIValidatorInterface::class,\n IMEIValidator::class\n );\n\n $this->app->bind(\n GeoInterface::class,\n GoogleGeo::class\n );\n }", "public function register()\n {\n// bind repo\n $this->app->bind(ParcelRepositoryContract::class, ParcelRepository::class);\n $this->app->bind(ShippingRequestRepositoryContract::class, ShippingRequestRepository::class);\n $this->app->bind(ParcelImageRepositoryContract::class, ParcelImageRepository::class);\n\n// bind service\n $this->app->bind(ParcelServiceContract::class, ParcelService::class);\n }", "public function register()\n {\n // Register package dependencies' service providers and aliases (so the user doesn't have to in app/config/app.php)\n $this->app->register('Radweb\\JsonExceptionFormatter\\JsonExceptionFormatterServiceProvider');\n\n // Register package interfaces with their corresponding implementations\n $this->app->bind('Radweb\\JsonExceptionFormatter\\FormatterInterface', 'Antarctica\\JsonExceptionFormatter\\Formatter\\JsonExceptionFormatter');\n }", "public function register()\n {\n $this->app->bind(FacebookMarketingContract::class,FacebookMarketingService::class);\n }", "public function register()\n {\n $this->app->alias('bugsnag.logger', Log::class);\n $this->app->alias('bugsnag.logger', LoggerInterface::class);\n\n $this->registerGenerators();\n $this->registerRoutes();\n }", "public function register()\n {\n $this->app->resolving('df.service', function (ServiceManager $df) {\n $df->addType(\n new ServiceType([\n 'name' => 'rackspace_cloud_files',\n 'label' => 'Rackspace Cloud Files',\n 'description' => 'File service supporting Rackspace Cloud Files Storage system.',\n 'group' => ServiceTypeGroups::FILE,\n 'config_handler' => RackspaceCloudFilesConfig::class,\n 'factory' => function ($config) {\n return new OpenStackObjectStore($config);\n },\n ])\n );\n $df->addType(\n new ServiceType([\n 'name' => 'openstack_object_storage',\n 'label' => 'OpenStack Object Storage',\n 'description' => 'File service supporting OpenStack Object Storage system.',\n 'group' => ServiceTypeGroups::FILE,\n 'config_handler' => OpenStackObjectStorageConfig::class,\n 'factory' => function ($config) {\n return new OpenStackObjectStore($config);\n },\n ])\n );\n });\n }", "public function register()\n {\n $this->app->singleton(ISalesOrderService::class, SalesOrderServiceImpl::class);\n }", "public function registerServices(){\n }", "protected function registerServices()\n {\n $this->app->bind(SocialProvidersManager::class, SocialiteProvidersManager::class);\n\n $this->app->singleton(TwoFactor::class, function () {\n return new AuthyTwoFactor(new Client());\n });\n }", "public function register()\n {\n $this->app->bind(\\App\\Service\\Theme\\ThemeService::class, \\App\\Service\\Theme\\Theme::class);\n }", "public function register()\n {\n $this->mergeConfigurations();\n \n $this->registerServiceProviders();\n $this->registerComponentsServiceProviders();\n \n $this->app['jarboe'] = $this->app->share(function($app) {\n return new Jarboe();\n });\n\n $this->doCommandsRegister();\n }", "public function register()\n {\n defined('XS_APP_ROOT') || define('XS_APP_ROOT', config_path());\n $this->app->singleton(XunsearchService::class, function ($app) {\n return new XunsearchService();\n });\n $this->app->alias(XunsearchService::class, 'xunsearch');\n }", "public function register()\n {\n if ('local' === $this->app->environment()) {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n $this->app->register(\\Reliese\\Coders\\CodersServiceProvider::class);\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n }\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n $this->registerMetaService();\n $this->registerLabelService();\n $this->registerTypeService();\n $this->registerGroupeService();\n $this->registerActiviteService();\n $this->registerRiiinglinkService();\n $this->registerInviteService();\n $this->registerTagService();\n $this->registerAuthService();\n $this->registerChangeService();\n $this->registerRevisionService();\n $this->registerUploadService();\n //$this->registerTransformerService();\n }", "public function register()\n {\n $this->app->register('Anomaly\\Streams\\Addon\\Module\\Resources\\Provider\\RouteServiceProvider');\n $this->app->register('Anomaly\\Streams\\Addon\\Module\\Resources\\Provider\\ListenerServiceProvider');\n $this->app->register('Anomaly\\Streams\\Addon\\Module\\Resources\\Provider\\InterfaceServiceProvider');\n }", "public function register()\n {\n $this->app->singleton(EntityCacheService::class, function ($app) {\n return new EntityCacheService();\n });\n $this->app->singleton(CampaignCacheService::class, function ($app) {\n return new CampaignCacheService();\n });\n $this->app->singleton(UserCacheService::class, function ($app) {\n return new UserCacheService();\n });\n $this->app->singleton(PostCacheService::class, function ($app) {\n return new PostCacheService();\n });\n\n $this->app->alias(EntityCacheService::class, 'entitycache');\n $this->app->alias(CampaignCacheService::class, 'campaigncache');\n $this->app->alias(UserCacheService::class, 'usercache');\n $this->app->alias(PostCacheService::class, 'postcache');\n }", "public function register()\n {\n $this->app->singleton('composer', function($app)\n {\n return new Composer($app['files'], $app['path.base']);\n });\n\n $this->app->singleton('forge', function($app)\n {\n return new Forge($app);\n });\n\n // Register the additional service providers.\n $this->app->register('Nova\\Console\\ScheduleServiceProvider');\n $this->app->register('Nova\\Queue\\ConsoleServiceProvider');\n }", "public function register()\n {\n $this->setupConfig();\n\n $this->bindServices();\n }", "public function register()\n {\n $this->app->register(\\Maatwebsite\\Excel\\ExcelServiceProvider::class);\n $this->app->register(\\Intervention\\Image\\ImageServiceProvider::class);\n $this->app->register(\\Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\DatatablesServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\ButtonsServiceProvider::class);\n\n $loader = null;\n if (class_exists('Illuminate\\Foundation\\AliasLoader')) {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n }\n\n // Facades\n if ($loader != null) {\n $loader->alias('Image', \\Intervention\\Image\\Facades\\Image::class);\n $loader->alias('Excel', \\Maatwebsite\\Excel\\Facades\\Excel::class);\n\n }\n\n if (app()->environment() != 'production') {\n // Service Providers\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n\n // Facades\n if ($loader != null) {\n $loader->alias('Debugbar', \\Barryvdh\\Debugbar\\Facade::class);\n }\n }\n\n if ($this->app->environment('local', 'testing')) {\n $this->app->register(\\Laravel\\Dusk\\DuskServiceProvider::class);\n }\n }", "public function register()\n {\n // Automatically apply the package configuration\n $this->mergeConfigFrom(__DIR__ . '/config/sweetalert.php', 'sweetalert');\n\n // Binding required classes to app\n $this->app->bind(\n 'RealRashid\\SweetAlert\\Storage\\SessionStore',\n 'RealRashid\\SweetAlert\\Storage\\AlertSessionStore',\n 'RealRashid\\SweetAlert\\ToSweetAlert'\n );\n\n // Register the main class to use with the facade\n $this->app->singleton('alert', function ($app) {\n return $this->app->make(Toaster::class);\n });\n\n if ($this->app->runningInConsole()) {\n // Registering package commands.\n $this->commands([\n Console\\PublishCommand::class,\n ]);\n }\n }", "public function register()\n {\n $this->app->bind(CardService::class, function(){\n return new CardService(cache()->store());\n });\n }", "public function register()\n {\n $this->app->bind(VehicleRepository::class, GuzzleVehicleRepository::class);\n }", "public function register()\n {\n if ($this->app->environment() == 'dev') {\n $this->app->register(\\Way\\Generators\\GeneratorsServiceProvider::class);\n $this->app->register(\\Xethron\\MigrationsGenerator\\MigrationsGeneratorServiceProvider::class);\n }\n }", "public function register(): void\n {\n $this->app->bind(ValidatorServiceInterface::class, ValidatorService::class);\n }", "public function register()\n {\n App::singleton(UtilsServiceCatalog::CacheService, 'services\\\\utils\\\\RedisCacheService');\n\t App::singleton(UtilsServiceCatalog::TransactionService, 'services\\\\utils\\\\EloquentTransactionService');\n\n App::resolving('redis',function($redis){\n $cache_service = App::make(UtilsServiceCatalog::CacheService);\n $cache_service->boot();\n });\n\n $this->app['serverconfigurationservice'] = App::share(function ($app) {\n return new ServerConfigurationService(App::make(UtilsServiceCatalog::CacheService),App::make(UtilsServiceCatalog::TransactionService));\n });\n\n // Shortcut so developers don't need to add an Alias in app/config/app.php\n App::booting(function () {\n $loader = AliasLoader::getInstance();\n $loader->alias('ServerConfigurationService', 'services\\\\facades\\\\ServerConfigurationService');\n });\n\n App::singleton(UtilsServiceCatalog::LogService, 'services\\\\utils\\\\LogService');\n App::singleton(UtilsServiceCatalog::LockManagerService, 'services\\\\utils\\\\LockManagerService');\n App::singleton(UtilsServiceCatalog::ServerConfigurationService, 'services\\\\utils\\\\ServerConfigurationService');\n App::singleton(UtilsServiceCatalog::BannedIpService, 'services\\\\utils\\\\BannedIPService');\n\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\UserCertificate\\IUserCertificateService::class,\n \\App\\Services\\UserCertificate\\UserCertificateService::class\n );\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../config/atlas.php', 'atlas'\n );\n \n $this->app->singleton(CoreContract::class, Core::class);\n \n $this->registerFacades([\n 'Atlas' => 'Atlas\\Facades\\Atlas',\n ]);\n }", "public function register()\n\t{\n\t\tapp()->bind(UtilityServiceInterface::class, UtilityService::class);\n\t}", "public function register()\n {\n $this->app->bind(AtomDecorator::class, ModelDecorator::class);\n $this->registerServiceProviders();\n $this->registerAliases();\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'APIcoLAB\\Services\\Registrar'\n\t\t);\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Flight\\FlightRepository',\n 'APIcoLAB\\Repositories\\Flight\\SkyScannerFlightRepository'\n );\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Place\\PlaceRepository',\n 'APIcoLAB\\Repositories\\Place\\SkyScannerPlaceRepository'\n );\n\t}", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Console\\MakeEndpointCommand::class,\n Console\\MakeControllerCommand::class,\n Console\\MakeRepositoryCommand::class,\n Console\\MakeTransformerCommand::class,\n Console\\MakeModelCommand::class,\n ]);\n }\n\n $this->registerFractal();\n }", "public function register()\n {\n App::bind('CreateTagService', function($app) {\n return new CreateTagService;\n });\n\n App::bind('UpdateTagService', function($app) {\n return new UpdateTagService;\n });\n }", "public function registerServices() {\n\t\t$services = $this->getServices();\n\t\t$services = array_map( [ $this, 'instantiateServices' ], $services );\n\t\t\n\t\tarray_walk( $services, function ( Service $service ) {\n\t\t\t$service->register();\n\t\t} );\n\t}", "public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n $this->app->register(TelescopeServiceProvider::class);\n }\n }", "public function register()\n {\n // Automatically apply the package configuration\n $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'mongicommerce');\n\n // Register the main class to use with the facade\n $this->app->singleton('mongicommerce', function () {\n return new Mongicommerce;\n });\n }", "public static function register_services()\n {\n foreach ( self::get_services() as $class )\n {\n $service = self::instantiate( $class );\n if( method_exists( $service, 'register' ) )\n $service->register();\n }\n }", "public function register()\n {\n $this->registerFacades();\n $this->registerRespository();\n }", "public function register()\n {\n //\n $this->app->register(RepositoryServiceProvider::class);\n if ($this->app->environment() !== 'production') {\n $this->app->register(IdeHelperServiceProvider::class);\n }\n }", "public function register()\n {\n Schema::defaultStringLength(199);\n\n $this->app->bind(\n 'App\\Helper\\ICheckAction',\n 'App\\Helper\\CheckAction'\n );\n\n $this->app->bind(\n 'App\\Helper\\IGetDateTime',\n 'App\\Helper\\GetDateTime'\n );\n\n $this->app->bind(\n 'App\\Repositories\\AnnouceRepository\\IAnnouceRepository',\n 'App\\Repositories\\AnnouceRepository\\AnnouceRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\AjaxRepository\\IAjaxRepository',\n 'App\\Repositories\\AjaxRepository\\AjaxRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\UserRepository\\IUserRepository',\n 'App\\Repositories\\UserRepository\\UserRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\PermissionRepository\\IPermissionRepository',\n 'App\\Repositories\\PermissionRepository\\PermissionRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\PermissionDetailRepository\\IPermissionDetailRepository',\n 'App\\Repositories\\PermissionDetailRepository\\PermissionDetailRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\AreaRepository\\IAreaRepository',\n 'App\\Repositories\\AreaRepository\\AreaRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\TableRepository\\ITableRepository',\n 'App\\Repositories\\TableRepository\\TableRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\GroupMenuRepository\\IGroupMenuRepository',\n 'App\\Repositories\\GroupMenuRepository\\GroupMenuRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\ToppingRepository\\IToppingRepository',\n 'App\\Repositories\\ToppingRepository\\ToppingRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\MaterialRepository\\IMaterialRepository',\n 'App\\Repositories\\MaterialRepository\\MaterialRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\MaterialDetailRepository\\IMaterialDetailRepository',\n 'App\\Repositories\\MaterialDetailRepository\\MaterialDetailRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\MaterialActionRepository\\IMaterialActionRepository',\n 'App\\Repositories\\MaterialActionRepository\\MaterialActionRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\SupplierRepository\\ISupplierRepository',\n 'App\\Repositories\\SupplierRepository\\SupplierRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\CookRepository\\ICookRepository',\n 'App\\Repositories\\CookRepository\\CookRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\CookScreenRepository\\ICookScreenRepository',\n 'App\\Repositories\\CookScreenRepository\\CookScreenRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\DishRepository\\IDishRepository',\n 'App\\Repositories\\DishRepository\\DishRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\OrderRepository\\IOrderRepository',\n 'App\\Repositories\\OrderRepository\\OrderRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\PayRepository\\IPayRepository',\n 'App\\Repositories\\PayRepository\\PayRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\WarehouseRepository\\IWarehouseRepository',\n 'App\\Repositories\\WarehouseRepository\\WarehouseRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\WarehouseCookRepository\\IWarehouseCookRepository',\n 'App\\Repositories\\WarehouseCookRepository\\WarehouseCookRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\ImportCouponRepository\\IImportCouponRepository',\n 'App\\Repositories\\ImportCouponRepository\\ImportCouponRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\ExportCouponRepository\\IExportCouponRepository',\n 'App\\Repositories\\ExportCouponRepository\\ExportCouponRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\ShiftRepository\\IShiftRepository',\n 'App\\Repositories\\ShiftRepository\\ShiftRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\PositionRepository\\IPositionRepository',\n 'App\\Repositories\\PositionRepository\\PositionRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\ReportRepository\\IReportRepository',\n 'App\\Repositories\\ReportRepository\\ReportRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\BookingRepository\\IBookingRepository',\n 'App\\Repositories\\BookingRepository\\BookingRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\DayRepository\\IDayRepository',\n 'App\\Repositories\\DayRepository\\DayRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\VoucherRepository\\IVoucherRepository',\n 'App\\Repositories\\VoucherRepository\\VoucherRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\MethodRepository\\IMethodRepository',\n 'App\\Repositories\\MethodRepository\\MethodRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\PlanRepository\\IPlanRepository',\n 'App\\Repositories\\PlanRepository\\PlanRepository'\n );\n }", "public function register()\n {\n $this->registerAdapterFactory();\n $this->registerDigitalOceanFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n $this->app->when('\\Lotto\\Services\\DrawMainService')\n ->needs('Lotto\\Interfaces\\LottoGameRepositoryInterface')\n ->give('\\Lotto\\Repositories\\LottoGameRepository');\n\n $this->app->when('\\Lotto\\Services\\DrawPowerballService')\n ->needs('Lotto\\Interfaces\\LottoGameRepositoryInterface')\n ->give('\\Lotto\\Repositories\\LottoGameRepository');\n\n $this->app->when('\\Lotto\\Services\\ExportGamesService')\n ->needs('Lotto\\Interfaces\\LottoGameRepositoryInterface')\n ->give('\\Lotto\\Repositories\\LottoGameRepository');\n\n }", "public function register()\n {\n $this->app->register(ModuleConfigServiceProvider::class);\n $this->app->register(ModuleKernelHandlerServiceProvider::class);\n //$this->app->register(ModuleLanguageServiceProvider::class);\n $this->app->register(ModuleViewServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(ItemService::class, function () {\n return new ItemService();\n });\n }", "protected function registerServiceProviders()\n {\n foreach ($this->providers as $provider) {\n $this->app->register($provider);\n }\n }" ]
[ "0.76041305", "0.752103", "0.7361134", "0.73519534", "0.73024994", "0.7251972", "0.72163796", "0.71865344", "0.7177101", "0.7172552", "0.7171603", "0.71630555", "0.7162181", "0.7150971", "0.7144041", "0.7133666", "0.71206236", "0.7110271", "0.7097245", "0.7096116", "0.70902807", "0.7088346", "0.70871305", "0.7075711", "0.7072157", "0.707042", "0.70622206", "0.7061241", "0.7041809", "0.70390487", "0.703757", "0.7036092", "0.7026063", "0.7024422", "0.7007104", "0.7001729", "0.6999956", "0.69964784", "0.6994129", "0.6991045", "0.69898355", "0.6988753", "0.6983915", "0.69802475", "0.697664", "0.69750535", "0.69723755", "0.69706815", "0.695806", "0.69579035", "0.69572085", "0.6947131", "0.6943844", "0.69401026", "0.6939808", "0.6930537", "0.692778", "0.69240135", "0.69182616", "0.6917003", "0.69150954", "0.6909141", "0.6907289", "0.69051325", "0.6899468", "0.6894455", "0.6894011", "0.688088", "0.6876365", "0.68760383", "0.68744546", "0.68727976", "0.68724275", "0.6871053", "0.68708855", "0.68699276", "0.6868679", "0.68684924", "0.68683434", "0.6866456", "0.6865625", "0.6864011", "0.6862499", "0.685689", "0.68565017", "0.6854128", "0.6852754", "0.6851796", "0.6851109", "0.6849057", "0.68490285", "0.684665", "0.6846476", "0.6844771", "0.6842477", "0.68386525", "0.68360406", "0.6835706", "0.68353266", "0.683283", "0.68275267" ]
0.0
-1
Agregar Nuevo taxonomy, make it hierarchical (like categories)
function create_my_taxonomies() { $labels_producto_productor = array( 'name' => _x( 'Productores', 'taxonomy general name' ), 'singular_name' => _x( 'Productor', 'taxonomy singular name' ), 'search_items' => __( 'Buscar productores' ), 'all_items' => __( 'Todos los productores' ), 'parent_item' => __( 'Productor Padre' ), 'parent_item_colon' => __( 'Productor Padre:' ), 'edit_item' => __( 'Editar productor' ), 'update_item' => __( 'Actualizar productor' ), 'add_new_item' => __( 'Agregar Nuevo productor' ), 'new_item_name' => __( 'Nombre de Nuevo productor' ), 'menu_name' => __( 'Productores' ) ); $args_producto_productor = array( 'public' => true, 'hierarchical' => false, 'labels' => $labels_producto_productor, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'capabilities' => array( 'manage_terms' => 'manage_productor', 'edit_terms' => 'edit_productor', 'delete_terms' => 'delete_productor', 'assign_terms' => 'assign_productor' ) ); $labels_producto_marca = array( 'name' => _x( 'Marcas', 'taxonomy general name' ), 'singular_name' => _x( 'Marca', 'taxonomy singular name' ), 'search_items' => __( 'Buscar Marcas' ), 'all_items' => __( 'Todos las Marcas' ), 'parent_item' => __( 'Marca Padre' ), 'parent_item_colon' => __( 'Marca Padre:' ), 'edit_item' => __( 'Editar Marca' ), 'update_item' => __( 'Actualizar Marca' ), 'add_new_item' => __( 'Agregar Nueva Marca' ), 'new_item_name' => __( 'Nombre de Nueva Marca' ), 'menu_name' => __( 'Marcas' ) ); $args_producto_marca = array( 'public' => true, 'hierarchical' => false, 'labels' => $labels_producto_marca, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'capabilities' => array( 'manage_terms' => 'manage_marca', 'edit_terms' => 'edit_marca', 'delete_terms' => 'delete_marca', 'assign_terms' => 'assign_marca' ) ); $labels_producto_lugar = array( 'name' => _x( 'Lugares', 'taxonomy general name' ), 'singular_name' => _x( 'Lugar', 'taxonomy singular name' ), 'search_items' => __( 'Buscar Lugares' ), 'all_items' => __( 'Todos los Lugares' ), 'parent_item' => __( 'Lugar Padre' ), 'parent_item_colon' => __( 'Lugar Padre:' ), 'edit_item' => __( 'Editar Lugar' ), 'update_item' => __( 'Actualizar Lugar' ), 'add_new_item' => __( 'Agregar Nuevo Lugar' ), 'new_item_name' => __( 'Nombre de Nuevo Lugar' ), 'menu_name' => __( 'Lugares' ) ); $args_producto_lugar = array( 'public' => true, 'hierarchical' => true, 'labels' => $labels_producto_lugar, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'capabilities' => array( 'manage_terms' => 'manage_lugar', 'edit_terms' => 'edit_lugar', 'delete_terms' => 'delete_lugar', 'assign_terms' => 'assign_lugar' ) ); $labels_producto_clasificacion = array( 'name' => _x( 'Clasificaciones', 'taxonomy general name' ), 'singular_name' => _x( 'Clasificación', 'taxonomy singular name' ), 'search_items' => __( 'Buscar Clasificaciones' ), 'all_items' => __( 'Todos las Clasificaciones' ), 'parent_item' => __( 'Clasificación Padre' ), 'parent_item_colon' => __( 'Clasificación Padre:' ), 'edit_item' => __( 'Editar Clasificación' ), 'update_item' => __( 'Actualizar Clasificación' ), 'add_new_item' => __( 'Agregar Nueva Clasificación' ), 'new_item_name' => __( 'Nombre de Nueva Clasificación' ), 'menu_name' => __( 'Clasificaciones' ) ); $args_producto_clasificacion = array( 'public' => true, 'hierarchical' => true, 'labels' => $labels_producto_clasificacion, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'capabilities' => array( 'manage_terms' => 'manage_clasificacion', 'edit_terms' => 'edit_clasificacion', 'delete_terms' => 'delete_clasificacion', 'assign_terms' => 'assign_clasificacion' ) ); $labels_banner_posicion = array( 'name' => _x( 'Posiciones', 'taxonomy general name' ), 'singular_name' => _x( 'Posición', 'taxonomy singular name' ), 'search_items' => __( 'Buscar Posiciones' ), 'all_items' => __( 'Todas las Posiciones' ), 'parent_item' => __( 'Posición Padre' ), 'parent_item_colon' => __( 'Posición Padre:' ), 'edit_item' => __( 'Editar posición' ), 'update_item' => __( 'Actualizar posición' ), 'add_new_item' => __( 'Agregar Nueva posición' ), 'new_item_name' => __( 'Nombre de Nueva posición' ), 'menu_name' => __( 'Posiciones' ) ); $args_banner_posicion = array( 'public' => true, 'hierarchical' => true, 'labels' => $labels_banner_posicion, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'capabilities' => array( 'manage_terms' => 'manage_posicion', 'edit_terms' => 'edit_posicion', 'delete_terms' => 'delete_posicion', 'assign_terms' => 'assign_posicion' ) ); $labels_documentos_tipos = array( 'name' => _x( 'Tipos', 'taxonomy general name' ), 'singular_name' => _x( 'Tipo', 'taxonomy singular name' ), 'search_items' => __( 'Buscar Tipos' ), 'all_items' => __( 'Todos los Tipos' ), 'parent_item' => __( 'Tipo Padre' ), 'parent_item_colon' => __( 'Tipo Padre:' ), 'edit_item' => __( 'Editar Tipo' ), 'update_item' => __( 'Actualizar Tipo' ), 'add_new_item' => __( 'Agregar Nuevo Tipo' ), 'new_item_name' => __( 'Nombre de Nuevo Tipo' ), 'menu_name' => __( 'Tipos' ) ); $args_documentos_tipos = array( 'public' => true, 'hierarchical' => true, 'labels' => $labels_documentos_tipos, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'capabilities' => array( 'manage_terms' => 'manage_tipo', 'edit_terms' => 'edit_tipo', 'delete_terms' => 'delete_tipo', 'assign_terms' => 'assign_tipo' ) ); $labels_convocatorias_categorias = array( 'name' => _x( 'Categorías', 'taxonomy general name' ), 'singular_name' => _x( 'Categoría', 'taxonomy singular name' ), 'search_items' => __( 'Buscar Categorías' ), 'all_items' => __( 'Todas las Categorías' ), 'parent_item' => __( 'Categoría Padre' ), 'parent_item_colon' => __( 'Categoría Padre:' ), 'edit_item' => __( 'Editar Categoría' ), 'update_item' => __( 'Actualizar Categoría' ), 'add_new_item' => __( 'Agregar Nueva Categoría' ), 'new_item_name' => __( 'Nombre de Nueva Categoría' ), 'menu_name' => __( 'Categorías' ) ); $args_convocatorias_categorias = array( 'public' => true, 'hierarchical' => true, 'labels' => $labels_convocatorias_categorias, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'capabilities' => array( 'manage_terms' => 'manage_cat-convocatorias', 'edit_terms' => 'edit_cat-convocatorias', 'delete_terms' => 'delete_cat-convocatorias', 'assign_terms' => 'assign_cat-convocatorias' ) ); $labels_convocatorias_estados = array( 'name' => _x( 'Estados', 'taxonomy general name' ), 'singular_name' => _x( 'Estado', 'taxonomy singular name' ), 'search_items' => __( 'Buscar Estados' ), 'all_items' => __( 'Todas los Estados' ), 'parent_item' => __( 'Estado Padre' ), 'parent_item_colon' => __( 'Estado Padre:' ), 'edit_item' => __( 'Editar Estado' ), 'update_item' => __( 'Actualizar Estado' ), 'add_new_item' => __( 'Agregar Nuevo Estado' ), 'new_item_name' => __( 'Nombre de Nuevo Estado' ), 'menu_name' => __( 'Estados' ) ); $args_convocatorias_estados = array( 'public' => true, 'hierarchical' => true, 'labels' => $labels_convocatorias_estados, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'capabilities' => array( 'manage_terms' => 'manage_est-convocatorias', 'edit_terms' => 'edit_est-convocatorias', 'delete_terms' => 'delete_est-convocatorias', 'assign_terms' => 'assign_est-convocatorias' ) ); $labels_servicios_condiciones = array( 'name' => _x( 'Condiciones', 'taxonomy general name' ), 'singular_name' => _x( 'Condición', 'taxonomy singular name' ), 'search_items' => __( 'Buscar Condiciones' ), 'all_items' => __( 'Todas las Condiciones' ), 'parent_item' => __( 'Condición Padre' ), 'parent_item_colon' => __( 'Condición Padre:' ), 'edit_item' => __( 'Editar Condición' ), 'update_item' => __( 'Actualizar Condición' ), 'add_new_item' => __( 'Agregar Nueva Condición' ), 'new_item_name' => __( 'Nombre de Nueva Condición' ), 'menu_name' => __( 'Condiciones' ) ); $args_servicios_condiciones = array( 'public' => true, 'hierarchical' => true, 'labels' => $labels_servicios_condiciones, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'capabilities' => array( 'manage_terms' => 'manage_condiciones', 'edit_terms' => 'edit_condiciones', 'delete_terms' => 'delete_condiciones', 'assign_terms' => 'assign_condiciones' ) ); $labels_directorios_grupos = array( 'name' => _x( 'Grupos', 'taxonomy general name' ), 'singular_name' => _x( 'Grupo', 'taxonomy singular name' ), 'search_items' => __( 'Buscar Grupos' ), 'all_items' => __( 'Todos los Grupos' ), 'parent_item' => __( 'Grupo Padre' ), 'parent_item_colon' => __( 'Grupo Padre:' ), 'edit_item' => __( 'Editar Grupo' ), 'update_item' => __( 'Actualizar Grupo' ), 'add_new_item' => __( 'Agregar Nuevo Grupo' ), 'new_item_name' => __( 'Nombre de Nuevo Grupo' ), 'menu_name' => __( 'Grupos' ) ); $args_directorios_grupos = array( 'public' => true, 'hierarchical' => true, 'labels' => $labels_directorios_grupos, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'capabilities' => array( 'manage_terms' => 'manage_grupos', 'edit_terms' => 'edit_grupos', 'delete_terms' => 'delete_grupos', 'assign_terms' => 'assign_grupos' ) ); register_taxonomy( 'productor', 'producto', $args_producto_productor ); register_taxonomy( 'marca', 'producto', $args_producto_marca ); register_taxonomy( 'lugar', 'producto', $args_producto_lugar ); register_taxonomy( 'clasificacion', 'producto', $args_producto_clasificacion ); register_taxonomy( 'posiciones', 'banners', $args_banner_posicion ); register_taxonomy( 'tipos', 'documentos', $args_documentos_tipos ); register_taxonomy( 'cat-convocatorias', 'convocatorias', $args_convocatorias_categorias ); register_taxonomy( 'est-convocatorias', 'convocatorias', $args_convocatorias_estados ); register_taxonomy( 'condiciones', 'servicios', $args_convocatorias_estados ); register_taxonomy( 'grupos', 'directorios', $args_directorios_grupos ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_topics_hierarchical_taxonomy() {\n \n// Add new taxonomy, make it hierarchical like categories\n//first do the translations part for GUI\n \n $labels = array(\n 'name' => _x( 'Sectores', 'taxonomy general name' ),\n 'singular_name' => _x( 'Sector', 'taxonomy singular name' ),\n 'search_items' => __( 'Buscar Sectores' ),\n 'all_items' => __( 'Todos los Sectores' ),\n 'parent_item' => __( 'Sector Padre' ),\n 'parent_item_colon' => __( 'Sector Padre:' ),\n 'edit_item' => __( 'Editar Sector' ), \n 'update_item' => __( 'Actualizar Sector' ),\n 'add_new_item' => __( 'Añadir Nuevo Sector' ),\n 'new_item_name' => __( 'Nuevo Sector' ),\n 'menu_name' => __( 'Sectores' ),\n ); \n \n// Now register the taxonomy\n \n register_taxonomy('sectores', array('logos, proyecto, diapositiva'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'sectores' ),\n ));\n \n}", "function ajarRegisterTaxonomy() {\n $args = array(\n 'hierarchical' => true, //con/sin jerarquia\n 'labels' => array(\n 'name' => 'Categorias de Productos',\n 'singular_name' => 'Categoria de Productos',\n ),\n 'show_in_nav_menu' => true,\n 'show_admin_column' => true,\n 'rewrite' => array('slug' => 'categoria-productos')\n );\n register_taxonomy('categoria-productos', array('producto'), $args);\n}", "function create_ha_taxonomies() {\n\n $labels = array(\n 'name' => _x( 'Habilidad artistica', 'taxonomy general name' ),\n 'singular_name' => _x( 'Habilidad artistica', 'taxonomy singular name' ),\n 'search_items' => __( 'Buscar Habilidad' ),\n 'all_items' => __( 'Habilidades artisticas' ),\n 'parent_item' => __( 'Parent Genre' ),\n 'parent_item_colon' => __( 'Parent Genre:' ),\n 'edit_item' => __( 'Editar habilidad' ), \n 'update_item' => __( 'Actualizar habilidad' ),\n 'add_new_item' => __( 'Nueva habilidad artistica' ),\n 'new_item_name' => __( 'Nueva habilidad artistica' ),\n 'menu_name' => __( 'Habilidades artisticas' ),\n ); \t\n\n register_taxonomy('habilidad-artistica',array('ofertas'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'habilidad-artistica' ),\n ));\n\n}", "function create_ht_taxonomies() {\n\n $labels = array(\n 'name' => _x( 'Habilidad tecnica', 'taxonomy general name' ),\n 'singular_name' => _x( 'Habilidad tecnica', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Genres' ),\n 'all_items' => __( 'Habilidades tecnicas' ),\n 'parent_item' => __( 'Parent Genre' ),\n 'parent_item_colon' => __( 'Parent Genre:' ),\n 'edit_item' => __( 'Editar habilidad' ), \n 'update_item' => __( 'Actualizar habilidad' ),\n 'add_new_item' => __( 'Nueva habilidad tecnica' ),\n 'new_item_name' => __( 'Nueva habilidad tecnica' ),\n 'menu_name' => __( 'Habilidades tecnicas' ),\n ); \t\n\n register_taxonomy('habilidad-tecnica',array('ofertas'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'habilidad-tecnica' ),\n ));\n\n}", "public function create_taxonomies() {\n \n }", "function create_level_taxonomies() {\n\n\n\t$labels = array(\n\t\t'name' => _x( 'Livello', 'taxonomy general name', 'italiattivo' ),\n\n\t);\n\n\n\t$args = array(\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\n\t);\n\n\tregister_taxonomy( 'level', array( 'post', 'esercizi', 'frasi', 'quadri'), $args );\n\n}", "public function add_taxonomy( $name, $hierarchy, $args = array(), $labels = array() ){\r\n if( ! empty( $name ) ){\r\n // We need to know the post type name, so the new taxonomy can be attached to it.\r\n $post_type_name = $this->post_type_name;\r\n\r\n // Taxonomy properties\r\n $taxonomy_name = strtolower( str_replace( ' ', '_', $name ) );\r\n $taxonomy_labels = $labels;\r\n $taxonomy_args = $args;\r\n\r\n if( ! taxonomy_exists( $taxonomy_name ) ){\r\n //Capitilize the words and make it plural\r\n $name = ucwords( str_replace( '_', ' ', $name ) );\r\n $plural = $name . 's';\r\n\r\n // Default labels, overwrite them with the given labels.\r\n $labels = array_merge(\r\n\r\n // Default\r\n array(\r\n 'name' => _x( $plural, 'taxonomy general name' ),\r\n 'singular_name' => _x( $name, 'taxonomy singular name' ),\r\n 'search_items' => __( 'Search ' . $plural ),\r\n 'all_items' => __( 'All ' . $plural ),\r\n 'parent_item' => __( 'Parent ' . $name ),\r\n 'parent_item_colon' => __( 'Parent ' . $name . ':' ),\r\n 'edit_item' => __( 'Edit ' . $name ),\r\n 'update_item' => __( 'Update ' . $name ),\r\n 'add_new_item' => __( 'Add New ' . $name ),\r\n 'new_item_name' => __( 'New ' . $name . ' Name' ),\r\n 'menu_name' => __( $plural ),\r\n ),\r\n\r\n // Given labels\r\n $taxonomy_labels\r\n\r\n );\r\n\r\n // Default arguments, overwritten with the given arguments\r\n $args = array_merge(\r\n\r\n // Default\r\n array(\r\n 'hierarchical' => $hierarchy,\r\n 'label' => $plural,\r\n 'labels' => $labels,\r\n 'public' => true,\r\n 'show_ui' => true,\r\n 'show_in_nav_menus' => true,\r\n '_builtin' => false,\r\n ),\r\n\r\n // Given\r\n $taxonomy_args\r\n\r\n );\r\n\r\n // Add the taxonomy to the post type\r\n add_action( 'init',\r\n function() use( $taxonomy_name, $post_type_name, $args ){\r\n register_taxonomy( $taxonomy_name, $post_type_name, $args );\r\n }\r\n );\r\n }\r\n else{\r\n add_action( 'init',\r\n function() use( $taxonomy_name, $post_type_name ){\r\n register_taxonomy_for_object_type( $taxonomy_name, $post_type_name );\r\n }\r\n );\r\n }\r\n }\r\n }", "function create_my_taxonomies()\n{\n register_taxonomy('utilities', 'post', array('hierarchical' => true, 'label' => 'Utilities'));\n}", "function create_taxonomies() \n{\n register_taxonomy(\n 'location',\n 'projects',\n array(\n 'labels' => array(\n 'name' => 'Location',\n 'add_new_item' => 'Add New Location',\n 'new_item_name' => \"New Location\"\n ),\n 'show_ui' => true,\n 'show_tagcloud' => false,\n 'hierarchical' => true\n )\n );\n \n register_taxonomy(\n 'category',\n 'projects',\n array(\n 'labels' => array(\n 'name' => 'Category',\n 'add_new_item' => 'Add New Category',\n 'new_item_name' => \"New Category\"\n ),\n 'show_ui' => true,\n 'show_tagcloud' => false,\n 'hierarchical' => true\n )\n );\n}", "function create_software_taxonomies() {\n\n $labels = array(\n 'name' => _x( 'Habilidad software', 'taxonomy general name' ),\n 'singular_name' => _x( 'Habilidad software', 'taxonomy singular name' ),\n 'search_items' => __( 'Search software' ),\n 'all_items' => __( 'Habilidades software' ),\n 'parent_item' => __( 'Parent software' ),\n 'parent_item_colon' => __( 'Parent software:' ),\n 'edit_item' => __( 'Editar software' ), \n 'update_item' => __( 'Actualizar software' ),\n 'add_new_item' => __( 'Nueva habilidad de software' ),\n 'new_item_name' => __( 'Nueva habilidad software' ),\n 'menu_name' => __( 'Habilidad software' ),\n ); \t\n\n register_taxonomy('habilidad-software',array('ofertas'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'habilidad-software' ),\n ));\n\n}", "function create_dpto_taxonomies() {\n\n $labels = array(\n 'name' => _x( 'Departamento', 'taxonomy general name' ),\n 'singular_name' => _x( 'Departamento', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Genres' ),\n 'all_items' => __( 'Departamentos' ),\n 'parent_item' => __( 'Parent Genre' ),\n 'parent_item_colon' => __( 'Parent Genre:' ),\n 'edit_item' => __( 'Editar departamento' ), \n 'update_item' => __( 'Actualizar departamento' ),\n 'add_new_item' => __( 'Nuevo departamento' ),\n 'new_item_name' => __( 'Nuevo departamento' ),\n 'menu_name' => __( 'Departamentos' ),\n ); \t\n\n register_taxonomy('departamento',array('ofertas'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'departamento' ),\n ));\n\n}", "function humcore_create_taxonomies() {\n\t// Add new taxonomy, make it hierarchical (like categories).\n\t$labels = array(\n\t\t'name' => _x( 'Subjects', 'taxonomy general name', 'humcore_domain' ),\n\t\t'singular_name' => _x( 'Subject', 'taxonomy singular name', 'humcore_domain' ),\n\t\t'search_items' => __( 'Search Subjects', 'humcore_domain' ),\n\t\t'all_items' => __( 'All Subjects', 'humcore_domain' ),\n\t\t'parent_item' => __( 'Parent Subject', 'humcore_domain' ),\n\t\t'parent_item_colon' => __( 'Parent Subject:', 'humcore_domain' ),\n\t\t'edit_item' => __( 'Edit Subject', 'humcore_domain' ),\n\t\t'update_item' => __( 'Update Subject', 'humcore_domain' ),\n\t\t'add_new_item' => __( 'Add New Subject', 'humcore_domain' ),\n\t\t'new_item_name' => __( 'New Subject Name', 'humcore_domain' ),\n\t\t'menu_name' => __( 'Subjects', 'humcore_domain' ),\n\t);\n\n\t$args = array(\n\t\t'public' => false,\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => false,\n\t\t'query_var' => false,\n\t\t'rewrite' => false,\n\t);\n\n\tregister_taxonomy( 'humcore_deposit_subject', array( 'humcore_deposit' ), $args );\n\tregister_taxonomy_for_object_type( 'humcore_deposit_subject', 'humcore_deposit' );\n\n\t// Add new taxonomy, NOT hierarchical (like tags).\n\t$labels = array(\n\t\t'name' => _x( 'Tags', 'taxonomy general name', 'humcore_domain' ),\n\t\t'singular_name' => _x( 'Tag', 'taxonomy singular name', 'humcore_domain' ),\n\t\t'search_items' => __( 'Search Tags', 'humcore_domain' ),\n\t\t'popular_items' => __( 'Popular Tags', 'humcore_domain' ),\n\t\t'all_items' => __( 'All Tags', 'humcore_domain' ),\n\t\t'parent_item' => null,\n\t\t'parent_item_colon' => null,\n\t\t'edit_item' => __( 'Edit Tag', 'humcore_domain' ),\n\t\t'update_item' => __( 'Update Tag', 'humcore_domain' ),\n\t\t'add_new_item' => __( 'Add New Tag', 'humcore_domain' ),\n\t\t'new_item_name' => __( 'New Tag Name', 'humcore_domain' ),\n\t\t'separate_items_with_commas' => __( 'Separate tags with commas', 'humcore_domain' ),\n\t\t'add_or_remove_items' => __( 'Add or remove tags', 'humcore_domain' ),\n\t\t'choose_from_most_used' => __( 'Choose from the most used tags', 'humcore_domain' ),\n\t\t'not_found' => __( 'No tags found.', 'humcore_domain' ),\n\t\t'menu_name' => __( 'Tags', 'humcore_domain' ),\n\t);\n\n\t$args = array(\n\t\t'public' => false,\n\t\t'hierarchical' => false,\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => false,\n\t\t'update_count_callback' => '_update_post_term_count',\n\t\t'query_var' => false,\n\t\t'rewrite' => false,\n\t);\n\n\tregister_taxonomy( 'humcore_deposit_tag', array( 'humcore_deposit' ), $args );\n\tregister_taxonomy_for_object_type( 'humcore_deposit_tag', 'humcore_deposit' );\n\n}", "function create_topics_hierarchical_taxonomy() {\n\n// Add new taxonomy, make it hierarchical like categories\n//first do the translations part for GUI\n\n $labels = array(\n 'name' => _x( 'Departments', 'taxonomy general name' ),\n 'singular_name' => _x( 'Department', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Departments' ),\n 'all_items' => __( 'All Departments' ),\n 'parent_item' => __( 'Parent Departments' ),\n 'parent_item_colon' => __( 'Parent Department:' ),\n 'edit_item' => __( 'Edit Department' ),\n 'update_item' => __( 'Update Department' ),\n 'add_new_item' => __( 'Add New Department' ),\n 'new_item_name' => __( 'New Topic Department' ),\n 'menu_name' => __( 'Departments' ),\n );\n\n// Now register the taxonomy\n\n register_taxonomy('departments',\n array('team'),\n array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'department' ),\n ));\n\n}", "function setupTaxonomy()\n\t{\n\t\t$labels = array(\n\t\t\t\t'name' => 'Skills',\n\t\t\t\t'add_new_item' => 'Add New Skill',\n\t\t\t\t'new_item_name' => \"New Skill\"\n\t\t);\n\t\t\n\t\t$args = array(\n\t\t\t'hierarchical' => false,\n\t\t\t'labels' \t=> $labels,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'update_count_callback' => '_update_post_term_count',\n\t\t\t'query_var' => true,\n\t\t\t//'rewrite' => array( 'slug' => 'writer' ),\n\t\t\t'show_tagcloud' \t\t=> true\n\t\t);\n\n\t\tregister_taxonomy( 'skills', 'iru_positions', $args );\n\t\tregister_taxonomy_for_object_type( 'skills', 'iru_positions' );\n\t}", "function wpm_add_taxonomies() {\n\t// Taxonomie Lieux\n\n\t$labels_lieux = array(\n\t\t'name' => _x( 'Lieux', 'taxonomy general name'),\n\t\t'singular_name' => _x( 'Lieu', 'taxonomy singular name'),\n\t\t'search_items' => __( 'Rechercher un lieu'),\n\t\t'popular_items' => __( 'Lieux populaires'),\n\t\t'all_items' => __( 'Tous les lieux'),\n\t\t'edit_item' => __( 'Editer un lieu'),\n\t\t'update_item' => __( 'Mettre à jour un lieu'),\n\t\t'add_new_item' => __( 'Ajouter un nouveau lieu'),\n\t\t'new_item_name' => __( 'Nom du nouveau lieu'),\n\t\t'separate_items_with_commas' => __( 'Séparer les lieux avec une virgule'),\n\t\t'add_or_remove_items' => __( 'Ajouter ou supprimer un lieu'),\n\t\t'choose_from_most_used' => __( 'Choisir parmi les plus utilisés'),\n\t\t'not_found' => __( 'Pas de lieu trouvé'),\n\t\t'menu_name' => __( 'Lieux'),\n\t);\n\n\t$args_lieux = array(\n\t\t'hierarchical' => false,\n\t\t'labels' => $labels_lieux,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'update_count_callback' => '_update_post_term_count',\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => 'lieux' ),\n\t);\n\n\tregister_taxonomy( 'lieux', 'actus', $args_lieux );\n}", "function create_taxonomies() {\r\n\t\t$labels = array(\r\n\t\t\t'name' => 'Ad Categories',\r\n\t\t\t'singular_name' => 'Ad Category',\r\n\t\t\t'search_items' => 'Search Ad Categories',\r\n\t\t\t'all_items' => 'All Ad Categories',\r\n\t\t\t'parent_item' => 'Parent Ad Category',\r\n\t\t\t'parent_item_colon' => 'Parent Ad Category:',\r\n\t\t\t'edit_item' => 'Edit Ad Category',\r\n\t\t\t'update_item' => 'Update Ad Category',\r\n\t\t\t'add_new_item' => 'Add New Ad Category',\r\n\t\t\t'new_item_name' => 'New Ad Category Name',\r\n\t\t\t'menu_name' => 'Ad Categories',\r\n\t\t\t);\r\n\r\n\t\t$args = array(\r\n\t\t\t'hierarchical' => true,\r\n\t\t\t'labels' => $labels,\r\n\t\t\t'show_ui' => true,\r\n\t\t\t'show_admin_column' => true,\r\n\t\t\t'query_var' => true,\r\n\t\t\t'rewrite' => false,\r\n\t\t\t);\r\n\r\n\t\tregister_taxonomy('mar_adverts_cats',array('mar_adverts'),$args);\r\n\r\n\t\t// Add new taxonomy, make it non-hierarchical (like tags)\r\n\t\t$labels = array(\r\n\t\t\t'name' => 'Ad Tags',\r\n\t\t\t'singular_name' => 'Ad Tag',\r\n\t\t\t'search_items' => 'Search Ad Tags',\r\n\t\t\t'all_items' => 'All Ad Tags',\r\n\t\t\t'parent_item' => 'Parent Ad Tag',\r\n\t\t\t'parent_item_colon' => 'Parent Ad Tag:',\r\n\t\t\t'edit_item' => 'Edit Ad Tag',\r\n\t\t\t'update_item' => 'Update Ad Tag',\r\n\t\t\t'add_new_item' => 'Add New Ad Tag',\r\n\t\t\t'new_item_name' => 'New Ad Tag Name',\r\n\t\t\t'menu_name' => 'Ad Tags',\r\n\t\t\t);\r\n\r\n\t\t$args = array(\r\n\t\t\t'hierarchical' => false,\r\n\t\t\t'labels' => $labels,\r\n\t\t\t'show_ui' => true,\r\n\t\t\t'show_admin_column' => true,\r\n\t\t\t'query_var' => true,\r\n\t\t\t'rewrite' => false,\r\n\t\t\t);\r\n\r\n\t\tregister_taxonomy('mar_adverts_tags',array('mar_adverts'),$args);\r\n\t}", "function create_taxonomies($tax,$val) {\n \n\n // register_taxonomy( 'genre', $taxonomies, $args );\n\n // Add new taxonomy, NOT hierarchical (like tags)\n $labels = array(\n 'name' => _x( $tax, 'taxonomy general name', 'textdomain' ),\n 'singular_name' => _x( $tax, 'taxonomy singular name', 'textdomain' ),\n 'search_items' => __( 'Search '.$tax, 'textdomain' ),\n 'popular_items' => __( 'Popular '.$tax, 'textdomain' ),\n 'all_items' => __( 'All '.$tax, 'textdomain' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit '.$tax, 'textdomain' ),\n 'update_item' => __( 'Update '.$tax, 'textdomain' ),\n 'add_new_item' => __( 'Add New '.$tax, 'textdomain' ),\n 'new_item_name' => __( 'New '.$tax.' Name', 'textdomain' ),\n 'separate_items_with_commas' => __( 'Separate '.$tax.' with commas', 'textdomain' ),\n 'add_or_remove_items' => __( 'Add or remove '.$tax, 'textdomain' ),\n 'choose_from_most_used' => __( 'Choose from the most used '.$tax, 'textdomain' ),\n 'not_found' => __( 'No '.$tax.' found', 'textdomain' ),\n 'menu_name' => __( $tax, 'textdomain' ),\n );\n\n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\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' => $tax ),\n );\n\n register_taxonomy( $tax, $val, $args );\n}", "function func_create_warehouse_taxonomy() {\r\n \r\n// Add new taxonomy, make it hierarchical like categories\r\n//first do the translations part for GUI\r\n \r\n $labels = array(\r\n 'name' => _x( 'Warehouse', 'taxonomy general name' ),\r\n 'singular_name' => _x( 'Warehouse', 'taxonomy singular name' ),\r\n 'search_items' => __( 'Search Warehouse' ),\r\n 'all_items' => __( 'All Warehouse' ),\r\n 'parent_item' => __( 'Parent Warehouse' ),\r\n 'parent_item_colon' => __( 'Parent Warehouse:' ),\r\n 'edit_item' => __( 'Edit Warehouse' ), \r\n 'update_item' => __( 'Update Warehouse' ),\r\n 'add_new_item' => __( 'Add New Warehouse' ),\r\n 'new_item_name' => __( 'New Warehouse Name' ),\r\n 'menu_name' => __( 'Warehouses' ),\r\n ); \r\n \r\n// Now register the taxonomy\r\n \r\n register_taxonomy('warehouses',array('product'), array(\r\n 'hierarchical' => true,\r\n 'labels' => $labels,\r\n 'show_ui' => true,\r\n 'show_admin_column' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array( 'slug' => 'warehouse' , 'with_front' => false),\r\n ));\r\n \r\n}", "public function taxonomy();", "function create_portfolio_taxonomies () {\r\n $labels = [\r\n 'name' => _x('Tecnologías', 'taxonomy general name'),\r\n 'singular_name' => _x('Tecnología', 'taxonomy singular name'),\r\n 'search_items' => __('Busca Tecnologías'),\r\n 'popular_items' => __('Tecnologías más usadas'),\r\n 'all_items' => __('Todas las tecnologías'),\r\n 'parent_item' => null,\r\n 'parent_item_colon' => null,\r\n 'edit_item' => __('Editar tecnología'),\r\n 'update_item' => __('Actualizar tecnología'),\r\n 'add_new_item' => __('Añade una nueva tecnología'),\r\n 'new_item_name' => __('Nombre de nueva tecnología'),\r\n 'separate_items_with_commas' => __('Tecnologías. Separadas por comas.'),\r\n 'add_or_remove_items' => __('Añadir o quitar tecnologías'),\r\n 'choose_from_most_used' => __('Elige de las tecnologías más usadas.'),\r\n 'not_found' => __('No se han encontrado tecnologías.'),\r\n 'menu_name' => __('Tecnologías'),\r\n ];\r\n $args = [\r\n 'hierarchical' => FALSE,\r\n 'labels' => $labels,\r\n 'show_ui' => TRUE,\r\n 'show_admin_column' => TRUE,\r\n 'update_count_callback' => '_update_post_term_count',\r\n 'query_var' => TRUE,\r\n 'rewrite' => array( 'slug' => 'tecnologia' ),\r\n ];\r\n \r\n register_taxonomy( 'tecnologia', 'trabajo', $args );\r\n}", "function nt_regsiter_taxonomy() {\n\t$labels = array(\n\t\t'name' => 'Course Note Categories',\n\t\t'singular_name' => 'Course Note Category',\n\t\t'search_items' => 'Search Course Notes Categories',\n\t\t'all_items' => 'All Course Note Categories',\n\t\t'edit_item' => 'Edit Course Note Category',\n\t\t'update_item' => 'Update Course Note Category',\n\t\t'add_new_item' => 'Add New Course Note Category',\n\t\t'new_item_name' => 'New Course Note Category',\n\t\t'menu_name' => 'Course Note Categories'\n\t);\n\t// register taxonomy\n\tregister_taxonomy( 'coursenotecat', 'coursenote', array(\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels,\n\t\t'query_var' => true,\n\t\t'show_admin_column' => true\n\t) );\n}", "function create_new_topic_index() {\n\t// Add new taxonomy\n $types = array('post','page','attachment','nav_menu_item', 'learning_resource');\n register_taxonomy('asn_topic_index', $types, array(\n 'hierarchical' => true,\n 'labels' => array(\n 'name' => _x( 'ASN Topic Index', 'taxonomy general name' ),\n 'singular_name' => _x( 'Topic', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Topics' ),\n 'all_items' => __( 'All Topics' ),\n 'parent_item' => __( 'Parent Topic' ),\n 'parent_item_colon' => __( 'Parent Topic:' ),\n 'edit_item' => __( 'Edit Topic' ),\n 'update_item' => __( 'Update Topic' ),\n 'add_new_item' => __( 'Add New Topic' ),\n 'new_item_name' => __( 'New Topic Name' ),\n 'menu_name' => __( 'Topic Index' ),\n ),\n //Slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'topic_index', \n 'with_front' => false,\n 'hierarchical' => true \n ),\n ));\n}", "function coffee_taxonomy(){\n $args = array(\n 'labels' => array (\n 'name' => 'Categories',\n 'singular_name' => 'Category',\n ),\n 'public' => true,\n 'hierarchical' => true, //true to make it behave like a category, false to make it behave like a tag\n\n );\n\n register_taxonomy( 'categories', array('coffees'), $args );\n}", "function add_custom_taxonomies() {\n // Add new taxonomy\n $types = array('post','page','attachment','nav_menu_item', 'learning_resource');\n register_taxonomy('asn_index', $types, array(\n 'hierarchical' => true,\n 'labels' => array(\n 'name' => _x( 'ASN Index', 'taxonomy general name' ),\n 'singular_name' => _x( 'Competency', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Competencies' ),\n 'all_items' => __( 'All Competencies' ),\n 'parent_item' => __( 'Parent Competency' ),\n 'parent_item_colon' => __( 'Parent Competency:' ),\n 'edit_item' => __( 'Edit Competency' ),\n 'update_item' => __( 'Update Competency' ),\n 'add_new_item' => __( 'Add New Competency' ),\n 'new_item_name' => __( 'New Competency Name' ),\n 'menu_name' => __( 'Competency Index' ),\n ),\n //Slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'competency_index', \n 'with_front' => false,\n 'hierarchical' => true \n ),\n ));\n add_custom_post_type();\n create_new_topic_index();\n add_metadata_taxonomies();\n}", "function create_tag_taxonomies()\n{\n // Add new taxonomy, NOT hierarchical (like tags)\n $labels = array(\n 'name' => _x( 'Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Tags' ),\n 'popular_items' => __( 'Popular Tags' ),\n 'all_items' => __( 'All Tags' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Tag' ),\n 'update_item' => __( 'Update Tag' ),\n 'add_new_item' => __( 'Add New Tag' ),\n 'new_item_name' => __( 'New Tag Name' ),\n 'separate_items_with_commas' => __( 'Separate tags with commas' ),\n 'add_or_remove_items' => __( 'Add or remove tags' ),\n 'choose_from_most_used' => __( 'Choose from the most used tags' ),\n 'menu_name' => __( 'Tags' ),\n );\n\n register_taxonomy('tag','edicoesAnteriores',array(\n 'hierarchical' => false,\n 'labels' => $labels,\n 'show_ui' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'tag' ),\n ));\n}", "function create_taxonomies() {\n\t// taxonomy_init(\n\t// \t$settings = array(\n\t// \t\t'slug' \t=> 'sample',\t\t\t// Required\n\t// \t\t'singular' \t=> 'Sample',\t\t\t// Required\n\t// \t\t'plural' \t=> 'Samples',\t\t\t// Required\n\t// \t\t'post_types'\t=> 'your_CPT',\t\t\t// Required\n\t// \t)\n\t// );\n}", "function create_marque_taxonomies() {\n // Add new taxonomy, make it hierarchical (like categories)\n $labels = array(\n 'name' => _x( 'Marques', 'taxonomy general name' ),\n 'singular_name' => _x( 'Marque', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Marques' ),\n 'all_items' => __( 'All Marques' ),\n 'parent_item' => __( 'Parent Marque' ),\n 'parent_item_colon' => __( 'Parent Marque:' ),\n 'edit_item' => __( 'Edit Marque' ),\n 'update_item' => __( 'Update Marque' ),\n 'add_new_item' => __( 'Add New Marque' ),\n 'new_item_name' => __( 'New Marque Name' ),\n 'menu_name' => __( 'Marque' ),\n );\n \n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'marque' ),\n );\n \n register_taxonomy( 'marque', array( 'product' ), $args );\n}", "function _wp_ajax_add_hierarchical_term()\n {\n }", "function bw_create_taxonomies() {\n//first do the translations part for GUI\n \n $labels = array(\n 'name' => _x( 'Years', 'taxonomy general name' ),\n 'singular_name' => _x( 'Year', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Years' ),\n 'all_items' => __( 'All Years' ),\n 'parent_item' => __( 'Parent Year' ),\n 'parent_item_colon' => __( 'Parent Year:' ),\n 'edit_item' => __( 'Edit Year' ), \n 'update_item' => __( 'Update Year' ),\n 'add_new_item' => __( 'Add New Year' ),\n 'new_item_name' => __( 'New Year Name' ),\n 'menu_name' => __( 'Years' ),\n ); \n \n// Now register the taxonomy\n \n register_taxonomy('years',array('post'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'topic' ),\n ));\n \n}", "function custom_taxonomies_for_courses() {\n\n // add new taxonomy - type\n $labels = array(\n 'name' => 'Type',\n 'singular_name' => 'Type',\n 'search_items' => 'Search',\n 'all_items' => 'All',\n 'parent_item' => 'Parent',\n 'parent_item_colon' => 'Parent type:',\n 'edit_item' => 'Edit',\n 'update_item' => 'Update',\n 'add_new_item' => 'Add new',\n 'new_item_name' => 'New Type Field',\n 'menu_name' => 'Type'\n );\n\n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array('slug' => 'type')\n );\n\n register_taxonomy('type', array('courses'), $args);\n\n}", "function create_academy_taxonomy() {\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Tipos', 'taxonomy general name', 'textdomain' ),\n\t\t\t'singular_name' => _x( 'Tipo', 'taxonomy singular name', 'textdomain' ),\n\t\t\t'search_items' => __( 'Buscar Tipos', 'textdomain' ),\n\t\t\t'all_items' => __( 'Todos los Tipos', 'textdomain' ),\n\t\t\t'parent_item' => __( 'Tipo Padre', 'textdomain' ),\n\t\t\t'parent_item_colon' => __( 'Parent Genre:', 'textdomain' ),\n\t\t\t'edit_item' => __( 'Editar Tipo', 'textdomain' ),\n\t\t\t'update_item' => __( 'Actualizar Tipo', 'textdomain' ),\n\t\t\t'add_new_item' => __( 'Nuevo Tipo', 'textdomain' ),\n\t\t\t'new_item_name' => __( 'Nuevo Nombre de Tipo', 'textdomain' ),\n\t\t\t'menu_name' => __( 'Tipo', 'textdomain' ),\n\t\t);\n\n\t\t$args = array(\n\t\t\t'hierarchical' => true,\n\t\t\t'labels' => $labels,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => array( 'slug' => 'academy-type' ),\n\t\t);\n\n\t\tregister_taxonomy( 'academy-type', array( 'academy' ), $args );\n\n\t}", "function wpfolio_create_taxonomies() {\nregister_taxonomy('medium', 'post', array( \n\t'label' => 'Medium',\n\t'hierarchical' => false, \n\t'query_var' => true, \n\t'rewrite' => true,\n\t'public' => true,\n\t'show_ui' => true,\n\t'show_tagcloud' => true,\n\t'show_in_nav_menus' => true,));\n}", "function atoz_init() {\r\n\t// create a new taxonomy\r\n\tregister_taxonomy(\r\n\t\t'azcategory',\r\n\t\t'atoz',\r\n\t\tarray(\r\n\t\t\t'label' \t\t => __( 'AtoZ Category' ),\r\n\t\t\t'sort' \t\t\t=> true,\r\n\t\t\t'args' \t\t\t=> array( 'orderby' => 'atoz_order' ),\r\n\t\t\t'query_var'\t => true,\r\n\t\t\t//'rewrite'\t\t => true,\r\n\t\t\t'rewrite'\t\t => array( 'slug' => 'azcategory' ),\r\n\t\t\t'hierarchical' \t=> true\r\n\t\t)\r\n\t);\r\n}", "function add_wp_taxonomy_to_recipe() {\n\t// Replace post_type with actual CPT slug.\n\tregister_taxonomy_for_object_type( 'category', 'recipe' );\n\tregister_taxonomy_for_object_type( 'post_tag', 'recipe' );\n}", "function add_educational_use() {\n\t// Add new taxonomy\n $types = array('post','page','attachment','nav_menu_item', 'learning_resource');\n register_taxonomy('asn_educational_use', $types, array(\n 'hierarchical' => false,\n 'labels' => array(\n 'name' => _x( 'Educational Use', 'taxonomy general name' ),\n 'singular_name' => _x( 'Educational Use', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Educational Uses' ),\n 'all_items' => __( 'All Educational Uses' ),\n 'parent_item' => __( 'Parent Educational Use' ),\n 'parent_item_colon' => __( 'Parent Educational Use:' ),\n 'edit_item' => __( 'Edit Educational Use' ),\n 'update_item' => __( 'Update Educational Use' ),\n 'add_new_item' => __( 'Add New Educational Use' ),\n 'new_item_name' => __( 'New Educational Use Name' ),\n 'menu_name' => __( 'Educational Use' ),\n ),\n //Slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'educational_use', \n 'with_front' => false,\n 'hierarchical' => false \n ),\n ));\t\n}", "function omfg_mobile_groove_add_theme_taxonomy() {\n\n\twp_insert_term(\n \t\t'Groove Theme', \t\t\t\t// the term\n \t\t'omfg_mobile_pro_themes', \t// the taxonomy\n \t\tarray(\n \t\t'description' => 'Groove Theme for the OMFG Mobile Landing Page Plugin.',\n \t\t'slug' => 'omfg-mobile-groove-theme'\n \t\t)\n\t);\n\n}", "public function initial_taxonomy() {\n $labels = array(\n 'name' => __( 'Taxonomies', Settings::$text_domain ),\n 'singular_name' => __( 'Taxonomy', Settings::$text_domain ),\n 'menu_name' => __( 'Taxonomies', Settings::$text_domain ),\n 'name_admin_bar' => __( 'Taxonomies', Settings::$text_domain ),\n 'add_new' => __( 'Add New', Settings::$text_domain ),\n 'add_new_item' => __( 'Add New Taxonomy', Settings::$text_domain ),\n 'new_item' => __( 'New Taxonomy', Settings::$text_domain ),\n 'edit_item' => __( 'Edit Taxonomy', Settings::$text_domain ),\n 'view_item' => __( 'View Taxonomy', Settings::$text_domain ),\n 'all_items' => __( 'Taxonomies', Settings::$text_domain ),\n 'search_items' => __( 'Search Taxonomies', Settings::$text_domain ),\n 'parent_item_colon' => __( 'Parent Taxonomies:', Settings::$text_domain ),\n 'not_found' => __( 'No taxonomy found.', Settings::$text_domain ),\n 'not_found_in_trash' => __( 'No taxonomies found in Trash.', Settings::$text_domain )\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => 'tools.php',\n 'show_in_nav_menus' => false,\n 'query_var' => true,\n 'capability_type' => 'post',\n 'has_archive' => false,\n 'hierarchical' => false,\n 'menu_position' => null,\n 'taxonomies' => array( '' ),\n 'menu_icon' => 'dashicons-category',\n 'supports' => array('title')\n );\n\n register_post_type( Settings::$main_taxonomy_name, $args );\n\n $taxonomy_factory = new Taxonomy_Factory();\n $taxonomy_factory->register_all_taxonomies();\n\n //Configura o número de posts por página\n add_action('pre_get_posts', array($taxonomy_factory, 'set_posts_per_page'));\n }", "function amenities_init() {\r\n\tregister_taxonomy(\r\n\t\t'amenities',\r\n\t\t'post',\r\n\t\tarray(\r\n\t\t\t'label' => __( 'Amenities' ),\r\n\t\t\t'rewrite' => array( 'slug' => 'amenities' ),\r\n\t\t\t'hierarchical' => true,\r\n\t\t)\r\n\t);\r\n}", "function my_register_taxonomies() {\r\n\t}", "function additional_taxonomies() {\r\n\tregister_taxonomy(\r\n\t\t'gradelevel',\r\n\t\t'post',\r\n\t\tarray(\r\n 'hierarchical' => true,\r\n\t\t\t'label' => __( 'Grade Level' ),\r\n\t\t\t'sort' => true,\r\n\t\t\t'args' => array( 'orderby' => 'term_order' ),\r\n\t\t\t'rewrite' => array( 'slug' => 'gradelevel' )\r\n\t\t)\r\n\t);\r\n \r\n register_taxonomy(\r\n\t\t'logotype',\r\n\t\t'logo',\r\n\t\tarray(\r\n 'hierarchical' => true,\r\n\t\t\t'label' => __( 'Logo Types' ),\r\n\t\t\t'sort' => true,\r\n\t\t\t'args' => array( 'orderby' => 'term_order' ),\r\n\t\t\t'rewrite' => array( 'slug' => 'logotype' )\r\n\t\t)\r\n\t);\r\n}", "function tag_agenda() {\n // Add new taxonomy, NOT hierarchical (like tags)\n $labels = array(\n 'name' => _x('Tag', 'taxonomy general name'),\n 'singular_name' => _x('Tag', 'taxonomy singular name'),\n 'search_items' => __('Cari Tag'),\n 'popular_items' => __('Tag Populer'),\n 'all_items' => __('Semua Tag'),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __('Edit Tag'),\n 'update_item' => __('Update Tag'),\n 'add_new_item' => __('Tambah Tag Baru'),\n 'new_item_name' => __('New Tag Name'),\n 'separate_items_with_commas' => __('Pisahkan tag dengan koma.'),\n 'add_or_remove_items' => __('Tambah atau hapus tag'),\n 'choose_from_most_used' => __('Pilih dari tag populer'),\n 'menu_name' => __('Tags'),\n );\n\n register_taxonomy('tag_agenda', 'agenda', array(\n 'hierarchical' => false,\n 'labels' => $labels,\n 'show_ui' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array('slug' => 'tag-agenda'),\n ));\n}", "function add_custom_taxonomies() {\n register_taxonomy('mechanic', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Mechanics', 'taxonomy general name' ),\n 'singular_name' => _x( 'Mechanic', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Mechanics' ),\n 'all_items' => __( 'All Mechanics' ),\n 'parent_item' => __( 'Parent Mechanic' ),\n 'parent_item_colon' => __( 'Parent Mechanic:' ),\n 'edit_item' => __( 'Edit Mechanic' ),\n 'update_item' => __( 'Update Mechanic' ),\n 'add_new_item' => __( 'Add New Mechanic' ),\n 'new_item_name' => __( 'New Mechanic Name' ),\n 'menu_name' => __( 'Mechanics' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'mechanics', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n \n // Add new \"Locations\" taxonomy to Posts\n register_taxonomy('family', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Families', 'taxonomy general name' ),\n 'singular_name' => _x( 'Family', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Families' ),\n 'all_items' => __( 'All Families' ),\n 'parent_item' => __( 'Parent Family' ),\n 'parent_item_colon' => __( 'Parent Family:' ),\n 'edit_item' => __( 'Edit Family' ),\n 'update_item' => __( 'Update Family' ),\n 'add_new_item' => __( 'Add New Family' ),\n 'new_item_name' => __( 'New Family Name' ),\n 'menu_name' => __( 'Families' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'family', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n \n // Add new \"Locations\" taxonomy to Posts\n register_taxonomy('publisher', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Publishers', 'taxonomy general name' ),\n 'singular_name' => _x( 'Publisher', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Publishers' ),\n 'all_items' => __( 'All Publishers' ),\n 'parent_item' => __( 'Parent Publisher' ),\n 'parent_item_colon' => __( 'Parent Publisher:' ),\n 'edit_item' => __( 'Edit Publisher' ),\n 'update_item' => __( 'Update Publisher' ),\n 'add_new_item' => __( 'Add New Publisher' ),\n 'new_item_name' => __( 'New Publisher Name' ),\n 'menu_name' => __( 'Publishers' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'publisher', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n \n register_taxonomy('artists', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Artists', 'taxonomy general name' ),\n 'singular_name' => _x( 'Artist', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Artists' ),\n 'all_items' => __( 'All Artists' ),\n 'parent_item' => __( 'Parent Artist' ),\n 'parent_item_colon' => __( 'Parent Artist:' ),\n 'edit_item' => __( 'Edit Artist' ),\n 'update_item' => __( 'Update Artist' ),\n 'add_new_item' => __( 'Add New Artist' ),\n 'new_item_name' => __( 'New Artist Name' ),\n 'menu_name' => __( 'Artists' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'artists', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n \n register_taxonomy('designers', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Designers', 'taxonomy general name' ),\n 'singular_name' => _x( 'Designer', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Designers' ),\n 'all_items' => __( 'All Designers' ),\n 'parent_item' => __( 'Parent Designer' ),\n 'parent_item_colon' => __( 'Parent Designer:' ),\n 'edit_item' => __( 'Edit Designer' ),\n 'update_item' => __( 'Update Designer' ),\n 'add_new_item' => __( 'Add New Designer' ),\n 'new_item_name' => __( 'New Designer Name' ),\n 'menu_name' => __( 'Designers' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'designers', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n\n\n register_taxonomy('awards', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Awards', 'taxonomy general name' ),\n 'singular_name' => _x( 'Award', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Awards' ),\n 'all_items' => __( 'All Awards' ),\n 'parent_item' => __( 'Parent Award' ),\n 'parent_item_colon' => __( 'Parent Award:' ),\n 'edit_item' => __( 'Edit Award' ),\n 'update_item' => __( 'Update Award' ),\n 'add_new_item' => __( 'Add New Award' ),\n 'new_item_name' => __( 'New Award Name' ),\n 'menu_name' => __( 'Awards' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'awards', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n }", "function add_educational_audience() {\n\t$types = array('post','page','attachment','nav_menu_item', 'learning_resource');\n register_taxonomy('asn_educational_audience', $types, array(\n 'hierarchical' => false,\n 'labels' => array(\n 'name' => _x( 'Educational Audience', 'taxonomy general name' ),\n 'singular_name' => _x( 'Educational Audience', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Educational Audiences' ),\n 'all_items' => __( 'All Educational Audiences' ),\n 'parent_item' => __( 'Parent Educational Audience' ),\n 'parent_item_colon' => __( 'Parent Educational Audience:' ),\n 'edit_item' => __( 'Edit Educational Audience' ),\n 'update_item' => __( 'Update Educational Audience' ),\n 'add_new_item' => __( 'Add New Educational Audience' ),\n 'new_item_name' => __( 'New Educational Audience Name' ),\n 'menu_name' => __( 'Educational Audience' ),\n ),\n //Slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'educational_audience', \n 'with_front' => false,\n 'hierarchical' => false \n ),\n ));\n}", "function create_gallerie_taxonomies() {\r\n\t// Add new taxonomy, make it hierarchical (like categories)\r\n\t$labels = array(\r\n\t\t'name' => _x( 'Genres', 'taxonomy general name', 'textdomain' ),\r\n\t\t'singular_name' => _x( 'Genre', 'taxonomy singular name', 'textdomain' ),\r\n\t\t'search_items' => __( 'Search Genres', 'textdomain' ),\r\n\t\t'all_items' => __( 'All Genres', 'textdomain' ),\r\n\t\t'parent_item' => __( 'Parent Genre', 'textdomain' ),\r\n\t\t'parent_item_colon' => __( 'Parent Genre:', 'textdomain' ),\r\n\t\t'edit_item' => __( 'Edit Genre', 'textdomain' ),\r\n\t\t'update_item' => __( 'Update Genre', 'textdomain' ),\r\n\t\t'add_new_item' => __( 'Add New Genre', 'textdomain' ),\r\n\t\t'new_item_name' => __( 'New Genre Name', 'textdomain' ),\r\n\t\t'menu_name' => __( 'Genre', 'textdomain' ),\r\n\t);\r\n\r\n\t$args = array(\r\n\t\t'hierarchical' => true,\r\n\t\t'labels' => $labels,\r\n\t\t'show_ui' => true,\r\n\t\t'show_admin_column' => true,\r\n\t\t'query_var' => true,\r\n\t\t'rewrite' => array( 'slug' => 'genre' ),\r\n\t);\r\n\r\n\tregister_taxonomy( 'genre', array( 'gallerie' ), $args );\r\n}", "private function initCustomTaxonomy(){\n //Instantiate our custom taxonomy object\n $this->taxAstrology = new Taxonomy($this->wpdsTaxonomyName, $this->wpdsPostType);\n \n //Set our taxonomy's properties\n $this->taxAstrology->setSingularName($this->wpdsTaxonomyName);\n $this->taxAstrology->setPluralName($this->wpdsTaxonomyName);\n $this->taxAstrology->setMenuName($this->wpdsTaxonomyName);\n $this->taxAstrology->setLabels('Search '.$this->wpdsPostTypeNamePlural, 'Popular '.$this->wpdsPostTypeNamePlural, 'All '.$this->wpdsPostTypeNamePlural, 'Edit '.$this->wpdsPostTypeName, 'Update '.$this->wpdsPostTypeName, 'Add New '.$this->wpdsPostTypeName, 'New '.$this->wpdsPostTypeName.' Name');\n $this->taxAstrology->setDescription($this->wpdsPostTypeNamePlural);\n $this->taxAstrology->setShowInMenu(true);\n $this->taxAstrology->setPublic(true);\n $this->taxAstrology->setHierarchical(false);\n \n //Finally, we register our new taxonomy\n $this->taxAstrology->register();\n }", "function workshop_chapter_taxonomy() {\n $args = array(\n 'label' => __( 'Chapter', 'workshop' ),\n 'public' => true,\n 'rewrite' => false,\n 'hierarchical' => true\n );\n\n register_taxonomy( 'chapter', 'workshop', $args );\n}", "function register_taxonomies(){\n }", "function register_taxonomies(){\n }", "function create_author_taxonomies() {\n\n\n\t$labels = array(\n\t\t'name' => _x( 'Autore', 'taxonomy general name', 'italiattivo' ),\n\n\t);\n\n\n\t$args = array(\n\t\t'hierarchical' => false,\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\n\t);\n\n\tregister_taxonomy( 'autore', array('frasi', 'quadri', 'esercizi'), $args );\n\n}", "public static function createTaxonomies() {\n // Add new taxonomy, make it hierarchical (like categories)\n $labels = array(\n 'name' => _x( 'Card Categories', 'taxonomy general name', 'textdomain' ),\n 'singular_name' => _x( 'Card Category', 'taxonomy singular name', 'textdomain' ),\n 'search_items' => __( 'Search Card Categories', 'textdomain' ),\n 'all_items' => __( 'All Card Categories', 'textdomain' ),\n 'parent_item' => __( 'Parent Card Category', 'textdomain' ),\n 'parent_item_colon' => __( 'Parent Card Category:', 'textdomain' ),\n 'edit_item' => __( 'Edit Card Category', 'textdomain' ),\n 'update_item' => __( 'Update Card Category', 'textdomain' ),\n 'add_new_item' => __( 'Add New Card Category', 'textdomain' ),\n 'new_item_name' => __( 'New Card Category Name', 'textdomain' ),\n 'menu_name' => __( 'Card Category', 'textdomain' ),\n );\n\n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'card_category' ),\n 'capabilities' => array(\n 'manage_terms' => 'edit_travelcards',\n 'edit_terms' => 'edit_travelcards',\n 'delete_terms' => 'edit_travelcards',\n 'assign_terms' => 'edit_travelcards'\n )\n );\n\n register_taxonomy( 'card_category', array( 'travelcard' ), $args );\n\n // Add 'card tags' taxonomy\n $labels = array(\n 'name' => _x( 'Card Tags', 'taxonomy general name', 'textdomain' ),\n 'singular_name' => _x( 'Card Tag', 'taxonomy singular name', 'textdomain' ),\n 'search_items' => __( 'Search Card Tags', 'textdomain' ),\n 'popular_items' => __( 'Popular Card Tags', 'textdomain' ),\n 'all_items' => __( 'All Card Tags', 'textdomain' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Card Tag', 'textdomain' ),\n 'update_item' => __( 'Update Card Tag', 'textdomain' ),\n 'add_new_item' => __( 'Add New Card Tag', 'textdomain' ),\n 'new_item_name' => __( 'New Card Tag Name', 'textdomain' ),\n 'separate_items_with_commas' => __( 'Separate card tags with commas', 'textdomain' ),\n 'add_or_remove_items' => __( 'Add or remove card tags', 'textdomain' ),\n 'choose_from_most_used' => __( 'Choose from the most used card tags', 'textdomain' ),\n 'not_found' => __( 'No card tags found.', 'textdomain' ),\n 'menu_name' => __( 'Card Tags', 'textdomain' ),\n );\n\n $args = array(\n 'hierarchical' => false,\n 'labels' => $labels,\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' => 'card_tag' ),\n 'capabilities' => array(\n 'manage_terms' => 'edit_travelcards',\n 'edit_terms' => 'edit_travelcards',\n 'delete_terms' => 'edit_travelcards',\n 'assign_terms' => 'edit_travelcards'\n )\n );\n\n register_taxonomy( 'card_tag', 'travelcard', $args );\n }", "function om_cars_categories() {\n $labels = array(\n 'name' => _x( 'Cars Categories', 'taxonomy general name' ),\n 'singular_name' => _x( 'Cars Category', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Cars Categories' ),\n 'all_items' => __( 'All Cars Categories' ),\n 'parent_item' => __( 'Parent Cars Category' ),\n 'parent_item_colon' => __( 'Parent Cars Category:' ),\n 'edit_item' => __( 'Edit Cars Category' ), \n 'update_item' => __( 'Update Cars Category' ),\n 'add_new_item' => __( 'Add New Cars Category' ),\n 'new_item_name' => __( 'New Cars Category' ),\n 'menu_name' => __( 'Cars Categories' ),\n );\n $args = array(\n 'labels' => $labels,\n 'hierarchical' => true,\n );\n register_taxonomy( 'cars_category', 'om-car', $args );\n}", "public function register_taxonomy(){\n $labels = $this->jb_generate_tax_label('work category');\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'show_in_nav_menus' => true,\n 'show_admin_column' => true,\n 'hierarchical' => true,\n 'show_tagcloud' => true,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => array(\n 'slug' => jb_get_option('work_category_slug', 'work_category') ,\n 'hierarchical' => jb_get_option('work_category_hierarchical', false)\n ) ,\n 'capabilities' => array(\n 'manage_terms',\n 'edit_terms',\n 'delete_terms',\n 'assign_terms'\n )\n );\n register_taxonomy('work_category', array('jb_work') , $args);\n }", "function rew_genreic_taxonomy(){\n\n\t$args= array(\n\t\t'label'=>'Services'\n\t\t);\n\tregister_taxonomy( 'services', array('apartment', 'villa', 'land', 'store'), $args );\n}", "private function prepareTaxonomy(){\n $taxonomy = null;\n if ( $this->taxonomy->terms() ){\n foreach($this->taxonomy->terms() as $term){\n $taxonomy[] = array( \n \t'id'=>$term->getID(), \n \t'label'=>$term->label->label \n\t\t\t\t);\n }\n }\n return $taxonomy;\n }", "function cwp_register_taxonomy_produtos(){\n\t \n\t $labels = array(\n\t\t\t'name' => _x('Categorias', 'taxonomy general name'),\n\t );\n\t $posts_types = array(\n\t \t\t'produtos',\n\t\t\t'faq'\n\t );\n\n\t register_taxonomy(\n 'category_prod',\n $posts_types,\n array(\n 'labels' => $labels,\n\t\t\t 'singular_name' => __('Categoria'),\n 'rewrite' => array('slug' => 'categoria_produto'),\n 'hierarchical' => true\n )\n );\n}", "private function registerTax() {\n $labels = array(\n 'name' => esc_html__('Masonry Gallery Categories', 'eltdf-core'),\n 'singular_name' => esc_html__('Masonry Gallery Category', 'eltdf-core'),\n 'search_items' => esc_html__('Search Masonry Gallery Categories', 'eltdf-core'),\n 'all_items' => esc_html__('All Masonry Gallery Categories', 'eltdf-core'),\n 'parent_item' => esc_html__('Parent Masonry Gallery Category', 'eltdf-core'),\n 'parent_item_colon' => esc_html__('Parent Masonry Gallery Category:', 'eltdf-core'),\n 'edit_item' => esc_html__('Edit Masonry Gallery Category', 'eltdf-core'),\n 'update_item' => esc_html__('Update Masonry Gallery Category', 'eltdf-core'),\n 'add_new_item' => esc_html__('Add New Masonry Gallery Category', 'eltdf-core'),\n 'new_item_name' => esc_html__('New Masonry Gallery Category Name', 'eltdf-core'),\n 'menu_name' => esc_html__('Masonry Gallery Categories', 'eltdf-core'),\n );\n\n register_taxonomy($this->taxBase, array($this->base), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'show_admin_column' => true,\n 'rewrite' => array( 'slug' => 'masonry-gallery-category' ),\n ));\n }", "function wporg_register_taxonomy_destaque() {\n\t$labels = array(\n\t\t'name' => _x( 'Destaques', 'taxonomy general name' ),\n\t\t'singular_name' => _x( 'Destaque', 'taxonomy singular name' ),\n\t\t'search_items' => __( 'Buscar destaques' ),\n\t\t'all_items' => __( 'Todos los tipos de destaque' ),\n\t\t'parent_item' => __( 'Destaque padre' ),\n\t\t'parent_item_colon' => __( 'Destaque padre:' ),\n\t\t'edit_item' => __( 'Editar Destaque' ),\n\t\t'update_item' => __( 'Actualizar Destaque' ),\n\t\t'add_new_item' => __( 'Agregar nueva Destaque' ),\n\t\t'new_item_name' => __( 'Nuevo Destaque' ),\n\t\t'menu_name' => __( 'Destaque' ),\n\t);\n\t$args = array(\n\t\t'hierarchical' => true, // make it hierarchical (like categories).\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'show_in_rest' => true,\n\t);\n\tregister_taxonomy( 'destaque', array( 'video' ), $args );\n}", "function mnk_taxonomies_prodotti() {\n\n\t$labels = array(\n\t\t'name'\t\t\t\t\t=> _x( 'Cat Prodotti', 'Taxonomy plural name', 'plugin-cpt' ),\n\t\t'singular_name'\t\t\t=> _x( 'Prodotto', 'Taxonomy singular name', 'plugin-cpt' ),\n\t\t'search_items'\t\t\t=> __( 'Cerca Prodotto', 'plugin-cpt' ),\n\t\t'popular_items'\t\t\t=> __( 'Prodotto più usata', 'plugin-cpt' ),\n\t\t'all_items'\t\t\t\t=> __( 'Tutte le categorie', 'plugin-cpt' ),\n\t\t'parent_item'\t\t\t=> __( 'Prodotto', 'plugin-cpt' ),\n\t\t'parent_item_colon'\t\t=> __( 'Prodotto', 'plugin-cpt' ),\n\t\t'edit_item'\t\t\t\t=> __( 'Modifica Prodotto', 'plugin-cpt' ),\n\t\t'update_item'\t\t\t=> __( 'Aggiorna Prodotto', 'plugin-cpt' ),\n\t\t'add_new_item'\t\t\t=> __( 'Aggiungi Nuova Prodotto', 'plugin-cpt' ),\n\t\t'new_item_name'\t\t\t=> __( 'Nuova Prodotto', 'plugin-cpt' ),\n\t\t'add_or_remove_items'\t=> __( 'Aggiungi o Rimuovi Prodotto', 'plugin-cpt' ),\n\t\t'choose_from_most_used'\t=> __( 'Scegli tra le Categorie più usate', 'plugin-cpt' ),\n\t\t'menu_name'\t\t\t\t=> __( 'Cat Prodotti', 'plugin-cpt' ),\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'public' => true,\n\t\t'show_admin_column' => true,\n\t\t'hierarchical' => true,\n\t\t'query_var' => true,\n\t);\n\n\tregister_taxonomy( 'cat_prodotti', array( 'realizzazioni' ), $args );\n}", "function cooma_create_location_taxo() {\n $labels = array(\n 'name' => 'Locations',\n 'singular_name' => 'Location',\n 'search_items' => 'Search Locations',\n 'popular_items' => 'Popular Locations',\n 'all_items' => 'All Locations',\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => 'Edit Location',\n 'update_item' => 'Update Location',\n 'add_new_item' => 'Add New Location',\n 'new_item_name' => 'New Location Name',\n 'separate_items_with_commas' => 'Separate locations with commas',\n 'add_or_remove_items' => 'Add or remove locations',\n 'choose_from_most_used' => 'Choose from the most used locations',\n 'not_found' => 'No locations found.',\n 'menu_name' => 'Locations'\n );\n\n register_taxonomy(\n 'event-location',\n ['event', 'event-recurring', 'accommodation', 'coffee_food_wine', 'groups_associations', 'attractions'],\n array(\n 'labels' => $labels,\n 'hierarchical' => true,\n 'query_var' => true\n )\n );\n}", "function katayam_custom_taxonomies(){\r\n\t$labels=array(\r\n\t'name'=>'Fields',\r\n\t'singular_name'=>'Field',\r\n\t'search_item'=>'Search Fields',\r\n\t'all_items'=>'All Field',\r\n\t'parent_item'=>'Parent Field',\r\n\t'parent_item_colon'=>'Parent Item',\r\n\t'edit_item'=>'Edit Item',\r\n\t'update_item'=>'Update Field',\r\n\t'add_new_item'=>'Add Item',\r\n\t'new_item_name'=>'New Field Name',\r\n\t'menu_name'=>'Field'\r\n\t\r\n\t);\r\n\t$args=array(\r\n\t'hierarchical'=>true,\r\n\t'labels'=>$labels,\r\n\t'show_ui'=>true,\r\n\t'show_admin_colum'=>true,\r\n\t'query_var'=>true,\r\n\t'rewrite'=>array('slug'=>'field')\r\n\t);\r\n\tregister_taxonomy('field',array('portfolio'),$args);\r\n\t//add new taxonomies Not hierarchical\r\n\tregister_taxonomy('software','portfolio',array(\r\n\t'label'=>'Software',\r\n\t'rewrite'=>array('slug'=>'software'),\r\n\t'hierarchical'=>false\r\n\t));\r\n}", "function add_proficiency_level() {\n\t$types = array('post','page','attachment','nav_menu_item', 'learning_resource');\n register_taxonomy('asn_proficiency_level', $types, array(\n 'hierarchical' => false,\n 'labels' => array(\n 'name' => _x( 'Proficiency Level', 'taxonomy general name' ),\n 'singular_name' => _x( 'Proficiency Level', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Proficiency Levels' ),\n 'all_items' => __( 'All Proficiency Levels' ),\n 'parent_item' => __( 'Parent Proficiency Levele' ),\n 'parent_item_colon' => __( 'Parent Proficiency Level:' ),\n 'edit_item' => __( 'Edit Proficiency Level' ),\n 'update_item' => __( 'Update Proficiency Level' ),\n 'add_new_item' => __( 'Add New Proficiency Level' ),\n 'new_item_name' => __( 'New Proficiency Level Name' ),\n 'menu_name' => __( 'Proficiency Level' ),\n ),\n //Slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'proficiency_level', \n 'with_front' => false,\n 'hierarchical' => false \n ),\n ));\n}", "function build_taxonomies() {\n// custom tax\n register_taxonomy( 'from', array('menu'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'From',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'menu-from' ),\n\t\t\t'_builtin' => true\n ) );\n \n register_taxonomy( 'cpt-tag',array('menu','recipe','sources-resources','tips-quips','style-points'), \n array( \n 'hierarchical' => false, // true = acts like categories false = acts like tags\n 'label' => 'Tags',\n 'query_var' => true,\n 'show_admin_column' => true,\n 'public' => true,\n 'rewrite' => true,\n '_builtin' => true\n ) );\n register_taxonomy( 'from-5', array('recipe'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'From',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'recipe-from' ),\n\t\t\t'_builtin' => true\n ) );\n \n register_taxonomy( 'from-2', array('sources-resources'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'From',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'sources-resources-from' ),\n\t\t\t'_builtin' => true\n ) );\n \n register_taxonomy( 'from-3', array('tips-quips'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'From',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'tips-quips-from' ),\n\t\t\t'_builtin' => true\n ) );\n \n register_taxonomy( 'from-4', array('style-points'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'From',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'style-points-from' ),\n\t\t\t'_builtin' => true\n ) );\n register_taxonomy( 'sub', array('menu'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'Sub',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'menu-sub' ),\n\t\t\t'_builtin' => true\n\t\t) );\n register_taxonomy( 'sub-5', array('recipe'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'Sub',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'recipe-sub' ),\n\t\t\t'_builtin' => true\n\t\t) );\n register_taxonomy( 'sub-2', array('sources-resources'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'Sub',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'sources-resources-sub' ),\n\t\t\t'_builtin' => true\n\t\t) );\n register_taxonomy( 'sub-3', array('tips-quips'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'Sub',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'tips-quips-sub' ),\n\t\t\t'_builtin' => true\n\t\t) );\n register_taxonomy( 'sub-4', array('style-points'),\n\t\tarray(\n\t\t\t'hierarchical' => true, // true = acts like categories false = acts like tags\n\t\t\t'label' => 'Sub',\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'style-points-sub' ),\n\t\t\t'_builtin' => true\n\t\t) );\n}", "public function register_taxonomies() {\n\n\t\t$options = $this->options;\n\t\t$this->remove_mb = array();\n\n\t\tforeach ( $options as $option ) {\n\n\t\t\tif ( 'taxonomy' == $option['args']['field_type'] ) {\n\n\t\t\t\t$name = ! empty( $option['args']['label'] ) ? sanitize_text_field( $option['args']['label'] ) : ucwords( str_replace( array( '_', '-' ), ' ', $option['name'] ) );\n\t\t\t\t$plural = ! empty( $option['args']['label_plural'] ) ? sanitize_text_field( $option['args']['label_plural'] ) : $name . 's';\n\t\t\t\t$column = true === $option['args']['taxo_std'] ? true : false;\n\t\t\t\t$hierarchical = $option['args']['taxo_hierarchical'];\n\n\t\t\t\t$labels = array(\n\t\t\t\t\t'name' => $plural,\n\t\t\t\t\t'singular_name' => $name,\n\t\t\t\t\t'search_items' => sprintf( __( 'Search %s', TEXTDOMAIN ), $plural ),\n\t\t\t\t\t'all_items' => sprintf( __( 'All %s', TEXTDOMAIN ), $plural ),\n\t\t\t\t\t'parent_item' => sprintf( __( 'Parent %s', TEXTDOMAIN ), $name ),\n\t\t\t\t\t'parent_item_colon' => sprintf( _x( 'Parent %s:', 'Parent term in a taxonomy where %s is dynamically replaced by the taxonomy (eg. \"book\")', TEXTDOMAIN ), $name ),\n\t\t\t\t\t'edit_item' => sprintf( __( 'Edit %s', TEXTDOMAIN ), $name ),\n\t\t\t\t\t'update_item' => sprintf( __( 'Update %s', TEXTDOMAIN ), $name ),\n\t\t\t\t\t'add_new_item' => sprintf( __( 'Add New %s', TEXTDOMAIN ), $name ),\n\t\t\t\t\t'new_item_name' => sprintf( _x( 'New %s Name', 'A new taxonomy term name where %s is dynamically replaced by the taxonomy (eg. \"book\")', TEXTDOMAIN ), $name ),\n\t\t\t\t\t'menu_name' => $plural,\n\t\t\t\t);\n\n\t\t\t\t$args = array(\n\t\t\t\t\t'hierarchical' => $hierarchical,\n\t\t\t\t\t'labels' => $labels,\n\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t'show_admin_column' => $column,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'rewrite' => array( 'slug' => $option['name'] ),\n\t\t\t\t\t'capabilities' => array(\n\t\t\t\t\t\t'manage_terms' => 'create_ticket',\n\t\t\t\t\t\t'edit_terms' => 'settings_tickets',\n\t\t\t\t\t\t'delete_terms' => 'settings_tickets',\n\t\t\t\t\t\t'assign_terms' => 'create_ticket'\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\tif ( false !== $option['args']['update_count_callback'] && function_exists( $option['args']['update_count_callback'] ) ) {\n\t\t\t\t\t$args['update_count_callback'] = $option['args']['update_count_callback'];\n\t\t\t\t}\n\n\t\t\t\tregister_taxonomy( $option['name'], array( 'ticket' ), $args );\n\n\t\t\t\tif ( false === $option['args']['taxo_std'] ) {\n\t\t\t\t\tarray_push( $this->remove_mb, $option['name'] );\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t/* Remove metaboxes that won't be used */\n\t\tif ( ! empty( $this->remove_mb ) ) {\n\t\t\tadd_action( 'admin_menu', array( $this, 'remove_taxonomy_metabox' ) );\n\t\t}\n\n\t}", "public function registerTaxonomy()\n {\n // Get the existing taxonomy options if it exists.\n $options = (taxonomy_exists($this->name)) ? (array) get_taxonomy($this->name) : [];\n\n // create options for the Taxonomy.\n $options = array_replace_recursive($options, $this->createOptions());\n\n // register the Taxonomy with WordPress.\n register_taxonomy($this->name, null, $options);\n }", "function register_taxonomy_fruits()\n{\n $labels = [\n 'name' => _x('Fruits', 'taxonomy general name'),\n'singular_name' => _x('Fruit', 'taxonomy singular name'),\n'search_items' => __('Search Fruits'),\n'all_items' => __('All Fruits'),\n'parent_item' => __('Parent Fruit'),\n'parent_item_colon' => __('Parent Fruit:'),\n'edit_item' => __('Edit Fruit'),\n'update_item' => __('Update Fruit'),\n'add_new_item' => __('Add New Fruit'),\n'new_item_name' => __('New Fruit Name'),\n'menu_name' => __('Fruit'),\n];\n$args = [\n'hierarchical' => true, // make it hierarchical (like categories)\n'labels' => $labels,\n'show_ui' => true,\n'show_admin_column' => true,\n'query_var' => true,\n'rewrite' => ['slug' => 'fruits'],\n];\nregister_taxonomy('fruits', ['post'], $args);\n}", "function custom_taxonomy_wie_init() {\n //custom taxonmy\n register_taxonomy(\n 'webdevelopment',\n 'post',\n array(\n 'hierarchical' => true,\n 'label' => 'Web Development Types',\n 'query_var' => true\n )\n );\n}", "function register_part_of_speech_taxonomy () {\n\n $labels = array(\n 'name' => _x( 'Part of Speech', 'taxonomy general name' ),\n 'singular_name' => _x( 'Part of Speech', 'taxonomy singular name' ),\n 'search_items' => __( 'Parts of Speech' ),\n 'all_items' => __( 'All Parts of Speech' ),\n 'parent_item' => __( 'Parent Part of Speech' ),\n 'parent_item_colon' => __( 'Parent Part of Speech:' ),\n 'edit_item' => __( 'Edit Part of Speech' ),\n 'update_item' => __( 'Update Part of Speech' ),\n 'add_new_item' => __( 'Add New Part of Speech' ),\n 'new_item_name' => __( 'New Part of Speech Name' ),\n 'menu_name' => __( \"Parts of Speech\"),\n );\n\n register_taxonomy(\n 'sil_parts_of_speech',\n 'post',\n array(\n 'hierarchical' => false,\n 'labels' => $labels,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => true,\n 'public' => true,\n 'show_ui' => true\n )\n ) ;\n}", "private function add_taxonomy( $taxonomy_name ) {\n\t\t$this->taxonomies[] = $taxonomy_name;\n\t}", "function wpv_ct_genre() {\r\n\r\n \t$labels = array(\r\n \t\t'menu_name' => 'Genre',\r\n\r\n \t);\r\n \t$args = array(\r\n \t\t'labels' => $labels,\r\n \t\t'hierarchical' => true,\r\n \t\t'public' => true,\r\n \t\t'show_ui' => true,\r\n \t\t'show_admin_column' => true,\r\n \t\t'show_in_nav_menus' => true,\r\n \t\t'show_tagcloud' => true,\r\n \t);\r\n \tregister_taxonomy( 'genre', array( 'filme' ), $args );\r\n\r\n }", "function five_register_taxonomy($taxonomy, $singular, $plural, $object_type = ['post'], $args = [])\n{\n //first do the translations part for GUI\n\n $labels = [\n 'name' => _x($plural, 'five'),\n 'singular_name' => _x($singular, 'five'),\n 'search_items' => __('Search '.$plural),\n 'all_items' => __('All '.$plural),\n 'parent_item' => __('Parent '.$singular),\n 'parent_item_colon' => __('Parent '.$singular.':'),\n 'edit_item' => __('Edit '.$singular),\n 'update_item' => __('Update '.$singular),\n 'add_new_item' => __('Add New '.$singular),\n 'new_item_name' => __('New '.$singular.' Name'),\n 'menu_name' => __($plural),\n ];\n\n // Now register the taxonomy\n $args = array_merge([\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_in_rest' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => ['slug' => $taxonomy],\n ], $args);\n\n register_taxonomy($taxonomy, $object_type, $args);\n}", "function store_custom_taxonomy() {\n // Adding taxonomy hierarchical\n $labels = array(\n 'name' => 'Store_Categories',\n 'singular_name' => 'Store_Category',\n 'search_items' => 'Search Store_Categories',\n 'all_items' => 'All Store_Categories',\n 'parent_item' => 'Parent Store_Category',\n 'parent_item_colon' => 'Parent Store_Category:',\n 'edit_item' => 'Edit Category',\n 'update_item' => 'Update Category',\n 'add_new_item' => 'Add New Category',\n 'new_item_name' => 'New Category',\n 'menu_name' => 'Category'\n );\n\n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array('slug' => 'store_category')\n );\n\n register_taxonomy('store_category', array('stores'), $args);\n}", "function create_package_type_taxonomy() {\n \n $labels = array(\n 'name' => _x( 'Package Type', '' ),\n 'singular_name' => _x( 'Package Type', '' ),\n 'search_items' => __( 'Search Package Type' ),\n 'all_items' => __( 'All Package Type' ),\n 'parent_item' => __( 'Parent Package Type' ),\n 'parent_item_colon' => __( 'Parent Package Type:' ),\n 'edit_item' => __( 'Edit Package Type' ), \n 'update_item' => __( 'Update Package Type' ),\n 'add_new_item' => __( 'Add New Package Type' ),\n 'new_item_name' => __( 'New Package Type Name' ),\n 'menu_name' => __( 'Package Type' ),\n );\n\n $args = array(\n 'hierarchical' => false,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_in_rest' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'package-type' ),\n );\n \n // Registering the Taxonomy\n register_taxonomy('package_type',array('packages'), $args);\n}", "function register_taxonomies() {\n\t}", "function register_taxonomies() {\n\t}", "function register_taxonomies() {\n\t}", "function SELLMYHOME_add_category( $cat_name, $taxonomy ){\n //Check if term exists before attempting to create\n if( !term_exists( $cat_name, $taxonomy ) ){\n $my_cat = array('cat_name' => $cat_name, \n 'category_description' => 'Default, Permanent Category', \n 'category_nicename' => SELLMYHOME_clean($cat_name), \n 'category_parent' => '',\n 'taxonomy' => $taxonomy);\n\n // Create the category\n wp_insert_category($my_cat); \n } \n}", "function years_custom_taxonomies() {\n\t$labels = array(\n\t\t'name' => 'Год',\n\t\t'singular_name' => 'Год',\n\t\t'search_items' => 'Поиск по годам',\n\t\t'all_items' => 'Все года',\n\t\t'parent_item' => 'Родительское поле',\n\t\t'parent_item_colon' => 'Родительское поле:',\n\t\t'edit_item' => 'Редактирование',\n\t\t'update_item' => 'Обновить',\n\t\t'add_new_item' => 'Добавить новое рабочее поле',\n\t\t'new_item_name' => 'Имя нового поля',\n\t\t'menu_name' => 'Год'\n\t);\n\n\t$args = array(\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => 'years' )\n\t);\n\n\tregister_taxonomy('years', array('film'), $args);\n\n}", "function om_cars_features() {\n $labels = array(\n 'name' => _x( 'Cars Features', 'taxonomy general name' ),\n 'singular_name' => _x( 'Cars Feature', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Cars Features' ),\n 'all_items' => __( 'All Cars Features' ),\n 'parent_item' => __( 'Parent Cars Feature' ),\n 'parent_item_colon' => __( 'Parent Cars Feature:' ),\n 'edit_item' => __( 'Edit Cars Feature' ), \n 'update_item' => __( 'Update Cars Feature' ),\n 'add_new_item' => __( 'Add New Cars Feature' ),\n 'new_item_name' => __( 'New Cars Feature' ),\n 'menu_name' => __( 'Cars Features' ),\n );\n $args = array(\n 'labels' => $labels,\n 'hierarchical' => true,\n );\n register_taxonomy( 'cars_feature', 'om-car', $args );\n}", "function wpv_ct_sprachen() {\r\n\r\n \t$labels = array(\r\n \t\t'menu_name' => 'Sprachen',\r\n\r\n \t);\r\n \t$args = array(\r\n \t\t'labels' => $labels,\r\n \t\t'hierarchical' => true,\r\n \t\t'public' => true,\r\n \t\t'show_ui' => true,\r\n \t\t'show_admin_column' => true,\r\n \t\t'show_in_nav_menus' => true,\r\n \t\t'show_tagcloud' => true,\r\n \t);\r\n \tregister_taxonomy( 'sprachen', array( 'filme' ), $args );\r\n\r\n }", "function country_custom_taxonomies() {\n\t$labels = array(\n\t\t'name' => 'Страны',\n\t\t'singular_name' => 'Страна',\n\t\t'search_items' => 'Поиск Стран',\n\t\t'all_items' => 'Все Страны',\n\t\t'parent_item' => 'Родительское поле',\n\t\t'parent_item_colon' => 'Родительское поле:',\n\t\t'edit_item' => 'Редактирование Страны',\n\t\t'update_item' => 'Обновить Страны',\n\t\t'add_new_item' => 'Добавить новое рабочее поле',\n\t\t'new_item_name' => 'Имя нового поля',\n\t\t'menu_name' => 'Страны'\n\t);\n\n\t$args = array(\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => 'country' )\n\t);\n\n\tregister_taxonomy('country', array('film'), $args);\n\n}", "public function create_portfolio_taxonomies()\n {\n $labels = array(\n 'name' => _x( 'portfolio_category', 'taxonomy general name' ),\n 'singular_name' => _x( 'portfolio_category', 'taxonomy singular name' ),\n 'search_items' => __( 'Search portfolio_categories' ),\n 'popular_items' => __( 'Popular portfolio_categories' ),\n 'all_items' => __( 'All portfolio_categories' ),\n 'parent_item' => __( 'Parent portfolio_category' ),\n 'parent_item_colon' => __( 'Parent portfolio_category:' ),\n 'edit_item' => __( 'Edit portfolio_category' ),\n 'update_item' => __( 'Update portfolio_category' ),\n 'add_new_item' => __( 'Add New portfolio_category' ),\n 'new_item_name' => __( 'New portfolio_category Name' ),\n );\n register_taxonomy('portfolio_categories',array('portfolio'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'portfolio_categories' ),\n ));\n }", "public function register_taxonomies() {\n\n\t}", "public function add_custom_taxonomies() {\n\t\t// Add new \"Departments\" taxonomy to Posts\n\t\tregister_taxonomy(\n\t\t\t'department',\n\t\t\t'lrhoa_voting',\n\t\t\t[\n\t\t\t\t// Hierarchical taxonomy (like categories)\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t// This array of options controls the labels displayed in the WordPress Admin UI\n\t\t\t\t'labels' => [\n\t\t\t\t\t'name' => _x( 'Departments', 'taxonomy general name' ),\n\t\t\t\t\t'singular_name' => _x( 'Department', 'taxonomy singular name' ),\n\t\t\t\t\t'search_items' => __( 'Search Departments' ),\n\t\t\t\t\t'all_items' => __( 'All Departments' ),\n\t\t\t\t\t'parent_item' => __( 'Parent Department' ),\n\t\t\t\t\t'parent_item_colon' => __( 'Parent Department:' ),\n\t\t\t\t\t'edit_item' => __( 'Edit Department' ),\n\t\t\t\t\t'update_item' => __( 'Update Department' ),\n\t\t\t\t\t'add_new_item' => __( 'Add New Department' ),\n\t\t\t\t\t'new_item_name' => __( 'New Department Name' ),\n\t\t\t\t\t'menu_name' => __( 'Departments' ),\n\t\t\t\t],\n\t\t\t\t'query_var' => 'department',\n\t\t\t\t// Control the slugs used for this taxonomy\n\t\t\t\t'rewrite' => [\n\t\t\t\t\t'slug' => 'department', // This controls the base slug that will display before each term\n\t\t\t\t\t'with_front' => false, // Don't display the category base before \"/locations/\"\n\t\t\t\t\t'hierarchical' => true, // This will allow URL's like \"/locations/boston/cambridge/\"\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t}", "public function register_taxonomies()\n {\n }", "function registerTaxonomies()\n{\n register_taxonomy('region', ['destination'], [\n 'public' => true,\n 'label' => 'Regions',\n 'hierarchical' => true,\n 'show_admin_column' => true\n ]);\n}", "function fs_create_portfolio_taxonomies()\n{\n $labels = array(\n 'name' => __('Portfolio Category', 'fs-portfolio'),\n 'singular_name' => __('Portfolio Category', 'fs-portfolio'),\n 'search_items' => __('Search Portfolio Categories', 'fs-portfolio'),\n 'all_items' => __('All Portfolio Categories', 'fs-portfolio'),\n 'parent_item' => __('Parent Portfolio Category', 'fs-portfolio'),\n 'parent_item_colon' => __('Parent Portfolio Category:', 'fs-portfolio'),\n 'edit_item' => __('Edit Portfolio Category', 'fs-portfolio'),\n 'update_item' => __('Update Portfolio Category', 'fs-portfolio'),\n 'add_new_item' => __('Add New Portfolio Category', 'fs-portfolio'),\n 'new_item_name' => __('New Portfolio Category Name', 'fs-portfolio'),\n 'menu_name' => __('Portfolio Category', 'fs-portfolio')\n );\n\n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array('slug' => 'portfolio-category'),\n 'show_in_rest' => true,\n 'rest_base' => 'portfolio_category',\n 'rest_controller_class' => 'WP_REST_Terms_Controller',\n );\n\n\n\n register_taxonomy( 'portfolio-category', array( 'portfolio' ), $args );\n\n // Add new taxonomy, NOT hierarchical (like tags)\n $labelst = array(\n 'name' => __( 'Porftolio Tags', 'fs-portfolio' ),\n 'singular_name' => __( 'Tag', 'fs-portfolio' ),\n 'search_items' => __( 'Search Tags', 'fs-portfolio' ),\n 'popular_items' => __( 'Popular Tags', 'fs-portfolio' ),\n 'all_items' => __( 'All Tags', 'fs-portfolio' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Tag', 'fs-portfolio' ),\n 'update_item' => __( 'Update Tag', 'fs-portfolio' ),\n 'add_new_item' => __( 'Add New Tag', 'fs-portfolio' ),\n 'new_item_name' => __( 'New Tag Name', 'fs-portfolio' ),\n 'separate_items_with_commas' => __( 'Separate tags with commas', 'fs-portfolio' ),\n 'add_or_remove_items' => __( 'Add or remove tags', 'fs-portfolio' ),\n 'choose_from_most_used' => __( 'Choose from the most used tags', 'fs-portfolio' ),\n 'not_found' => __( 'No tags found.', 'fs-portfolio' ),\n 'menu_name' => __( 'Portfolio Tags', 'fs-portfolio' )\n );\n\n $argst = array(\n 'hierarchical' => false,\n 'labels' => $labelst,\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' => 'portfolio-tags' ),\n 'show_in_rest' => true,\n 'rest_base' => 'porfolio_tags',\n 'rest_controller_class' => 'WP_REST_Terms_Controller',\n );\n\n register_taxonomy( 'portfolio-tags', 'portfolio', $argst );\n}", "function apachesolr_add_taxonomy_to_document(&$document, $node) {\r\n if (isset($node->taxonomy) && is_array($node->taxonomy)) {\r\n foreach ($node->taxonomy as $term) {\r\n // Double indexing of tids lets us do effecient searches (on tid)\r\n // and do accurate per-vocabulary faceting.\r\n\r\n // By including the ancestors to a term in the index we make\r\n // sure that searches for general categories match specific\r\n // categories, e.g. Fruit -> apple, a search for fruit will find\r\n // content categorized with apple.\r\n $ancestors = taxonomy_get_parents_all($term->tid);\r\n foreach ($ancestors as $ancestor) {\r\n $document->setMultiValue('tid', $ancestor->tid);\r\n $document->setMultiValue('im_vid_'. $ancestor->vid, $ancestor->tid);\r\n $name = apachesolr_clean_text($ancestor->name);\r\n $document->setMultiValue('vid', $ancestor->vid);\r\n $document->{'ts_vid_'. $ancestor->vid .'_names'} .= ' '. $name;\r\n // We index each name as a string for cross-site faceting\r\n // using the vocab name rather than vid in field construction .\r\n $document->setMultiValue('sm_vid_'. apachesolr_vocab_name($ancestor->vid), $name);\r\n }\r\n }\r\n }\r\n}", "function five_register_my_taxonomies()\n{\n //five_register_taxonomy('custom-taxonomy', 'Custom Taxonomy', 'Custom Taxonomies', ['custom-post-type']);\n}", "function register_language_taxonomy () {\n\n $labels = array(\n 'name' => _x( 'Languages', 'taxonomy general name' ),\n 'singular_name' => _x( 'Language', 'taxonomy singular name' ),\n 'search_items' => __( 'Language' ),\n 'all_items' => __( 'All Languages' ),\n 'parent_item' => __( 'Parent Language' ),\n 'parent_item_colon' => __( 'Parent Language:' ),\n 'edit_item' => __( 'Edit Language' ),\n 'update_item' => __( 'Update Language' ),\n 'add_new_item' => __( 'Add New Language' ),\n 'new_item_name' => __( 'New Language Name' ),\n 'menu_name' => __( 'Language' ),\n );\n \n register_taxonomy(\n 'sil_writing_systems',\n 'post',\n array(\n 'hierarchical' => false,\n 'labels' => $labels,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => true,\n 'public' => true,\n 'show_ui' => true\n )\n ) ;\n}", "function crunchify_create_deals_custom_taxonomy2() {\r\n \r\n $labels = array(\r\n 'name' => _x( 'Marca produto', 'marca_produtos' ),\r\n 'singular_name' => _x( 'Marca produto', 'marca_produtos' ),\r\n 'search_items' => __( 'Pesquisar marca produto' ),\r\n 'all_items' => __( 'Todas as marcas' ),\r\n 'parent_item' => __( 'Marca produto pai' ),\r\n 'parent_item_colon' => __( 'Marca produto pai:' ),\r\n 'edit_item' => __( 'Editar Marca produto' ), \r\n 'update_item' => __( 'Atualizar marca produto' ),\r\n 'add_new_item' => __( 'Adicionar marca produto' ),\r\n 'new_item_name' => __( 'Nova marca produto' ),\r\n 'menu_name' => __( 'Marca produto' ),\r\n ); \r\n \r\n register_taxonomy('marca_produtos',array('product'), array(\r\n 'hierarchical' => true,\r\n 'labels' => $labels,\r\n 'show_ui' => true,\r\n 'show_admin_column' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array( 'slug' => 'marca_produtos' ),\r\n ));\r\n}", "function my_taxonomies_genre() {\n\t $labels = array(\n\t 'name' => _x( 'Genres', 'taxanomy general name' ),\n\t 'singular_name' => _x( 'Genre', 'taxanomy singular name' ),\n\t 'search_items' => __( 'Search Genres' ),\n\t 'all_items' => __( 'All Genres' ),\n\t 'parent_item' => __( 'Parent Genre' ),\n\t 'parent_item_colon' => __( 'Parent Genre' ),\n\t 'edit_item' => __( 'Edit Genre' ), \n\t 'update_item' => __( 'Update Genre' ),\n\t 'add_new_item' => __( 'Add New Genre' ),\n\t 'new_item_name' => __( 'New Genre' ),\n\t 'menu_name' => __( 'Genres' ),\n\t );\n\t $args = array(\n\t 'labels' => $labels,\n\t 'hierarchical' => true,\n\t );\n\t register_taxonomy( 'movie_genres', 'movies', $args );\n\t}", "function add_custom_staff_taxonomy() {\n // Add new \"Locations\" taxonomy to Posts\n register_taxonomy('group', 'staff', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Group', 'taxonomy general name' ),\n 'singular_name' => _x( 'Group', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Group' ),\n 'all_items' => __( 'All Groups' ),\n 'parent_item' => __( 'Parent Group' ),\n 'parent_item_colon' => __( 'Parent Group:' ),\n 'edit_item' => __( 'Edit Group' ),\n 'update_item' => __( 'Update Group' ),\n 'add_new_item' => __( 'Add New Group' ),\n 'new_item_name' => __( 'New Group Name' ),\n 'menu_name' => __( 'Group' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'locations', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => false // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n}", "function custom_taxonomy_news()\n {\n // Add new taxonomy, make it hierarchical (like categories)\n $labels =array(\n 'name' => _x( 'news type', 'thirdtheme' ),\n 'singular_name' => _x( 'news type', 'thirdtheme' ),\n 'search_items' => __( 'Search news', 'thirdtheme' ),\n 'all_items' => __( 'All news', 'thirdtheme' ),\n 'parent_item' => __( 'Parent news', 'thirdtheme' ),\n 'edit_item' => __( 'Edit news type', 'thirdtheme' ),\n 'update_item' => __( 'Update news type', 'thirdtheme' ),\n 'add_new_item' => __( 'Add New news type', 'thirdtheme' ),\n 'new_item_name' => __( 'New news type Name', 'thirdtheme' ),\n 'not_found' => __( 'no news category found.', 'thirdtheme' ),\n 'menu_name' => __( 'news type', 'thirdtheme' ));\n \n $args =array(\n 'hierarchical' => true,\n 'labels' => $labels,\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' => 'category'));\n\n register_taxonomy('newstype','custompost',$args);\n\n // Add new taxonomy, NOT hierarchical (like tags)\n $labels =array(\n 'name' => _x( 'news tag', 'thirdtheme' ),\n 'singular_name' => _x( 'news tag', 'thirdtheme' ),\n 'search_items' => __( 'Search tag', 'thirdtheme' ),\n 'all_items' => __( 'All tag', 'thirdtheme' ),\n 'edit_item' => __( 'Edit news tag', 'thirdtheme' ),\n 'update_item' => __( 'Update news tag', 'thirdtheme' ),\n 'add_new_item' => __( 'Add New news tag', 'thirdtheme' ),\n 'new_item_name' => __( 'New news tag Name', 'thirdtheme' ),\n 'not_found' => __( 'no news tag found', 'thirdtheme' ),\n 'menu_name' => __( 'news tag', 'thirdtheme' ));\n\n $args =array(\n 'hierarchical' => false,\n 'labels' => $labels,\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' => 'tag'));\n\n register_taxonomy('newstag','custompost',$args);\n }", "function create_testimonial_taxonomies() {\n // Add new taxonomy, make it hierarchical (like categories)\n\n // Staff Categories\n $labels = array(\n 'name' => _x( 'Testimonial Categories', 'taxonomy general name' ),\n 'singular_name' => _x( 'Testimonial Category', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Testimonial Categories' ),\n 'all_items' => __( 'All Categories' ),\n 'parent_item' => __( 'Parent Testimonial Categories' ),\n 'parent_item_colon' => __( 'Parent Testimonial Categories' ),\n 'edit_item' => __( 'Edit Testimonial Category' ),\n 'update_item' => __( 'Update Testimonial Category' ),\n 'add_new_item' => __( 'Add New Testimonial Category' ),\n 'new_item_name' => __( 'New Testimonial Category' ),\n 'menu_name' => __( 'Categories' ),\n );\n\n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'testimonial_category' ),\n );\n\n register_taxonomy( 'testimonial_category', array( 'testimonials' , 'page' ), $args );\n}", "function add_interactivity_type() {\n\t$types = array('post','page','attachment','nav_menu_item', 'learning_resource');\n register_taxonomy('asn_interactivity_type', $types, array(\n 'hierarchical' => false,\n 'labels' => array(\n 'name' => _x( 'Interactivity Type', 'taxonomy general name' ),\n 'singular_name' => _x( 'Interactivity Type', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Interactivity Types' ),\n 'all_items' => __( 'All Interactivity Types' ),\n 'parent_item' => __( 'Parent Interactivity Type' ),\n 'parent_item_colon' => __( 'Parent Interactivity Type:' ),\n 'edit_item' => __( 'Edit Interactivity Type' ),\n 'update_item' => __( 'Update Interactivity Type' ),\n 'add_new_item' => __( 'Add New Interactivity Type' ),\n 'new_item_name' => __( 'New Interactivity Type Name' ),\n 'menu_name' => __( 'Interactivity Type' ),\n ),\n //Slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'interactivity_type', \n 'with_front' => false,\n 'hierarchical' => false \n ),\n ));\n}", "private function register_taxonomies()\n {\n $this->register_service($this->get_taxonomy_services(), 'taxonomies');\n }", "function faqs_init() {\r\n\t// create a new taxonomy\r\n\tregister_taxonomy(\r\n\t\t'faqscategory',\r\n\t\t'faqs',\r\n\t\tarray(\r\n\t\t\t'label' \t\t => __( 'FAQs Category' ),\r\n\t\t\t'sort' \t\t\t=> true,\r\n\t\t\t'args' \t\t\t=> array( 'orderby' => 'faqs_order' ),\r\n\t\t\t'query_var'\t => true,\r\n\t\t\t'rewrite'\t\t => array( 'slug' => 'faqscategory' ),\r\n\t\t\t'hierarchical' \t=> true\r\n\t\t)\r\n\t);\r\n}", "function cwp_register_taxonomy_unit(){\n register_taxonomy(\n 'category_unit',\n 'unit',\n array(\n 'label' => __('Categorias'),\n 'rewrite' => array('slug' => 'category_unit'),\n 'hierarchical' => true,\n 'show_in_rest' => true,\n // Mostra o tipo de categoria de cada post\n 'show_admin_column' => true\n )\n );\n}", "function create_ticket_tax() {\n $labels = array(\n 'name' => _x( 'Genres', 'taxonomy general name', 'textdomain' ),\n 'singular_name' => _x( 'Genre', 'taxonomy singular name', 'textdomain' ),\n 'search_items' => __( 'Search Genres', 'textdomain' ),\n 'all_items' => __( 'All Genres', 'textdomain' ),\n 'parent_item' => __( 'Parent Genre', 'textdomain' ),\n 'parent_item_colon' => __( 'Parent Genre:', 'textdomain' ),\n 'edit_item' => __( 'Edit Genre', 'textdomain' ),\n 'update_item' => __( 'Update Genre', 'textdomain' ),\n 'add_new_item' => __( 'Add New Genre', 'textdomain' ),\n 'new_item_name' => __( 'New Genre Name', 'textdomain' ),\n 'menu_name' => __( 'Genre', 'textdomain' ),\n );\n\n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'genre', 'with_front' => false ),\n 'description' => 'Genre for shows and cast. Parent categories are Sports, Theater, Concerts or Other.',\n );\n\n //register_taxonomy( 'genre', array( 'show', 'cast' ), $args );\n register_taxonomy( 'genre', array( 'show' ), $args );\n\n register_taxonomy_for_object_type( 'genre', 'show' );\n //register_taxonomy_for_object_type( 'genre', 'cast' );\n\n}", "function ms_add_custom_taxonomies() {\n // Add new \"Placement Tag\" taxonomy to Articles\n register_taxonomy('placement_tag', 'article', array(\n 'hierarchical' => false,\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' => 'placement-tags' ),\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Placement Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Placement Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Placement Tags' ),\n 'popular_items' => __( 'Popular Placement Tags' ),\n 'all_items' => __( 'All Placement Tags' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Placement Tag' ),\n 'update_item' => __( 'Update Placement Tag' ),\n 'add_new_item' => __( 'Add New Placement Tag' ),\n 'new_item_name' => __( 'New Origin Tag Name' ),\n 'add_or_remove_items' => __( 'Add or remove placement tags' ),\n 'separate_items_with_commas' => __( 'Separate placement tags with commas' ),\n 'choose_from_most_used' => __( 'Choose from the most used placement tags' ),\n 'not_found' => __( 'No placement tags found.' ),\n 'menu_name' => __( 'Placement Tags' ),\n ),\n ));\n\n // Add new \"Location Tag\" taxonomy to Articles\n register_taxonomy('location_tag', 'article', array(\n 'hierarchical' => false,\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' => 'location-tags' ),\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Location Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Location Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Location Tags' ),\n 'popular_items' => __( 'Popular Location Tags' ),\n 'all_items' => __( 'All Location Tags' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Location Tag' ),\n 'update_item' => __( 'Update Location Tag' ),\n 'add_new_item' => __( 'Add New Location Tag' ),\n 'new_item_name' => __( 'New Location Tag Name' ),\n 'add_or_remove_items' => __( 'Add or remove location tags' ),\n 'separate_items_with_commas' => __( 'Separate location tags with commas' ),\n 'choose_from_most_used' => __( 'Choose from the most used location tags' ),\n 'not_found' => __( 'No location tags found.' ),\n 'menu_name' => __( 'Location Tags' ),\n ),\n ));\n\n // Add new \"Lifestyle Tag\" taxonomy to Articles\n register_taxonomy('lifestyle_tag', 'article', array(\n 'hierarchical' => false,\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' => 'lifestyle-tag' ),\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Lifestyle Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Lifestyle Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Lifestyle Tags' ),\n 'popular_items' => __( 'Popular Lifestyle Tags' ),\n 'all_items' => __( 'All Lifestyle Tags' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Lifestyle Tag' ),\n 'update_item' => __( 'Update Lifestyle Tag' ),\n 'add_new_item' => __( 'Add New Lifestyle Tag' ),\n 'new_item_name' => __( 'New Lifestyle Name' ),\n 'add_or_remove_items' => __( 'Add or remove lifestyle tags' ),\n 'separate_items_with_commas' => __( 'Separate lifestyle tags with commas' ),\n 'choose_from_most_used' => __( 'Choose from the most used lifestyle tags' ),\n 'not_found' => __( 'No lifestyle tags found.' ),\n 'menu_name' => __( 'Lifestyle Tags' ),\n ),\n ));\n\n // Add new \"Featured Tag\" taxonomy to Articles\n register_taxonomy('featured_tag', 'article', array(\n 'hierarchical' => false,\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' => 'featured-tag' ),\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Featured Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Featured Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Featured Tags' ),\n 'popular_items' => __( 'Popular Featured Tags' ),\n 'all_items' => __( 'All Featured Tags' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Featured Tag' ),\n 'update_item' => __( 'Update Featured Tag' ),\n 'add_new_item' => __( 'Add New Featured Tag' ),\n 'new_item_name' => __( 'New Featured Tag Name' ),\n 'add_or_remove_items' => __( 'Add or remove featured tags' ),\n 'separate_items_with_commas' => __( 'Separate featured tags with commas' ),\n 'choose_from_most_used' => __( 'Choose from the most used featured tags' ),\n 'not_found' => __( 'No locations found.' ),\n 'menu_name' => __( 'Featured Tags' ),\n ),\n ));\n // Add new \"Origin Tag\" taxonomy to Articles\n register_taxonomy('origin_tag', 'article', array(\n 'hierarchical' => false,\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' => 'origin-tags' ),\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Origin Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Origin Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Origin Tags' ),\n 'popular_items' => __( 'Popular Origin Tags' ),\n 'all_items' => __( 'All Origin Tags' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Origin Tag' ),\n 'update_item' => __( 'Update Origin Tag' ),\n 'add_new_item' => __( 'Add New Origin Tag' ),\n 'new_item_name' => __( 'New Origin Tag Name' ),\n 'add_or_remove_items' => __( 'Add or remove origin tags' ),\n 'separate_items_with_commas' => __( 'Separate origin tags with commas' ),\n 'choose_from_most_used' => __( 'Choose from the most used origin tags' ),\n 'not_found' => __( 'No origin tags found.' ),\n 'menu_name' => __( 'Origin Tags' ),\n ),\n ));\n}" ]
[ "0.7972475", "0.75666225", "0.7522146", "0.7513263", "0.7436886", "0.73850834", "0.73836416", "0.7375152", "0.7344592", "0.7318267", "0.7251258", "0.7239166", "0.7224802", "0.7222011", "0.7202343", "0.7183035", "0.7182033", "0.7157975", "0.71246386", "0.7105719", "0.7077084", "0.7064381", "0.70486856", "0.7019636", "0.70102096", "0.6994413", "0.6993932", "0.69929993", "0.6984438", "0.69479114", "0.69475126", "0.694708", "0.6932925", "0.68786895", "0.687594", "0.68582255", "0.6850372", "0.68419594", "0.6817043", "0.6802853", "0.6795715", "0.67670053", "0.6756052", "0.6748654", "0.6748409", "0.6743869", "0.6735", "0.6729849", "0.67228156", "0.67199916", "0.6712799", "0.67113656", "0.6710374", "0.66927356", "0.66896623", "0.6687903", "0.66854864", "0.6681644", "0.6669854", "0.6650962", "0.66479284", "0.6647641", "0.6647051", "0.664477", "0.66380686", "0.6634042", "0.6628952", "0.6627748", "0.6624697", "0.66221607", "0.6621617", "0.662088", "0.6620635", "0.6620635", "0.6620635", "0.66078097", "0.65956503", "0.6569161", "0.65642303", "0.65629464", "0.6541356", "0.6538991", "0.65302944", "0.6527387", "0.6518072", "0.6500751", "0.6498804", "0.649798", "0.6489999", "0.64837444", "0.64803106", "0.6468057", "0.64371544", "0.6425137", "0.6422632", "0.64166355", "0.6415204", "0.64002985", "0.639619", "0.6395675" ]
0.7172625
17
/ If editing, deleting, or reading a producto, get the post and post type object.
function producto_meta_cap( $caps, $cap, $user_id, $args ) { if ( 'edit_producto' == $cap || 'delete_producto' == $cap || 'read_producto' == $cap ) { $post = get_post( $args[0] ); $post_type = get_post_type_object( $post->post_type ); /* Set an empty array for the caps. */ $caps = array(); } /* If editing a producto, assign the required capability. */ if ( 'edit_producto' == $cap ) { if ( $user_id == $post->post_author ) $caps[] = $post_type->cap->edit_posts; else $caps[] = $post_type->cap->edit_others_posts; } /* If deleting a producto, assign the required capability. */ elseif ( 'delete_producto' == $cap ) { if ( $user_id == $post->post_author ) $caps[] = $post_type->cap->delete_posts; else $caps[] = $post_type->cap->delete_others_posts; } /* If reading a private producto, assign the required capability. */ elseif ( 'read_producto' == $cap ) { if ( 'private' != $post->post_status ) $caps[] = 'read'; elseif ( $user_id == $post->post_author ) $caps[] = 'read'; else $caps[] = $post_type->cap->read_private_posts; } /* Return the capabilities required by the user. */ return $caps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_post_type_object($post_type)\n {\n }", "public function type() { return $this->post->post_type; }", "public static function post_object_type($type, $post) {\n $post_type = get_post_type($post);\n switch ( $post_type ) {\n case \"post\":\n $post_format = get_post_format($post);\n switch ( $post_format ) {\n case \"aside\":\n case \"status\":\n case \"quote\":\n case \"note\":\n $object_type = \"note\";\n break;\n case \"gallery\":\n case \"image\":\n $object_type = \"image\";\n break;\n case \"video\":\n $object_type = \"video\";\n break;\n case \"audio\":\n $object_type = \"audio\";\n break;\n default:\n $object_type = \"article\";\n break;\n }\n break;\n case \"page\":\n $object_type = \"page\";\n break;\n case \"attachment\":\n $mime_type = get_post_mime_type();\n $media_type = preg_replace(\"/(\\/[a-zA-Z]+)/i\", \"\", $mime_type);\n\n switch ($media_type) {\n case 'audio':\n $object_type = \"audio\";\n break;\n case 'video':\n $object_type = \"video\";\n break;\n case 'image':\n $object_type = \"image\";\n break;\n }\n break;\n default:\n $object_type = \"article\";\n break;\n }\n\n return $object_type;\n }", "public function getProductType();", "public function getProduct_type () {\n\t$preValue = $this->preGetValue(\"product_type\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->product_type;\n\treturn $data;\n}", "public static function current_object_type() {\n\t\tglobal $pagenow;\n\t\t$type = 'post';\n\n\t\tif ( in_array( $pagenow, [ 'user-edit.php', 'profile.php', 'user-new.php' ], true ) ) {\n\t\t\t$type = 'user';\n\t\t}\n\n\t\tif ( in_array( $pagenow, [ 'edit-comments.php', 'comment.php' ], true ) ) {\n\t\t\t$type = 'comment';\n\t\t}\n\n\t\tif ( in_array( $pagenow, [ 'edit-tags.php', 'term.php' ], true ) ) {\n\t\t\t$type = 'term';\n\t\t}\n\n\t\tif ( Conditional::is_ajax() && 'add-tag' === Param::post( 'action' ) ) {\n\t\t\t$type = 'term';\n\t\t}\n\n\t\treturn $type;\n\t}", "public function getProductType()\n {\n }", "public function getPostType(){\n return $this->wpdsPostType;\n }", "function get_post_type($post = \\null)\n {\n }", "public function getType()\n {\n return $this->type = $this->get()->post_type;\n }", "public function getPostType() {\n\t\treturn $this->post_type;\n\t}", "function dwr_product_post_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'DWR Products', 'Post Type General Name', 'dwr' ),\n\t\t'singular_name' => _x( 'Product', 'Post Type Singular Name', 'dwr' ),\n\t\t'menu_name' => __( 'DWR Products', 'dwr' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'dwr' ),\n\t\t'all_items' => __( 'All Products', 'dwr' ),\n\t\t'view_item' => __( 'View Product', 'dwr' ),\n\t\t'add_new_item' => __( 'Add New Product', 'dwr' ),\n\t\t'add_new' => __( 'Add New', 'dwr' ),\n\t\t'edit_item' => __( 'Edit Item', 'dwr' ),\n\t\t'update_item' => __( 'Update Item', 'dwr' ),\n\t\t'search_items' => __( 'Search Product', 'dwr' ),\n\t\t'not_found' => __( 'Not found', 'dwr' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'dwr' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'dwr_product', 'dwr' ),\n\t\t'description' => __( 'DWR Products', 'dwr' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'thumbnail' ),\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'can_export' => true,\n\t\t'has_archive' => false,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'rewrite' => false,\n\t\t'capability_type' => 'page',\n\t);\n\tregister_post_type( 'dwr_product', $args );\n\n}", "public function getType()\n {\n \n $tipos = \n\n $TypeOfProduct = TypeOfProduct::find($this->type_id); \n\n return $TypeOfProduct->description;\n }", "function productos_type(){\n\n $labels = array(\n 'name' => 'Productos',\n 'singular_name' => 'Producto',\n // define el nombre en el menú\n 'menu_name' => 'Productos'\n );\n $args = array(\n 'label' => 'productos',\n 'description' => 'productos de platzi',\n 'labels' => $labels,\n // supports hace referencia a los skils que tendrá este custon type\n 'supports' => array('title', 'editor', 'thumbnail', 'revisions'),\n // Define el estado de publicación borrador false, publicadas true\n 'public' =>true,\n // define si el custon type puede usarse desde los menus\n 'taxonomies' => array( 'category', 'post_tag' ),\n 'show_in_menu' =>true,\n // en qué posición se colocará en el menu\n 'menu_position' => 5,\n // icono del custon type\n // repositorio: https://developer.wordpress.org/resource/dashicons/#cart\n 'menu_icon' => 'dashicons-cart',\n 'can_export' => true,\n // Puede hacerse un loop personalizado\n 'publicly_queryable' => true,\n // hace que tenga una URL asignada\n 'rewrite' =>true,\n // genera el editor de codigo gutember\n 'show_in_rest' => true,\n );\n // es la función que me crea el custon_type\n register_post_type( 'producto', $args );\n}", "public function getPostType()\n\t\t{\n\t\t\treturn $this->_postType;\n\t\t}", "protected function get_object_type()\n {\n }", "public function getProductType() {\n return $this->item->getProductType();\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 get_post_type_advanced() {\n\n $post_type = get_post_type();\n\n if( is_post_type_archive() ) {\n $post_type = get_query_var( 'post_type' );\n }\n\n if( is_tax() ) {\n $post_type = get_taxonomy( get_queried_object()->taxonomy )->object_type[0];\n }\n\n return $post_type;\n}", "public function get_post_type() {\n\t\treturn $this->post_type_key;\n\t}", "function tc_get_post_type() {\r\n global $post;\r\n\r\n if ( !isset($post) )\r\n return;\r\n \r\n return $post -> post_type;\r\n }", "public function editproductActionPost(): object\n {\n // Connects to db\n $this->app->db->connect();\n\n // Retrieves productId\n $productId = getPost(\"id\");\n\n if (hasKeyPost(\"doDelete\")) {\n return $this->app->response->redirect(\"admin/deleteproduct&id=$productId\");\n }\n\n if (hasKeyPost(\"doSave\")) {\n $params = getPost([\n \"name\",\n \"category\",\n \"short_description\",\n \"amount\",\n \"price\",\n \"image\",\n \"id\"\n ]);\n\n // Calls editProduct method\n $this->admin->editProduct($params);\n\n // Redirects\n return $this->app->response->redirect(\"admin/products2\");\n }\n }", "public function get_related_products() {\n if('product' != get_post_type()) {\n\n // Get an array of the resource types\n\n // Query the relationship field on all 'products' associated with the current post type\n $return = get_posts(array(\n 'post_type' => 'product',\n 'suppress_filters' => 0,\n 'meta_query' => array(\n array(\n 'key' => get_post_type(), // name of custom field\n 'value' => '\"' . get_the_ID() . '\"', // matches exactly \"123\", not just 123. This prevents a match for \"1234\"\n 'compare' => 'LIKE'\n )\n )\n ));\n } else {\n $return = get_field('related_products');\n }\n return $return;\n }", "public function getPostType(): string {\n return $this->post_type;\n }", "public static function get_post_type(){\n global $TFUSE;\n return $TFUSE->ext->seek->get_post_type();\n }", "function save_products_meta( $post_id, $post ) {\r\n\r\n // Verify nonce\r\n if ( !isset($_POST['products_nonce']) || !wp_verify_nonce( $_POST['products_nonce'], basename( __FILE__ ) ) ) {\r\n return $post_id;\r\n }\r\n\r\n // get the post type object\r\n $post_type = get_post_type_object( $post->post_type );\r\n\r\n // check if the current user has the permission to edit\r\n if ( !current_user_can( $post_type->cap->edit_post, $post_id ) ) {\r\n return $post_id;\r\n }\r\n\r\n // Get the posted data and sanitize it\r\n $title = ( isset( $_POST['products_title'] ) ) ? sanitize_text_field( $_POST['products_title'] ) : '';\r\n $background_color = ( isset( $_POST['background_color'] ) ) ? sanitize_text_field( $_POST['background_color'] ) : '';\r\n\r\n // Update post meta data\r\n update_post_meta( $post_id, 'products_title', $title );\r\n update_post_meta( $post_id, 'background_color', $background_color );\r\n\r\n}", "public function type()\n\t{\n\t\treturn $this->belongsTo('Lainga9\\BallDeep\\app\\PostType', 'post_type_id');\n\t}", "public static function post_type(){}", "function inhabitent_post_types() {\n\n/////////// New post-type: Products: Start\n\n // public = true means that we will have a menu item\n register_post_type('product', array(\n 'has_archive' => true,\n 'show_in_rest' => true,\n 'public' => true,\n 'supports' => array('title', 'editor', 'thumbnail'),\n 'labels' => array(\n 'name' => 'Products',\n 'add_new_item' => 'Add NewYY Product',\n 'edit_item' => 'Edit Product',\n 'all_items' => 'All Products',\n 'singular_name' => 'Product'\n ),\n 'menu_icon' => 'dashicons-store'\n ));\n \n\t$labels = array(\n\t\t'name' => _x( 'Product Types', 'Taxonomy General Name', 'Product Type' ),\n\t\t'singular_name' => _x( 'Product Type', 'Taxonomy Singular Name', 'Product Type' ),\n\t\t'menu_name' => __( 'Product Type', 'Product Type' ),\n\t\t'all_items' => __( 'All Items', 'Product Type' ),\n\t\t'parent_item' => __( 'Parent Item', 'Product Type' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'Product Type' ),\n\t\t'new_item_name' => __( 'New Item Name', 'Product Type' ),\n\t\t'add_new_item' => __( 'Add New Item', 'Product Type' ),\n\t\t'edit_item' => __( 'Edit Item', 'Product Type' ),\n\t\t'update_item' => __( 'Update Item', 'Product Type' ),\n\t\t'view_item' => __( 'View Item', 'Product Type' ),\n\t\t'separate_items_with_commas' => __( 'Separate items with commas', 'Product Type' ),\n\t\t'add_or_remove_items' => __( 'Add or remove items', 'Product Type' ),\n\t\t'choose_from_most_used' => __( 'Choose from the most used', 'Product Type' ),\n\t\t'popular_items' => __( 'Popular Items', 'Product Type' ),\n\t\t'search_items' => __( 'Search Items', 'Product Type' ),\n 'not_found' => __( 'Not Found', 'Product Type' ),\n\t);\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'hierarchical' => true,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'show_in_nav_menus' => true,\n 'show_tagcloud' => true,\n 'show_in_rest' => true,\n\t);\n\n\tregister_taxonomy('product-type', array('product'), $args);\n\n/////////// New post-type: Products: End\n\n\n/////////// New post-type: Adventures: Start\n// public = true means that we will have a menu item\nregister_post_type('adventure', array(\n 'has_archive' => true,\n 'show_in_rest' => true,\n 'public' => true,\n 'supports' => array('title', 'editor', 'thumbnail'),\n 'labels' => array(\n 'name' => 'Adventures',\n 'add_new_item' => 'Add Adventure',\n 'edit_item' => 'Edit Adventure',\n 'all_items' => 'All Adventures',\n 'singular_name' => 'Adventure',\n ),\n 'menu_icon' => 'dashicons-smiley',\n));\n\n$labels = array(\n 'name' => _x('Adventure Types', 'Taxonomy General Name', 'Adventure Type'),\n 'singular_name' => _x('Adventure Type', 'Taxonomy Singular Name', 'Adventure Type'),\n 'menu_name' => __('Adventure Type', 'Adventure Type'),\n 'all_items' => __('All Items', 'Adventure Type'),\n 'parent_item' => __('Parent Item', 'Adventure Type'),\n 'parent_item_colon' => __('Parent Item:', 'Adventure Type'),\n 'new_item_name' => __('New Item Name', 'Adventure Type'),\n 'add_new_item' => __('Add New Item', 'Adventure Type'),\n 'edit_item' => __('Edit Item', 'Adventure Type'),\n 'update_item' => __('Update Item', 'Adventure Type'),\n 'view_item' => __('View Item', 'Adventure Type'),\n 'separate_items_with_commas' => __('Separate items with commas', 'Adventure Type'),\n 'add_or_remove_items' => __('Add or remove items', 'Adventure Type'),\n 'choose_from_most_used' => __('Choose from the most used', 'Adventure Type'),\n 'popular_items' => __('Popular Items', 'Adventure Type'),\n 'search_items' => __('Search Items', 'Adventure Type'),\n 'not_found' => __('Not Found', 'Adventure Type'),\n);\n$args = array(\n 'labels' => $labels,\n 'hierarchical' => true,\n 'public' => true,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'show_in_nav_menus' => true,\n 'show_tagcloud' => true,\n 'show_in_rest' => true,\n\n);\nregister_taxonomy('adventure-type', array('adventure'), $args);\n\n/////////// New post-type: Adventures: End\n\n\n\n\n}", "public static function getProductTypeId()\n\t{\n\t\t$input = JFactory::getApplication()->input;\n\n\t\tswitch ($input->getCmd('view'))\n\t\t{\n\t\t\tcase 'product':\n\t\t\t\t$model = new GazebosModelProduct;\n\t\t\t\t$id = $model->getItem()->type_id;\n\t\t\t\tbreak;\n\t\t\tcase 'producttype':\n\t\t\t\t$id = $input->getInt('id');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $id;\n\t}", "public function productType()\n {\n return $this->belongsTo(\\App\\Models\\ProductType::class, \"product_type_id\", \"id\");\n }", "public function getEntityTypeCode()\n {\n return 'catalog_product';\n }", "function create_custom_post_type() {\r\n\r\n\t// Labels\r\n\t$labels = array(\r\n 'name' => _x( 'Products', 'Post Type General Name' ),\r\n 'singular_name' => _x( 'Product', 'Post Type Singular Name' ),\r\n 'menu_name' => __( 'Products' ),\r\n 'parent_item_colon' => __( 'Parent Product' ),\r\n 'all_items' => __( 'All Products' ),\r\n 'view_item' => __( 'View Product' ),\r\n 'add_new_item' => __( 'Add New Product' ),\r\n 'add_new' => __( 'Add Product' ),\r\n 'edit_item' => __( 'Edit Product' ),\r\n 'update_item' => __( 'Update Product' ),\r\n 'search_items' => __( 'Search Product' ),\r\n 'not_found' => __( 'Not Found' ),\r\n 'not_found_in_trash' => __( 'Not found in Trash' ),\r\n\t);\r\n\t\r\n\t$args = array(\r\n 'label' => __( 'products' ),\r\n 'description' => __( 'This is the test product custom post type' ),\r\n 'labels' => $labels,\r\n\t\t\r\n\t\t// Features this Custom Post Type supports in Post Editor\r\n\t\t'supports' => array('thumbnail'),\r\n\t\t\r\n 'hierarchical' => false,\r\n 'public' => true,\r\n 'show_ui' => true,\r\n 'show_in_menu' => true,\r\n 'show_in_nav_menus' => true,\r\n 'show_in_admin_bar' => true,\r\n 'rewrite' => array('slug' => '/products'),\r\n\t\t'menu_position' => 5,\r\n\t\t'menu_icon'\t\t\t => 'dashicons-products',\r\n 'can_export' => true,\r\n 'has_archive' => true,\r\n 'exclude_from_search' => false,\r\n 'publicly_queryable' => true,\r\n 'capability_type' => 'post',\r\n 'show_in_rest' => true,\r\n\t);\r\n\r\n\t// Registering your Custom Post Type\r\n register_post_type( 'products', $args );\r\n\t\r\n}", "public function get_product() {\n $product = wc_get_product( $this->get_product_id() );\n\n return $product && $product->is_type( YITH_WCBK_Product_Post_Type_Admin::$prod_type ) ? $product : false;\n }", "public function modelForPost(\\WP_Post $post)\n {\n if (! $post) {\n return;\n }\n\n $result = null;\n\n if (isset($this->modelCache[\"m-$post->ID\"])) {\n return $this->modelCache[\"m-$post->ID\"];\n }\n\n if (isset($this->modelFactories[$post->post_type])) {\n $result = call_user_func_array($this->modelFactories[$post->post_type], [$this, $post]);\n } elseif (isset($this->config['model-map'][$post->post_type])) {\n $className = $this->config['model-map'][$post->post_type];\n if (class_exists($className)) {\n $result = new $className($this, $post);\n }\n }\n\n if (! $result) {\n if ($post->post_type == 'attachment') {\n $result = new Attachment($this, $post);\n } elseif ($post->post_type == 'page') {\n $result = new Page($this, $post);\n } else {\n $result = new Post($this, $post);\n }\n }\n\n if ($result) {\n $this->modelCache[\"m-$post->ID\"] = $result;\n }\n\n return $result;\n }", "function propuestasPostType() {\n\t$supports = array(\n\t'title', // post title\n\t'editor', // post content\n\t'author', // post author\n\t'thumbnail', // featured images\n\t'excerpt', // post excerpt\n\t'custom-fields', // custom fields\n\t// 'comments', // post comments\n\t// 'revisions', // post revisions\n\t'post-formats', // post formats\n\t'page-attributes'\n\t);\n\t$labels = array(\n\t'name' => _x('Propuesta', 'plural'),\n\t'singular_name' => _x('Propuestas', 'singular'),\n\t'menu_name' => _x('Propuestas', 'admin menu'),\n\t'name_admin_bar' => _x('Propuestas', 'admin bar'),\n\t'add_new' => _x('Añadir propuesta', 'add new'),\n\t'add_new_item' => __('Añadir nueva propuesta'),\n\t'new_item' => __('Nueva propuesta'),\n\t'edit_item' => __('Editar propuesta'),\n\t'view_item' => __('Ver propuesta'),\n\t'all_items' => __('Todas las propuestas'),\n\t'search_items' => __('Buscar'),\n\t'not_found' => __('No hay resultados.'),\n\t);\n\t$args = array(\n\t'supports' => $supports,\n\t'labels' => $labels,\n\t'public' => true,\n\t'query_var' => true,\n\t'rewrite' => array('slug' => 'propuestas'),\n\t'has_archive' => true,\n\t'hierarchical' => true,\n\t);\n\tregister_post_type('propuestasPostType', $args);\n\t}", "abstract protected function post_type();", "public function get_post_types(){ return $this->post_types; }", "protected function _getProductTypeModel()\n\t{\n\t\treturn $this->getModelFromCache('Brivium_Store_Model_ProductType');\n\t}", "function getProduct( $post_id ) {\n\n // update cache if required\n if ( $this->last_product_id != $post_id ) {\n $this->last_product_object = wc_get_product( $post_id );\n $this->last_product_id = $post_id;\n }\n\n return $this->last_product_object;\n }", "function proyecto_post_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'proyectos', 'Post Type General Name', 'text_domain' ),\n\t\t'singular_name' => _x( 'proyecto', 'Post Type Singular Name', 'text_domain' ),\n\t\t'menu_name' => __( 'Post Types', 'text_domain' ),\n\t\t'name_admin_bar' => __( 'Post Type', 'text_domain' ),\n\t\t'archives' => __( 'Item Archives', 'text_domain' ),\n\t\t'attributes' => __( 'Item Attributes', 'text_domain' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n\t\t'all_items' => __( 'All Items', 'text_domain' ),\n\t\t'add_new_item' => __( 'Add New Item', 'text_domain' ),\n\t\t'add_new' => __( 'Add New', 'text_domain' ),\n\t\t'new_item' => __( 'New Item', 'text_domain' ),\n\t\t'edit_item' => __( 'Edit Item', 'text_domain' ),\n\t\t'update_item' => __( 'Update Item', 'text_domain' ),\n\t\t'view_item' => __( 'View Item', 'text_domain' ),\n\t\t'view_items' => __( 'View Items', 'text_domain' ),\n\t\t'search_items' => __( 'Search Item', '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 item', 'text_domain' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),\n\t\t'items_list' => __( 'Items list', 'text_domain' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'text_domain' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'proyecto', 'text_domain' ),\n\t\t'description' => __( 'personalización del proyecto', 'text_domain' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor', 'thumbnail' ),\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\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-images-alt2',\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\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' => 'page',\n\t);\n\tregister_post_type( 'proyecto', $args );\n\n}", "public function product_type()\n {\n return $this->belongsTo('App\\ProductType');\n }", "function wp_get_single_post($postid = 0, $mode = \\OBJECT)\n {\n }", "function OPS_get_post($id) {\r\n\tglobal $wpdb;\r\n\t$post = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID=$id\");\r\n\tif ($post->post_type == \"revision\"){\r\n\t\t$id = $post->post_parent;\r\n\t\t$post = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID=$id\");\r\n\t}\r\n\treturn $post[0];\r\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 getAdminEditProduct(string $id = null): ?Post\n {\n $result = null;\n\n if ($id) {\n $result = $this->dataPersistor->get(Config::ADMIN_POST_PERSISTOR . $id);\n $this->dataPersistor->clear(Config::ADMIN_POST_PERSISTOR . $id);\n }\n\n return $result;\n }", "public function posttype()\n\t{\n\t\treturn $this->belongsTo('App\\Models\\Posttype');\n\t}", "function create_posttype() {\n \n register_post_type( 'product',\n // CPT Options\n array(\n 'labels' => array(\n 'name' => __( 'Products' ),\n 'singular_name' => __( 'Product' )\n ),\n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'products'),\n 'capability_type' => 'post',\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )\n )\n );\n}", "public function getObjectType();", "public function getObjectType();", "public function edit_postAction() {\n\t\t$info = $this->getPost(array('id', 'sort','name'));\n\t\t$info = $this->_cookData($info);\n\t\t$supplier = Fanli_Service_Ptype::getBy(array('name'=>$info['name']));\n\t\tif($supplier && $supplier['id'] != $info['id']) $this->output(-1, '操作失败,该供分类已存在');\n\t\t$ret = Fanli_Service_Ptype::updateType($info, intval($info['id']));\n\t\tif (!$ret) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功.'); \t\t\n\t}", "private function getPost($post)\n {\n if ($post instanceof WP_post) {\n return $post;\n } elseif (is_int($post) === true) {\n return $this->objectHandler->getPost($post);\n } elseif (isset($post->ID) === true) {\n return $this->objectHandler->getPost($post->ID);\n }\n\n return false;\n }", "public function getTargetType($type) {\n $retObj = array();\n switch ($type) {\n case 'Brand':\n $retObj[] = new ProductBrand($this->targetData);\n $retObj[] = new ProductBrand();\n \n return $retObj;\n break;\n case 'Condition':\n $retObj[] = new ProductCanonicalCondition($this->targetData);\n $retObj[] = new ProductCanonicalCondition();\n \n return $retObj;\n break;\n case 'Category':\n $retObj[] = new ProductBiddingCategory('BIDDING_CATEGORY_L1', $this->targetData);\n $retObj[] = new ProductBiddingCategory('BIDDING_CATEGORY_L1');\n \n return $retObj;\n break;\n case 'Channel':\n $retObj[] = new ProductChannel($this->targetData);\n $retObj[] = new ProductChannel();\n \n return $retObj;\n break;\n case 'Item ID':\n $retObj[] = new ProductOfferId($this->targetData);\n $retObj[] = new ProductOfferId();\n \n return $retObj;\n break;\n case 'Product type':\n $retObj[] = new ProductType('PRODUCT_TYPE_L1', $this->targetData);\n $retObj[] = new ProductType('PRODUCT_TYPE_L1');\n \n return $retObj;\n break;\n case 'Channel exclusivity':\n $retObj[] = new ProductChannelExclusivity($this->targetData);\n $retObj[] = new ProductChannelExclusivity();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_0':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_1':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_2':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_3':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_4':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n \n default:\n break;\n }\n }", "public static function get_meta_type();", "public function postType()\n {\n return $this->belongsTo(PostType::class);\n }", "public function getSingleProduct_post()\n {\n\t\t$product_id = ($this->post('product_id')) ? $this->post('product_id') : '';\t\n\t\t\n\t\tif($product_id == '' ){\n\t\t\t$empty_msg = \"Product Id is required\";\n\t\t\t$this->response([\n 'status' => false,\n\t\t\t\t'message' => $empty_msg,\n\t\t\t], Restserver\\Libraries\\REST_Controller_Definitions::HTTP_CREATED); // CREATED (201) being the HTTP response code\n\t\t\texit;\n\t\t}\n\t\t\n\t\t\tif($product_id != ''){\n\t\t\t\t$product_details = $this->Product_model->getProductById($product_id);\n\t\t\t}\n\t\t\n\t\t\t$this->response([\n 'status' => true,\n\t\t\t\t'message' => \"Get data successfully\",\n\t\t\t\t\"data\"=> $product_details,\n\t\t\t], Restserver\\Libraries\\REST_Controller_Definitions::HTTP_CREATED); // CREATED (201) being the HTTP response code\n\t\t\texit;\n\t\t\n\t}", "function get_default_post_to_edit($post_type = 'post', $create_in_db = \\false)\n {\n }", "final protected function getObject($type){\n\t\t\treturn $this->getFactory()->getObject( $this->getRes(), $type );\n\t\t}", "public function getProduct() {\n return $this->getValueOrDefault('Product');\n }", "protected function get_meta_type()\n {\n }", "protected function get_meta_type()\n {\n }", "protected function get_meta_type()\n {\n }", "protected function get_meta_type()\n {\n }", "function getObjtype() {\n return $this->objtype;\n }", "public function getProductType()\n {\n return Zend_Json::encode($this->escapeHtml($this->getProduct()->getTypeId()));\n }", "public function model()\n {\n return ProductMeta::class;\n }", "protected function getProduct() {\n return $this->registry->registry('product');\n }", "public function getPost()\n {\n if (!$this->hasPost()) {\n $this->setPost(false);\n\n if ($post = $this->registry->registry('wordpress_post')) {\n if ($post->getPostType() === 'page') {\n $this->setPost($post);\n }\n } \n }\n\n return $this->_getData('post');\n }", "function _get_type() {\n\t\treturn $this->type();\n\n\t}", "protected abstract function get_meta_type();", "function promo_post_type() {\n\t// Promo posts type where users can create promo post types.\n\tregister_post_type(\n\t\t'promos',\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => __( 'Promos' ),\n\t\t\t\t'singular_name' => __( 'Promo' ),\n\t\t\t),\n\t\t\t'public' => true,\n\t\t\t'has_archive' => true,\n\t\t\t'supports' => array( 'title', 'editor', 'custom-fields', 'thumbnail')\n\t\t)\n\t);\n}", "public function get_post_type($value='') {\n\t\t\treturn $this->post_type;\n\t\t}", "public function get()\n {\n return $this->object = get_post($this->id);\n }", "protected function get_post_type() {\n\t\tif ( $post = get_post() ) {\n\t\t\treturn get_post_type( $post );\n\t\t}\n\n\t\tif ( isset( $_GET['post'] ) ) {\n\t\t\treturn get_post_type( sanitize_text_field( $_GET['post'] ) );\n\t\t}\n\n\t\tif ( isset( $_GET['post_type'] ) ) {\n\t\t\treturn strtolower( sanitize_text_field( $_GET['post_type'] ) );\n\t\t}\n\n\t\t$req_uri = $_SERVER['REQUEST_URI'];\n\t\t$exploded = explode( '/', $req_uri );\n\t\t$last = end( $exploded );\n\t\t$last = parse_url( $last, PHP_URL_PATH );\n\n\t\tif ( $last === 'post-new.php' || $last === 'edit.php' ) {\n\t\t\treturn 'post';\n\t\t}\n\n\t\treturn '';\n\t}", "protected function setPostTypeObject(){\n\t\treturn array(\n\t\t\t'label' => _x('genres', 'genre', 'cpt_genre'),\n\t\t\t'labels' => array(\n\t\t\t\t'name' => _x('Genres', 'genre', 'cpt_genre'),\n\t\t\t\t'singular_name' => _x('genre', 'genre', 'cpt_genre'),\n\t\t\t\t'add_new' => _x('Add new genre', 'genre', 'cpt_genre'),\n\t\t\t\t'all_items' => _x('Genres', 'genre', 'cpt_genre'),\n\t\t\t\t'add_new_item' => _x('Add new genre', 'genre', 'cpt_genre'),\n\t\t\t\t'edit_item' => _x('Edit genre', 'genre', 'cpt_genre'),\n\t\t\t\t'new_item' => _x('New genre', 'genre', 'cpt_genre'),\n\t\t\t\t'view_item' => _x('Show genre', 'genre', 'cpt_genre'),\n\t\t\t\t'search_items' => _x('Search genres', 'genre', 'cpt_genre'),\n\t\t\t\t'not_found' => _x('No genres found', 'genre', 'cpt_genre'),\n\t\t\t\t'not_found_in_trash' => _x('No genres found in the trash', 'genre', 'cpt_genre'),\n\t\t\t\t'parent_item_colon' => _x('Genre', 'genre', 'cpt_genre'),\n\t\t\t\t'menu_name' => _x('Genres catalog', 'genre', 'cpt_genre')\n\t\t\t),\n\t\t\t'description' => _x('Genres for music catalog', 'genre', 'cpt_genre'),\n\t\t\t'public' => true,\n\t\t\t'exclude_from_search' => false,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_nav_menus' => false,\n\t\t\t'show_in_menu' => 'edit.php?post_type=music',\n\t\t\t'show_in_admin_bar' => true,\n\t\t\t'menu_position' => null,\n\t\t\t'menu_icon' => null,\n\t\t\t'capability_type' => array( 'genre', 'genres' ),\n\t\t\t'hierarchical' => true,\n\t\t\t'supports' => array( 'title', 'editor' ),\n\t\t\t'has_archive' => true,\n\t\t\t'rewrite' => array( 'slug' => __('genres', 'cpt_genre'), 'with_front' => true, 'feeds' => true, 'pages' => true ),\n\t\t\t'query_var' => true,\n\t\t\t'can_export' => false\n\t\t);\n\t}", "static function getCustomizedPostsDataFromPostType($post_type){\n $posts_ids = self::getCustomizedPostsIdFromPostType($post_type);\n $posts_data = self::getPostsObjectsFromPostIds($posts_ids);\n\n return $posts_data;\n }", "public static function get_class_post_type()\n {\n return self::$post_type;\n }", "public static function get_class_post_type()\n {\n return self::$post_type;\n }", "function get_form_type()\n {\n return is_array($this->object->context) ? $this->object->context[0] : $this->object->context;\n }", "public function getObjectType() {\n\t\t$type = $this->object->getType();\n\t\t$subtype = $this->object->getSubtype() ? : 'default';\n\t\t$keys = [\n\t\t\t\"interactions:$type:$subtype\",\n\t\t\t$this->object instanceof Comment ? \"interactions:comment\" : \"interactions:post\",\n\t\t];\n\t\tforeach ($keys as $key) {\n\t\t\tif (elgg_language_key_exists($key, $this->language)) {\n\t\t\t\treturn elgg_echo($key, array(), $this->language);\n\t\t\t}\n\t\t}\n\t\treturn elgg_echo('interactions:post', $this->language);\n\t}", "function edd_get_product_to_duplicate($id) {\n\tglobal $wpdb;\n\n\t$post = $wpdb->get_results( \"SELECT * FROM $wpdb->posts WHERE ID=$id\" );\n\tif ( isset( $post->post_type ) && $post->post_type == \"revision\" ){\n\t\t$id = $post->post_parent;\n\t\t$post = $wpdb->get_results( \"SELECT * FROM $wpdb->posts WHERE ID=$id\" );\n\t}\n\treturn $post[0];\n}", "public function getModel()\n {\n $post = Post::class;\n return $post;\n }", "public function getProduct()\n {\n return $this->coreRegistry->registry('product');\n }", "public static function post_is_object(){\n if( count($_POST)>=1) return (object)$_POST;\n }", "public function getTipoProducto(){\n $items = TcTipoProducto::where('id_estado','=',1)->get();\n return $items;\n }", "function fa_post_type_slide(){\n\tglobal $fa_pro;\n\treturn $fa_pro->post_type_slide();\n}", "function acf_get_object_type($object_type, $object_subtype = '')\n{\n}", "public function getTypeObject()\n {\n return $this->typeObject;\n }", "private function getType($product)\n { \n $productTypes = $product->types;\n\n if(!$productTypes->isEmpty())\n {\n $typeName=NULL;\n\n foreach ($productTypes as $productType) {\n\n $typeName .= $productType->type_name . \"+\";\n }\n\n return trim($typeName,\"+\");\n\n }\n else\n {\n return NULL;\n }\n }", "public function product() {\n return $this->morphTo();\n }", "public function menuType()\n {\n return ProductType::all();\n }", "function create_post_type_gon_products_premium() {\n register_post_type( 'gon_products_premium',\n array(\n 'labels' => array(\n 'name' => __( 'Products' ),\n 'singular_name' => __( 'Product' )\n ),\n 'public' => true,\n 'has_archive' => true,\n\t 'menu_position' => 10,\n\t 'capability_type' => 'post',\n\t 'supports' => array('title', 'editor','page-attributes','thumbnail'),\n\t 'rewrite' => array( 'slug' => 'products' )\n )\n );\n \n \t//add product-type tax\n \n\tregister_taxonomy(\n\t\t'featured_product_type',\n\t\t'gon_products_premium',\n\t\tarray(\n\t\t\t'label' => __( 'Product Categories' ),\n\t\t\t'rewrite' => array( 'slug' => 'product-type' ),\n\t\t\t'hierarchical' => true,\n\t\t)\n\t);\n}", "private function get_post_type()\n {\n $post_id = get_the_ID();\n\n // Check post for post type\n if( $post_id )\n {\n return get_post_type($post_id);\n }\n\n // Check query vars for post type\n if( $post_type = get_query_var('post_type') )\n {\n return $post_type;\n }\n\n // No post type found\n return '';\n\n }", "function custom_product_tabs_post_type() {\n $labels = array(\n 'name' => _x( 'Product Tabs', 'Post Type General Name', 'GWP' ),\n 'singular_name' => _x( 'Product Tab', 'Post Type Singular Name', 'GWP' ),\n 'menu_name' => __( 'product Tabs', 'GWP' ),\n 'parent_item_colon' => __( '', 'GWP' ),\n 'all_items' => __( 'Product Tabs', 'GWP' ),\n 'view_item' => __( '', 'GWP' ),\n 'add_new_item' => __( 'Add Product Tab', 'GWP' ),\n 'add_new' => __( 'Add New', 'GWP' ),\n 'edit_item' => __( 'Edit Product Tab', 'GWP' ),\n 'update_item' => __( 'Update Product Tab', 'GWP' ),\n 'search_items' => __( 'Search Product Tab', 'GWP' ),\n 'not_found' => __( 'Not found', 'GWP' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'GWP' ),\n );\n $args = array(\n 'label' => __( 'Product Tabs', 'GWP' ),\n 'description' => __( 'Custom Product Tabs', 'GWP' ),\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'custom-fields' ),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => 'edit.php?post_type=product',\n 'show_in_nav_menus' => false,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-feedback',\n 'can_export' => true,\n 'has_archive' => false,\n 'exclude_from_search' => true,\n 'publicly_queryable' => false,\n 'capability_type' => 'post',\n );\n register_post_type( 'c_p_tab', $args );\n }", "protected function setPostTypeObject(){\n\t\treturn array(\n\t\t\t'label' => _x('artists', 'artist', 'cpt_artist'),\n\t\t\t'labels' => array(\n\t\t\t\t'name' => _x('Artists', 'artist', 'cpt_artist'),\n\t\t\t\t'singular_name' => _x('artist', 'artist', 'cpt_artist'),\n\t\t\t\t'add_new' => _x('Add new artist', 'artist', 'cpt_artist'),\n\t\t\t\t'all_items' => _x('Artists', 'artist', 'cpt_artist'),\n\t\t\t\t'add_new_item' => _x('Add new artist', 'artist', 'cpt_artist'),\n\t\t\t\t'edit_item' => _x('Edit artist', 'artist', 'cpt_artist'),\n\t\t\t\t'new_item' => _x('New artist', 'artist', 'cpt_artist'),\n\t\t\t\t'view_item' => _x('Show artist', 'artist', 'cpt_artist'),\n\t\t\t\t'search_items' => _x('Search artists', 'artist', 'cpt_artist'),\n\t\t\t\t'not_found' => _x('No artists found', 'artist', 'cpt_artist'),\n\t\t\t\t'not_found_in_trash' => _x('No artists found in the trash', 'artist', 'cpt_artist'),\n\t\t\t\t'parent_item_colon' => _x('Artist', 'artist', 'cpt_artist'),\n\t\t\t\t'menu_name' => _x('Artists catalog', 'artist', 'cpt_artist')\n\t\t\t),\n\t\t\t'description' => _x('Artists for music catalog.', 'artist', 'cpt_artist'),\n\t\t\t'public' => true,\n\t\t\t'exclude_from_search' => false,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_nav_menus' => false,\n\t\t\t'show_in_menu' => 'edit.php?post_type=music',\n\t\t\t'show_in_admin_bar' => true,\n\t\t\t'menu_position' => null,\n\t\t\t'menu_icon' => null,\n\t\t\t'capability_type' => array( 'artist', 'artists' ),\n\t\t\t'hierarchical' => true,\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail' ),\n\t\t\t'has_archive' => true,\n\t\t\t'rewrite' => array( 'slug' => __('artists', 'cpt_artist'), 'with_front' => true, 'feeds' => true, 'pages' => true ),\n\t\t\t'query_var' => true,\n\t\t\t'can_export' => false\n\t\t);\n\t}", "private function get_type(){\n\t\treturn $this->_type;\n\t}", "function getPType(){\n\treturn 'normal';\n}", "function get_post_types() {\n\tglobal $rf_custom_posts;\n\n\t$post = new PostType();\n\t$cpts = $post->get_admin_post_pages();\n\n\t$cpts = array_merge($cpts, $rf_custom_posts);\n\t$cpts = apply_filters(\"admin/post_types\", $cpts);\n\n\treturn $cpts;\n}", "function get_parent_post_type ($post) {\n /* Get an array of Ancestors and Parents if they exist */\n\t$parents = get_post_ancestors( $post->ID );\n /* Get the top Level post->ID count base 1, array base 0 so -1 */ \n\t$id = ($parents) ? $parents[count($parents)-1]: $post->ID;\n\t/* Get the parent type */\n $parent = get_post( $id );\n\t$type = $parent->post_type;\n\t\nreturn $type;\n}", "function product( )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $ret = new eZProduct( $this->ProductID );\n \n return $ret;\n }", "protected function _getProduct()\n {\n if (!$this->_product) {\n $this->_product = $this->_objectManager->create(\\Magento\\Catalog\\Model\\Product::class);\n $productId = (int)$this->getRequest()->getParam('product', 0);\n $urlRewrite = $this->_getUrlRewrite();\n if (!$productId && $urlRewrite->getId() && $urlRewrite->getEntityType() === self::ENTITY_TYPE_PRODUCT) {\n $productId = $this->_getUrlRewrite()->getEntityId();\n }\n if ($productId) {\n $this->_product->load($productId);\n }\n }\n return $this->_product;\n }" ]
[ "0.73207545", "0.6869455", "0.662927", "0.6447375", "0.6398048", "0.6350403", "0.62490624", "0.6239269", "0.6228676", "0.620768", "0.61552685", "0.6133885", "0.6102788", "0.60884815", "0.60804206", "0.60798943", "0.6067799", "0.60603005", "0.60591745", "0.60401773", "0.60379475", "0.59927166", "0.59911275", "0.59780043", "0.5949791", "0.5890259", "0.588225", "0.5870346", "0.5865159", "0.586017", "0.5841233", "0.5837647", "0.58274925", "0.57950544", "0.57782793", "0.57525146", "0.5735013", "0.5714604", "0.5699018", "0.5681311", "0.5680532", "0.5673222", "0.5666712", "0.56617814", "0.56461906", "0.56361014", "0.56314665", "0.562637", "0.5614716", "0.5614716", "0.5601627", "0.55975205", "0.5595518", "0.5592356", "0.5579659", "0.55744463", "0.55633694", "0.5559339", "0.55565435", "0.5550034", "0.5550034", "0.5550034", "0.5550034", "0.5550007", "0.55352837", "0.55283576", "0.5518499", "0.55147284", "0.5510394", "0.54977417", "0.5494267", "0.54853004", "0.54778457", "0.54769194", "0.54760015", "0.54693395", "0.5465625", "0.5465625", "0.5451945", "0.5449171", "0.54488134", "0.54440916", "0.5438221", "0.5434979", "0.5429441", "0.54273635", "0.54235375", "0.54212224", "0.5413676", "0.54133004", "0.5409682", "0.5406157", "0.54015404", "0.5396347", "0.539127", "0.5386333", "0.5385994", "0.5385036", "0.5384726", "0.5378305", "0.5373024" ]
0.0
-1
/ If editing, deleting, or reading a banner, get the post and post type object.
function banner_meta_cap( $caps, $cap, $user_id, $args ) { if ( 'edit_banner' == $cap || 'delete_banner' == $cap || 'read_banner' == $cap ) { $post = get_post( $args[0] ); $post_type = get_post_type_object( $post->post_type ); /* Set an empty array for the caps. */ $caps = array(); } /* If editing a banner, assign the required capability. */ if ( 'edit_banner' == $cap ) { if ( $user_id == $post->post_author ) $caps[] = $post_type->cap->edit_posts; else $caps[] = $post_type->cap->edit_others_posts; } /* If deleting a banner, assign the required capability. */ elseif ( 'delete_banner' == $cap ) { if ( $user_id == $post->post_author ) $caps[] = $post_type->cap->delete_posts; else $caps[] = $post_type->cap->delete_others_posts; } /* If reading a private banner, assign the required capability. */ elseif ( 'read_banner' == $cap ) { if ( 'private' != $post->post_status ) $caps[] = 'read'; elseif ( $user_id == $post->post_author ) $caps[] = 'read'; else $caps[] = $post_type->cap->read_private_posts; } /* Return the capabilities required by the user. */ return $caps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_post_type_object($post_type)\n {\n }", "public function type() { return $this->post->post_type; }", "public static function post_object_type($type, $post) {\n $post_type = get_post_type($post);\n switch ( $post_type ) {\n case \"post\":\n $post_format = get_post_format($post);\n switch ( $post_format ) {\n case \"aside\":\n case \"status\":\n case \"quote\":\n case \"note\":\n $object_type = \"note\";\n break;\n case \"gallery\":\n case \"image\":\n $object_type = \"image\";\n break;\n case \"video\":\n $object_type = \"video\";\n break;\n case \"audio\":\n $object_type = \"audio\";\n break;\n default:\n $object_type = \"article\";\n break;\n }\n break;\n case \"page\":\n $object_type = \"page\";\n break;\n case \"attachment\":\n $mime_type = get_post_mime_type();\n $media_type = preg_replace(\"/(\\/[a-zA-Z]+)/i\", \"\", $mime_type);\n\n switch ($media_type) {\n case 'audio':\n $object_type = \"audio\";\n break;\n case 'video':\n $object_type = \"video\";\n break;\n case 'image':\n $object_type = \"image\";\n break;\n }\n break;\n default:\n $object_type = \"article\";\n break;\n }\n\n return $object_type;\n }", "function get_post_type($post = \\null)\n {\n }", "function tc_get_post_type() {\r\n global $post;\r\n\r\n if ( !isset($post) )\r\n return;\r\n \r\n return $post -> post_type;\r\n }", "public function getPostType() {\n\t\treturn $this->post_type;\n\t}", "public function getPostType(){\n return $this->wpdsPostType;\n }", "public function getPostType()\n\t\t{\n\t\t\treturn $this->_postType;\n\t\t}", "private function getPost($post)\n {\n if ($post instanceof WP_post) {\n return $post;\n } elseif (is_int($post) === true) {\n return $this->objectHandler->getPost($post);\n } elseif (isset($post->ID) === true) {\n return $this->objectHandler->getPost($post->ID);\n }\n\n return false;\n }", "private function WP_Post_types($graph, $post) {\r\n if ($post->post_type == 'post') {\r\n $post_resource = $graph->resource($post->guid);\r\n $post_resource->add('rdf:type', $graph->resource('sioc:BlogPost'));\r\n }\r\n\r\n return $graph;\r\n }", "public function getPost()\n {\n if (!$this->hasPost()) {\n $this->setPost(false);\n\n if ($post = $this->registry->registry('wordpress_post')) {\n if ($post->getPostType() === 'page') {\n $this->setPost($post);\n }\n } \n }\n\n return $this->_getData('post');\n }", "public function getPostType(): string {\n return $this->post_type;\n }", "function create_post_type(){\n\n\t/*|>>>>>>>>>>>>>>>>>>>> BANNERS <<<<<<<<<<<<<<<<<<<<|*/\n\t\n\t$labels = array(\n\t\t'name' => __('Banners'),\n\t\t'singular_name' => __('Banner'),\n\t\t'add_new' => __('Nuevo Banner'),\n\t\t'add_new_item' => __('Agregar nuevo Banner'),\n\t\t'edit_item' => __('Editar Banner'),\n\t\t'view_item' => __('Ver Banner'),\n\t\t'search_items' => __('Buscar Banners'),\n\t\t'not_found' => __('Banner no encontrado'),\n\t\t'not_found_in_trash' => __('Banner no encontrado en la papelera'),\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'has_archive' => true,\n\t\t'public' => true,\n\t\t'hierachical' => true,\n\t\t'supports' => array('title','editor','excerpt','custom-fields','thumbnail','page-attributes'),\n\t\t'taxonomies' => array('post-tag','banner_category'),\n\t\t'menu_icon' => 'dashicons-visibility',\n\t);\n\n\t/*|>>>>>>>>>>>>>>>>>>>> SERVICIOS <<<<<<<<<<<<<<<<<<<<|*/\n\t\n\t$labels2 = array(\n\t\t'name' => __('Servicios'),\n\t\t'singular_name' => __('Servicio'),\n\t\t'add_new' => __('Nuevo Servicio'),\n\t\t'add_new_item' => __('Agregar nuevo Servicio'),\n\t\t'edit_item' => __('Editar Servicio'),\n\t\t'view_item' => __('Ver Servicio'),\n\t\t'search_items' => __('Buscar Servicios'),\n\t\t'not_found' => __('Servicio no encontrado'),\n\t\t'not_found_in_trash' => __('Servicio no encontrado en la papelera'),\n\t);\n\n\t$args2 = array(\n\t\t'labels' => $labels2,\n\t\t'has_archive' => true,\n\t\t'public' => true,\n\t\t'hierachical' => false,\n\t\t'supports' => array('title','editor','excerpt','custom-fields','thumbnail','page-attributes'),\n\t\t'taxonomies' => array('post-tag','category','servicio_category'),\n\t\t'menu_icon' => 'dashicons-exerpt-view',\n\t);\t\n\n\n\t/*|>>>>>>>>>>>>>>>>>>>> CLIENTES <<<<<<<<<<<<<<<<<<<<|*/\n\t\n\t$labels4 = array(\n\t\t'name' => __('Clientes'),\n\t\t'singular_name' => __('Cliente'),\n\t\t'add_new' => __('Nuevo Cliente'),\n\t\t'add_new_item' => __('Agregar nuevo Cliente'),\n\t\t'edit_item' => __('Editar Cliente'),\n\t\t'view_item' => __('Ver Cliente'),\n\t\t'search_items' => __('Buscar Clientes'),\n\t\t'not_found' => __('Cliente no encontrado'),\n\t\t'not_found_in_trash' => __('Cliente no encontrado en la papelera'),\n\t);\n\n\t$args4 = array(\n\t\t'labels' => $labels4,\n\t\t'has_archive' => true,\n\t\t'public' => true,\n\t\t'hierachical' => false,\n\t\t'supports' => array('title','editor','excerpt','custom-fields','thumbnail','page-attributes'),\n\t\t'taxonomies' => array('post-tag','category'),\n\t\t'menu_icon' => 'dashicons-money',\n\t);\t\n\n\n\t/*|>>>>>>>>>>>>>>>>>>>> PROMOCIONES <<<<<<<<<<<<<<<<<<<<|*/\n\t\n\t$labels7 = array(\n\t\t'name' => __('Promociones'),\n\t\t'singular_name' => __('Promoción'),\n\t\t'add_new' => __('Nueva Promoción'),\n\t\t'add_new_item' => __('Agregar nueva Promoción'),\n\t\t'edit_item' => __('Editar Promoción'),\n\t\t'view_item' => __('Ver Promoción'),\n\t\t'search_items' => __('Buscar Promoción'),\n\t\t'not_found' => __('Promoción no encontrada'),\n\t\t'not_found_in_trash' => __('Promoción no encontrada en la papelera'),\n\t);\n\n\t$args7 = array(\n\t\t'labels' => $labels7,\n\t\t'has_archive' => true,\n\t\t'public' => true,\n\t\t'hierachical' => false,\n\t\t'supports' => array('title','editor','excerpt','custom-fields','thumbnail','page-attributes'),\n\t\t'taxonomies' => array('category','post-tag'),\n\t\t'menu_icon' => 'dashicons-products',\n\t);\n\n\n\t/*|>>>>>>>>>>>>>>>>>>>> REGISTRAR <<<<<<<<<<<<<<<<<<<<|*/\n\tregister_post_type( 'banner' , $args );\n\tregister_post_type( 'servicio' , $args2 );\n\tregister_post_type( 'cliente' , $args4 );\n\tregister_post_type( 'promocion' , $args7 );\n\t\n\tflush_rewrite_rules();\n}", "public static function post_type(){}", "function getPostObject($post_id) {\n\t\t$post_url = get_permalink($post_id);\n\t\t$title = strip_tags(get_the_title($post_id));\n\t\t$tagObjects = get_the_tags($post_id);\n\t\t$single = is_single();\n\t\t$tags = \"\";\n\t\tif (!empty($tagObjects)) {\n\t\t\t$tags .= $tagObjects[0]->name;\n\t\t\tfor ($i = 1; $i < count($tagObjects); $i++) {\n\t\t\t\t$tags .= \",\".$tagObjects[$i]->name;\n\t\t\t}\n\t\t}\n\t\t$category = get_the_category($post_id);\n\t\t$categories = \"\";\n\t\tif (!empty($category)) {\n\t\t\t$categories .= $category[0]->name;\n\t\t\tfor ($i=1; $i<count($category); $i++) {\n\t\t\t\t$categories .= \",\".$category[$i]->name;\n\t\t\t}\n\t\t}\n\t\t$author = get_the_author();\n\t\t$date = get_the_date('U', $post_id) * 1000;\n\t\t$comments = get_comments_number($post_id);\n\n\t\t$tmdb = get_post_meta($post_id,'imdb_id');\n\n\t\t$post_object = array(\n\t\t\t'id' => $post_id,\n\t\t\t'url' => $post_url,\n\t\t\t'title' => $title,\n\t\t\t'tags' => $tags,\n\t\t\t'categories' => $categories,\n\t\t\t'comments' => $comments,\n\t\t\t'date' => $date,\n\t\t\t'author' => $author,\n\t\t\t'single' => $single,\n\t\t\t'img' => get_the_post_thumbnail_url($post_id),\n\t\t\t'tmdb' => $tmdb\n\t\t);\n\t\treturn $post_object;\n\t}", "public static function get_post_type(){\n global $TFUSE;\n return $TFUSE->ext->seek->get_post_type();\n }", "function wp_get_single_post($postid = 0, $mode = \\OBJECT)\n {\n }", "function garoe_create_post_type(){\n\n\t/*|>>>>>>>>>>>>>>>>>>>> BANNERS <<<<<<<<<<<<<<<<<<<<|*/\n\t\n\t$labels = array(\n\t\t'name' => __('Banners'),\n\t\t'singular_name' => __('Banner'),\n\t\t'add_new' => __('Nuevo Banner'),\n\t\t'add_new_item' => __('Agregar nuevo Banner'),\n\t\t'edit_item' => __('Editar Banner'),\n\t\t'view_item' => __('Ver Banner'),\n\t\t'search_items' => __('Buscar Banners'),\n\t\t'not_found' => __('Banner no encontrado'),\n\t\t'not_found_in_trash' => __('Banner no encontrado en la papelera'),\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'has_archive' => true,\n\t\t'public' => true,\n\t\t'hierachical' => false,\n\t\t'supports' => array('title','editor','excerpt','custom-fields','thumbnail','page-attributes'),\n\t\t'taxonomies' => array('post-tag','banner_category'),\n\t\t'menu_icon' => 'dashicons-visibility',\n\t);\n\n\t/*|>>>>>>>>>>>>>>>>>>>> TESTIMONIO <<<<<<<<<<<<<<<<<<<<|*/\n\t$labels2 = array(\n\t\t'name' => __('Testimonios'),\n\t\t'singular_name' => __('Testimonio'),\n\t\t'add_new' => __('Nuevo Testimonio'),\n\t\t'add_new_item' => __('Agregar nuevo Testimonio'),\n\t\t'edit_item' => __('Editar Testimonio'),\n\t\t'view_item' => __('Ver Testimonio'),\n\t\t'search_items' => __('Buscar Testimonios'),\n\t\t'not_found' => __('Testimonio no encontrado'),\n\t\t'not_found_in_trash' => __('Testimonio no encontrado en la papelera'),\n\t);\n\n\t$args2 = array(\n\t\t'labels' => $labels2,\n\t\t'has_archive' => true,\n\t\t'public' => true,\n\t\t'hierachical' => false,\n\t\t'supports' => array('title','editor','excerpt','custom-fields','thumbnail','page-attributes'),\n\t\t'taxonomies' => array('post-tag','testimonio_category'),\n\t\t'menu_icon' => 'dashicons-megaphone'\n\t);\n\n\t/*|>>>>>>>>>>>>>>>>>>>> Galería Imágenes <<<<<<<<<<<<<<<<<<<<|*/\n\t$labels3 = array(\n\t\t'name' => __('Galería Imagen'),\n\t\t'singular_name' => __('Imagen'),\n\t\t'add_new' => __('Nueva Imagen'),\n\t\t'add_new_item' => __('Agregar nueva Imagen'),\n\t\t'edit_item' => __('Editar Imagen'),\n\t\t'view_item' => __('Ver Imagen'),\n\t\t'search_items' => __('Buscar Imagen'),\n\t\t'not_found' => __('Imagen no encontrado'),\n\t\t'not_found_in_trash' => __('Imagen no encontrado en la papelera'),\n\t);\n\n\t$args3 = array(\n\t\t'labels' => $labels3,\n\t\t'has_archive' => true,\n\t\t'public' => true,\n\t\t'hierachical' => false,\n\t\t'supports' => array('title','editor','excerpt','custom-fields','thumbnail','page-attributes'),\n\t\t'taxonomies' => array('post-tag'),\n\t\t'menu_icon' => 'dashicons-format-gallery'\n\t);\n\n\t/*|>>>>>>>>>>>>>>>>>>>> Galería Videos <<<<<<<<<<<<<<<<<<<<|*/\n\t$labels4 = array(\n\t\t'name' => __('Galería Videos'),\n\t\t'singular_name' => __('Video'),\n\t\t'add_new' => __('Nueva Video'),\n\t\t'add_new_item' => __('Agregar nueva Video'),\n\t\t'edit_item' => __('Editar Video'),\n\t\t'view_item' => __('Ver Video'),\n\t\t'search_items' => __('Buscar Video'),\n\t\t'not_found' => __('Video no encontrado'),\n\t\t'not_found_in_trash' => __('Video no encontrado en la papelera'),\n\t);\n\n\t$args4 = array(\n\t\t'labels' => $labels4,\n\t\t'has_archive' => true,\n\t\t'public' => true,\n\t\t'hierachical' => false,\n\t\t'supports' => array('title','editor','excerpt','custom-fields','thumbnail','page-attributes'),\n\t\t'taxonomies' => array('post-tag'),\n\t\t'menu_icon' => 'dashicons-video-alt3'\n\t);\n\n\t/*|>>>>>>>>>>>>>>>>>>>> SERVICIO <<<<<<<<<<<<<<<<<<<<|*/\n\t$labels5 = array(\n\t\t'name' => __('Servicios'),\n\t\t'singular_name' => __('Servicio'),\n\t\t'add_new' => __('Nuevo Servicio'),\n\t\t'add_new_item' => __('Agregar nuevo Servicio'),\n\t\t'edit_item' => __('Editar Servicio'),\n\t\t'view_item' => __('Ver Servicio'),\n\t\t'search_items' => __('Buscar Servicio'),\n\t\t'not_found' => __('Testimonio no encontrado'),\n\t\t'not_found_in_trash' => __('Testimonio no encontrado en la papelera'),\n\t);\n\n\t$args5 = array(\n\t\t'labels' => $labels5,\n\t\t'has_archive' => true,\n\t\t'public' => true,\n\t\t'hierachical' => false,\n\t\t'supports' => array('title','editor','excerpt','custom-fields','thumbnail','page-attributes'),\n\t\t'taxonomies' => array('post-tag'),\n\t\t'menu_icon' => 'dashicons-portfolio'\n\t);\n\t\n\t/*|>>>>>>>>>>>>>>>>>>>> REGISTRAR <<<<<<<<<<<<<<<<<<<<|*/\n\tregister_post_type('banner',$args);\n\tregister_post_type('testimonio',$args2);\n\tregister_post_type('galeria-imagen',$args3);\n\tregister_post_type('galeria-video',$args4);\n\tregister_post_type('servicio',$args5);\n}", "function diversity_get_header_content_type( $content_type, $obj ) {\n\tif ( $obj instanceof WP_Post ) {\n\t\t$post_type = $obj->post_type;\n\n\t\tif ( $post_type === 'post' ) {\n\t\t\t$content_type = 'post';\n\t\t}\n\t}\n\n\treturn $content_type;\n}", "public function get_post_type() {\n\t\treturn $this->post_type_key;\n\t}", "function get_post_type_advanced() {\n\n $post_type = get_post_type();\n\n if( is_post_type_archive() ) {\n $post_type = get_query_var( 'post_type' );\n }\n\n if( is_tax() ) {\n $post_type = get_taxonomy( get_queried_object()->taxonomy )->object_type[0];\n }\n\n return $post_type;\n}", "public static function current_object_type() {\n\t\tglobal $pagenow;\n\t\t$type = 'post';\n\n\t\tif ( in_array( $pagenow, [ 'user-edit.php', 'profile.php', 'user-new.php' ], true ) ) {\n\t\t\t$type = 'user';\n\t\t}\n\n\t\tif ( in_array( $pagenow, [ 'edit-comments.php', 'comment.php' ], true ) ) {\n\t\t\t$type = 'comment';\n\t\t}\n\n\t\tif ( in_array( $pagenow, [ 'edit-tags.php', 'term.php' ], true ) ) {\n\t\t\t$type = 'term';\n\t\t}\n\n\t\tif ( Conditional::is_ajax() && 'add-tag' === Param::post( 'action' ) ) {\n\t\t\t$type = 'term';\n\t\t}\n\n\t\treturn $type;\n\t}", "function get_the_post_type_description()\n {\n }", "function honeycomb_page_banner() {\n\t\tglobal $post;\n\n\t\tif ( !isset($post->ID) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$post_id = $post->ID;\n\t\tif ( is_post_type_archive('property') )\n\t\t{\n\t\t\t$post_id = ph_get_page_id( 'search_results' );\n\t\t}\n\n\t\t$banner_type = get_post_meta( $post_id, '_banner_type', TRUE );\n\n\t\tswitch ( $banner_type )\n\t\t{\n\t\t\tcase \"map\":\n\t\t\t{\n\t\t\t\tif ( class_exists( 'PH_Map_Search' ) )\n\t\t\t\t{\n\t\t\t\t\t$query = '';\n\n\t\t\t\t\tif ( is_post_type_archive('property') )\n\t\t\t\t\t{\n\t\t\t\t\t\tglobal $wp_query;\n\n\t\t\t\t $query = $wp_query->request;\n\n\t\t\t\t // Remove limit\n\t\t\t\t $last_limit_pos = strrpos(strtolower($query), \"limit\");\n\t\t\t\t if ($last_limit_pos !== FALSE)\n\t\t\t\t {\n\t\t\t\t // We found a limit\n\t\t\t\t $query = substr($query, 0, $last_limit_pos - 1); // -1 because strrpos return starts at zero\n\t\t\t\t }\n\n\t\t\t\t $query = base64_encode($query);\n\t\t\t\t\t}\n\n\t\t\t\t\techo do_shortcode('[propertyhive_map_search scrollwheel=\"false\" query=\"' . $query . '\"]');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo __( 'The Property Hive Map Search add on does not exist or is not activated', 'honeycomb' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"revslider\":\n\t\t\t{\n\t\t\t\tif ( class_exists( 'RevSlider' ) ) \n\t\t\t\t{\n\t\t\t\t\t$rev_slider = esc_html( get_post_meta( $post_id, '_banner_rev_slider', TRUE ) ); \n\t\t\t\t\tputRevSlider($rev_slider);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo __( 'Revolution Slider does not exist or is not activated', 'honeycomb' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"featured\":\n\t\t\t{\n\t\t\t\tif ( has_post_thumbnail($post_id) ) \n\t\t\t\t{\n\t\t\t\t\t$url = get_the_post_thumbnail_url($post_id, 'full');\n\t\t\t\t\techo '<div class=\"featured-image-page-banner\" style=\"background-image:url(\\'' . $url . '\\');\"></div>';\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "abstract protected function post_type();", "public function getType()\n {\n return $this->type = $this->get()->post_type;\n }", "public function modelForPost(\\WP_Post $post)\n {\n if (! $post) {\n return;\n }\n\n $result = null;\n\n if (isset($this->modelCache[\"m-$post->ID\"])) {\n return $this->modelCache[\"m-$post->ID\"];\n }\n\n if (isset($this->modelFactories[$post->post_type])) {\n $result = call_user_func_array($this->modelFactories[$post->post_type], [$this, $post]);\n } elseif (isset($this->config['model-map'][$post->post_type])) {\n $className = $this->config['model-map'][$post->post_type];\n if (class_exists($className)) {\n $result = new $className($this, $post);\n }\n }\n\n if (! $result) {\n if ($post->post_type == 'attachment') {\n $result = new Attachment($this, $post);\n } elseif ($post->post_type == 'page') {\n $result = new Page($this, $post);\n } else {\n $result = new Post($this, $post);\n }\n }\n\n if ($result) {\n $this->modelCache[\"m-$post->ID\"] = $result;\n }\n\n return $result;\n }", "public function type()\n\t{\n\t\treturn $this->belongsTo('Lainga9\\BallDeep\\app\\PostType', 'post_type_id');\n\t}", "function get_post_status_object($post_status)\n {\n }", "public function get()\n {\n return $this->object = get_post($this->id);\n }", "protected function get_post_type() {\n\t\tif ( $post = get_post() ) {\n\t\t\treturn get_post_type( $post );\n\t\t}\n\n\t\tif ( isset( $_GET['post'] ) ) {\n\t\t\treturn get_post_type( sanitize_text_field( $_GET['post'] ) );\n\t\t}\n\n\t\tif ( isset( $_GET['post_type'] ) ) {\n\t\t\treturn strtolower( sanitize_text_field( $_GET['post_type'] ) );\n\t\t}\n\n\t\t$req_uri = $_SERVER['REQUEST_URI'];\n\t\t$exploded = explode( '/', $req_uri );\n\t\t$last = end( $exploded );\n\t\t$last = parse_url( $last, PHP_URL_PATH );\n\n\t\tif ( $last === 'post-new.php' || $last === 'edit.php' ) {\n\t\t\treturn 'post';\n\t\t}\n\n\t\treturn '';\n\t}", "function OPS_get_post($id) {\r\n\tglobal $wpdb;\r\n\t$post = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID=$id\");\r\n\tif ($post->post_type == \"revision\"){\r\n\t\t$id = $post->post_parent;\r\n\t\t$post = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID=$id\");\r\n\t}\r\n\treturn $post[0];\r\n}", "function get_default_post_to_edit($post_type = 'post', $create_in_db = \\false)\n {\n }", "function get_post_data() {\n\t\tif (empty($this->post)) :\n\t\t\t$this->post = get_post( $this->id );\n\t\tendif;\n\t\t\n\t\treturn $this->post;\n\t}", "function get_posts_gallery_type($post_id){\n \n if ( wp_is_mobile() ) {\n $mobile_gallerytype = meta::get_meta( $post_id , 'gallerytype' );\n if( isset($mobile_gallerytype['mobile_gallery_type']) && strlen($mobile_gallerytype['mobile_gallery_type']) ){\n return $mobile_gallerytype['mobile_gallery_type'];\n }else{\n return options::get_value( 'blog_post' , 'mobile_gallery_type' ); \n }\n }\n \n \n $gallerytype = meta::get_meta( $post_id , 'gallerytype' );\n\n if(isset($gallerytype['value']) && strlen($gallerytype['value'])){\n return $gallerytype['value'];\n }else{\n return options::get_value( 'blog_post' , 'gallery_type' );\n }\n \n }", "function wp_getPostType( $args ) {\n\n global $wp_xmlrpc_server;\n $wp_xmlrpc_server->escape( $args );\n\n $blog_ID = (int) $args[0];\n $username = $args[1];\n $password = $args[2];\n $post_type_name = $args[3];\n\n if ( !$user = $wp_xmlrpc_server->login( $username, $password ) )\n return $wp_xmlrpc_server->error;\n\n $post_type_names = get_post_types('', 'names');\n\n if( ! in_array( $post_type_name, $post_type_names ) )\n return new IXR_Error( 403, __( 'The post type specified is not valid' ) );\n\n $post_type = get_post_type_object( $post_type_name );\n\n //capability check\n if( ! current_user_can( $post_type->cap->edit_posts ) )\n return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post type' ) );\n\n $post_type = (array)$post_type;\n\n $post_type_data = array(\n 'labels' => $post_type['labels'],\n 'description' => $post_type['description'],\n 'capability_type' => $post_type['capability_type'],\n 'cap' => $post_type['cap'],\n 'map_meta_cap' => $post_type['map_meta_cap'],\n 'hierarchical' => $post_type['hierarchical'],\n 'menu_position' => $post_type['menu_position'],\n 'taxonomies' => get_object_taxonomies( $post_type['name'] ),\n );\n\n return $post_type_data;\n \n}", "public function postType()\n {\n return $this->belongsTo(PostType::class);\n }", "public function get_post_types(){ return $this->post_types; }", "static function get_post_by_cat_id($post){\n\t\treturn self::$db->where('cat_id',$post)->get('blog')->row();\n\t}", "public static function findByID($postTypeID)\n {\n return PostType::all()->where(\"postTypeID\", $postTypeID)->first();\n }", "public function getPost(): Post\n {\n return $this->post;\n }", "public function getPost()\n {\n return $this->hasOne(PostForm::className(), ['_id' => 'post_id']);\n }", "private function get_post_type()\n {\n $post_id = get_the_ID();\n\n // Check post for post type\n if( $post_id )\n {\n return get_post_type($post_id);\n }\n\n // Check query vars for post type\n if( $post_type = get_query_var('post_type') )\n {\n return $post_type;\n }\n\n // No post type found\n return '';\n\n }", "public static function get_class_post_type()\n {\n return self::$post_type;\n }", "public static function get_class_post_type()\n {\n return self::$post_type;\n }", "function get_css_post() {\n\t\t$args = array(\n\t\t\t'numberposts' => 1,\n\t\t\t'post_type' => 'safecss',\n\t\t\t'post_status' => 'publish',\n\t\t);\n\n\t\tif ( $post = array_shift( get_posts( $args ) ) )\n\t\t\treturn get_object_vars( $post );\n\n\t\treturn false;\n\t}", "private function processPost(WP_Post $post): ?WP_Post\n {\n $post->post_title .= $this->adminOutput((string) $post->post_type, $post->ID);\n\n if ($this->accessHandler->checkObjectAccess($post->post_type, $post->ID) === false) {\n if ($this->removePostFromList($post->post_type) === true) {\n return null;\n }\n\n $post->post_content = $this->processPostContent($post);\n\n if ($this->mainConfig->hidePostTypeTitle($post->post_type) === true) {\n $post->post_title = $this->mainConfig->getPostTypeTitle($post->post_type);\n }\n\n if ($this->mainConfig->lockPostTypeComments($post->post_type) === true) {\n $post->comment_status = 'close';\n }\n }\n\n return $post;\n }", "function get_parent_post_type ($post) {\n /* Get an array of Ancestors and Parents if they exist */\n\t$parents = get_post_ancestors( $post->ID );\n /* Get the top Level post->ID count base 1, array base 0 so -1 */ \n\t$id = ($parents) ? $parents[count($parents)-1]: $post->ID;\n\t/* Get the parent type */\n $parent = get_post( $id );\n\t$type = $parent->post_type;\n\t\nreturn $type;\n}", "protected function get_object_type()\n {\n }", "function get_post_types() {\n\tglobal $rf_custom_posts;\n\n\t$post = new PostType();\n\t$cpts = $post->get_admin_post_pages();\n\n\t$cpts = array_merge($cpts, $rf_custom_posts);\n\t$cpts = apply_filters(\"admin/post_types\", $cpts);\n\n\treturn $cpts;\n}", "public function actionGetInfoPost()\n {\n $post_id = isset($_GET['post_id']) ? $_GET['post_id'] : false;\n if ($post_id) {\n $post = POST::find()->where('id = '. $post_id . ' AND post_type = 1')->one();\n if ($post) {\n $data = [\n 'id' => $post->id,\n 'title' => $post->title,\n 'content' => $post->content,\n 'topic_id' => $post->topic_id,\n 'user_id' => $post->user_id,\n 'created_at' => $post->created_at,\n 'updated_at' => $post->updated_at,\n 'view_count' => $post->view_count,\n 'brilliant_count' => $post->brilliant_count,\n 'comment_count' => $post->comment_count,\n 'post_type' => $post->post_type\n ];\n $data = json_encode($data);\n return $data;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "function getBanner()\n {\n return $this->banner;\n }", "public function load($post);", "public function post_type() {\n\n\t\tif( ! class_exists( 'bbPress' ) )\n\t\t\treturn;\n\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Notices', 'post type general name', 'bbpress-notices' ),\n\t\t\t'singular_name' => _x( 'Notice', 'post type singular name', 'bbpress-notices' ),\n\t\t\t'add_new' => __( 'Add New', 'bbpress-notices' ),\n\t\t\t'add_new_item' => __( 'Add New Notice', 'bbpress-notices' ),\n\t\t\t'edit_item' => __( 'Edit Notice', 'bbpress-notices' ),\n\t\t\t'new_item' => __( 'New Notice', 'bbpress-notices' ),\n\t\t\t'all_items' => __( 'Notices', 'bbpress-notices' ),\n\t\t\t'view_item' => __( 'View Notice', 'bbpress-notices' ),\n\t\t\t'search_items' => __( 'Search Notices', 'bbpress-notices' ),\n\t\t\t'not_found' => __( 'No Notices found', 'bbpress-notices' ),\n\t\t\t'not_found_in_trash'=> __( 'No Notices found in Trash', 'bbpress-notices' ),\n\t\t\t'parent_item_colon' => '',\n\t\t\t'menu_name' => __( 'Notices', 'bbpress-notices' )\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'show_ui' => true,\n\t\t\t'show_in_menu' => 'edit.php?post_type=' . bbp_get_forum_post_type(),\n\t\t\t'query_var' => false,\n\t\t\t'rewrite' => false,\n\t\t\t'capabilities' => bbp_get_forum_caps(),\n\t\t\t'capability_type' => array( 'forum', 'forums' ),\n\t\t\t'supports' => array( 'editor', 'title' ),\n\t\t\t'can_export' => false\n\t\t);\n\n\t\tregister_post_type( 'bbp_notice', $args );\n\t}", "function save_post_type_beneficiary($post_id) {\n $post_type = get_post_type($post_id);\n if ($post_type != 'beneficiary') {\n return;\n }\n\n $post_title = get_field('organization_name');\n $post_name = sanitize_title($post_title);\n $post = array(\n 'ID' => $post_id,\n 'post_name' => $post_name,\n 'post_title' => $post_title\n );\n wp_update_post($post);\n}", "public function single(Post $post)\n {\n// auth()->loginUsingId(1);\n// if (Gate::allows('show-post',$post)){\n// return $post;\n// }\n// abort(403,'not access');\n\n// authorization services by ACL PostPolicy\n auth()->loginUsingId(1);\n if (Gate::allows('view',$post)){\n return $post;\n }\n abort(403,'not access');\n }", "function medigroup_mikado_get_blog_type($type) {\n\n $blog_query = medigroup_mikado_get_blog_query();\n\n $paged = medigroup_mikado_paged();\n $blog_classes = '';\n\n if(medigroup_mikado_options()->getOptionValue('blog_page_range') != \"\") {\n $blog_page_range = esc_attr(medigroup_mikado_options()->getOptionValue('blog_page_range'));\n } else {\n $blog_page_range = $blog_query->max_num_pages;\n }\n $show_load_more = medigroup_mikado_enable_load_more();\n\n if($show_load_more) {\n $blog_classes .= ' mkd-blog-load-more';\n }\n\n $params = array(\n 'blog_query' => $blog_query,\n 'paged' => $paged,\n 'blog_page_range' => $blog_page_range,\n 'blog_type' => $type,\n 'blog_classes' => $blog_classes\n );\n\n medigroup_mikado_get_module_template_part('templates/lists/'.$type, 'blog', '', $params);\n }", "public function testForcesAContentTypeOfPost(){\n\t\t$data = array(\n\t\t\t'Post'=>array(\n\t\t\t\t'controller'=>'Test',\n\t\t\t\t'controller'=>'test_action',\n\t\t\t\t'content_type'=>'post'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$this->Post->save($data);\n\t\t\n\t\t$results = $this->Post->find(\n\t\t\t'first',\n\t\t\tarray(\n\t\t\t\t'conditions'=>array(\n\t\t\t\t\t'Post.id' => $this->Post->id\n\t\t\t\t),\n\t\t\t\t'contain'=>array()\n\t\t\t)\n\t\t);\n\t\t\n\t\t$this->assertEqual($results['Post']['content_type'], 'post');\n\t}", "static function getCustomizedPostsDataFromPostType($post_type){\n $posts_ids = self::getCustomizedPostsIdFromPostType($post_type);\n $posts_data = self::getPostsObjectsFromPostIds($posts_ids);\n\n return $posts_data;\n }", "function medigroup_mikado_get_blog($type) {\n\n $sidebar = medigroup_mikado_sidebar_layout();\n\n $params = array(\n \"blog_type\" => $type,\n \"sidebar\" => $sidebar\n );\n medigroup_mikado_get_module_template_part('templates/lists/holder', 'blog', '', $params);\n }", "protected function getItemFromPost($post)\n {\n if ($post['original_post_id'] == null) {\n $embPost = false;\n } else {\n $embPost = true;\n }\n\n if ($this -> getInput('noreblog') && $embPost) {\n return [];\n }\n\n $item = [];\n\n $item['uid'] = $post['id'];\n $item['timestamp'] = strtotime($post['created_at']);\n\n if ($embPost) {\n $item['uri'] = self::URI . '/posts/' . $post['original_post']['id'];\n $item['author'] = $post['original_username'];\n if ($post['original_post']['title'] != '') {\n $item['title'] = $post['original_post']['title'];\n } else {\n $item['title'] = '[NO TITLE]';\n }\n } else {\n $item['uri'] = self::URI . '/posts/' . $post['id'];\n $item['author'] = $post['username'];\n if ($post['title'] != '') {\n $item['title'] = $post['title'];\n } else {\n $item['title'] = '[NO TITLE]';\n }\n }\n\n /**\n * 4 cases if it is a reblog.\n * 1: reblog has tags, original has tags. defer to option.\n * 2: reblog has tags, original has no tags. use reblog tags.\n * 3: reblog has no tags, original has tags. use original tags.\n * 4: reblog has no tags, original has no tags. use reblog tags not that it matters.\n */\n $item['categories'] = $post['tags'];\n if ($embPost) {\n if ($this -> getInput('noretags') || ($post['tags'] == null)) {\n $item['categories'] = $post['original_post']['tag_list'];\n }\n }\n\n $avatarText = $this -> genAvatarText(\n $item['author'],\n $post['avatar_url'],\n $item['title']\n );\n $imagesText = $this -> genImagesText($post['media']);\n\n $item['content'] = <<<EOD\n<div style=\"display: inline-block; vertical-align: top;\">\n\t{$avatarText}\n</div>\n<div style=\"display: inline-block; vertical-align: top;\">\n\t{$post['content']}\n</div>\n<div style=\"display: block; vertical-align: top;\">\n\t{$imagesText}\n</div>\nEOD;\n\n return $item;\n }", "function acf_get_object_type($object_type, $object_subtype = '')\n{\n}", "function get_js_post() {\n\t\t$args = array(\n\t\t\t'numberposts' => 1,\n\t\t\t'post_type' => 'customjs',\n\t\t\t'post_status' => 'publish',\n\t\t);\n\n\t\tif ( $post = array_shift( get_posts( $args ) ) )\n\t\t\treturn get_object_vars( $post );\n\n\t\treturn false;\n\t}", "public function model()\n {\n return AppFeaturedPost::class;\n }", "function cptui_register_my_cpts_top_banner() {\n\n\t$labels = array(\n\t\t\"name\" => __( \"Top Banners\", \"esoftkulo\" ),\n\t\t\"singular_name\" => __( \"Top Banner\", \"esoftkulo\" ),\n\t);\n\n\t$args = array(\n\t\t\"label\" => __( \"Top Banners\", \"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'capabilities' => array(\n\t\t 'create_posts' => 'do_not_allow'\n\t\t ),\n\t\t\"map_meta_cap\" => true,\n\t\t\"hierarchical\" => false,\n\t\t\"rewrite\" => array( \"slug\" => \"top_banner\", \"with_front\" => true ),\n\t\t\"query_var\" => true,\n\t\t\"supports\" => array( \"title\", \"editor\", \"custom-fields\", \"thumbnail\", \"page-attributes\" )\n\t);\n\n\tregister_post_type( \"top_banner\", $args );\n}", "function acf_get_post_types($args = array())\n{\n}", "protected function _applyPostPageLogic($object, $type = 'post')\n\t{\n\t\tif ($object->isBlogListingPage()) {\n\t\t\t//$this->_addRelNextPrev($object, __METHOD__);\n\t\t}\n\t\t\n\t\t$meta = new Varien_Object(array(\n\t\t\t'title' => $this->_getTitleFormat($object->getPostType()),\n\t\t\t'description' => trim($this->getData('metadesc_' . $object->getPostType())),\n\t\t\t'keywords' => trim($this->getData('metakey_' . $object->getPostType())),\n\t\t));\n\n\t\tif (($value = trim($object->getMetaValue('_yoast_wpseo_title'))) !== '') {\n \t\t$meta->setTitle($value);\n#\t\t\t$data = $this->getRewriteData();\n#\t\t\t$data['title'] = $value;\n#\t\t\t$this->setRewriteData($data);\n\t\t}\n\t\t\n\t\tif (($value = trim($object->getMetaValue('_yoast_wpseo_metadesc'))) !== '') {\n\t\t\t$meta->setDescription($value);\n\t\t}\n\t\t\n\t\tif (($value = trim($object->getMetaValue('_yoast_wpseo_metakeywords'))) !== '') {\n\t\t\t$meta->setKeywords($value);\n\t\t}\n\t\t\n\t\t$robots = array();\n\n\t\t$noIndex = (int)$object->getMetaValue('_yoast_wpseo_meta-robots-noindex');\n\n\t\tif ($noIndex === 0) {\n\t\t\t$robots['index'] = '';\n\t\t}\n\t\telse if ($noIndex === 1) {\n\t\t\t$robots['noindex'] = '';\n\t\t}\n\t\telse if ($noIndex === 2) {\n\t\t\t$robots['index'] = '';\n\t\t}\n\t\telse if ((int)$this->getData('noindex_' . $object->getPostType()) === 1) {\n\t\t\t$robots['noindex'] = '';\n\t\t}\n\n\t\tif ($object->getMetaValue('_yoast_wpseo_meta-robots-nofollow')) {\n\t\t\t$robots['nofollow'] = '';\n\t\t}\n\t\telse {\n\t\t\t$robots['follow'] = '';\n\t\t}\n\n\t\tif (($advancedRobots = trim($object->getMetaValue('_yoast_wpseo_meta-robots-adv'))) !== '') {\n\t\t\tif ($advancedRobots !== 'none') {\n\t\t\t\t$robots = explode(',', $advancedRobots);\n\t\t\t}\n\t\t}\n\n\t\t/* Allow custom fields in meta data */\n\t\t$data = $this->getRewriteData();\n\t\t\n\t\tforeach($meta->getData() as $key => $value) {\n\t\t\tif (strpos($value, '%%cf_') !== false) {\n\t\t\t\tif (preg_match_all('/%%cf_([^%]+)%%/', $value, $matches)) {\n\t\t\t\t\tforeach($matches[1] as $customField) {\n\t\t\t\t\t\t$data['cf_' . $customField] = $object->getMetaValue($customField);\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->setRewriteData($data);\n\n\t\t$robots = array_keys($robots);\n\n\t\tif (count($robots) > 0) {\n\t\t\t$meta->setRobots(implode(',', $robots));\n\t\t}\n\n\t\tif (!$meta->getDescription()) {\n\t\t\t$meta->setDescription($object->getMetaDescription());\n\t\t}\n\t\t\n\t\t$this->_applyMeta($meta->getData());\n\n\t\tif ($canon = $object->getMetaValue('_yoast_wpseo_canonical')) {\n\t\t\t$object->setCanonicalUrl($canon);\n\t\t}\n\t\t\n\t\tif (!$this->hasOpengraph() || (int)$this->getOpengraph() ===1) {\n\t\t\t$this->_addPostOpenGraphTags($object, $object->getPostType());\n\t\t}\n\t\t\n\t\tif ($this->getTwitter()) {\n\t\t\t$twitterData = array(\n\t\t\t\t'card' => $this->getTwitterCardType(),\n\t\t\t\t'site' => ($this->getTwitterSite() ? '@' . $this->getTwitterSite() : ''),\n\t\t\t\t'creator' => ($creator = $object->getAuthor()->getMetaValue('twitter')) ? '@' . $creator : '',\n\t\t\t\t'title' => $object->getMetaValue('_yoast_wpseo_twitter-title'),\n\t\t\t\t'description' => $object->getMetaValue('_yoast_wpseo_twitter-description'),\n\t\t\t\t'image' => $object->getMetaValue('_yoast_wpseo_twitter-image'),\n\t\t\t);\n\n\t\t\tif (!$twitterData['title']) {\n\t\t\t\t$twitterData['title'] = $object->getPostTitle();\n\t\t\t}\n\t\t\t\n\t\t\tif (!$twitterData['image']) {\n\t\t\t\t$twitterData['image'] = $object->getFeaturedImage() ? $object->getFeaturedImage()->getFullSizeImage() : null;\n\t\t\t}\n\n\t\t\t$this->_addTwitterCard($twitterData);\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "public function getObjectType();", "public function getObjectType();", "public function get_post( $post_id )\n\t{\n\t\t// revisions are not supported for this post type, but still check for future proofing\n\t\t$post_id = ( wp_is_post_revision( $post_id ) ) ? wp_is_post_revision( $post_id ) : $post_id;\n\n\t\t// attempt to get the post\n\t\t$post = get_post( $post_id );\n\n\t\t// confirm that the post exists and is usable\n\t\tif ( ! isset( $post->post_type ) || $post->post_type != $this->post_type_name )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// return the post if found\n\t\treturn $post;\n\t}", "function get_id_post_type($wpdb, $post_type, $title){\n $table = $wpdb->prefix.\"posts\";\n $q = \"SELECT ID as id FROM \".$table.\" WHERE post_type = '\".$post_type.\"' && post_title = '\".$title.\"'\";\n $row = $wpdb->get_results($wpdb->prepare($q));\n\n return $row;\n}", "function get_by_type($type) {\r\n\t\t\t$output = array();\r\n\t\t\t$posts_array = get_posts( 'post_type=' . $type ); \r\n\t\t\tforeach( $posts_array as $post ) {\r\n\t\t\t\tsetup_postdata($post); \r\n\t\t\t\t$output[$post->ID] = $post->post_title ;\r\n\t\t\t}\r\n\t\t\treturn $output;\r\n\t\t}", "function post_types()\n{\n $collection = collect(get_post_types(array( '_builtin' => false ), 'objects'))\n ->pluck('label', 'name')\n ->except(array( 'acf-field', 'acf-field-group', 'wp_stream_alerts', 'wp_area' ))\n ->prepend(get_post_type_object('page')->labels->name, 'page')\n ->prepend(get_post_type_object('post')->labels->name, 'post')\n ->all();\n\n return $collection;\n}", "public function getPostContent();", "public function show(PostType $postType, Post $post)\n\t{\n\t\t\n\t\t MetaTag::setTitle($post->seo->meta_title);\n MetaTag::setDescription($post->seo->meta_description);\n MetaTag::setKeywords($post->seo->meta_keywords);\n MetaTag::setFacebookTags([\n \t'title' => $post->seo->facebook_title, \n \t'description' => $post->seo->facebook_description, \n \t'image' => url($post->getFirstMediaURL( $post->getMediaCollectionName(), 'facebook')) , \n \t'url' => route('posts.show', [$postType->slug, $post->slug]) \n ]);\n MetaTag::setTwitterDescription($post->seo->twitter_description);\n\n\n\t\t$related_posts = $this->postRepos->getAllRelated($post);\n\n //check if youtube url and id exist in the post:\n $youtubeid = \"\";\n if($post->youtube_url != \"\")\n {\n preg_match('/[\\\\?\\\\&]v=([^\\\\?\\\\&]+)/', $post->youtube_url, $matches);\n $youtubeid = $matches[1];\n }\n\n //check the lang availability\n if(Lang::getLocale() ==\"ar\" && !$post->is_ar)\n \treturn view('front.notavailable_ar');\n if(Lang::getLocale() ==\"en\" && !$post->is_en)\n \treturn view('front.notavailable_en');\n\n\t\t//get the view name\n\t\tif( File::exists($this->viewsPath.\"/show-\".$postType->slug.\".blade.php\" ))\n\t\t\t$viewName = \"front.posts.show-\".$postType->slug;\n\t\telse\n\t\t\t$viewName = \"front.posts.show\";\n\t\t\n\t\treturn view($viewName, ['post' => $post, 'related_posts' => $related_posts, 'youtube_id'=>$youtubeid]);\n\n\n\n\n\t}", "function acf_get_post_type_label($post_type)\n{\n}", "function is_single_type($type, $post) {\n if (get_post_type($post->ID) === $type) {\n return true;\n } else {\n return false;\n }\n}", "function getLinkTypePosts($pageFeedLink){\n\t\t$graphObjectArray=getPageContents($pageFeedLink);\n\t\t$fnFilterLinkTypePost=function($post){ return isset($post->picture) && isset($post->name);};\n\t\treturn array_filter($graphObjectArray[\"data\"],$fnFilterLinkTypePost);\n\t}", "public function getObjectType() {\n\t\t$type = $this->object->getType();\n\t\t$subtype = $this->object->getSubtype() ? : 'default';\n\t\t$keys = [\n\t\t\t\"interactions:$type:$subtype\",\n\t\t\t$this->object instanceof Comment ? \"interactions:comment\" : \"interactions:post\",\n\t\t];\n\t\tforeach ($keys as $key) {\n\t\t\tif (elgg_language_key_exists($key, $this->language)) {\n\t\t\t\treturn elgg_echo($key, array(), $this->language);\n\t\t\t}\n\t\t}\n\t\treturn elgg_echo('interactions:post', $this->language);\n\t}", "public static function createPostType() {\n $plural = 'Travel Cards';\n $singular = 'Travel Card';\n $p_lower = strtolower($plural);\n $s_lower = strtolower($singular);\n\n $labels = [\n 'name' => $plural,\n 'singular_name' => $singular,\n 'add_new_item' => \"New $singular\",\n 'edit_item' => \"Edit $singular\",\n 'view_item' => \"View $singular\",\n 'view_items' => \"View $plural\",\n 'search_items' => \"Search $plural\",\n 'not_found' => \"No $p_lower found\",\n 'not_found_in_trash' => \"No $p_lower found in trash\",\n 'parent_item_colon' => \"Parent $singular\",\n 'all_items' => \"All $plural\",\n 'archives' => \"$singular Archives\",\n 'attributes' => \"$singular Attributes\",\n 'insert_into_item' => \"Insert into $s_lower\",\n 'uploaded_to_this_item' => \"Uploaded to this $s_lower\",\n ];\n\n $supports = ['title', 'editor', 'thumbnail', 'excerpt'];\n\n register_post_type( 'travelcard',\n array(\n 'rewrite' => ['slug' => 'travelcard'],\n 'taxonomies' => array('card_category', 'card_tag'),\n 'register_meta_box_cb' => [self::class, 'addMetaBox'],\n 'labels' => $labels,\n 'public' => true,\n 'has_archive' => false,\n 'menu_icon' => 'dashicons-id',\n 'supports' => $supports,\n 'capability_type' => array('travelcard', 'travelcards'),\n 'map_meta_cap' => false,\n 'exclude_from_search' => true,\n )\n );\n }", "function voyage_mikado_get_blog_type($type) {\n\n $blog_query = voyage_mikado_get_blog_query();\n\n $paged = voyage_mikado_paged();\n $blog_classes = '';\n\n if(voyage_mikado_options()->getOptionValue('blog_page_range') != \"\") {\n $blog_page_range = esc_attr(voyage_mikado_options()->getOptionValue('blog_page_range'));\n } else {\n $blog_page_range = $blog_query->max_num_pages;\n }\n $show_load_more = voyage_mikado_enable_load_more();\n\n if($show_load_more) {\n $blog_classes .= ' mkdf-blog-load-more';\n }\n\n $params = array(\n 'blog_query' => $blog_query,\n 'paged' => $paged,\n 'blog_page_range' => $blog_page_range,\n 'blog_type' => $type,\n 'blog_classes' => $blog_classes\n );\n\n voyage_mikado_get_module_template_part('templates/lists/'.$type, 'blog', '', $params);\n }", "public function is_single($post = '')\n {\n }", "public function get_post_type($value='') {\n\t\t\treturn $this->post_type;\n\t\t}", "function voyage_mikado_get_blog($type) {\n\n $sidebar = voyage_mikado_sidebar_layout();\n\n $params = array(\n \"blog_type\" => $type,\n \"sidebar\" => $sidebar\n );\n voyage_mikado_get_module_template_part('templates/lists/holder', 'blog', '', $params);\n }", "public function getPost()\n {\n return $this->hasOne(Post::className(), ['id' => 'post_id']);\n }", "public function posttype()\n\t{\n\t\treturn $this->belongsTo('App\\Models\\Posttype');\n\t}", "public function getBanner() {\n\t\t$ls = DBModel::getByFields('cernet_contest');\n\t\treturn $ls[0]['h_banner'];\n\t}", "public function get_envira_types( $post ) {\n\n $types = array(\n 'default' => __( 'Default', 'envira-gallery' )\n );\n\n return apply_filters( 'envira_gallery_types', $types, $post );\n\n }", "function get_post($post = \\null, $output = \\OBJECT, $filter = 'raw')\n {\n }", "public function getBusinessObjectType()\n {\n return $this->_fields['BusinessObjectType']['FieldValue'];\n }", "public static function get_meta_type();", "public function getPost()\n {\n return $this->hasOne(Posts::className(), ['id' => 'post_id']);\n }", "public function editActionPost(): object\n {\n // Connects to db\n $this->app->db->connect();\n\n // Retrieves contentId\n $contentId = getPost(\"contentId\");\n\n if (!is_numeric($contentId)) {\n return $this->app->response->redirect(\"admin\");\n }\n\n if (hasKeyPost(\"doDelete\")) {\n return $this->app->response->redirect(\"admin/delete&id=$contentId\");\n }\n\n if (hasKeyPost(\"doSave\")) {\n $params = getPost([\n \"contentTitle\",\n \"contentPath\",\n \"contentSlug\",\n \"contentData\",\n \"contentType\",\n \"contentFilter\",\n \"contentPublish\",\n \"contentId\"\n ]);\n\n if (!$params[\"contentSlug\"]) {\n $params[\"contentSlug\"] = slugify($params[\"contentTitle\"]);\n }\n\n if (!$params[\"contentPath\"]) {\n $params[\"contentPath\"] = null;\n }\n\n $params[\"contentFilter\"] = implode(\",\", getPost([\"contentFilter\"]));\n\n // Calls editBlogpost method\n $this->admin->editBlogpost($params);\n\n // Redirects\n return $this->app->response->redirect(\"admin\");\n }\n }", "function tmiGetContentAreas() {\n global $wpdb;\n\n $postType = 'tmi-content-area'; // define your custom post type slug here\n\n $results = $wpdb->get_results( $wpdb->prepare( \"SELECT ID, post_title FROM {$wpdb->posts} WHERE post_type = %s and post_status = 'publish'\", $postType ));\n\n // Return null if we found no results\n if ( ! $results )\n return;\n return $results;\n}", "function nsbr_post_type() {\r\n\r\n $labels = array(\r\n\t\t'name' => _x( 'NSBR', 'Post Type General Name', 'text_domain' ),\r\n\t\t'singular_name' => _x( 'Boat', 'Post Type Singular Name', 'text_domain' ),\r\n\t\t'menu_name' => __( 'NSBR', 'text_domain' ),\r\n\t\t'parent_item_colon' => __( 'Parent Boat:', 'text_domain' ),\r\n\t\t'all_items' => __( 'All Small Boat Registrations', 'text_domain' ),\r\n\t\t'view_item' => __( 'View Boat Registration', 'text_domain' ),\r\n\t\t'add_new_item' => __( 'Add Small Boat Registration', 'text_domain' ),\r\n\t\t'add_new' => __( 'Add Small Boat Registration', 'text_domain' ),\r\n\t\t'edit_item' => __( 'Edit Boat Registration', 'text_domain' ),\r\n\t\t'update_item' => __( 'Update Boat Registration', 'text_domain' ),\r\n\t\t'search_items' => __( 'Search NSBR', 'text_domain' ),\r\n\t\t'not_found' => __( 'Boat Not found in Register', 'text_domain' ),\r\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\r\n\t);\r\n\t$capabilities = array(\r\n\t\t'edit_post' => 'edit_nsbr',\r\n\t\t'read_post' => 'read_nsbr',\r\n\t\t'delete_post' => 'delete_nsbr',\r\n\t\t'edit_posts' => 'edit_nsbr',\r\n\t\t'edit_others_posts' => 'edit_others_nsbr',\r\n\t\t'publish_posts' => 'publish_nsbr',\r\n\t\t'read_private_posts' => 'read_private_nsbr',\r\n\t);\r\n\t$args = array(\r\n\t\t'label' => __( 'nsbr', 'text_domain' ),\r\n\t\t'description' => __( 'National Small Boat Register', 'text_domain' ),\r\n\t\t'labels' => $labels,\r\n\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions',),\r\n\t\t'hierarchical' => false,\r\n\t\t'public' => 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'show_in_admin_bar' => true,\r\n\t\t'menu_position' => 5,\r\n\t\t'can_export' => true,\r\n\t\t'has_archive' => true,\r\n\t\t'exclude_from_search' => false,\r\n\t\t'publicly_queryable' => true,\r\n\t 'capabilities' => $capabilities,\r\n\t);\r\n\tregister_post_type( 'nsbr', $args );\r\n\t\r\n\tadd_role('nsbr_manager', 'NSBR Manager', array(\r\n 'edit_nsbr' => true,\r\n 'edit_others_nsbr' => true,\r\n 'read_nsbr' => true,\r\n 'publish_nsbr' => true,\r\n 'read_private_nsbr' => true,\r\n 'delete_nsbr' => true,\r\n 'read'=> true\r\n ));\r\n \r\n\t add_nsbr_capabilities_to_role( 'curator' );\r\n add_nsbr_capabilities_to_role( 'administrator' );\r\n add_nsbr_capabilities_to_role( 'nmmc_admin' );\r\n}", "function MPU_save_homepage_banner( $post_id, $post ) {\n if ( !isset( $_POST['homepage_banner_nonce'] ) || !wp_verify_nonce( $_POST['homepage_banner_nonce'], basename( __FILE__ ) ) )\n return $post_id;\n\n /* Get the post type object. */\n $post_type = get_post_type_object( $post->post_type );\n\n /* Check if the current user has permission to edit the post. */\n if ( !current_user_can( $post_type->cap->edit_post, $post_id ) )\n return $post_id;\n\n /* Get the meta key. */\n $meta_key = 'MPUhomepagebanner';\n\n /* Get the meta value of the custom field key. */\n $meta_value = get_post_meta( $post_id, $meta_key, true );\n\n /* If a new meta value was added and there was no previous value, add it. */\n if ( $new_meta_value && '' == $meta_value )\n add_post_meta( $post_id, $meta_key, $new_meta_value, true );\n\n /* If the new meta value does not match the old value, update it. */\n elseif ( $new_meta_value && $new_meta_value != $meta_value )\n update_post_meta( $post_id, $meta_key, $new_meta_value );\n\n /* If there is no new meta value but an old value exists, delete it. */\n elseif ( '' == $new_meta_value && $meta_value )\n delete_post_meta( $post_id, $meta_key, $meta_value );\n}", "function post_type_minibanners() {\n\n register_post_type(\n 'minibanners',\n array('label' => __('Mini Banners'),\n 'singular_label' => __('Mini Banner'),\n 'public' => true,\n 'rewrite' => array('slug' => 'mini-banners'), // modify the page slug / permalink\n 'show_ui' => true,\n 'capability_type' => 'post',\n 'hierarchical' => false, //it means we cannot have parent and sub pages\n 'query_var' => false,\n 'exclude_from_search' => true,\n 'supports' => array(\n 'title', // entry title\n 'thumbnail', // featured image\n 'editor', //standard wysywig editor\n 'page-attributes'),\n 'labels' => array(\n 'name' => __( 'Mini Banners' ),\n 'singular_name' => __( 'Mini Banner' ),\n 'add_new' => __( 'Add New' ),\n 'add_new_item' => __( 'Add New Mini Banner' ),\n 'edit' => __( 'Edit' ),\n 'edit_item' => __( 'Edit Mini Banner' ),\n 'new_item' => __( 'New Mini Banner' ),\n 'view' => __( 'View Mini Banners' ),\n 'view_item' => __( 'View Mini Banner' ),\n 'search_items' => __( 'Search Mini Banners' ),\n 'not_found' => __( 'No Mini Banners Found' ),\n 'not_found_in_trash' => __( 'No Mini Banners Found in Trash' ),\n 'parent' => __( 'Parent Mini Banner' )\n )\n )\n\n );\n\n register_taxonomy_for_object_type('post_tag', 'minibanners'); // Change to match custom content name\n}", "public function getBanner()\n {\n return $this->banner;\n }", "public function for_post( $id ) {\n\t\t$indexable = $this->repository->find_by_id_and_type( $id, 'post' );\n\n\t\tif ( ! $indexable ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $this->build_meta( $this->context_memoizer->get( $indexable, 'Post_Type' ) );\n\t}", "public function post()\n {\n return $this->belongsTo(Post::class, 'type_id');\n }", "public function load_source_object()\n\t{\n\t\tif (!is_object($this->post))\n\t\t{\n\t\t\t$this->post = new titania_post();\n\t\t\t$this->post->load($this->attention_object_id);\n\t\t}\n\n\t\treturn (is_object($this->post)) ? true : false;\n\t}" ]
[ "0.68518203", "0.6484236", "0.6368118", "0.6213858", "0.60906625", "0.6071706", "0.59947896", "0.59904826", "0.587064", "0.583413", "0.5824312", "0.5821228", "0.58065045", "0.58001584", "0.5768133", "0.57579136", "0.5737347", "0.5705168", "0.5689725", "0.5676037", "0.5631043", "0.56173414", "0.5585997", "0.5555199", "0.5554241", "0.5552044", "0.5523043", "0.5520681", "0.55178994", "0.546148", "0.5450329", "0.5442567", "0.5385671", "0.5383205", "0.5377601", "0.5374629", "0.5364084", "0.5360583", "0.53558916", "0.53456324", "0.5337399", "0.5337222", "0.532507", "0.53247213", "0.53247213", "0.5312314", "0.52923834", "0.52879584", "0.5271547", "0.52643996", "0.5263237", "0.5260022", "0.5234408", "0.5234071", "0.5231067", "0.52243435", "0.5220161", "0.52186173", "0.5214396", "0.5213351", "0.5187494", "0.5181079", "0.51807004", "0.51725656", "0.5168981", "0.5165494", "0.51652354", "0.51520014", "0.51520014", "0.515198", "0.51496017", "0.51468974", "0.5146091", "0.5141978", "0.5140166", "0.513881", "0.51383936", "0.51318765", "0.5130209", "0.5129793", "0.51296246", "0.5129039", "0.5128692", "0.5124474", "0.51236755", "0.5123432", "0.5119518", "0.5117921", "0.5113678", "0.5112673", "0.51119053", "0.5104716", "0.5098718", "0.5093762", "0.50925803", "0.5084921", "0.50831234", "0.50774544", "0.50754225", "0.507431", "0.50697416" ]
0.0
-1
/ If editing, deleting, or reading a documento, get the post and post type object.
function documento_meta_cap( $caps, $cap, $user_id, $args ) { if ( 'edit_documento' == $cap || 'delete_documento' == $cap || 'read_documento' == $cap ) { $post = get_post( $args[0] ); $post_type = get_post_type_object( $post->post_type ); /* Set an empty array for the caps. */ $caps = array(); } /* If editing a documento, assign the required capability. */ if ( 'edit_documento' == $cap ) { if ( $user_id == $post->post_author ) $caps[] = $post_type->cap->edit_posts; else $caps[] = $post_type->cap->edit_others_posts; } /* If deleting a documento, assign the required capability. */ elseif ( 'delete_documento' == $cap ) { if ( $user_id == $post->post_author ) $caps[] = $post_type->cap->delete_posts; else $caps[] = $post_type->cap->delete_others_posts; } /* If reading a private documento, assign the required capability. */ elseif ( 'read_documento' == $cap ) { if ( 'private' != $post->post_status ) $caps[] = 'read'; elseif ( $user_id == $post->post_author ) $caps[] = 'read'; else $caps[] = $post_type->cap->read_private_posts; } /* Return the capabilities required by the user. */ return $caps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_post_type_object($post_type)\n {\n }", "public function type() { return $this->post->post_type; }", "public static function post_object_type($type, $post) {\n $post_type = get_post_type($post);\n switch ( $post_type ) {\n case \"post\":\n $post_format = get_post_format($post);\n switch ( $post_format ) {\n case \"aside\":\n case \"status\":\n case \"quote\":\n case \"note\":\n $object_type = \"note\";\n break;\n case \"gallery\":\n case \"image\":\n $object_type = \"image\";\n break;\n case \"video\":\n $object_type = \"video\";\n break;\n case \"audio\":\n $object_type = \"audio\";\n break;\n default:\n $object_type = \"article\";\n break;\n }\n break;\n case \"page\":\n $object_type = \"page\";\n break;\n case \"attachment\":\n $mime_type = get_post_mime_type();\n $media_type = preg_replace(\"/(\\/[a-zA-Z]+)/i\", \"\", $mime_type);\n\n switch ($media_type) {\n case 'audio':\n $object_type = \"audio\";\n break;\n case 'video':\n $object_type = \"video\";\n break;\n case 'image':\n $object_type = \"image\";\n break;\n }\n break;\n default:\n $object_type = \"article\";\n break;\n }\n\n return $object_type;\n }", "public static function current_object_type() {\n\t\tglobal $pagenow;\n\t\t$type = 'post';\n\n\t\tif ( in_array( $pagenow, [ 'user-edit.php', 'profile.php', 'user-new.php' ], true ) ) {\n\t\t\t$type = 'user';\n\t\t}\n\n\t\tif ( in_array( $pagenow, [ 'edit-comments.php', 'comment.php' ], true ) ) {\n\t\t\t$type = 'comment';\n\t\t}\n\n\t\tif ( in_array( $pagenow, [ 'edit-tags.php', 'term.php' ], true ) ) {\n\t\t\t$type = 'term';\n\t\t}\n\n\t\tif ( Conditional::is_ajax() && 'add-tag' === Param::post( 'action' ) ) {\n\t\t\t$type = 'term';\n\t\t}\n\n\t\treturn $type;\n\t}", "public function document_type() {\r\n\t\t$class = __CLASS__;\r\n\t\treturn (isset($class::_object()->document_type)) ? $class::_object()->document_type:null;\r\n }", "function get_post_type($post = \\null)\n {\n }", "public function getDocType();", "public static function get_post_type(){\n global $TFUSE;\n return $TFUSE->ext->seek->get_post_type();\n }", "function get_default_post_to_edit($post_type = 'post', $create_in_db = \\false)\n {\n }", "private static final function getDocumentType () {\r\n // Do return ...\r\n return self::$objDocumentType;\r\n }", "function forum_single_document($id, $itemtype) {\n\n // both known item types are posts so get them the same way\n $post = get_record('forum_posts', 'id', $id);\n $discussion = get_record('forum_discussions', 'id', $post->discussion);\n $coursemodule = get_field('modules', 'id', 'name', 'forum');\n $cm = get_record('course_modules', 'course', $discussion->course, 'module', $coursemodule, 'instance', $discussion->forum);\n if ($cm){\n $context = get_context_instance(CONTEXT_MODULE, $cm->id);\n $post->groupid = $discussion->groupid;\n return new ForumSearchDocument(get_object_vars($post), $discussion->forum, $discussion->course, $itemtype, $context->id);\n }\n return null;\n}", "function tc_get_post_type() {\r\n global $post;\r\n\r\n if ( !isset($post) )\r\n return;\r\n \r\n return $post -> post_type;\r\n }", "public function getPostType() {\n\t\treturn $this->post_type;\n\t}", "public function getPostType()\n\t\t{\n\t\t\treturn $this->_postType;\n\t\t}", "public function getPostType(){\n return $this->wpdsPostType;\n }", "public static function post_type(){}", "function readDocumentType($id){\n $obj = new DocumentType($id);\n if($obj->isNew()) return false; else return $obj;\n }", "public function getType()\n {\n return $this->type = $this->get()->post_type;\n }", "protected function get_post_type() {\n\t\tif ( $post = get_post() ) {\n\t\t\treturn get_post_type( $post );\n\t\t}\n\n\t\tif ( isset( $_GET['post'] ) ) {\n\t\t\treturn get_post_type( sanitize_text_field( $_GET['post'] ) );\n\t\t}\n\n\t\tif ( isset( $_GET['post_type'] ) ) {\n\t\t\treturn strtolower( sanitize_text_field( $_GET['post_type'] ) );\n\t\t}\n\n\t\t$req_uri = $_SERVER['REQUEST_URI'];\n\t\t$exploded = explode( '/', $req_uri );\n\t\t$last = end( $exploded );\n\t\t$last = parse_url( $last, PHP_URL_PATH );\n\n\t\tif ( $last === 'post-new.php' || $last === 'edit.php' ) {\n\t\t\treturn 'post';\n\t\t}\n\n\t\treturn '';\n\t}", "abstract protected function post_type();", "public static function post_is_object(){\n if( count($_POST)>=1) return (object)$_POST;\n }", "function wp_get_single_post($postid = 0, $mode = \\OBJECT)\n {\n }", "function OPS_get_post($id) {\r\n\tglobal $wpdb;\r\n\t$post = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID=$id\");\r\n\tif ($post->post_type == \"revision\"){\r\n\t\t$id = $post->post_parent;\r\n\t\t$post = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID=$id\");\r\n\t}\r\n\treturn $post[0];\r\n}", "public function getPost()\n {\n if (!$this->hasPost()) {\n $this->setPost(false);\n\n if ($post = $this->registry->registry('wordpress_post')) {\n if ($post->getPostType() === 'page') {\n $this->setPost($post);\n }\n } \n }\n\n return $this->_getData('post');\n }", "public function getDocumentType() {\n return $this->document['type'];\n }", "function get_post_type_advanced() {\n\n $post_type = get_post_type();\n\n if( is_post_type_archive() ) {\n $post_type = get_query_var( 'post_type' );\n }\n\n if( is_tax() ) {\n $post_type = get_taxonomy( get_queried_object()->taxonomy )->object_type[0];\n }\n\n return $post_type;\n}", "public function getDocumentType()\n {\n return $this->_documentType;\n }", "public function get_post_type() {\n\t\treturn $this->post_type_key;\n\t}", "public function getPostType(): string {\n return $this->post_type;\n }", "public function getDocumentType()\n {\n return $this->document_type;\n }", "public function type()\n\t{\n\t\treturn $this->belongsTo('Lainga9\\BallDeep\\app\\PostType', 'post_type_id');\n\t}", "public function getTipoDocumento( ){\n\t\t\treturn $this->tipoDocumento;\n\t\t}", "private function getPost($post)\n {\n if ($post instanceof WP_post) {\n return $post;\n } elseif (is_int($post) === true) {\n return $this->objectHandler->getPost($post);\n } elseif (isset($post->ID) === true) {\n return $this->objectHandler->getPost($post->ID);\n }\n\n return false;\n }", "public function editActionPost(): object\n {\n // Connects to db\n $this->app->db->connect();\n\n // Retrieves contentId\n $contentId = getPost(\"contentId\");\n\n if (!is_numeric($contentId)) {\n return $this->app->response->redirect(\"admin\");\n }\n\n if (hasKeyPost(\"doDelete\")) {\n return $this->app->response->redirect(\"admin/delete&id=$contentId\");\n }\n\n if (hasKeyPost(\"doSave\")) {\n $params = getPost([\n \"contentTitle\",\n \"contentPath\",\n \"contentSlug\",\n \"contentData\",\n \"contentType\",\n \"contentFilter\",\n \"contentPublish\",\n \"contentId\"\n ]);\n\n if (!$params[\"contentSlug\"]) {\n $params[\"contentSlug\"] = slugify($params[\"contentTitle\"]);\n }\n\n if (!$params[\"contentPath\"]) {\n $params[\"contentPath\"] = null;\n }\n\n $params[\"contentFilter\"] = implode(\",\", getPost([\"contentFilter\"]));\n\n // Calls editBlogpost method\n $this->admin->editBlogpost($params);\n\n // Redirects\n return $this->app->response->redirect(\"admin\");\n }\n }", "protected function get_object_type()\n {\n }", "function getObjtype() {\n return $this->objtype;\n }", "public function getEntityType() {\n\t\treturn self::ELASTICSEARCH_TYPE_DOCUMENT;\n\t}", "public function getPost()\n {\n return $this->hasOne(PostForm::className(), ['_id' => 'post_id']);\n }", "function dtm_get_post_id( $post_type, $post_id ) {\n\t//$accepted_post_type = array( 'article', 'listicle' );\n\t//$post_type = self::get_post_type( $post_type );\n\t//if ( WP_Base::is_toh() ) {\n\t//\tif ( in_array( $post_type, $accepted_post_type ) ) {\n\t//\t\treturn ( '' );\n\t//\t}\n\t//\n\t//\tif ( WP_Base::is_recipe() ) {\n\t//\t\treturn get_post_meta( $post_id, 'rms_legacy_id', true );\n\t//\t}\n\t//}\n\t$post_id = apply_filters( 'dtm_wordpress_content_id', $post_id );\n\n\treturn $post_id;\n}", "function get_parent_post_type ($post) {\n /* Get an array of Ancestors and Parents if they exist */\n\t$parents = get_post_ancestors( $post->ID );\n /* Get the top Level post->ID count base 1, array base 0 so -1 */ \n\t$id = ($parents) ? $parents[count($parents)-1]: $post->ID;\n\t/* Get the parent type */\n $parent = get_post( $id );\n\t$type = $parent->post_type;\n\t\nreturn $type;\n}", "function get_post_types() {\n\tglobal $rf_custom_posts;\n\n\t$post = new PostType();\n\t$cpts = $post->get_admin_post_pages();\n\n\t$cpts = array_merge($cpts, $rf_custom_posts);\n\t$cpts = apply_filters(\"admin/post_types\", $cpts);\n\n\treturn $cpts;\n}", "public function getObjectType() {\n\t\t$type = $this->object->getType();\n\t\t$subtype = $this->object->getSubtype() ? : 'default';\n\t\t$keys = [\n\t\t\t\"interactions:$type:$subtype\",\n\t\t\t$this->object instanceof Comment ? \"interactions:comment\" : \"interactions:post\",\n\t\t];\n\t\tforeach ($keys as $key) {\n\t\t\tif (elgg_language_key_exists($key, $this->language)) {\n\t\t\t\treturn elgg_echo($key, array(), $this->language);\n\t\t\t}\n\t\t}\n\t\treturn elgg_echo('interactions:post', $this->language);\n\t}", "public function modelForPost(\\WP_Post $post)\n {\n if (! $post) {\n return;\n }\n\n $result = null;\n\n if (isset($this->modelCache[\"m-$post->ID\"])) {\n return $this->modelCache[\"m-$post->ID\"];\n }\n\n if (isset($this->modelFactories[$post->post_type])) {\n $result = call_user_func_array($this->modelFactories[$post->post_type], [$this, $post]);\n } elseif (isset($this->config['model-map'][$post->post_type])) {\n $className = $this->config['model-map'][$post->post_type];\n if (class_exists($className)) {\n $result = new $className($this, $post);\n }\n }\n\n if (! $result) {\n if ($post->post_type == 'attachment') {\n $result = new Attachment($this, $post);\n } elseif ($post->post_type == 'page') {\n $result = new Page($this, $post);\n } else {\n $result = new Post($this, $post);\n }\n }\n\n if ($result) {\n $this->modelCache[\"m-$post->ID\"] = $result;\n }\n\n return $result;\n }", "public function type()\n {\n return $this->belongsTo('App\\Models\\DocField');\n }", "public function getDocumentType() {\n\t\tif($this->document_type == 'DOCUMENT' && $this->document_id)\n\t\t\treturn Yii::t('store', $this->document->document_type);\n\t\telse\n\t\t\treturn Yii::t('store', $this->document_type);\n\t}", "public function getObjectType();", "public function getObjectType();", "function wp_getPostType( $args ) {\n\n global $wp_xmlrpc_server;\n $wp_xmlrpc_server->escape( $args );\n\n $blog_ID = (int) $args[0];\n $username = $args[1];\n $password = $args[2];\n $post_type_name = $args[3];\n\n if ( !$user = $wp_xmlrpc_server->login( $username, $password ) )\n return $wp_xmlrpc_server->error;\n\n $post_type_names = get_post_types('', 'names');\n\n if( ! in_array( $post_type_name, $post_type_names ) )\n return new IXR_Error( 403, __( 'The post type specified is not valid' ) );\n\n $post_type = get_post_type_object( $post_type_name );\n\n //capability check\n if( ! current_user_can( $post_type->cap->edit_posts ) )\n return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post type' ) );\n\n $post_type = (array)$post_type;\n\n $post_type_data = array(\n 'labels' => $post_type['labels'],\n 'description' => $post_type['description'],\n 'capability_type' => $post_type['capability_type'],\n 'cap' => $post_type['cap'],\n 'map_meta_cap' => $post_type['map_meta_cap'],\n 'hierarchical' => $post_type['hierarchical'],\n 'menu_position' => $post_type['menu_position'],\n 'taxonomies' => get_object_taxonomies( $post_type['name'] ),\n );\n\n return $post_type_data;\n \n}", "public function get()\n {\n return $this->object = get_post($this->id);\n }", "public function getCompanyTypeDoc()\n {\n return $this->hasOne(CompanyTypeDocument::className(), ['id' => 'company_type_doc_id']);\n }", "public function get_post_types(){ return $this->post_types; }", "public function postType()\n {\n return $this->belongsTo(PostType::class);\n }", "public function posttype()\n\t{\n\t\treturn $this->belongsTo('App\\Models\\Posttype');\n\t}", "function diversity_get_header_content_type( $content_type, $obj ) {\n\tif ( $obj instanceof WP_Post ) {\n\t\t$post_type = $obj->post_type;\n\n\t\tif ( $post_type === 'post' ) {\n\t\t\t$content_type = 'post';\n\t\t}\n\t}\n\n\treturn $content_type;\n}", "function get_post_data() {\n\t\tif (empty($this->post)) :\n\t\t\t$this->post = get_post( $this->id );\n\t\tendif;\n\t\t\n\t\treturn $this->post;\n\t}", "private function getServicePostDoc()\n {\n return $this->container->get('app_service_post_doc');\n }", "protected function get_fields() {\n\t\treturn rwmb_get_registry( 'field' )->get_by_object_type( 'post' );\n\t}", "public function getObjType()\r\n {\r\n return $this->objType;\r\n }", "function get_form_type()\n {\n return is_array($this->object->context) ? $this->object->context[0] : $this->object->context;\n }", "public function get_post_type($value='') {\n\t\t\treturn $this->post_type;\n\t\t}", "function dtm_get_wordpress_content_id( $post_type, $post_id ) {\n\t//$post_type = self::get_post_type( $post_type );\n\t//if ( WP_Base::is_toh() ) {\n\t//\tif ( in_array( $post_type, $accepted_post_type ) ) {\n\t//\t\treturn ( $post_id );\n\t//\t}\n\t//}\n\t$content_id = apply_filters( 'dtm_wordpress_content_id', '' );\n\n\treturn $content_id;\n}", "public function objType()\n {\n return $this->objType;\n }", "function get_post($post = \\null, $output = \\OBJECT, $filter = 'raw')\n {\n }", "private function get_post_type()\n {\n $post_id = get_the_ID();\n\n // Check post for post type\n if( $post_id )\n {\n return get_post_type($post_id);\n }\n\n // Check query vars for post type\n if( $post_type = get_query_var('post_type') )\n {\n return $post_type;\n }\n\n // No post type found\n return '';\n\n }", "private function _get_relatives_of_object_by_type( $post_type ) {\n\t\t// Set up meta key fragments.\n\t\t$meta_key_fragments = array(\n\t\t\t'prefix' => $prefix,\n\t\t\t'type' => $post_type,\n\t\t);\n\n\t\t// Generate meta key.\n\t\t$meta_key = '_' . implode( '_', $meta_key_fragments );\n\n\t\treturn get_metadata( $this->type, $this->id, $meta_key, false );\n\t}", "private function WP_Post_types($graph, $post) {\r\n if ($post->post_type == 'post') {\r\n $post_resource = $graph->resource($post->guid);\r\n $post_resource->add('rdf:type', $graph->resource('sioc:BlogPost'));\r\n }\r\n\r\n return $graph;\r\n }", "function acf_get_object_type($object_type, $object_subtype = '')\n{\n}", "public function testForcesAContentTypeOfPost(){\n\t\t$data = array(\n\t\t\t'Post'=>array(\n\t\t\t\t'controller'=>'Test',\n\t\t\t\t'controller'=>'test_action',\n\t\t\t\t'content_type'=>'post'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$this->Post->save($data);\n\t\t\n\t\t$results = $this->Post->find(\n\t\t\t'first',\n\t\t\tarray(\n\t\t\t\t'conditions'=>array(\n\t\t\t\t\t'Post.id' => $this->Post->id\n\t\t\t\t),\n\t\t\t\t'contain'=>array()\n\t\t\t)\n\t\t);\n\t\t\n\t\t$this->assertEqual($results['Post']['content_type'], 'post');\n\t}", "protected function _applyPostPageLogic($object, $type = 'post')\n\t{\n\t\tif ($object->isBlogListingPage()) {\n\t\t\t//$this->_addRelNextPrev($object, __METHOD__);\n\t\t}\n\t\t\n\t\t$meta = new Varien_Object(array(\n\t\t\t'title' => $this->_getTitleFormat($object->getPostType()),\n\t\t\t'description' => trim($this->getData('metadesc_' . $object->getPostType())),\n\t\t\t'keywords' => trim($this->getData('metakey_' . $object->getPostType())),\n\t\t));\n\n\t\tif (($value = trim($object->getMetaValue('_yoast_wpseo_title'))) !== '') {\n \t\t$meta->setTitle($value);\n#\t\t\t$data = $this->getRewriteData();\n#\t\t\t$data['title'] = $value;\n#\t\t\t$this->setRewriteData($data);\n\t\t}\n\t\t\n\t\tif (($value = trim($object->getMetaValue('_yoast_wpseo_metadesc'))) !== '') {\n\t\t\t$meta->setDescription($value);\n\t\t}\n\t\t\n\t\tif (($value = trim($object->getMetaValue('_yoast_wpseo_metakeywords'))) !== '') {\n\t\t\t$meta->setKeywords($value);\n\t\t}\n\t\t\n\t\t$robots = array();\n\n\t\t$noIndex = (int)$object->getMetaValue('_yoast_wpseo_meta-robots-noindex');\n\n\t\tif ($noIndex === 0) {\n\t\t\t$robots['index'] = '';\n\t\t}\n\t\telse if ($noIndex === 1) {\n\t\t\t$robots['noindex'] = '';\n\t\t}\n\t\telse if ($noIndex === 2) {\n\t\t\t$robots['index'] = '';\n\t\t}\n\t\telse if ((int)$this->getData('noindex_' . $object->getPostType()) === 1) {\n\t\t\t$robots['noindex'] = '';\n\t\t}\n\n\t\tif ($object->getMetaValue('_yoast_wpseo_meta-robots-nofollow')) {\n\t\t\t$robots['nofollow'] = '';\n\t\t}\n\t\telse {\n\t\t\t$robots['follow'] = '';\n\t\t}\n\n\t\tif (($advancedRobots = trim($object->getMetaValue('_yoast_wpseo_meta-robots-adv'))) !== '') {\n\t\t\tif ($advancedRobots !== 'none') {\n\t\t\t\t$robots = explode(',', $advancedRobots);\n\t\t\t}\n\t\t}\n\n\t\t/* Allow custom fields in meta data */\n\t\t$data = $this->getRewriteData();\n\t\t\n\t\tforeach($meta->getData() as $key => $value) {\n\t\t\tif (strpos($value, '%%cf_') !== false) {\n\t\t\t\tif (preg_match_all('/%%cf_([^%]+)%%/', $value, $matches)) {\n\t\t\t\t\tforeach($matches[1] as $customField) {\n\t\t\t\t\t\t$data['cf_' . $customField] = $object->getMetaValue($customField);\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->setRewriteData($data);\n\n\t\t$robots = array_keys($robots);\n\n\t\tif (count($robots) > 0) {\n\t\t\t$meta->setRobots(implode(',', $robots));\n\t\t}\n\n\t\tif (!$meta->getDescription()) {\n\t\t\t$meta->setDescription($object->getMetaDescription());\n\t\t}\n\t\t\n\t\t$this->_applyMeta($meta->getData());\n\n\t\tif ($canon = $object->getMetaValue('_yoast_wpseo_canonical')) {\n\t\t\t$object->setCanonicalUrl($canon);\n\t\t}\n\t\t\n\t\tif (!$this->hasOpengraph() || (int)$this->getOpengraph() ===1) {\n\t\t\t$this->_addPostOpenGraphTags($object, $object->getPostType());\n\t\t}\n\t\t\n\t\tif ($this->getTwitter()) {\n\t\t\t$twitterData = array(\n\t\t\t\t'card' => $this->getTwitterCardType(),\n\t\t\t\t'site' => ($this->getTwitterSite() ? '@' . $this->getTwitterSite() : ''),\n\t\t\t\t'creator' => ($creator = $object->getAuthor()->getMetaValue('twitter')) ? '@' . $creator : '',\n\t\t\t\t'title' => $object->getMetaValue('_yoast_wpseo_twitter-title'),\n\t\t\t\t'description' => $object->getMetaValue('_yoast_wpseo_twitter-description'),\n\t\t\t\t'image' => $object->getMetaValue('_yoast_wpseo_twitter-image'),\n\t\t\t);\n\n\t\t\tif (!$twitterData['title']) {\n\t\t\t\t$twitterData['title'] = $object->getPostTitle();\n\t\t\t}\n\t\t\t\n\t\t\tif (!$twitterData['image']) {\n\t\t\t\t$twitterData['image'] = $object->getFeaturedImage() ? $object->getFeaturedImage()->getFullSizeImage() : null;\n\t\t\t}\n\n\t\t\t$this->_addTwitterCard($twitterData);\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "public function get_post( $post_id )\n\t{\n\t\t// revisions are not supported for this post type, but still check for future proofing\n\t\t$post_id = ( wp_is_post_revision( $post_id ) ) ? wp_is_post_revision( $post_id ) : $post_id;\n\n\t\t// attempt to get the post\n\t\t$post = get_post( $post_id );\n\n\t\t// confirm that the post exists and is usable\n\t\tif ( ! isset( $post->post_type ) || $post->post_type != $this->post_type_name )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// return the post if found\n\t\treturn $post;\n\t}", "public function getModel()\n {\n $post = Post::class;\n return $post;\n }", "private function get_post_types() {\n\n\t\t$output = 'names'; // names or objects, note names is the default\n\t\t$operator = 'and'; // 'and' or 'or'\n\n\t\t// Collate builtin and custom post-types\n\t\t$builtin_post_types = get_post_types( array( 'public' => true, '_builtin' => true ), $output, $operator );\n\t\t$custom_post_types = get_post_types( array( \n\t\t\t// Perhaps later introduce an option to select whether to include non-public CPTs as well.\n\t\t\t//'public' => true, \n\t\t\t'_builtin' => false \n\t\t\t), \n\t\t$output, $operator );\n\t\t$post_types = array_merge( $builtin_post_types, $custom_post_types );\n\n\t\treturn $post_types;\n\t}", "function get_post_mime_type($post = \\null)\n {\n }", "function get_post_status_object($post_status)\n {\n }", "public function getDocumentType()\n {\n $value = $this->get(self::DOCUMENTTYPE);\n return $value === null ? (integer)$value : $value;\n }", "private function getObjType($obj){\n\t\t\t$query = new Query();\n\n\t\t\t$query->tables = array(\"tbloggetti\");\n\t\t\t$query->fields = array(\"TipoOggetto\");\n\t\t\t$query->filters = \"ID=\".$obj;\n\n\t\t\tif ($query->Open()){\n\t\t\t\t$row = $query->GetNextRecord();\n\t\t\t\treturn $row[0];\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}", "public function getTipoDocumento($argTipoPessoa){\n \t$tipo_pessoa_fisica = $this->getTipoPessoaFisica();\n \tif ($argTipoPessoa===$tipo_pessoa_fisica['tipo_pessoa']){\n \t\treturn $tipo_pessoa_fisica['tipo_documento'];\n \t}\n \t$tipo_pessoa_juridica = $this->getTipoPessoaJuridica();\n \tif ($argTipoPessoa===$tipo_pessoa_juridica['tipo_pessoa']){\n \t\treturn $tipo_pessoa_juridica['tipo_documento'];\n \t}\n \treturn '';\n }", "function post_types()\n{\n $collection = collect(get_post_types(array( '_builtin' => false ), 'objects'))\n ->pluck('label', 'name')\n ->except(array( 'acf-field', 'acf-field-group', 'wp_stream_alerts', 'wp_area' ))\n ->prepend(get_post_type_object('page')->labels->name, 'page')\n ->prepend(get_post_type_object('post')->labels->name, 'post')\n ->all();\n\n return $collection;\n}", "private function processPost(WP_Post $post): ?WP_Post\n {\n $post->post_title .= $this->adminOutput((string) $post->post_type, $post->ID);\n\n if ($this->accessHandler->checkObjectAccess($post->post_type, $post->ID) === false) {\n if ($this->removePostFromList($post->post_type) === true) {\n return null;\n }\n\n $post->post_content = $this->processPostContent($post);\n\n if ($this->mainConfig->hidePostTypeTitle($post->post_type) === true) {\n $post->post_title = $this->mainConfig->getPostTypeTitle($post->post_type);\n }\n\n if ($this->mainConfig->lockPostTypeComments($post->post_type) === true) {\n $post->comment_status = 'close';\n }\n }\n\n return $post;\n }", "public function getPostsTypes()\n\t {\n\t \t$args = array(\n\t\t\t 'public' => true,\n\t\t\t '_builtin' => false\n\t\t\t);\n\n\t\t\t$output = 'names'; // names or objects, note names is the default\n\t\t\t$operator = 'and'; // 'and' or 'or'\n\t\t\t$post_types = get_post_types( $args, $output, $operator ); \n\n\t\t\treturn $post_types;\n\t }", "public function getType_documents()\n {\n return $this->fv_type_documents_branch;\n }", "public function getTypeObject()\n {\n return $this->typeObject;\n }", "public function getObjectIdentifier()\n {\n return $this->type;\n }", "public function get_post_types() {\n\n\t\treturn $this->post_type;\n\n\t}", "public function getPageType();", "public function getPageType();", "function wp_getPostTypes( $args ) {\n\n global $wp_xmlrpc_server;\n $wp_xmlrpc_server->escape( $args );\n\n $blog_ID = (int) $args[0];\n $username = $args[1];\n $password = $args[2];\n\n if ( ! $user = $wp_xmlrpc_server->login( $username, $password ) )\n return $wp_xmlrpc_server->error;\n\n $post_types = get_post_types( '','objects' );\n\n $struct = array();\n\n foreach( $post_types as $post_type ) {\n\n // capability check for post_types\n if( ! current_user_can( $post_type->cap->edit_posts ) )\n continue;\n\n $post_type = (array)$post_type;\n\n $post_type_data = array(\n 'labels' => $post_type['labels'],\n 'description' => $post_type['description'],\n 'capability_type' => $post_type['capability_type'],\n 'cap' => $post_type['cap'],\n 'map_meta_cap' => $post_type['map_meta_cap'],\n 'hierarchical' => $post_type['hierarchical'],\n 'menu_position' => $post_type['menu_position'],\n 'taxonomies' => get_object_taxonomies( $post_type['name'] ),\n );\n\n $struct[ $post_type['name'] ] = $post_type_data;\n\n }\n\n return $struct;\n \n}", "function getPostObject($post_id) {\n\t\t$post_url = get_permalink($post_id);\n\t\t$title = strip_tags(get_the_title($post_id));\n\t\t$tagObjects = get_the_tags($post_id);\n\t\t$single = is_single();\n\t\t$tags = \"\";\n\t\tif (!empty($tagObjects)) {\n\t\t\t$tags .= $tagObjects[0]->name;\n\t\t\tfor ($i = 1; $i < count($tagObjects); $i++) {\n\t\t\t\t$tags .= \",\".$tagObjects[$i]->name;\n\t\t\t}\n\t\t}\n\t\t$category = get_the_category($post_id);\n\t\t$categories = \"\";\n\t\tif (!empty($category)) {\n\t\t\t$categories .= $category[0]->name;\n\t\t\tfor ($i=1; $i<count($category); $i++) {\n\t\t\t\t$categories .= \",\".$category[$i]->name;\n\t\t\t}\n\t\t}\n\t\t$author = get_the_author();\n\t\t$date = get_the_date('U', $post_id) * 1000;\n\t\t$comments = get_comments_number($post_id);\n\n\t\t$tmdb = get_post_meta($post_id,'imdb_id');\n\n\t\t$post_object = array(\n\t\t\t'id' => $post_id,\n\t\t\t'url' => $post_url,\n\t\t\t'title' => $title,\n\t\t\t'tags' => $tags,\n\t\t\t'categories' => $categories,\n\t\t\t'comments' => $comments,\n\t\t\t'date' => $date,\n\t\t\t'author' => $author,\n\t\t\t'single' => $single,\n\t\t\t'img' => get_the_post_thumbnail_url($post_id),\n\t\t\t'tmdb' => $tmdb\n\t\t);\n\t\treturn $post_object;\n\t}", "function wp_list_post_revisions($post = 0, $type = 'all')\n {\n }", "public function post()\n {\n return $this->belongsTo(Post::class, 'type_id');\n }", "function _find_post_by_old_date($post_type)\n {\n }", "public function get_post() {\n\n return $this->_post;\n }", "public function getPost(): Post\n {\n return $this->post;\n }", "function acf_get_post_types($args = array())\n{\n}", "public static function get_class_post_type()\n {\n return self::$post_type;\n }", "public static function get_class_post_type()\n {\n return self::$post_type;\n }", "public function test__GetPost()\n\t{\n\t\t$this->assertThat(\n\t\t\t$this->object->objects->post,\n\t\t\t$this->isInstanceOf('JAmazons3OperationsObjectsPost')\n\t\t);\n\t}", "protected abstract function get_rest_field_type();", "function get_translatable_documents($icl_post_types)\n {\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}", "function ee_get_post_types($post_types, $args)\n {\n }" ]
[ "0.73914164", "0.68031377", "0.6777489", "0.65495366", "0.6459245", "0.64289093", "0.63469017", "0.63322234", "0.6316179", "0.63037974", "0.6279231", "0.62593293", "0.62112105", "0.61820495", "0.6168927", "0.60844034", "0.60842794", "0.60195357", "0.6005012", "0.59869474", "0.5982826", "0.5960627", "0.5957962", "0.59555525", "0.59470737", "0.5922654", "0.5917869", "0.59142625", "0.5910792", "0.5903225", "0.586794", "0.586647", "0.58430403", "0.5814883", "0.5808997", "0.5808116", "0.5807681", "0.57613254", "0.5737169", "0.57218", "0.571942", "0.57154936", "0.5715324", "0.5715284", "0.57058597", "0.5683035", "0.5683035", "0.5681774", "0.56782895", "0.56772894", "0.56430733", "0.5623307", "0.56217253", "0.5560283", "0.5553677", "0.55320877", "0.55316955", "0.550649", "0.5504139", "0.5503337", "0.54970145", "0.54933167", "0.54828113", "0.5475788", "0.546721", "0.54558563", "0.54515064", "0.54480565", "0.54460967", "0.54326445", "0.54141724", "0.5396662", "0.5385789", "0.53777647", "0.5375692", "0.53752923", "0.5368621", "0.5361981", "0.53425395", "0.53412145", "0.5336152", "0.5320054", "0.531073", "0.53077793", "0.53066665", "0.53066665", "0.53060293", "0.5302737", "0.5297125", "0.5295412", "0.52942187", "0.52917004", "0.5284084", "0.52740526", "0.526959", "0.526959", "0.5269381", "0.52687067", "0.5261603", "0.5260928", "0.5251355" ]
0.0
-1
/ If editing, deleting, or reading a convocatoria, get the post and post type object.
function convocatoria_meta_cap( $caps, $cap, $user_id, $args ) { if ( 'edit_convocatoria' == $cap || 'delete_convocatoria' == $cap || 'read_convocatoria' == $cap ) { $post = get_post( $args[0] ); $post_type = get_post_type_object( $post->post_type ); /* Set an empty array for the caps. */ $caps = array(); } /* If editing a convocatoria, assign the required capability. */ if ( 'edit_convocatoria' == $cap ) { if ( $user_id == $post->post_author ) $caps[] = $post_type->cap->edit_posts; else $caps[] = $post_type->cap->edit_others_posts; } /* If deleting a convocatoria, assign the required capability. */ elseif ( 'delete_convocatoria' == $cap ) { if ( $user_id == $post->post_author ) $caps[] = $post_type->cap->delete_posts; else $caps[] = $post_type->cap->delete_others_posts; } /* If reading a private convocatoria, assign the required capability. */ elseif ( 'read_convocatoria' == $cap ) { if ( 'private' != $post->post_status ) $caps[] = 'read'; elseif ( $user_id == $post->post_author ) $caps[] = 'read'; else $caps[] = $post_type->cap->read_private_posts; } /* Return the capabilities required by the user. */ return $caps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_post_type_object($post_type)\n {\n }", "public function type() { return $this->post->post_type; }", "public static function post_object_type($type, $post) {\n $post_type = get_post_type($post);\n switch ( $post_type ) {\n case \"post\":\n $post_format = get_post_format($post);\n switch ( $post_format ) {\n case \"aside\":\n case \"status\":\n case \"quote\":\n case \"note\":\n $object_type = \"note\";\n break;\n case \"gallery\":\n case \"image\":\n $object_type = \"image\";\n break;\n case \"video\":\n $object_type = \"video\";\n break;\n case \"audio\":\n $object_type = \"audio\";\n break;\n default:\n $object_type = \"article\";\n break;\n }\n break;\n case \"page\":\n $object_type = \"page\";\n break;\n case \"attachment\":\n $mime_type = get_post_mime_type();\n $media_type = preg_replace(\"/(\\/[a-zA-Z]+)/i\", \"\", $mime_type);\n\n switch ($media_type) {\n case 'audio':\n $object_type = \"audio\";\n break;\n case 'video':\n $object_type = \"video\";\n break;\n case 'image':\n $object_type = \"image\";\n break;\n }\n break;\n default:\n $object_type = \"article\";\n break;\n }\n\n return $object_type;\n }", "function tc_get_post_type() {\r\n global $post;\r\n\r\n if ( !isset($post) )\r\n return;\r\n \r\n return $post -> post_type;\r\n }", "public function getPostType() {\n\t\treturn $this->post_type;\n\t}", "public function getPostType()\n\t\t{\n\t\t\treturn $this->_postType;\n\t\t}", "public static function post_type(){}", "public function getPostType(){\n return $this->wpdsPostType;\n }", "function get_post_type($post = \\null)\n {\n }", "public static function current_object_type() {\n\t\tglobal $pagenow;\n\t\t$type = 'post';\n\n\t\tif ( in_array( $pagenow, [ 'user-edit.php', 'profile.php', 'user-new.php' ], true ) ) {\n\t\t\t$type = 'user';\n\t\t}\n\n\t\tif ( in_array( $pagenow, [ 'edit-comments.php', 'comment.php' ], true ) ) {\n\t\t\t$type = 'comment';\n\t\t}\n\n\t\tif ( in_array( $pagenow, [ 'edit-tags.php', 'term.php' ], true ) ) {\n\t\t\t$type = 'term';\n\t\t}\n\n\t\tif ( Conditional::is_ajax() && 'add-tag' === Param::post( 'action' ) ) {\n\t\t\t$type = 'term';\n\t\t}\n\n\t\treturn $type;\n\t}", "abstract protected function post_type();", "function get_default_post_to_edit($post_type = 'post', $create_in_db = \\false)\n {\n }", "public function getPost()\n {\n if (!$this->hasPost()) {\n $this->setPost(false);\n\n if ($post = $this->registry->registry('wordpress_post')) {\n if ($post->getPostType() === 'page') {\n $this->setPost($post);\n }\n } \n }\n\n return $this->_getData('post');\n }", "public function getPostType(): string {\n return $this->post_type;\n }", "public function getType()\n {\n return $this->type = $this->get()->post_type;\n }", "public function getPost()\n {\n return $this->hasOne(PostForm::className(), ['_id' => 'post_id']);\n }", "public static function get_post_type(){\n global $TFUSE;\n return $TFUSE->ext->seek->get_post_type();\n }", "public function type()\n\t{\n\t\treturn $this->belongsTo('Lainga9\\BallDeep\\app\\PostType', 'post_type_id');\n\t}", "function get_post_data() {\n\t\tif (empty($this->post)) :\n\t\t\t$this->post = get_post( $this->id );\n\t\tendif;\n\t\t\n\t\treturn $this->post;\n\t}", "private function getPost($post)\n {\n if ($post instanceof WP_post) {\n return $post;\n } elseif (is_int($post) === true) {\n return $this->objectHandler->getPost($post);\n } elseif (isset($post->ID) === true) {\n return $this->objectHandler->getPost($post->ID);\n }\n\n return false;\n }", "public function get_post_type() {\n\t\treturn $this->post_type_key;\n\t}", "public static function post_is_object(){\n if( count($_POST)>=1) return (object)$_POST;\n }", "protected function get_post_type() {\n\t\tif ( $post = get_post() ) {\n\t\t\treturn get_post_type( $post );\n\t\t}\n\n\t\tif ( isset( $_GET['post'] ) ) {\n\t\t\treturn get_post_type( sanitize_text_field( $_GET['post'] ) );\n\t\t}\n\n\t\tif ( isset( $_GET['post_type'] ) ) {\n\t\t\treturn strtolower( sanitize_text_field( $_GET['post_type'] ) );\n\t\t}\n\n\t\t$req_uri = $_SERVER['REQUEST_URI'];\n\t\t$exploded = explode( '/', $req_uri );\n\t\t$last = end( $exploded );\n\t\t$last = parse_url( $last, PHP_URL_PATH );\n\n\t\tif ( $last === 'post-new.php' || $last === 'edit.php' ) {\n\t\t\treturn 'post';\n\t\t}\n\n\t\treturn '';\n\t}", "function get_post_type_advanced() {\n\n $post_type = get_post_type();\n\n if( is_post_type_archive() ) {\n $post_type = get_query_var( 'post_type' );\n }\n\n if( is_tax() ) {\n $post_type = get_taxonomy( get_queried_object()->taxonomy )->object_type[0];\n }\n\n return $post_type;\n}", "public function getObjectType() {\n\t\t$type = $this->object->getType();\n\t\t$subtype = $this->object->getSubtype() ? : 'default';\n\t\t$keys = [\n\t\t\t\"interactions:$type:$subtype\",\n\t\t\t$this->object instanceof Comment ? \"interactions:comment\" : \"interactions:post\",\n\t\t];\n\t\tforeach ($keys as $key) {\n\t\t\tif (elgg_language_key_exists($key, $this->language)) {\n\t\t\t\treturn elgg_echo($key, array(), $this->language);\n\t\t\t}\n\t\t}\n\t\treturn elgg_echo('interactions:post', $this->language);\n\t}", "public function postType()\n {\n return $this->belongsTo(PostType::class);\n }", "function get_post($post = \\null, $output = \\OBJECT, $filter = 'raw')\n {\n }", "public function posttype()\n\t{\n\t\treturn $this->belongsTo('App\\Models\\Posttype');\n\t}", "public function get()\n {\n return $this->object = get_post($this->id);\n }", "function wp_getPostType( $args ) {\n\n global $wp_xmlrpc_server;\n $wp_xmlrpc_server->escape( $args );\n\n $blog_ID = (int) $args[0];\n $username = $args[1];\n $password = $args[2];\n $post_type_name = $args[3];\n\n if ( !$user = $wp_xmlrpc_server->login( $username, $password ) )\n return $wp_xmlrpc_server->error;\n\n $post_type_names = get_post_types('', 'names');\n\n if( ! in_array( $post_type_name, $post_type_names ) )\n return new IXR_Error( 403, __( 'The post type specified is not valid' ) );\n\n $post_type = get_post_type_object( $post_type_name );\n\n //capability check\n if( ! current_user_can( $post_type->cap->edit_posts ) )\n return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post type' ) );\n\n $post_type = (array)$post_type;\n\n $post_type_data = array(\n 'labels' => $post_type['labels'],\n 'description' => $post_type['description'],\n 'capability_type' => $post_type['capability_type'],\n 'cap' => $post_type['cap'],\n 'map_meta_cap' => $post_type['map_meta_cap'],\n 'hierarchical' => $post_type['hierarchical'],\n 'menu_position' => $post_type['menu_position'],\n 'taxonomies' => get_object_taxonomies( $post_type['name'] ),\n );\n\n return $post_type_data;\n \n}", "public function modelForPost(\\WP_Post $post)\n {\n if (! $post) {\n return;\n }\n\n $result = null;\n\n if (isset($this->modelCache[\"m-$post->ID\"])) {\n return $this->modelCache[\"m-$post->ID\"];\n }\n\n if (isset($this->modelFactories[$post->post_type])) {\n $result = call_user_func_array($this->modelFactories[$post->post_type], [$this, $post]);\n } elseif (isset($this->config['model-map'][$post->post_type])) {\n $className = $this->config['model-map'][$post->post_type];\n if (class_exists($className)) {\n $result = new $className($this, $post);\n }\n }\n\n if (! $result) {\n if ($post->post_type == 'attachment') {\n $result = new Attachment($this, $post);\n } elseif ($post->post_type == 'page') {\n $result = new Page($this, $post);\n } else {\n $result = new Post($this, $post);\n }\n }\n\n if ($result) {\n $this->modelCache[\"m-$post->ID\"] = $result;\n }\n\n return $result;\n }", "public function getPost(): Post\n {\n return $this->post;\n }", "public function actionGetInfoPost()\n {\n $post_id = isset($_GET['post_id']) ? $_GET['post_id'] : false;\n if ($post_id) {\n $post = POST::find()->where('id = '. $post_id . ' AND post_type = 1')->one();\n if ($post) {\n $data = [\n 'id' => $post->id,\n 'title' => $post->title,\n 'content' => $post->content,\n 'topic_id' => $post->topic_id,\n 'user_id' => $post->user_id,\n 'created_at' => $post->created_at,\n 'updated_at' => $post->updated_at,\n 'view_count' => $post->view_count,\n 'brilliant_count' => $post->brilliant_count,\n 'comment_count' => $post->comment_count,\n 'post_type' => $post->post_type\n ];\n $data = json_encode($data);\n return $data;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "function get_post_types() {\n\tglobal $rf_custom_posts;\n\n\t$post = new PostType();\n\t$cpts = $post->get_admin_post_pages();\n\n\t$cpts = array_merge($cpts, $rf_custom_posts);\n\t$cpts = apply_filters(\"admin/post_types\", $cpts);\n\n\treturn $cpts;\n}", "public function editActionPost(): object\n {\n // Connects to db\n $this->app->db->connect();\n\n // Retrieves contentId\n $contentId = getPost(\"contentId\");\n\n if (!is_numeric($contentId)) {\n return $this->app->response->redirect(\"admin\");\n }\n\n if (hasKeyPost(\"doDelete\")) {\n return $this->app->response->redirect(\"admin/delete&id=$contentId\");\n }\n\n if (hasKeyPost(\"doSave\")) {\n $params = getPost([\n \"contentTitle\",\n \"contentPath\",\n \"contentSlug\",\n \"contentData\",\n \"contentType\",\n \"contentFilter\",\n \"contentPublish\",\n \"contentId\"\n ]);\n\n if (!$params[\"contentSlug\"]) {\n $params[\"contentSlug\"] = slugify($params[\"contentTitle\"]);\n }\n\n if (!$params[\"contentPath\"]) {\n $params[\"contentPath\"] = null;\n }\n\n $params[\"contentFilter\"] = implode(\",\", getPost([\"contentFilter\"]));\n\n // Calls editBlogpost method\n $this->admin->editBlogpost($params);\n\n // Redirects\n return $this->app->response->redirect(\"admin\");\n }\n }", "static function getCustomizedPostsDataFromPostType($post_type){\n $posts_ids = self::getCustomizedPostsIdFromPostType($post_type);\n $posts_data = self::getPostsObjectsFromPostIds($posts_ids);\n\n return $posts_data;\n }", "public function get_post_types(){ return $this->post_types; }", "protected function get_fields() {\n\t\treturn rwmb_get_registry( 'field' )->get_by_object_type( 'post' );\n\t}", "public function getPosto() {\n return $this->posto;\n }", "function wp_get_single_post($postid = 0, $mode = \\OBJECT)\n {\n }", "public function getPost()\n {\n return $this->post;\n }", "function get_parent_post_type ($post) {\n /* Get an array of Ancestors and Parents if they exist */\n\t$parents = get_post_ancestors( $post->ID );\n /* Get the top Level post->ID count base 1, array base 0 so -1 */ \n\t$id = ($parents) ? $parents[count($parents)-1]: $post->ID;\n\t/* Get the parent type */\n $parent = get_post( $id );\n\t$type = $parent->post_type;\n\t\nreturn $type;\n}", "public function getPost ();", "public function get_post() {\n\n return $this->_post;\n }", "public function edit_postAction() {\n\t\t$info = $this->getPost(array('id', 'sort','name'));\n\t\t$info = $this->_cookData($info);\n\t\t$supplier = Fanli_Service_Ptype::getBy(array('name'=>$info['name']));\n\t\tif($supplier && $supplier['id'] != $info['id']) $this->output(-1, '操作失败,该供分类已存在');\n\t\t$ret = Fanli_Service_Ptype::updateType($info, intval($info['id']));\n\t\tif (!$ret) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功.'); \t\t\n\t}", "function OPS_get_post($id) {\r\n\tglobal $wpdb;\r\n\t$post = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID=$id\");\r\n\tif ($post->post_type == \"revision\"){\r\n\t\t$id = $post->post_parent;\r\n\t\t$post = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID=$id\");\r\n\t}\r\n\treturn $post[0];\r\n}", "public function post()\n {\n return $this->belongsTo(Post::class, 'type_id');\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}", "function getFromPost()\r\n {\r\n $CI = &get_instance();\r\n $note = new Note;\r\n //correct form?\r\n if ($CI->input->post('formname')!='note') {\r\n return null;\r\n }\r\n //get basic data\r\n $note->note_id = $CI->input->post('note_id');\r\n $note->text = $CI->input->post('text');\r\n $note->pub_id = $CI->input->post('pub_id');\r\n $note->user_id = $CI->input->post('user_id');\r\n\r\n return $note;\r\n }", "public static function getPost($id, $type = '')\n {\n \t//echo \"#### \".$id.\"<br>\";die();\n \t$post = new Post;\n \tif ($id != null || $id != \"\") {\n \t\t$hashids = new \\Hashids\\Hashids(\"\", Config::get(\"weixin.minhashlength\"));\n \t\t// hashStr to id number\n \t\tif (!is_numeric($id)) {\n \t\t\t$ids = $hashids->decode($id);\n \t\t\tif (isset($ids[0])) {\n \t\t\t\t$id = $ids[0];\n \t\t\t}\n \t\t}\n \t\t$post = Post::findOrFail($id);\n \t\t$post = $post->attributesToArray();\n \t\t// add QRcode at the end of content\n \t\t$post['content'] = $post['content'].WeixinController::addQrcode($post['sourcedomain']);\n \t\t// id number to hashStr\n \t\t$post['id'] = $hashids->encode($post['id']);\n \t\t// gen html meta\n \t\t$meta = self::getHtmlMeta('post', $post);\n \t} else {\n \t\t$post = $post->attributesToArray();\n \t\t$meta = \"\";\n \t}\n \t\n \tif ($type == \"preview\") {\n \t\t$preview = true;\n \t} else {\n \t\t$preview = false;\n \t}\n \t\n \treturn response()->view('post', ['data' => $post, 'url' => $post['url'], 'isadmin' => self::isAdmin(), 'ispreview' => $preview, 'meta' => $meta ]);\n }", "function carrousel_savePost($post_id, $post){\n\n if(!isset($_POST[\"caroussel_lien\"])){\n return $post_id;\n }\n\n $type = get_post_type_object($post->post_type);\n if(!current_user_can($type->cap->edit_post)){\n return $post_id;\n }\n\n update_post_meta($post_id, \"_monLink\", $_POST[\"caroussel_lien\"]);\n}", "public function get_post_data() {\n\t\treturn $this->post;\n\t}", "public function getPost()\n {\n return $this->hasOne(Post::className(), ['id' => 'post_id']);\n }", "public function getObjectType();", "public function getObjectType();", "function dtm_get_post_id( $post_type, $post_id ) {\n\t//$accepted_post_type = array( 'article', 'listicle' );\n\t//$post_type = self::get_post_type( $post_type );\n\t//if ( WP_Base::is_toh() ) {\n\t//\tif ( in_array( $post_type, $accepted_post_type ) ) {\n\t//\t\treturn ( '' );\n\t//\t}\n\t//\n\t//\tif ( WP_Base::is_recipe() ) {\n\t//\t\treturn get_post_meta( $post_id, 'rms_legacy_id', true );\n\t//\t}\n\t//}\n\t$post_id = apply_filters( 'dtm_wordpress_content_id', $post_id );\n\n\treturn $post_id;\n}", "protected function get_info( $pid ) {\n\t\t$post = $this->prepare_post_info($pid);\n\t\tif ( !isset($post->post_status) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tdo_action_ref_array('the_post', array(&$post, &$GLOBALS['wp_query']));\n\n\t\t$post->status = $post->post_status;\n\t\t$post->id = $post->ID;\n\t\t$post->slug = $post->post_name;\n\t\t$customs = $this->get_post_custom($post->ID);\n\t\tif ( $this->is_previewing() ) {\n\t\t\tglobal $wp_query;\n\t\t\t$rev_id = $this->get_post_preview_id($wp_query);\n\t\t\t$customs = $this->get_post_custom($rev_id);\n\t\t}\n\t\t$post->custom = $customs;\n\t\t$post = (object) array_merge((array) $customs, (array) $post);\n\t\treturn $post;\n\t}", "public function getPost()\n {\n return $this->hasOne(Posts::className(), ['id' => 'post_id']);\n }", "public function get_post_type($value='') {\n\t\t\treturn $this->post_type;\n\t\t}", "public function testForcesAContentTypeOfPost(){\n\t\t$data = array(\n\t\t\t'Post'=>array(\n\t\t\t\t'controller'=>'Test',\n\t\t\t\t'controller'=>'test_action',\n\t\t\t\t'content_type'=>'post'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$this->Post->save($data);\n\t\t\n\t\t$results = $this->Post->find(\n\t\t\t'first',\n\t\t\tarray(\n\t\t\t\t'conditions'=>array(\n\t\t\t\t\t'Post.id' => $this->Post->id\n\t\t\t\t),\n\t\t\t\t'contain'=>array()\n\t\t\t)\n\t\t);\n\t\t\n\t\t$this->assertEqual($results['Post']['content_type'], 'post');\n\t}", "function get_post_status_object($post_status)\n {\n }", "function post_types()\n{\n $collection = collect(get_post_types(array( '_builtin' => false ), 'objects'))\n ->pluck('label', 'name')\n ->except(array( 'acf-field', 'acf-field-group', 'wp_stream_alerts', 'wp_area' ))\n ->prepend(get_post_type_object('page')->labels->name, 'page')\n ->prepend(get_post_type_object('post')->labels->name, 'post')\n ->all();\n\n return $collection;\n}", "public function fromGetOrPost($id = null, $type = 'integer')\n {\n if (is_null($id)) {\n $id = 'id';\n $type = $this->id_type;\n }\n\n if (is_null($value = TIP::getGet($id, $type)) &&\n is_null($value = TIP::getPost($id, $type))) {\n TIP::warning(\"GET or POST not found ($id)\");\n TIP::notifyError('noparams');\n }\n\n return $value;\n }", "function getPostObject($post_id) {\n\t\t$post_url = get_permalink($post_id);\n\t\t$title = strip_tags(get_the_title($post_id));\n\t\t$tagObjects = get_the_tags($post_id);\n\t\t$single = is_single();\n\t\t$tags = \"\";\n\t\tif (!empty($tagObjects)) {\n\t\t\t$tags .= $tagObjects[0]->name;\n\t\t\tfor ($i = 1; $i < count($tagObjects); $i++) {\n\t\t\t\t$tags .= \",\".$tagObjects[$i]->name;\n\t\t\t}\n\t\t}\n\t\t$category = get_the_category($post_id);\n\t\t$categories = \"\";\n\t\tif (!empty($category)) {\n\t\t\t$categories .= $category[0]->name;\n\t\t\tfor ($i=1; $i<count($category); $i++) {\n\t\t\t\t$categories .= \",\".$category[$i]->name;\n\t\t\t}\n\t\t}\n\t\t$author = get_the_author();\n\t\t$date = get_the_date('U', $post_id) * 1000;\n\t\t$comments = get_comments_number($post_id);\n\n\t\t$tmdb = get_post_meta($post_id,'imdb_id');\n\n\t\t$post_object = array(\n\t\t\t'id' => $post_id,\n\t\t\t'url' => $post_url,\n\t\t\t'title' => $title,\n\t\t\t'tags' => $tags,\n\t\t\t'categories' => $categories,\n\t\t\t'comments' => $comments,\n\t\t\t'date' => $date,\n\t\t\t'author' => $author,\n\t\t\t'single' => $single,\n\t\t\t'img' => get_the_post_thumbnail_url($post_id),\n\t\t\t'tmdb' => $tmdb\n\t\t);\n\t\treturn $post_object;\n\t}", "protected function get_object_type()\n {\n }", "public function detect_persontype($post_id, $type = '_billing') {\n\n\t\t$tipo_pessoa = get_post_meta($post_id, $type.'_persontype', true);\n\n\t\tif ( !$tipo_pessoa && $type == '_shipping' ) {\n\n\t\t\treturn 3;\n\n\t\t} elseif ( !$tipo_pessoa ) {\n\n\t\t\tif ( !empty(get_post_meta($post_id, $type.'_cpf', true)) ) {\n\t\t\t\t$tipo_pessoa = 1;\n\t\t\t} elseif ( !empty(get_post_meta($post_id, $type.'_cnpj', true)) ) {\n\t\t\t\t$tipo_pessoa = 2;\n\t\t\t}\n\n\t\t\tif (!$tipo_pessoa)\n\t\t\t\t$tipo_pessoa = 1;\n\n\t\t}\n\n\t\treturn $tipo_pessoa;\n\n\t}", "function get_css_post() {\n\t\t$args = array(\n\t\t\t'numberposts' => 1,\n\t\t\t'post_type' => 'safecss',\n\t\t\t'post_status' => 'publish',\n\t\t);\n\n\t\tif ( $post = array_shift( get_posts( $args ) ) )\n\t\t\treturn get_object_vars( $post );\n\n\t\treturn false;\n\t}", "function propuestasPostType() {\n\t$supports = array(\n\t'title', // post title\n\t'editor', // post content\n\t'author', // post author\n\t'thumbnail', // featured images\n\t'excerpt', // post excerpt\n\t'custom-fields', // custom fields\n\t// 'comments', // post comments\n\t// 'revisions', // post revisions\n\t'post-formats', // post formats\n\t'page-attributes'\n\t);\n\t$labels = array(\n\t'name' => _x('Propuesta', 'plural'),\n\t'singular_name' => _x('Propuestas', 'singular'),\n\t'menu_name' => _x('Propuestas', 'admin menu'),\n\t'name_admin_bar' => _x('Propuestas', 'admin bar'),\n\t'add_new' => _x('Añadir propuesta', 'add new'),\n\t'add_new_item' => __('Añadir nueva propuesta'),\n\t'new_item' => __('Nueva propuesta'),\n\t'edit_item' => __('Editar propuesta'),\n\t'view_item' => __('Ver propuesta'),\n\t'all_items' => __('Todas las propuestas'),\n\t'search_items' => __('Buscar'),\n\t'not_found' => __('No hay resultados.'),\n\t);\n\t$args = array(\n\t'supports' => $supports,\n\t'labels' => $labels,\n\t'public' => true,\n\t'query_var' => true,\n\t'rewrite' => array('slug' => 'propuestas'),\n\t'has_archive' => true,\n\t'hierarchical' => true,\n\t);\n\tregister_post_type('propuestasPostType', $args);\n\t}", "function _get_type() {\n\t\treturn $this->type();\n\n\t}", "public function get_tipo_comando()\n {\n \n // loads the associated object\n if (empty($this->tipo_comando))\n $this->tipo_comando = new TiposComando($this->tipo_comando_id);\n \n // returns the associated object\n return $this->tipo_comando;\n }", "private function get_post_types() {\n\n\t\t$output = 'names'; // names or objects, note names is the default\n\t\t$operator = 'and'; // 'and' or 'or'\n\n\t\t// Collate builtin and custom post-types\n\t\t$builtin_post_types = get_post_types( array( 'public' => true, '_builtin' => true ), $output, $operator );\n\t\t$custom_post_types = get_post_types( array( \n\t\t\t// Perhaps later introduce an option to select whether to include non-public CPTs as well.\n\t\t\t//'public' => true, \n\t\t\t'_builtin' => false \n\t\t\t), \n\t\t$output, $operator );\n\t\t$post_types = array_merge( $builtin_post_types, $custom_post_types );\n\n\t\treturn $post_types;\n\t}", "function proyecto_post_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'proyectos', 'Post Type General Name', 'text_domain' ),\n\t\t'singular_name' => _x( 'proyecto', 'Post Type Singular Name', 'text_domain' ),\n\t\t'menu_name' => __( 'Post Types', 'text_domain' ),\n\t\t'name_admin_bar' => __( 'Post Type', 'text_domain' ),\n\t\t'archives' => __( 'Item Archives', 'text_domain' ),\n\t\t'attributes' => __( 'Item Attributes', 'text_domain' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n\t\t'all_items' => __( 'All Items', 'text_domain' ),\n\t\t'add_new_item' => __( 'Add New Item', 'text_domain' ),\n\t\t'add_new' => __( 'Add New', 'text_domain' ),\n\t\t'new_item' => __( 'New Item', 'text_domain' ),\n\t\t'edit_item' => __( 'Edit Item', 'text_domain' ),\n\t\t'update_item' => __( 'Update Item', 'text_domain' ),\n\t\t'view_item' => __( 'View Item', 'text_domain' ),\n\t\t'view_items' => __( 'View Items', 'text_domain' ),\n\t\t'search_items' => __( 'Search Item', '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 item', 'text_domain' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),\n\t\t'items_list' => __( 'Items list', 'text_domain' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'text_domain' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'proyecto', 'text_domain' ),\n\t\t'description' => __( 'personalización del proyecto', 'text_domain' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor', 'thumbnail' ),\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\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-images-alt2',\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\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' => 'page',\n\t);\n\tregister_post_type( 'proyecto', $args );\n\n}", "function get_form_type()\n {\n return is_array($this->object->context) ? $this->object->context[0] : $this->object->context;\n }", "public function process_post($type, $id = null){\n\t\t$action = $_POST['action'];\n\t\t\n\t\tif($action == 'cancel'){\n\t\t\turl::redirect($this->section_url);\n\t\t}\n\t\t\n\t\tif($action == 'delete'){\n\t\t\tif(Auth::instance()->logged_in('admin')){\n\t\t\t\tif($this->model->update(array($this->model->db_column_prefix.'status' => 0,$this->model->db_column_prefix.'deleted' => 1,$this->model->db_column_prefix.'deleted_date' => date('Y-m-d H:i:s')))){\n\t\t\t\t\t$this->session->set('alert',array('type' => 'success', 'message' => 'Entry deleted'));\n\t\t\t\t} else {\n\t\t\t\t\t$this->session->set('alert',array('type' => 'danger', 'message' => 'Something went wrong'));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->session->set('alert',array('type' => 'danger', 'message' => 'Sorry, you don\\'t have permission to do that.'));\n\t\t\t}\n\t\t\t\n\t\t\turl::redirect($this->section_url);\n\t\t}\n\t\t\n\t\t$fields = $this->model->fields();\n\t\t\n\t\t// Remove default field values\n\t\tforeach ($fields as $key => $field){\n\t\t\tif (isset($_POST[$key]) && $field['type'] != 'select' && $field['type'] != 'radio' && $field['type'] != 'checkbox' && $_POST[$key] == $field['value']) {\n\t\t\t\t$_POST[$key] = '';\n\t\t\t}\n\t\t}\n\t\t\n\t\t$validation = $this->model->validation();\n\t \n\t if ($validation->validate()){\n\t \t// Pull out fields we want from POST.\n\t\t\t$data = $this->model->map_post($this->input->post());\n\n\t\t\t// Format data/fields \n\t\t\t$this->model->process_fields($data);\n\t\t\t\n\t // Add or Edit\n\t if($type == 'add'){\n\t $id = $this->model->insert($data);\n\t } elseif($type == 'edit') {\n\t $this->model->update($data);\n\t }\n\t\t\t\n\t\t\t// Process files\n\t\t\t$this->process_uploaded_files($id);\n\t \n\t // Audit trace\n\t $this->audit_record('edit',$this->section_url,$id,$data);\n\t \n\t // Handle redirect and success message\n\t if($action == 'save'){\n\t $this->session->set('alert',array('type' => 'success', 'message' => 'Saved'));\n\t\t\t\t\n\t url::redirect($this->section_url);\n\t } else {\n\t $this->session->set('alert',array('type' => 'success', 'message' => 'Updated'));\n\t\t\t\t\n\t url::redirect(Kohana::config('admin.url').'/'.$this->section_url.'/edit/'.$id);\n\t }\t \n\t } else {\t \t\n\t\t\t$this->session->set('alert',array('type' => 'danger', 'message' => 'There are form errors'));\n\n\t \treturn array($validation,0);\n\t\t}\n\t}", "public function get_post_get()\n {\n $this->get_post_get_action();\n $this->get_post_get_query();\n $this->get_post_get_andor();\n $this->get_post_get_uid();\n $this->get_post_get_mid();\n $this->get_post_get_start();\n $this->get_post_get_mids();\n $this->get_post_get_showcontext();\n $this->get_post_get_mark();\n $this->get_post_get_cid();\n $this->get_post_get_subcat();\n }", "public function get_persontype_info($post_id, $persontype = 1, $type = '_billing') {\n\n\t\t$WooCommerceNFeFormat = new WooCommerceNFeFormat;\n\n\t\tif ( $persontype == 3 && $type == '_shipping' ) {\n\t\t\t$persontype = $this->detect_persontype($post_id, '_billing');\n\t\t\t$type = '_billing';\n\t\t}\n\n\t\tif ( $persontype == 1 ) {\n\n\t\t\t// Full name and CPF\n\t\t\t$person_info['nome_completo'] = get_post_meta($post_id, $type.'_first_name', true).' '.get_post_meta($post_id, $type.'_last_name', true);\n\t\t\t$person_info['cpf'] = $WooCommerceNFeFormat->cpf(get_post_meta($post_id, $type.'_cpf', true));\n\n\t\t} elseif ( $persontype == 2 ) {\n\n\t\t\t// Razao Social, CNPJ and IE\n\t\t\t$person_info['razao_social'] = get_post_meta($post_id, $type.'_company', true);\n\t\t\t$person_info['cnpj'] = $WooCommerceNFeFormat->cnpj(get_post_meta($post_id, $type.'_cnpj', true));\n\t\t\t$person_info['ie'] = str_replace(array('-','.',','), '', get_post_meta($post_id, $type.'_ie', true));\n\n\t\t}\n\n\t\treturn $person_info;\n\n\t}", "private function processPost(WP_Post $post): ?WP_Post\n {\n $post->post_title .= $this->adminOutput((string) $post->post_type, $post->ID);\n\n if ($this->accessHandler->checkObjectAccess($post->post_type, $post->ID) === false) {\n if ($this->removePostFromList($post->post_type) === true) {\n return null;\n }\n\n $post->post_content = $this->processPostContent($post);\n\n if ($this->mainConfig->hidePostTypeTitle($post->post_type) === true) {\n $post->post_title = $this->mainConfig->getPostTypeTitle($post->post_type);\n }\n\n if ($this->mainConfig->lockPostTypeComments($post->post_type) === true) {\n $post->comment_status = 'close';\n }\n }\n\n return $post;\n }", "function getPostType($row = \"\", $mode) {\n\t$output = \"\";\n\t$postForm = \"\n\t\t<form id='addPost' data-id='\". $row[\"ID\"] . \"' class='admin-form fadeIn' action='assets/php/addposts.php' method='POST' style='display:none;' enctype='multipart/form-data'>\n\t\t\t<label for='image'><span>Choose image</span><input type='file' name='image' id='image'></label>\n\t\t\t<label for='headline'><span>Headline</span><br><input name='headline' type='text'></label><br>\n\t\t\t<label for='text'><span>Text</span><br>\n\t\t\t\t<textarea name='textarea' id='' cols='30' rows='5'></textarea></label>\n\t\t\t<label for='embed'><span>Add youtube url / map</span><br>\n\t\t\t\t<textarea name='embed' id='' cols='30' rows='5'></textarea></label>\n\t\t\t<br>\n\t\t\t<label class='admin-form-published' for='publ'><span>Publish?</span> <br>\n\t\t\t\t<input class='publBox' type='checkbox' value='1' name='publ'>\n\t\t\t</label>\n\t\t\t<button class='submitBtn' type='submit' name='savePost'>Save post</button>\n\t\t</form>\";\n\n\t\t$editPostForm = \"\n\t\t<form id='addPost' data-id='\". $row[\"ID\"] . \"' class='admin-form fadeInput' action='assets/php/edit.php' method='POST' style='display:none;' enctype='multipart/form-data'>\n\t\t\t<img class='posts__item-img' src='/CMS/assets/media/\" . $row[\"image\"] . \"' alt='\" . $row[\"headline\"] .\"'>\n\t\t\t<label for='image'><span>Choose new image (replaces old image)</span>\n\t\t\t<input type='file' name='image' id='image'></label>\n\t\t\t<label for='headline'>\n\t\t\t\t<span>Headline</span><br>\n\t\t\t\t<input name='headline' type='text' value='\".$row[\"headline\"].\"'>\n\t\t\t</label><br>\n\t\t\t<label for='text'><span>Text</span><br>\n\t\t\t\t<textarea name='textarea' id='' cols='30' rows='5' value=''>\" . $row[\"textarea\"] . \"</textarea>\n\t\t\t</label>\n\t\t\t<label for='embed'><span>Add youtube url / map</span><br>\n\t\t\t\t<textarea name='embed' id='' cols='30' rows='5'>\" . $row[\"embed\"] . \"</textarea>\n\t\t\t</label>\n\t\t\t<br>\n\t\t\t<label class='admin-form-published' for='publ'><span>Publish?</span>\n\t\t\t\t<input type='checkbox' value='1' checked='\". isPublished($row) . \"' name='publ'>\n\t\t\t</label>\n\t\t\t<input type='hidden' name='id' value='\". $row[\"ID\"] . \"'>\n\t\t\t<input type='hidden' name='path' value='\". $row[\"image\"] . \"'>\n\t\t\t\n\t\t\t<button class='submitBtn' type='submit' name='savePost')'>UPDATE POST</button>\n\t\t</form>\";\n\n\tif($mode === \"edit\") {\n\t\t$output = $postForm;\n\t} else {\n\t\tif($mode === \"front\") {\n\t\t\t$output = \n\t\t\t\t\"<article class='posts posts__item fadeIn'>\n\t\t\t\t\t<img class='posts__item-img' src='/CMS/assets/media/\" . $row[\"image\"] . \"' alt='\" . $row[\"headline\"] .\"'>\n\t\t\t\t\t<h2>\". $row[\"headline\"] . \"</h2>\n\t\t\t\t\t<span class='posts__item-date'><i class='far fa-calendar-alt'></i> \". $row[\"date\"] . \"</span>\n\t\t\t\t\t<p>\". nl2br($row[\"textarea\"]) .\"<br></p>\n\t\t\t\t\t<div class='posts__item-embedarea'>\" . $row[\"embed\"] . \"</div>\n\t\t\t</article>\";\t\n\t\t} else {\n\t\t\t$output = \"\n\t\t\t<article class='posts posts__item admin-form fadeIn'>\n\t\t\t<section class='admin-form__change-section'><a onclick='editView(\". $row[\"ID\"] . \")'href='javascript:void(0)'><i class='fas fa-edit'></i></a><a onclick='deleteView(\". $row[\"ID\"] . \")' href='javascript:void(0)'><i class='fas fa-trash-alt'></a></i></section>\n\t\t\t\t<img class='posts__item-img' src='/CMS/assets/media/\" . $row[\"image\"] . \"' alt=''>\n\t\t\t\t<h2>\". $row[\"headline\"] . \"</h2>\n\t\t\t\t<span class='posts__item-date'><i class='far fa-calendar-alt'></i> \". $row[\"date\"] . \"</span>\n\t\t\t\t<p>\". nl2br($row[\"textarea\"]) .\"<br></p>\n\t\t\t\t<div class='posts__item-embedarea'>\".$row[\"embed\"].\"</div>\n\t\t\t</article>\n\t\t\t$editPostForm\";\t\n\t\t}\n\t}\n\treturn $output;\n}", "function save_post_type_beneficiary($post_id) {\n $post_type = get_post_type($post_id);\n if ($post_type != 'beneficiary') {\n return;\n }\n\n $post_title = get_field('organization_name');\n $post_name = sanitize_title($post_title);\n $post = array(\n 'ID' => $post_id,\n 'post_name' => $post_name,\n 'post_title' => $post_title\n );\n wp_update_post($post);\n}", "private function get_post_type()\n {\n $post_id = get_the_ID();\n\n // Check post for post type\n if( $post_id )\n {\n return get_post_type($post_id);\n }\n\n // Check query vars for post type\n if( $post_type = get_query_var('post_type') )\n {\n return $post_type;\n }\n\n // No post type found\n return '';\n\n }", "public static function get_class_post_type()\n {\n return self::$post_type;\n }", "public static function get_class_post_type()\n {\n return self::$post_type;\n }", "public function single(Post $post)\n {\n// auth()->loginUsingId(1);\n// if (Gate::allows('show-post',$post)){\n// return $post;\n// }\n// abort(403,'not access');\n\n// authorization services by ACL PostPolicy\n auth()->loginUsingId(1);\n if (Gate::allows('view',$post)){\n return $post;\n }\n abort(403,'not access');\n }", "public function getModel()\n {\n $post = Post::class;\n return $post;\n }", "private function WP_Post_types($graph, $post) {\r\n if ($post->post_type == 'post') {\r\n $post_resource = $graph->resource($post->guid);\r\n $post_resource->add('rdf:type', $graph->resource('sioc:BlogPost'));\r\n }\r\n\r\n return $graph;\r\n }", "public static function get_meta_type();", "function _convert_entity_to_post($entity)\n {\n // Was a model passed instead of an entity?\n $post = $entity;\n if (!$entity instanceof stdClass) {\n $post = $entity->get_entity();\n }\n // Create the post content\n $post_content = clone $post;\n foreach ($this->object->_table_columns as $column) {\n unset($post_content->{$column});\n }\n unset($post->id_field);\n unset($post->post_content_filtered);\n unset($post->post_content);\n $post->post_content = $this->object->serialize($post_content);\n $post->post_content_filtered = $post->post_content;\n $post->post_type = $this->object->get_object_name();\n // Sometimes an entity can contain a data stored in an array or object\n // Those will be removed from the post, and serialized in the\n // post_content field\n foreach ($post as $key => $value) {\n if (in_array(strtolower(gettype($value)), array('object', 'array'))) {\n unset($post->{$key});\n }\n }\n // A post required a title\n if (!property_exists($post, 'post_title')) {\n $post->post_title = $this->object->get_post_title($post);\n }\n // A post also requires an excerpt\n if (!property_exists($post, 'post_excerpt')) {\n $post->post_excerpt = $this->object->get_post_excerpt($post);\n }\n return $post;\n }", "function diversity_get_header_content_type( $content_type, $obj ) {\n\tif ( $obj instanceof WP_Post ) {\n\t\t$post_type = $obj->post_type;\n\n\t\tif ( $post_type === 'post' ) {\n\t\t\t$content_type = 'post';\n\t\t}\n\t}\n\n\treturn $content_type;\n}", "public function get_type()\n\t{\n\t\treturn 'notification.type.approve_post';\n\t}", "function get_type() {\n\t\treturn $this->get_data( 'type' );\n\t}", "function convert_post_to_entity($post, $model = FALSE)\n {\n $entity = new stdClass();\n // Unserialize the post_content_filtered field\n if (is_string($post->post_content_filtered)) {\n if ($post_content = $this->object->unserialize($post->post_content_filtered)) {\n foreach ($post_content as $key => $value) {\n $post->{$key} = $value;\n }\n }\n }\n // Unserialize the post content field\n if (is_string($post->post_content)) {\n if ($post_content = $this->object->unserialize($post->post_content)) {\n foreach ($post_content as $key => $value) {\n $post->{$key} = $value;\n }\n }\n }\n // Copy post fields to entity\n unset($post->post_content);\n unset($post->post_content_filtered);\n foreach ($post as $key => $value) {\n $entity->{$key} = $value;\n }\n $this->object->_convert_to_entity($entity);\n return $model ? $this->object->convert_to_model($entity) : $entity;\n }", "function getObjtype() {\n return $this->objtype;\n }", "public function getCodigoPost()\n {\n return $this->codigoPost;\n }", "function cww_associate_get_content($associate_id = fale, $type = 'single') {\n\tglobal $post;\n\t$old_post = $post;\n\t$post = $associate_id ? get_post( $associate_id ) : $post;\n\tglobal $cww_associate_type;\n\t$cww_associate_type = $type;\n\tob_start();\n\tget_template_part('template', 'associate');\n\t$result = ob_get_contents();\n\tob_end_clean();\n\t$post = $old_post;\n\treturn $result;\n}", "private static final function getDocumentType () {\r\n // Do return ...\r\n return self::$objDocumentType;\r\n }", "public function get_type();", "public function getCollisimoLaPoste()\n\t{\n\t\treturn $this->em->getRepository(\"VPMTransporteurBundle:Transporteur\")->findOneByNom(\"Colissimo La Poste\");\n\t}", "public function test__GetPost()\n\t{\n\t\t$this->assertThat(\n\t\t\t$this->object->objects->post,\n\t\t\t$this->isInstanceOf('JAmazons3OperationsObjectsPost')\n\t\t);\n\t}", "function getType()\t { return $this->type;\t }", "function dtm_get_wordpress_content_id( $post_type, $post_id ) {\n\t//$post_type = self::get_post_type( $post_type );\n\t//if ( WP_Base::is_toh() ) {\n\t//\tif ( in_array( $post_type, $accepted_post_type ) ) {\n\t//\t\treturn ( $post_id );\n\t//\t}\n\t//}\n\t$content_id = apply_filters( 'dtm_wordpress_content_id', '' );\n\n\treturn $content_id;\n}", "function wp_getPostTypes( $args ) {\n\n global $wp_xmlrpc_server;\n $wp_xmlrpc_server->escape( $args );\n\n $blog_ID = (int) $args[0];\n $username = $args[1];\n $password = $args[2];\n\n if ( ! $user = $wp_xmlrpc_server->login( $username, $password ) )\n return $wp_xmlrpc_server->error;\n\n $post_types = get_post_types( '','objects' );\n\n $struct = array();\n\n foreach( $post_types as $post_type ) {\n\n // capability check for post_types\n if( ! current_user_can( $post_type->cap->edit_posts ) )\n continue;\n\n $post_type = (array)$post_type;\n\n $post_type_data = array(\n 'labels' => $post_type['labels'],\n 'description' => $post_type['description'],\n 'capability_type' => $post_type['capability_type'],\n 'cap' => $post_type['cap'],\n 'map_meta_cap' => $post_type['map_meta_cap'],\n 'hierarchical' => $post_type['hierarchical'],\n 'menu_position' => $post_type['menu_position'],\n 'taxonomies' => get_object_taxonomies( $post_type['name'] ),\n );\n\n $struct[ $post_type['name'] ] = $post_type_data;\n\n }\n\n return $struct;\n \n}" ]
[ "0.710287", "0.6955795", "0.6589064", "0.64783925", "0.64199907", "0.640507", "0.6375657", "0.6358842", "0.63502854", "0.6346296", "0.630643", "0.62996596", "0.622658", "0.61829966", "0.6146203", "0.6140258", "0.6112345", "0.61042535", "0.60034823", "0.59956247", "0.59690315", "0.5956416", "0.5925542", "0.59177196", "0.59100866", "0.5909159", "0.5902117", "0.58704734", "0.58602226", "0.58573514", "0.581859", "0.5795572", "0.5774521", "0.57573044", "0.5754216", "0.572896", "0.57279474", "0.5725536", "0.57215047", "0.5713185", "0.5705673", "0.5667453", "0.5664877", "0.5663412", "0.5648861", "0.56445557", "0.56434906", "0.56347585", "0.56067383", "0.560439", "0.5602987", "0.55943286", "0.5584544", "0.557842", "0.557842", "0.5576851", "0.5564346", "0.5547871", "0.55426884", "0.55280244", "0.55191386", "0.5517131", "0.5505434", "0.55023015", "0.5495742", "0.54931545", "0.54900306", "0.5486577", "0.5485098", "0.5484503", "0.54767096", "0.5471987", "0.5467492", "0.5464844", "0.5461576", "0.54537266", "0.54496384", "0.5448998", "0.5447553", "0.5436287", "0.5417856", "0.5417856", "0.54157126", "0.5413709", "0.54070616", "0.5403072", "0.53982216", "0.5396215", "0.5394063", "0.5388676", "0.5381797", "0.53738785", "0.53699005", "0.536933", "0.536729", "0.5360415", "0.5355635", "0.5349035", "0.5346403", "0.5345647", "0.5341254" ]
0.0
-1
/ If editing, deleting, or reading a servicio, get the post and post type object.
function servicio_meta_cap( $caps, $cap, $user_id, $args ) { if ( 'edit_servicio' == $cap || 'delete_servicio' == $cap || 'read_servicio' == $cap ) { $post = get_post( $args[0] ); $post_type = get_post_type_object( $post->post_type ); /* Set an empty array for the caps. */ $caps = array(); } /* If editing a servicio, assign the required capability. */ if ( 'edit_servicio' == $cap ) { if ( $user_id == $post->post_author ) $caps[] = $post_type->cap->edit_posts; else $caps[] = $post_type->cap->edit_others_posts; } /* If deleting a servicio, assign the required capability. */ elseif ( 'delete_servicio' == $cap ) { if ( $user_id == $post->post_author ) $caps[] = $post_type->cap->delete_posts; else $caps[] = $post_type->cap->delete_others_posts; } /* If reading a private servicio, assign the required capability. */ elseif ( 'read_servicio' == $cap ) { if ( 'private' != $post->post_status ) $caps[] = 'read'; elseif ( $user_id == $post->post_author ) $caps[] = 'read'; else $caps[] = $post_type->cap->read_private_posts; } /* Return the capabilities required by the user. */ return $caps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_post_type_object($post_type)\n {\n }", "public function type() { return $this->post->post_type; }", "public function getPostType(){\n return $this->wpdsPostType;\n }", "public function getPostType()\n\t\t{\n\t\t\treturn $this->_postType;\n\t\t}", "public function getPostType() {\n\t\treturn $this->post_type;\n\t}", "public static function post_object_type($type, $post) {\n $post_type = get_post_type($post);\n switch ( $post_type ) {\n case \"post\":\n $post_format = get_post_format($post);\n switch ( $post_format ) {\n case \"aside\":\n case \"status\":\n case \"quote\":\n case \"note\":\n $object_type = \"note\";\n break;\n case \"gallery\":\n case \"image\":\n $object_type = \"image\";\n break;\n case \"video\":\n $object_type = \"video\";\n break;\n case \"audio\":\n $object_type = \"audio\";\n break;\n default:\n $object_type = \"article\";\n break;\n }\n break;\n case \"page\":\n $object_type = \"page\";\n break;\n case \"attachment\":\n $mime_type = get_post_mime_type();\n $media_type = preg_replace(\"/(\\/[a-zA-Z]+)/i\", \"\", $mime_type);\n\n switch ($media_type) {\n case 'audio':\n $object_type = \"audio\";\n break;\n case 'video':\n $object_type = \"video\";\n break;\n case 'image':\n $object_type = \"image\";\n break;\n }\n break;\n default:\n $object_type = \"article\";\n break;\n }\n\n return $object_type;\n }", "public static function post_type(){}", "public function type()\n\t{\n\t\treturn $this->belongsTo('Lainga9\\BallDeep\\app\\PostType', 'post_type_id');\n\t}", "public function getPostType(): string {\n return $this->post_type;\n }", "function tc_get_post_type() {\r\n global $post;\r\n\r\n if ( !isset($post) )\r\n return;\r\n \r\n return $post -> post_type;\r\n }", "public function getType()\n {\n return $this->type = $this->get()->post_type;\n }", "public static function current_object_type() {\n\t\tglobal $pagenow;\n\t\t$type = 'post';\n\n\t\tif ( in_array( $pagenow, [ 'user-edit.php', 'profile.php', 'user-new.php' ], true ) ) {\n\t\t\t$type = 'user';\n\t\t}\n\n\t\tif ( in_array( $pagenow, [ 'edit-comments.php', 'comment.php' ], true ) ) {\n\t\t\t$type = 'comment';\n\t\t}\n\n\t\tif ( in_array( $pagenow, [ 'edit-tags.php', 'term.php' ], true ) ) {\n\t\t\t$type = 'term';\n\t\t}\n\n\t\tif ( Conditional::is_ajax() && 'add-tag' === Param::post( 'action' ) ) {\n\t\t\t$type = 'term';\n\t\t}\n\n\t\treturn $type;\n\t}", "abstract protected function post_type();", "private function getServicePostDoc()\n {\n return $this->container->get('app_service_post_doc');\n }", "function get_post_type($post = \\null)\n {\n }", "public function test__GetPost()\n\t{\n\t\t$this->assertThat(\n\t\t\t$this->object->objects->post,\n\t\t\t$this->isInstanceOf('JAmazons3OperationsObjectsPost')\n\t\t);\n\t}", "public function postType()\n {\n return $this->belongsTo(PostType::class);\n }", "function wp_getPostType( $args ) {\n\n global $wp_xmlrpc_server;\n $wp_xmlrpc_server->escape( $args );\n\n $blog_ID = (int) $args[0];\n $username = $args[1];\n $password = $args[2];\n $post_type_name = $args[3];\n\n if ( !$user = $wp_xmlrpc_server->login( $username, $password ) )\n return $wp_xmlrpc_server->error;\n\n $post_type_names = get_post_types('', 'names');\n\n if( ! in_array( $post_type_name, $post_type_names ) )\n return new IXR_Error( 403, __( 'The post type specified is not valid' ) );\n\n $post_type = get_post_type_object( $post_type_name );\n\n //capability check\n if( ! current_user_can( $post_type->cap->edit_posts ) )\n return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post type' ) );\n\n $post_type = (array)$post_type;\n\n $post_type_data = array(\n 'labels' => $post_type['labels'],\n 'description' => $post_type['description'],\n 'capability_type' => $post_type['capability_type'],\n 'cap' => $post_type['cap'],\n 'map_meta_cap' => $post_type['map_meta_cap'],\n 'hierarchical' => $post_type['hierarchical'],\n 'menu_position' => $post_type['menu_position'],\n 'taxonomies' => get_object_taxonomies( $post_type['name'] ),\n );\n\n return $post_type_data;\n \n}", "public function getPost()\n {\n if (!$this->hasPost()) {\n $this->setPost(false);\n\n if ($post = $this->registry->registry('wordpress_post')) {\n if ($post->getPostType() === 'page') {\n $this->setPost($post);\n }\n } \n }\n\n return $this->_getData('post');\n }", "public function getPost()\n {\n return $this->hasOne(PostForm::className(), ['_id' => 'post_id']);\n }", "public function get_post_type() {\n\t\treturn $this->post_type_key;\n\t}", "protected function getNotification_Type_PostService()\n {\n $instance = new \\phpbb\\notification\\type\\post(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, './../', 'php', 'phpbb_user_notifications');\n\n $instance->set_user_loader(${($_ = isset($this->services['user_loader']) ? $this->services['user_loader'] : $this->getUserLoaderService()) && false ?: '_'});\n $instance->set_config(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'});\n\n return $instance;\n }", "public function fromGetOrPost($id = null, $type = 'integer')\n {\n if (is_null($id)) {\n $id = 'id';\n $type = $this->id_type;\n }\n\n if (is_null($value = TIP::getGet($id, $type)) &&\n is_null($value = TIP::getPost($id, $type))) {\n TIP::warning(\"GET or POST not found ($id)\");\n TIP::notifyError('noparams');\n }\n\n return $value;\n }", "function services_post_type() {\n\t$labels = array(\n\t\t'name' => _x( 'services', 'Post Type General Name', 'webino' ),\n\t\t'singular_name' => _x( 'services', 'Post Type Singular Name', 'webino' ),\n\t\t'menu_name' => __( 'services', 'webino' ),\n\t\t'parent_item_colon' => __( 'Parent services', 'webino' ),\n\t\t'all_items' => __( 'All services', 'webino' ),\n\t\t'view_item' => __( 'View services', 'webino' ),\n\t\t'add_new_item' => __( 'Add New services', 'webino' ),\n\t\t'add_new' => __( 'Add New', 'webino' ),\n\t\t'edit_item' => __( 'Edit services', 'webino' ),\n\t\t'update_item' => __( 'Update services', 'webino' ),\n\t\t'search_items' => __( 'Search services', 'webino' ),\n\t\t'not_found' => __( 'Not Found', 'webino' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'webino' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'services', 'webino' ),\n\t\t'description' => __( 'services news and reviews', 'webino' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', ),\n\t\t'taxonomies' => array( 'genres' ),\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\n\t\t'menu_position' => 5,\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' => 'page',\n\t\t'taxonomies' => array( 'category' ),\n\t);\n\tregister_post_type( 'services', $args );\n}", "function get_default_post_to_edit($post_type = 'post', $create_in_db = \\false)\n {\n }", "public function posttype()\n\t{\n\t\treturn $this->belongsTo('App\\Models\\Posttype');\n\t}", "static function getCustomizedPostsDataFromPostType($post_type){\n $posts_ids = self::getCustomizedPostsIdFromPostType($post_type);\n $posts_data = self::getPostsObjectsFromPostIds($posts_ids);\n\n return $posts_data;\n }", "public function actionGetInfoPost()\n {\n $post_id = isset($_GET['post_id']) ? $_GET['post_id'] : false;\n if ($post_id) {\n $post = POST::find()->where('id = '. $post_id . ' AND post_type = 1')->one();\n if ($post) {\n $data = [\n 'id' => $post->id,\n 'title' => $post->title,\n 'content' => $post->content,\n 'topic_id' => $post->topic_id,\n 'user_id' => $post->user_id,\n 'created_at' => $post->created_at,\n 'updated_at' => $post->updated_at,\n 'view_count' => $post->view_count,\n 'brilliant_count' => $post->brilliant_count,\n 'comment_count' => $post->comment_count,\n 'post_type' => $post->post_type\n ];\n $data = json_encode($data);\n return $data;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "public function process_post($type, $id = null){\n\t\t$action = $_POST['action'];\n\t\t\n\t\tif($action == 'cancel'){\n\t\t\turl::redirect($this->section_url);\n\t\t}\n\t\t\n\t\tif($action == 'delete'){\n\t\t\tif(Auth::instance()->logged_in('admin')){\n\t\t\t\tif($this->model->update(array($this->model->db_column_prefix.'status' => 0,$this->model->db_column_prefix.'deleted' => 1,$this->model->db_column_prefix.'deleted_date' => date('Y-m-d H:i:s')))){\n\t\t\t\t\t$this->session->set('alert',array('type' => 'success', 'message' => 'Entry deleted'));\n\t\t\t\t} else {\n\t\t\t\t\t$this->session->set('alert',array('type' => 'danger', 'message' => 'Something went wrong'));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->session->set('alert',array('type' => 'danger', 'message' => 'Sorry, you don\\'t have permission to do that.'));\n\t\t\t}\n\t\t\t\n\t\t\turl::redirect($this->section_url);\n\t\t}\n\t\t\n\t\t$fields = $this->model->fields();\n\t\t\n\t\t// Remove default field values\n\t\tforeach ($fields as $key => $field){\n\t\t\tif (isset($_POST[$key]) && $field['type'] != 'select' && $field['type'] != 'radio' && $field['type'] != 'checkbox' && $_POST[$key] == $field['value']) {\n\t\t\t\t$_POST[$key] = '';\n\t\t\t}\n\t\t}\n\t\t\n\t\t$validation = $this->model->validation();\n\t \n\t if ($validation->validate()){\n\t \t// Pull out fields we want from POST.\n\t\t\t$data = $this->model->map_post($this->input->post());\n\n\t\t\t// Format data/fields \n\t\t\t$this->model->process_fields($data);\n\t\t\t\n\t // Add or Edit\n\t if($type == 'add'){\n\t $id = $this->model->insert($data);\n\t } elseif($type == 'edit') {\n\t $this->model->update($data);\n\t }\n\t\t\t\n\t\t\t// Process files\n\t\t\t$this->process_uploaded_files($id);\n\t \n\t // Audit trace\n\t $this->audit_record('edit',$this->section_url,$id,$data);\n\t \n\t // Handle redirect and success message\n\t if($action == 'save'){\n\t $this->session->set('alert',array('type' => 'success', 'message' => 'Saved'));\n\t\t\t\t\n\t url::redirect($this->section_url);\n\t } else {\n\t $this->session->set('alert',array('type' => 'success', 'message' => 'Updated'));\n\t\t\t\t\n\t url::redirect(Kohana::config('admin.url').'/'.$this->section_url.'/edit/'.$id);\n\t }\t \n\t } else {\t \t\n\t\t\t$this->session->set('alert',array('type' => 'danger', 'message' => 'There are form errors'));\n\n\t \treturn array($validation,0);\n\t\t}\n\t}", "protected abstract function get_rest_field_type();", "private function getPost($post)\n {\n if ($post instanceof WP_post) {\n return $post;\n } elseif (is_int($post) === true) {\n return $this->objectHandler->getPost($post);\n } elseif (isset($post->ID) === true) {\n return $this->objectHandler->getPost($post->ID);\n }\n\n return false;\n }", "function get_post($post = \\null, $output = \\OBJECT, $filter = 'raw')\n {\n }", "private function getServicePostLike()\n {\n return $this->container->get('app_service_post_like');\n }", "public function getPost ();", "public function get_post_types(){ return $this->post_types; }", "public static function post_is_object(){\n if( count($_POST)>=1) return (object)$_POST;\n }", "public function get()\n {\n return $this->object = get_post($this->id);\n }", "final protected function getObject($type){\n\t\t\treturn $this->getFactory()->getObject( $this->getRes(), $type );\n\t\t}", "public static function get_post_type(){\n global $TFUSE;\n return $TFUSE->ext->seek->get_post_type();\n }", "protected function get_post_type() {\n\t\tif ( $post = get_post() ) {\n\t\t\treturn get_post_type( $post );\n\t\t}\n\n\t\tif ( isset( $_GET['post'] ) ) {\n\t\t\treturn get_post_type( sanitize_text_field( $_GET['post'] ) );\n\t\t}\n\n\t\tif ( isset( $_GET['post_type'] ) ) {\n\t\t\treturn strtolower( sanitize_text_field( $_GET['post_type'] ) );\n\t\t}\n\n\t\t$req_uri = $_SERVER['REQUEST_URI'];\n\t\t$exploded = explode( '/', $req_uri );\n\t\t$last = end( $exploded );\n\t\t$last = parse_url( $last, PHP_URL_PATH );\n\n\t\tif ( $last === 'post-new.php' || $last === 'edit.php' ) {\n\t\t\treturn 'post';\n\t\t}\n\n\t\treturn '';\n\t}", "public function getPost(): Post\n {\n return $this->post;\n }", "public function getObjectType();", "public function getObjectType();", "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}", "protected function getVictoireBlog_Blog_Form_TypeService()\n {\n return $this->services['victoire_blog.blog.form.type'] = new \\Victoire\\Bundle\\BlogBundle\\Form\\BlogType(array(0 => 'fr', 1 => 'en'), $this->get('request_stack'), $this->get('security.authorization_checker'));\n }", "function wp_get_single_post($postid = 0, $mode = \\OBJECT)\n {\n }", "public function post()\n {\n return $this->belongsTo(Post::class, 'type_id');\n }", "protected function get_info( $pid ) {\n\t\t$post = $this->prepare_post_info($pid);\n\t\tif ( !isset($post->post_status) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tdo_action_ref_array('the_post', array(&$post, &$GLOBALS['wp_query']));\n\n\t\t$post->status = $post->post_status;\n\t\t$post->id = $post->ID;\n\t\t$post->slug = $post->post_name;\n\t\t$customs = $this->get_post_custom($post->ID);\n\t\tif ( $this->is_previewing() ) {\n\t\t\tglobal $wp_query;\n\t\t\t$rev_id = $this->get_post_preview_id($wp_query);\n\t\t\t$customs = $this->get_post_custom($rev_id);\n\t\t}\n\t\t$post->custom = $customs;\n\t\t$post = (object) array_merge((array) $customs, (array) $post);\n\t\treturn $post;\n\t}", "public function edit_postAction() {\n\t\t$info = $this->getPost(array('id', 'sort','name'));\n\t\t$info = $this->_cookData($info);\n\t\t$supplier = Fanli_Service_Ptype::getBy(array('name'=>$info['name']));\n\t\tif($supplier && $supplier['id'] != $info['id']) $this->output(-1, '操作失败,该供分类已存在');\n\t\t$ret = Fanli_Service_Ptype::updateType($info, intval($info['id']));\n\t\tif (!$ret) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功.'); \t\t\n\t}", "function pleiades17_custom_post_types() {\n\t\t// Servicios Post Type\n\t\t$labels = array(\n\t\t\t'name' => 'Servicios',\n\t\t\t'singular_name' => 'Servicio',\n\t\t\t'menu_name' => 'Servicios',\n\t\t\t'name_admin_bar'\t\t\t=> 'Servicio',\n\t\t\t'add_new' => 'Add New',\n\t\t\t'add_new_item'\t\t\t\t=> 'Add New Servicio',\n\t\t\t'new_item' => 'New Servicio',\n\t\t\t'edit_item' => 'Edit Servicio',\t\n\t\t\t'view_item' => 'View Servicio',\n\t\t\t'all_items'\t\t\t\t\t\t=> 'All Servicios',\n\t\t\t'search_items' => 'Search Servicios',\n\t\t\t'parent_item_colon' => 'Parent Servicios:',\n\t\t\t'not_found' => 'No Servicio Found.',\n\t\t\t'not_found_in_trash' => 'No Servicios Found In Trash.',\n\t\t);\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public'\t\t\t\t\t\t\t=> 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'menu_position' => 5,\t\n\t\t\t'menu_icon' => 'dashicons-id-alt',\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => array('slug' => 'servicios'),\n\t\t\t'capability_type' => 'post', //page\n\t\t\t'has_archive' => false, //false\n\t\t\t'hierarchical' => true, //true\n\t\t\t'supports' => array('title', 'editor', 'thumbnail','excerpt')\n\t\t);\n\t\tregister_post_type('servicios', $args);\n\n\t}", "private function get_custom_post_type_services()\n {\n return [\n PostType\\Example::class,\n ];\n }", "public function single(Post $post)\n {\n// auth()->loginUsingId(1);\n// if (Gate::allows('show-post',$post)){\n// return $post;\n// }\n// abort(403,'not access');\n\n// authorization services by ACL PostPolicy\n auth()->loginUsingId(1);\n if (Gate::allows('view',$post)){\n return $post;\n }\n abort(403,'not access');\n }", "public static function getPost($id, $type = '')\n {\n \t//echo \"#### \".$id.\"<br>\";die();\n \t$post = new Post;\n \tif ($id != null || $id != \"\") {\n \t\t$hashids = new \\Hashids\\Hashids(\"\", Config::get(\"weixin.minhashlength\"));\n \t\t// hashStr to id number\n \t\tif (!is_numeric($id)) {\n \t\t\t$ids = $hashids->decode($id);\n \t\t\tif (isset($ids[0])) {\n \t\t\t\t$id = $ids[0];\n \t\t\t}\n \t\t}\n \t\t$post = Post::findOrFail($id);\n \t\t$post = $post->attributesToArray();\n \t\t// add QRcode at the end of content\n \t\t$post['content'] = $post['content'].WeixinController::addQrcode($post['sourcedomain']);\n \t\t// id number to hashStr\n \t\t$post['id'] = $hashids->encode($post['id']);\n \t\t// gen html meta\n \t\t$meta = self::getHtmlMeta('post', $post);\n \t} else {\n \t\t$post = $post->attributesToArray();\n \t\t$meta = \"\";\n \t}\n \t\n \tif ($type == \"preview\") {\n \t\t$preview = true;\n \t} else {\n \t\t$preview = false;\n \t}\n \t\n \treturn response()->view('post', ['data' => $post, 'url' => $post['url'], 'isadmin' => self::isAdmin(), 'ispreview' => $preview, 'meta' => $meta ]);\n }", "public function getType()\n { return $this->get('type'); }", "function proyecto_post_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'proyectos', 'Post Type General Name', 'text_domain' ),\n\t\t'singular_name' => _x( 'proyecto', 'Post Type Singular Name', 'text_domain' ),\n\t\t'menu_name' => __( 'Post Types', 'text_domain' ),\n\t\t'name_admin_bar' => __( 'Post Type', 'text_domain' ),\n\t\t'archives' => __( 'Item Archives', 'text_domain' ),\n\t\t'attributes' => __( 'Item Attributes', 'text_domain' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n\t\t'all_items' => __( 'All Items', 'text_domain' ),\n\t\t'add_new_item' => __( 'Add New Item', 'text_domain' ),\n\t\t'add_new' => __( 'Add New', 'text_domain' ),\n\t\t'new_item' => __( 'New Item', 'text_domain' ),\n\t\t'edit_item' => __( 'Edit Item', 'text_domain' ),\n\t\t'update_item' => __( 'Update Item', 'text_domain' ),\n\t\t'view_item' => __( 'View Item', 'text_domain' ),\n\t\t'view_items' => __( 'View Items', 'text_domain' ),\n\t\t'search_items' => __( 'Search Item', '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 item', 'text_domain' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),\n\t\t'items_list' => __( 'Items list', 'text_domain' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'text_domain' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'proyecto', 'text_domain' ),\n\t\t'description' => __( 'personalización del proyecto', 'text_domain' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor', 'thumbnail' ),\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\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-images-alt2',\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\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' => 'page',\n\t);\n\tregister_post_type( 'proyecto', $args );\n\n}", "public function getModel()\n {\n $post = Post::class;\n return $post;\n }", "function get_post_type_advanced() {\n\n $post_type = get_post_type();\n\n if( is_post_type_archive() ) {\n $post_type = get_query_var( 'post_type' );\n }\n\n if( is_tax() ) {\n $post_type = get_taxonomy( get_queried_object()->taxonomy )->object_type[0];\n }\n\n return $post_type;\n}", "public function getPosto() {\n return $this->posto;\n }", "function get_post_data() {\n\t\tif (empty($this->post)) :\n\t\t\t$this->post = get_post( $this->id );\n\t\tendif;\n\t\t\n\t\treturn $this->post;\n\t}", "protected function get_fields() {\n\t\treturn rwmb_get_registry( 'field' )->get_by_object_type( 'post' );\n\t}", "function OPS_get_post($id) {\r\n\tglobal $wpdb;\r\n\t$post = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID=$id\");\r\n\tif ($post->post_type == \"revision\"){\r\n\t\t$id = $post->post_parent;\r\n\t\t$post = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID=$id\");\r\n\t}\r\n\treturn $post[0];\r\n}", "function cursos_post_type() {\n\n $labels = array(\n 'name' => _x( 'cursos', 'Post Type General Name', 'text_domain' ),\n 'singular_name' => _x( 'curso', 'Post Type Singular Name', 'text_domain' ),\n 'menu_name' => __( 'cursos', 'text_domain' ),\n 'name_admin_bar' => __( 'Post Type', 'text_domain' ),\n 'archives' => __( 'Item Archives', 'text_domain' ),\n 'attributes' => __( 'Item Attributes', 'text_domain' ),\n 'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n 'all_items' => __( 'Todos os cursos', 'text_domain' ),\n 'add_new_item' => __( 'Add nova pergunta', 'text_domain' ),\n 'add_new' => __( 'novo cursoa', 'text_domain' ),\n 'new_item' => __( 'nova pergunta', 'text_domain' ),\n 'edit_item' => __( 'Edit Item', 'text_domain' ),\n 'update_item' => __( 'Update Item', 'text_domain' ),\n 'view_item' => __( 'View Item', 'text_domain' ),\n 'view_items' => __( 'View Items', 'text_domain' ),\n 'search_items' => __( 'Search Item', 'text_domain' ),\n 'not_found' => __( 'não encontrato', 'text_domain' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n 'featured_image' => __( 'Featured Image', 'text_domain' ),\n 'set_featured_image' => __( 'Set featured image', 'text_domain' ),\n 'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),\n 'use_featured_image' => __( 'Use as featured image', 'text_domain' ),\n 'insert_into_item' => __( 'Insert into item', 'text_domain' ),\n 'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),\n 'items_list' => __( 'Items list', 'text_domain' ),\n 'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n 'filter_items_list' => __( 'Filter items list', 'text_domain' ),\n );\n $args = array(\n 'label' => __( 'cursos', 'text_domain' ),\n 'description' => __( 'cursos', 'text_domain' ),\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'excerpt'),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\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( 'cursos_post_type', $args );\n\n}", "private function getServicePostUser()\n {\n return $this->container->get('app_service_post_user');\n }", "function get_post_status_object($post_status)\n {\n }", "function get_post_types() {\n\tglobal $rf_custom_posts;\n\n\t$post = new PostType();\n\t$cpts = $post->get_admin_post_pages();\n\n\t$cpts = array_merge($cpts, $rf_custom_posts);\n\t$cpts = apply_filters(\"admin/post_types\", $cpts);\n\n\treturn $cpts;\n}", "private function createResourceForm($post, $formType = 'create')\n {\n $resourceForm = $this->createNamedForm('resource', 'pum_object', $post, array(\n 'form_view' => $this->createFormViewByName('post', 'create', $update = false)\n ));\n\n $resourceForm->add('publish_date', 'datetime', array(\n 'label' => 'Date de publication :',\n 'widget' => 'single_text',\n 'format' => 'dd/MM/yyyy HH:mm',\n 'view_timezone' => $this->getUserTimezone()\n ));\n $resourceForm->add('medias', 'collection', array('type' => 'rpe_media', 'allow_add' => true, 'allow_delete' => true));\n $resourceForm->add('library_medias', 'collection', array('mapped' => false, 'allow_add' => true, 'allow_delete' => true));\n\n //$resourceForm->add('library_medias_file', 'rpe_media', array('mapped' => false));\n //$resourceForm->add('linkedPosts', 'collection', array('type' => 'rpe_linked_posts', 'allow_add' => true, 'allow_delete' => true));\n\n if ('edit' === $formType) {\n $resourceForm->add('submit_new', 'submit');\n }\n $resourceForm->add('submit_draft', 'submit');\n\n return $resourceForm;\n }", "public function editActionPost(): object\n {\n // Connects to db\n $this->app->db->connect();\n\n // Retrieves contentId\n $contentId = getPost(\"contentId\");\n\n if (!is_numeric($contentId)) {\n return $this->app->response->redirect(\"admin\");\n }\n\n if (hasKeyPost(\"doDelete\")) {\n return $this->app->response->redirect(\"admin/delete&id=$contentId\");\n }\n\n if (hasKeyPost(\"doSave\")) {\n $params = getPost([\n \"contentTitle\",\n \"contentPath\",\n \"contentSlug\",\n \"contentData\",\n \"contentType\",\n \"contentFilter\",\n \"contentPublish\",\n \"contentId\"\n ]);\n\n if (!$params[\"contentSlug\"]) {\n $params[\"contentSlug\"] = slugify($params[\"contentTitle\"]);\n }\n\n if (!$params[\"contentPath\"]) {\n $params[\"contentPath\"] = null;\n }\n\n $params[\"contentFilter\"] = implode(\",\", getPost([\"contentFilter\"]));\n\n // Calls editBlogpost method\n $this->admin->editBlogpost($params);\n\n // Redirects\n return $this->app->response->redirect(\"admin\");\n }\n }", "public function getPost()\n {\n return $this->post;\n }", "function custom_post_type1 (){\r\n\t\r\n\t\t$labels = array(\r\n\t\t\t'name' => 'Services',\r\n\t\t\t'singular_name' => 'Services',\r\n\t\t\t'add_new' => 'Add Item',\r\n\t\t\t'all_items' => 'All Items',\r\n\t\t\t'add_new_item' => 'Add Item',\r\n\t\t\t'edit_item' => 'Edit Item',\r\n\t\t\t'new_item' => 'New Item',\r\n\t\t\t'view_item' => 'View Item',\r\n\t\t\t'search_item' => 'Search Services',\r\n\t\t\t'not_found' => 'No items found',\r\n\t\t\t'not_found_in_trash' => 'No items found in trash',\r\n\t\t\t'parent_item_colon' => 'Parent Item'\r\n\t\t);\r\n\t\t$args = array(\r\n\t\t\t'labels' => $labels,\r\n\t\t\t'public' => true,\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'publicly_queryable' => true,\r\n\t\t\t'query_var' => true,\r\n\t\t\t'rewrite' => true,\r\n\t\t\t'capability_type' => 'post',\r\n\t\t\t'hierarchical' => false,\r\n\t\t\t'supports' => array(\r\n\t\t\t\t'title',\r\n\t\t\t\t'editor',\r\n\t\t\t\t'excerpt',\r\n\t\t\t\t'thumbnail',\r\n\t\t\t\t'revisions',\r\n\t\t\t),\r\n\t\t\t'taxonomies' => array('category', 'post_tag'),\r\n\t\t\t'menu_position' => 5,\r\n\t\t\t'exclude_from_search' => false\r\n\t\t);\r\n\t\tregister_post_type('services',$args);\r\n\t}", "function get_by_type($type) {\r\n\t\t\t$output = array();\r\n\t\t\t$posts_array = get_posts( 'post_type=' . $type ); \r\n\t\t\tforeach( $posts_array as $post ) {\r\n\t\t\t\tsetup_postdata($post); \r\n\t\t\t\t$output[$post->ID] = $post->post_title ;\r\n\t\t\t}\r\n\t\t\treturn $output;\r\n\t\t}", "public function get_post_get()\n {\n $this->get_post_get_action();\n $this->get_post_get_query();\n $this->get_post_get_andor();\n $this->get_post_get_uid();\n $this->get_post_get_mid();\n $this->get_post_get_start();\n $this->get_post_get_mids();\n $this->get_post_get_showcontext();\n $this->get_post_get_mark();\n $this->get_post_get_cid();\n $this->get_post_get_subcat();\n }", "public function get_rest_field_type()\n {\n }", "public function get_rest_field_type()\n {\n }", "public function get_rest_field_type()\n {\n }", "public function get_rest_field_type()\n {\n }", "public function modelForPost(\\WP_Post $post)\n {\n if (! $post) {\n return;\n }\n\n $result = null;\n\n if (isset($this->modelCache[\"m-$post->ID\"])) {\n return $this->modelCache[\"m-$post->ID\"];\n }\n\n if (isset($this->modelFactories[$post->post_type])) {\n $result = call_user_func_array($this->modelFactories[$post->post_type], [$this, $post]);\n } elseif (isset($this->config['model-map'][$post->post_type])) {\n $className = $this->config['model-map'][$post->post_type];\n if (class_exists($className)) {\n $result = new $className($this, $post);\n }\n }\n\n if (! $result) {\n if ($post->post_type == 'attachment') {\n $result = new Attachment($this, $post);\n } elseif ($post->post_type == 'page') {\n $result = new Page($this, $post);\n } else {\n $result = new Post($this, $post);\n }\n }\n\n if ($result) {\n $this->modelCache[\"m-$post->ID\"] = $result;\n }\n\n return $result;\n }", "function wp_getPostTypes( $args ) {\n\n global $wp_xmlrpc_server;\n $wp_xmlrpc_server->escape( $args );\n\n $blog_ID = (int) $args[0];\n $username = $args[1];\n $password = $args[2];\n\n if ( ! $user = $wp_xmlrpc_server->login( $username, $password ) )\n return $wp_xmlrpc_server->error;\n\n $post_types = get_post_types( '','objects' );\n\n $struct = array();\n\n foreach( $post_types as $post_type ) {\n\n // capability check for post_types\n if( ! current_user_can( $post_type->cap->edit_posts ) )\n continue;\n\n $post_type = (array)$post_type;\n\n $post_type_data = array(\n 'labels' => $post_type['labels'],\n 'description' => $post_type['description'],\n 'capability_type' => $post_type['capability_type'],\n 'cap' => $post_type['cap'],\n 'map_meta_cap' => $post_type['map_meta_cap'],\n 'hierarchical' => $post_type['hierarchical'],\n 'menu_position' => $post_type['menu_position'],\n 'taxonomies' => get_object_taxonomies( $post_type['name'] ),\n );\n\n $struct[ $post_type['name'] ] = $post_type_data;\n\n }\n\n return $struct;\n \n}", "function poi_post_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'poi Types', 'Post Type General Name', 'text_domain' ),\n\t\t'singular_name' => _x( 'poiType', 'Post Type Singular Name', 'text_domain' ),\n\t\t'menu_name' => __( 'poi', 'text_domain' ),\n\t\t'name_admin_bar' => __( 'poi Type', 'text_domain' ),\n\t\t'archives' => __( 'poi Archives', 'text_domain' ),\n\t\t'attributes' => __( 'poi Attributes', 'text_domain' ),\n\t\t'parent_item_colon' => __( 'Parent poi', 'text_domain' ),\n\t\t'all_items' => __( 'All poi', 'text_domain' ),\n\t\t'add_new_item' => __( 'Add New poi', 'text_domain' ),\n\t\t'add_new' => __( 'Add New', 'text_domain' ),\n\t\t'new_item' => __( 'New poi', 'text_domain' ),\n\t\t'edit_item' => __( 'Edit poi', 'text_domain' ),\n\t\t'update_item' => __( 'Update poi', 'text_domain' ),\n\t\t'view_item' => __( 'View poi', 'text_domain' ),\n\t\t'view_items' => __( 'View pois', 'text_domain' ),\n\t\t'search_items' => __( 'Search poi', '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 poi', 'text_domain' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this poi', 'text_domain' ),\n\t\t'items_list' => __( 'pois list', 'text_domain' ),\n\t\t'items_list_navigation' => __( 'pois list navigation', 'text_domain' ),\n\t\t'filter_items_list' => __( 'Filter pois list', 'text_domain' ),\n\t);\n\t$rewrite = array(\n\t\t'slug' => 'poi',\n\t\t'with_front' => true,\n\t\t'pages' => true,\n\t\t'feeds' => true,\n\t);\n\t$args = array(\n\t\t'label' => __( 'poiType', 'text_domain' ),\n\t\t'description' => __( 'poi Type Description', 'text_domain' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats' ),\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\n\t\t'hierarchical' => true,\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-editor-customchar',\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\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'rewrite' => $rewrite,\n\t\t'capability_type' => 'post',\n\t\t'show_in_rest' => true,\n\t);\n\tregister_post_type( 'poi_type', $args );\n\n}", "public function get_type()\n\t{\n\t\treturn 'notification.type.approve_post';\n\t}", "public function get_persontype_info($post_id, $persontype = 1, $type = '_billing') {\n\n\t\t$WooCommerceNFeFormat = new WooCommerceNFeFormat;\n\n\t\tif ( $persontype == 3 && $type == '_shipping' ) {\n\t\t\t$persontype = $this->detect_persontype($post_id, '_billing');\n\t\t\t$type = '_billing';\n\t\t}\n\n\t\tif ( $persontype == 1 ) {\n\n\t\t\t// Full name and CPF\n\t\t\t$person_info['nome_completo'] = get_post_meta($post_id, $type.'_first_name', true).' '.get_post_meta($post_id, $type.'_last_name', true);\n\t\t\t$person_info['cpf'] = $WooCommerceNFeFormat->cpf(get_post_meta($post_id, $type.'_cpf', true));\n\n\t\t} elseif ( $persontype == 2 ) {\n\n\t\t\t// Razao Social, CNPJ and IE\n\t\t\t$person_info['razao_social'] = get_post_meta($post_id, $type.'_company', true);\n\t\t\t$person_info['cnpj'] = $WooCommerceNFeFormat->cnpj(get_post_meta($post_id, $type.'_cnpj', true));\n\t\t\t$person_info['ie'] = str_replace(array('-','.',','), '', get_post_meta($post_id, $type.'_ie', true));\n\n\t\t}\n\n\t\treturn $person_info;\n\n\t}", "static private function _get($type, $id) {\n $objects = self::getStack($type);\n if (empty($objects)) {\n return FALSE;\n }\n if (isset($objects[$id])) {\n return self::convertToOriginalObject($objects[$id]);\n }\n return FALSE;\n }", "public function postEdit($type)\n {\n // Declare the rules for the form validation\n $rules = array(\n 'name' => 'required|min:3'\n );\n\n // Validate the inputs\n $validator = Validator::make(Input::all(), $rules);\n\n // Check if the form validates with success\n if ($validator->passes())\n {\n // Update the type post data\n $this->$type->name = Input::get('name');\n\n // Was the type post updated?\n if($this->$type->save())\n {\n // Redirect to the new type post page\n return Redirect::to('admin/types/' . $type->id . '/edit')->with('success', Lang::get('admin/types/messages.update.success'));\n }\n\n // Redirect to the types post management page\n return Redirect::to('admin/types/' . $type->id . '/edit')->with('error', Lang::get('admin/types/messages.update.error'));\n }\n\n // Form validation failed\n return Redirect::to('admin/types/' . $type->id . '/edit')->withInput()->withErrors($validator);\n }", "private function get_post_type()\n {\n $post_id = get_the_ID();\n\n // Check post for post type\n if( $post_id )\n {\n return get_post_type($post_id);\n }\n\n // Check query vars for post type\n if( $post_type = get_query_var('post_type') )\n {\n return $post_type;\n }\n\n // No post type found\n return '';\n\n }", "public function getType()\n{\nreturn $this->type;\n}", "function dtm_get_post_id( $post_type, $post_id ) {\n\t//$accepted_post_type = array( 'article', 'listicle' );\n\t//$post_type = self::get_post_type( $post_type );\n\t//if ( WP_Base::is_toh() ) {\n\t//\tif ( in_array( $post_type, $accepted_post_type ) ) {\n\t//\t\treturn ( '' );\n\t//\t}\n\t//\n\t//\tif ( WP_Base::is_recipe() ) {\n\t//\t\treturn get_post_meta( $post_id, 'rms_legacy_id', true );\n\t//\t}\n\t//}\n\t$post_id = apply_filters( 'dtm_wordpress_content_id', $post_id );\n\n\treturn $post_id;\n}", "function post_types()\n{\n $collection = collect(get_post_types(array( '_builtin' => false ), 'objects'))\n ->pluck('label', 'name')\n ->except(array( 'acf-field', 'acf-field-group', 'wp_stream_alerts', 'wp_area' ))\n ->prepend(get_post_type_object('page')->labels->name, 'page')\n ->prepend(get_post_type_object('post')->labels->name, 'post')\n ->all();\n\n return $collection;\n}", "function get_form_type()\n {\n return is_array($this->object->context) ? $this->object->context[0] : $this->object->context;\n }", "public function get_post( $post_id )\n\t{\n\t\t// revisions are not supported for this post type, but still check for future proofing\n\t\t$post_id = ( wp_is_post_revision( $post_id ) ) ? wp_is_post_revision( $post_id ) : $post_id;\n\n\t\t// attempt to get the post\n\t\t$post = get_post( $post_id );\n\n\t\t// confirm that the post exists and is usable\n\t\tif ( ! isset( $post->post_type ) || $post->post_type != $this->post_type_name )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// return the post if found\n\t\treturn $post;\n\t}", "public function get_post() {\n\n return $this->_post;\n }", "function sc_get_post_meta( $id, $key ){\n\treturn (object)get_post_meta( $id, $key, true );\n}", "function _convert_entity_to_post($entity)\n {\n // Was a model passed instead of an entity?\n $post = $entity;\n if (!$entity instanceof stdClass) {\n $post = $entity->get_entity();\n }\n // Create the post content\n $post_content = clone $post;\n foreach ($this->object->_table_columns as $column) {\n unset($post_content->{$column});\n }\n unset($post->id_field);\n unset($post->post_content_filtered);\n unset($post->post_content);\n $post->post_content = $this->object->serialize($post_content);\n $post->post_content_filtered = $post->post_content;\n $post->post_type = $this->object->get_object_name();\n // Sometimes an entity can contain a data stored in an array or object\n // Those will be removed from the post, and serialized in the\n // post_content field\n foreach ($post as $key => $value) {\n if (in_array(strtolower(gettype($value)), array('object', 'array'))) {\n unset($post->{$key});\n }\n }\n // A post required a title\n if (!property_exists($post, 'post_title')) {\n $post->post_title = $this->object->get_post_title($post);\n }\n // A post also requires an excerpt\n if (!property_exists($post, 'post_excerpt')) {\n $post->post_excerpt = $this->object->get_post_excerpt($post);\n }\n return $post;\n }", "private function WP_Post_types($graph, $post) {\r\n if ($post->post_type == 'post') {\r\n $post_resource = $graph->resource($post->guid);\r\n $post_resource->add('rdf:type', $graph->resource('sioc:BlogPost'));\r\n }\r\n\r\n return $graph;\r\n }", "public function fetchPost($postType)\n {\n $posts = $this->post->where('postType', $postType)->get();\n $this->response['code'] = \"0000\";\n $this->response['message'] = \"Posts fetched successfully\";\n $this->response['post'] = $this->postTransformer->transformCollection($this->getPostDetails($posts));\n\n return ($this->response);\n }", "function _get_type() {\n\t\treturn $this->type();\n\n\t}", "function post_type_services() {\nregister_post_type(\n 'services', \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/services.png',\n 'labels'=>array(\n 'name' => _x('Services', 'post type general name'),\n 'singular_name' => _x('Service', 'post type singular name'),\n 'add_new' => _x('Add New', 'Service'),\n 'add_new_item' => __('Add New Service'),\n 'edit_item' => __('Edit Service'),\n 'new_item' => __('New Service'),\n 'view_item' => __('View Service'),\n 'search_items' => __('Search Testimonials'),\n 'not_found' => __('No Services found'),\n 'not_found_in_trash' => __('No Services found in Trash'), \n 'menu_name' => _x( 'Services', 'services' ),\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' => 'services', 'with_front' => FALSE,),\n 'capability_type' => 'post',\n 'supports' => array(\n 'title',\n 'thumbnail',\n 'custom-fields',\n 'excerpt',\n 'comments',\n 'author',\n 'editor'\n )\n ) \n );\n}", "function readFromPost() {\n\t\t$this->idt = requestVar('idt');\n\t\t$this->newIdt = requestVar('template');\n\t\t$this->description = requestVar('description');\n\t\t$this->postsHeader = requestVar('postListHeader');\n\t\t$this->postBody = requestVar('postBody');\n\t\t$this->postsFooter = requestVar('postListFooter');\n\t\t$this->formLogged = requestVar('formLogged');\n\t\t$this->form = requestVar('formNotLogged');\n\t\t$this->navigation = requestVar('navigation');\n\t\t$this->name = requestVar('nameNoUrl');\n\t\t$this->nameLin = requestVar('nameUrl');\n\t\t$this->memberName = requestVar('memberName');\n\t\t$this->date = requestVar('date');\n\t\t$this->time = requestVar('time'); \n\t\t$this->nextPage = requestVar('nextPage');\n\t\t$this->previousPage =requestVar('previousPage');\n\t\t$this->firstPage = requestVar('firstPage');\n\t\t$this->lastPage = requestVar('lastPage');\t\n\n\t\t$this->urlToLink = (requestVar('urlToLink') == 'yes') ? true : false;\n\t\t$this->emoToImg = \t (requestVar('emoToImg') == 'yes') ?true : false;\n\t\t$this->gravSize = \t (int)requestVar('gravSize');\n\t\t$this->gravDefault = requestVar('gravDefault');;\n\n\n\t\t\n\t\t$this->action = requestVar('action');\n\t}", "public function getEntityType();", "public function createActionPost(): object\n {\n // Connects to db\n $this->app->db->connect();\n\n if (hasKeyPost(\"doCreate\")) {\n $title = getPost(\"contentTitle\");\n\n // Calls createProduct method\n $this->admin->createBlogpost($title);\n\n // Retrieves id\n $id = $this->app->db->lastInsertId();\n }\n\n // Redirects\n return $this->app->response->redirect(\"admin/edit?id=$id\");\n }", "protected function get_object_type()\n {\n }", "public function getPost()\n {\n return $this->hasOne(Posts::className(), ['id' => 'post_id']);\n }", "function get_type() {\n\t\treturn $this->get_data( 'type' );\n\t}" ]
[ "0.66037905", "0.64443016", "0.6231475", "0.60936433", "0.6065269", "0.5992466", "0.59074616", "0.58791625", "0.5838664", "0.5828246", "0.5824715", "0.58228725", "0.5815631", "0.579846", "0.5777325", "0.5762573", "0.5752127", "0.5713981", "0.56968015", "0.5670789", "0.5654672", "0.5649312", "0.5641051", "0.56194097", "0.56006896", "0.55734396", "0.55620563", "0.5560246", "0.5547713", "0.5542143", "0.55390614", "0.5537751", "0.5536675", "0.5529453", "0.55225545", "0.55088556", "0.55012023", "0.5485099", "0.5478388", "0.5476588", "0.5466644", "0.54298484", "0.54298484", "0.5424363", "0.5421022", "0.54181075", "0.54170257", "0.5405143", "0.54014933", "0.54000723", "0.53973836", "0.53969574", "0.53945756", "0.53942186", "0.5389031", "0.53875613", "0.5385813", "0.5381057", "0.53642887", "0.5361611", "0.53147364", "0.53144395", "0.5281633", "0.52811337", "0.52746916", "0.52744776", "0.52733266", "0.5272851", "0.52620864", "0.5254363", "0.5251134", "0.5246254", "0.5246254", "0.5246254", "0.5246254", "0.5246014", "0.5244698", "0.5231856", "0.5231402", "0.5218042", "0.5208511", "0.52028435", "0.5182312", "0.51791453", "0.5173009", "0.5168797", "0.51614684", "0.51518375", "0.5151219", "0.51499593", "0.51436555", "0.5139733", "0.5132948", "0.5131988", "0.5130511", "0.5125367", "0.51224065", "0.5120198", "0.51136553", "0.51135033", "0.51091784" ]
0.0
-1
/ If editing, deleting, or reading a directorio, get the post and post type object.
function directorio_meta_cap( $caps, $cap, $user_id, $args ) { if ( 'edit_directorio' == $cap || 'delete_directorio' == $cap || 'read_directorio' == $cap ) { $post = get_post( $args[0] ); $post_type = get_post_type_object( $post->post_type ); /* Set an empty array for the caps. */ $caps = array(); } /* If editing a directorio, assign the required capability. */ if ( 'edit_directorio' == $cap ) { if ( $user_id == $post->post_author ) $caps[] = $post_type->cap->edit_posts; else $caps[] = $post_type->cap->edit_others_posts; } /* If deleting a directorio, assign the required capability. */ elseif ( 'delete_directorio' == $cap ) { if ( $user_id == $post->post_author ) $caps[] = $post_type->cap->delete_posts; else $caps[] = $post_type->cap->delete_others_posts; } /* If reading a private directorio, assign the required capability. */ elseif ( 'read_directorio' == $cap ) { if ( 'private' != $post->post_status ) $caps[] = 'read'; elseif ( $user_id == $post->post_author ) $caps[] = 'read'; else $caps[] = $post_type->cap->read_private_posts; } /* Return the capabilities required by the user. */ return $caps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_post_type_object($post_type)\n {\n }", "public static function post_object_type($type, $post) {\n $post_type = get_post_type($post);\n switch ( $post_type ) {\n case \"post\":\n $post_format = get_post_format($post);\n switch ( $post_format ) {\n case \"aside\":\n case \"status\":\n case \"quote\":\n case \"note\":\n $object_type = \"note\";\n break;\n case \"gallery\":\n case \"image\":\n $object_type = \"image\";\n break;\n case \"video\":\n $object_type = \"video\";\n break;\n case \"audio\":\n $object_type = \"audio\";\n break;\n default:\n $object_type = \"article\";\n break;\n }\n break;\n case \"page\":\n $object_type = \"page\";\n break;\n case \"attachment\":\n $mime_type = get_post_mime_type();\n $media_type = preg_replace(\"/(\\/[a-zA-Z]+)/i\", \"\", $mime_type);\n\n switch ($media_type) {\n case 'audio':\n $object_type = \"audio\";\n break;\n case 'video':\n $object_type = \"video\";\n break;\n case 'image':\n $object_type = \"image\";\n break;\n }\n break;\n default:\n $object_type = \"article\";\n break;\n }\n\n return $object_type;\n }", "public function type() { return $this->post->post_type; }", "function get_post_type($post = \\null)\n {\n }", "public static function current_object_type() {\n\t\tglobal $pagenow;\n\t\t$type = 'post';\n\n\t\tif ( in_array( $pagenow, [ 'user-edit.php', 'profile.php', 'user-new.php' ], true ) ) {\n\t\t\t$type = 'user';\n\t\t}\n\n\t\tif ( in_array( $pagenow, [ 'edit-comments.php', 'comment.php' ], true ) ) {\n\t\t\t$type = 'comment';\n\t\t}\n\n\t\tif ( in_array( $pagenow, [ 'edit-tags.php', 'term.php' ], true ) ) {\n\t\t\t$type = 'term';\n\t\t}\n\n\t\tif ( Conditional::is_ajax() && 'add-tag' === Param::post( 'action' ) ) {\n\t\t\t$type = 'term';\n\t\t}\n\n\t\treturn $type;\n\t}", "public function type()\n\t{\n\t\treturn $this->belongsTo('Lainga9\\BallDeep\\app\\PostType', 'post_type_id');\n\t}", "private function _get_relatives_of_object_by_type( $post_type ) {\n\t\t// Set up meta key fragments.\n\t\t$meta_key_fragments = array(\n\t\t\t'prefix' => $prefix,\n\t\t\t'type' => $post_type,\n\t\t);\n\n\t\t// Generate meta key.\n\t\t$meta_key = '_' . implode( '_', $meta_key_fragments );\n\n\t\treturn get_metadata( $this->type, $this->id, $meta_key, false );\n\t}", "protected function get_post_type() {\n\t\tif ( $post = get_post() ) {\n\t\t\treturn get_post_type( $post );\n\t\t}\n\n\t\tif ( isset( $_GET['post'] ) ) {\n\t\t\treturn get_post_type( sanitize_text_field( $_GET['post'] ) );\n\t\t}\n\n\t\tif ( isset( $_GET['post_type'] ) ) {\n\t\t\treturn strtolower( sanitize_text_field( $_GET['post_type'] ) );\n\t\t}\n\n\t\t$req_uri = $_SERVER['REQUEST_URI'];\n\t\t$exploded = explode( '/', $req_uri );\n\t\t$last = end( $exploded );\n\t\t$last = parse_url( $last, PHP_URL_PATH );\n\n\t\tif ( $last === 'post-new.php' || $last === 'edit.php' ) {\n\t\t\treturn 'post';\n\t\t}\n\n\t\treturn '';\n\t}", "function tc_get_post_type() {\r\n global $post;\r\n\r\n if ( !isset($post) )\r\n return;\r\n \r\n return $post -> post_type;\r\n }", "public static function post_type(){}", "public static function get_post_type(){\n global $TFUSE;\n return $TFUSE->ext->seek->get_post_type();\n }", "public function getPostType(){\n return $this->wpdsPostType;\n }", "abstract protected function post_type();", "function get_default_post_to_edit($post_type = 'post', $create_in_db = \\false)\n {\n }", "public function getPostType() {\n\t\treturn $this->post_type;\n\t}", "function get_parent_post_type ($post) {\n /* Get an array of Ancestors and Parents if they exist */\n\t$parents = get_post_ancestors( $post->ID );\n /* Get the top Level post->ID count base 1, array base 0 so -1 */ \n\t$id = ($parents) ? $parents[count($parents)-1]: $post->ID;\n\t/* Get the parent type */\n $parent = get_post( $id );\n\t$type = $parent->post_type;\n\t\nreturn $type;\n}", "function OPS_get_post($id) {\r\n\tglobal $wpdb;\r\n\t$post = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID=$id\");\r\n\tif ($post->post_type == \"revision\"){\r\n\t\t$id = $post->post_parent;\r\n\t\t$post = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID=$id\");\r\n\t}\r\n\treturn $post[0];\r\n}", "public function getPost()\n {\n if (!$this->hasPost()) {\n $this->setPost(false);\n\n if ($post = $this->registry->registry('wordpress_post')) {\n if ($post->getPostType() === 'page') {\n $this->setPost($post);\n }\n } \n }\n\n return $this->_getData('post');\n }", "public function posttype()\n\t{\n\t\treturn $this->belongsTo('App\\Models\\Posttype');\n\t}", "public function getPostType()\n\t\t{\n\t\t\treturn $this->_postType;\n\t\t}", "public function postType()\n {\n return $this->belongsTo(PostType::class);\n }", "function get_post_type_advanced() {\n\n $post_type = get_post_type();\n\n if( is_post_type_archive() ) {\n $post_type = get_query_var( 'post_type' );\n }\n\n if( is_tax() ) {\n $post_type = get_taxonomy( get_queried_object()->taxonomy )->object_type[0];\n }\n\n return $post_type;\n}", "public function getPostType(): string {\n return $this->post_type;\n }", "public function getType()\n {\n return $this->type = $this->get()->post_type;\n }", "private function getPost($post)\n {\n if ($post instanceof WP_post) {\n return $post;\n } elseif (is_int($post) === true) {\n return $this->objectHandler->getPost($post);\n } elseif (isset($post->ID) === true) {\n return $this->objectHandler->getPost($post->ID);\n }\n\n return false;\n }", "public function post()\n {\n return $this->belongsTo(Post::class, 'type_id');\n }", "public function editActionPost(): object\n {\n // Connects to db\n $this->app->db->connect();\n\n // Retrieves contentId\n $contentId = getPost(\"contentId\");\n\n if (!is_numeric($contentId)) {\n return $this->app->response->redirect(\"admin\");\n }\n\n if (hasKeyPost(\"doDelete\")) {\n return $this->app->response->redirect(\"admin/delete&id=$contentId\");\n }\n\n if (hasKeyPost(\"doSave\")) {\n $params = getPost([\n \"contentTitle\",\n \"contentPath\",\n \"contentSlug\",\n \"contentData\",\n \"contentType\",\n \"contentFilter\",\n \"contentPublish\",\n \"contentId\"\n ]);\n\n if (!$params[\"contentSlug\"]) {\n $params[\"contentSlug\"] = slugify($params[\"contentTitle\"]);\n }\n\n if (!$params[\"contentPath\"]) {\n $params[\"contentPath\"] = null;\n }\n\n $params[\"contentFilter\"] = implode(\",\", getPost([\"contentFilter\"]));\n\n // Calls editBlogpost method\n $this->admin->editBlogpost($params);\n\n // Redirects\n return $this->app->response->redirect(\"admin\");\n }\n }", "public function getPost()\n {\n return $this->hasOne(PostForm::className(), ['_id' => 'post_id']);\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 get_post( $post_id )\n\t{\n\t\t// revisions are not supported for this post type, but still check for future proofing\n\t\t$post_id = ( wp_is_post_revision( $post_id ) ) ? wp_is_post_revision( $post_id ) : $post_id;\n\n\t\t// attempt to get the post\n\t\t$post = get_post( $post_id );\n\n\t\t// confirm that the post exists and is usable\n\t\tif ( ! isset( $post->post_type ) || $post->post_type != $this->post_type_name )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// return the post if found\n\t\treturn $post;\n\t}", "public function get_post_type() {\n\t\treturn $this->post_type_key;\n\t}", "function wp_getPostType( $args ) {\n\n global $wp_xmlrpc_server;\n $wp_xmlrpc_server->escape( $args );\n\n $blog_ID = (int) $args[0];\n $username = $args[1];\n $password = $args[2];\n $post_type_name = $args[3];\n\n if ( !$user = $wp_xmlrpc_server->login( $username, $password ) )\n return $wp_xmlrpc_server->error;\n\n $post_type_names = get_post_types('', 'names');\n\n if( ! in_array( $post_type_name, $post_type_names ) )\n return new IXR_Error( 403, __( 'The post type specified is not valid' ) );\n\n $post_type = get_post_type_object( $post_type_name );\n\n //capability check\n if( ! current_user_can( $post_type->cap->edit_posts ) )\n return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post type' ) );\n\n $post_type = (array)$post_type;\n\n $post_type_data = array(\n 'labels' => $post_type['labels'],\n 'description' => $post_type['description'],\n 'capability_type' => $post_type['capability_type'],\n 'cap' => $post_type['cap'],\n 'map_meta_cap' => $post_type['map_meta_cap'],\n 'hierarchical' => $post_type['hierarchical'],\n 'menu_position' => $post_type['menu_position'],\n 'taxonomies' => get_object_taxonomies( $post_type['name'] ),\n );\n\n return $post_type_data;\n \n}", "function proyecto_post_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'proyectos', 'Post Type General Name', 'text_domain' ),\n\t\t'singular_name' => _x( 'proyecto', 'Post Type Singular Name', 'text_domain' ),\n\t\t'menu_name' => __( 'Post Types', 'text_domain' ),\n\t\t'name_admin_bar' => __( 'Post Type', 'text_domain' ),\n\t\t'archives' => __( 'Item Archives', 'text_domain' ),\n\t\t'attributes' => __( 'Item Attributes', 'text_domain' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n\t\t'all_items' => __( 'All Items', 'text_domain' ),\n\t\t'add_new_item' => __( 'Add New Item', 'text_domain' ),\n\t\t'add_new' => __( 'Add New', 'text_domain' ),\n\t\t'new_item' => __( 'New Item', 'text_domain' ),\n\t\t'edit_item' => __( 'Edit Item', 'text_domain' ),\n\t\t'update_item' => __( 'Update Item', 'text_domain' ),\n\t\t'view_item' => __( 'View Item', 'text_domain' ),\n\t\t'view_items' => __( 'View Items', 'text_domain' ),\n\t\t'search_items' => __( 'Search Item', '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 item', 'text_domain' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),\n\t\t'items_list' => __( 'Items list', 'text_domain' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'text_domain' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'proyecto', 'text_domain' ),\n\t\t'description' => __( 'personalización del proyecto', 'text_domain' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor', 'thumbnail' ),\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\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-images-alt2',\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\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' => 'page',\n\t);\n\tregister_post_type( 'proyecto', $args );\n\n}", "function wp_get_single_post($postid = 0, $mode = \\OBJECT)\n {\n }", "public function get()\n {\n return $this->object = get_post($this->id);\n }", "public function modelForPost(\\WP_Post $post)\n {\n if (! $post) {\n return;\n }\n\n $result = null;\n\n if (isset($this->modelCache[\"m-$post->ID\"])) {\n return $this->modelCache[\"m-$post->ID\"];\n }\n\n if (isset($this->modelFactories[$post->post_type])) {\n $result = call_user_func_array($this->modelFactories[$post->post_type], [$this, $post]);\n } elseif (isset($this->config['model-map'][$post->post_type])) {\n $className = $this->config['model-map'][$post->post_type];\n if (class_exists($className)) {\n $result = new $className($this, $post);\n }\n }\n\n if (! $result) {\n if ($post->post_type == 'attachment') {\n $result = new Attachment($this, $post);\n } elseif ($post->post_type == 'page') {\n $result = new Page($this, $post);\n } else {\n $result = new Post($this, $post);\n }\n }\n\n if ($result) {\n $this->modelCache[\"m-$post->ID\"] = $result;\n }\n\n return $result;\n }", "private function processPost(WP_Post $post): ?WP_Post\n {\n $post->post_title .= $this->adminOutput((string) $post->post_type, $post->ID);\n\n if ($this->accessHandler->checkObjectAccess($post->post_type, $post->ID) === false) {\n if ($this->removePostFromList($post->post_type) === true) {\n return null;\n }\n\n $post->post_content = $this->processPostContent($post);\n\n if ($this->mainConfig->hidePostTypeTitle($post->post_type) === true) {\n $post->post_title = $this->mainConfig->getPostTypeTitle($post->post_type);\n }\n\n if ($this->mainConfig->lockPostTypeComments($post->post_type) === true) {\n $post->comment_status = 'close';\n }\n }\n\n return $post;\n }", "function dtm_get_post_id( $post_type, $post_id ) {\n\t//$accepted_post_type = array( 'article', 'listicle' );\n\t//$post_type = self::get_post_type( $post_type );\n\t//if ( WP_Base::is_toh() ) {\n\t//\tif ( in_array( $post_type, $accepted_post_type ) ) {\n\t//\t\treturn ( '' );\n\t//\t}\n\t//\n\t//\tif ( WP_Base::is_recipe() ) {\n\t//\t\treturn get_post_meta( $post_id, 'rms_legacy_id', true );\n\t//\t}\n\t//}\n\t$post_id = apply_filters( 'dtm_wordpress_content_id', $post_id );\n\n\treturn $post_id;\n}", "function forum_single_document($id, $itemtype) {\n\n // both known item types are posts so get them the same way\n $post = get_record('forum_posts', 'id', $id);\n $discussion = get_record('forum_discussions', 'id', $post->discussion);\n $coursemodule = get_field('modules', 'id', 'name', 'forum');\n $cm = get_record('course_modules', 'course', $discussion->course, 'module', $coursemodule, 'instance', $discussion->forum);\n if ($cm){\n $context = get_context_instance(CONTEXT_MODULE, $cm->id);\n $post->groupid = $discussion->groupid;\n return new ForumSearchDocument(get_object_vars($post), $discussion->forum, $discussion->course, $itemtype, $context->id);\n }\n return null;\n}", "function get_post_types() {\n\tglobal $rf_custom_posts;\n\n\t$post = new PostType();\n\t$cpts = $post->get_admin_post_pages();\n\n\t$cpts = array_merge($cpts, $rf_custom_posts);\n\t$cpts = apply_filters(\"admin/post_types\", $cpts);\n\n\treturn $cpts;\n}", "public static function getPost($id, $type = '')\n {\n \t//echo \"#### \".$id.\"<br>\";die();\n \t$post = new Post;\n \tif ($id != null || $id != \"\") {\n \t\t$hashids = new \\Hashids\\Hashids(\"\", Config::get(\"weixin.minhashlength\"));\n \t\t// hashStr to id number\n \t\tif (!is_numeric($id)) {\n \t\t\t$ids = $hashids->decode($id);\n \t\t\tif (isset($ids[0])) {\n \t\t\t\t$id = $ids[0];\n \t\t\t}\n \t\t}\n \t\t$post = Post::findOrFail($id);\n \t\t$post = $post->attributesToArray();\n \t\t// add QRcode at the end of content\n \t\t$post['content'] = $post['content'].WeixinController::addQrcode($post['sourcedomain']);\n \t\t// id number to hashStr\n \t\t$post['id'] = $hashids->encode($post['id']);\n \t\t// gen html meta\n \t\t$meta = self::getHtmlMeta('post', $post);\n \t} else {\n \t\t$post = $post->attributesToArray();\n \t\t$meta = \"\";\n \t}\n \t\n \tif ($type == \"preview\") {\n \t\t$preview = true;\n \t} else {\n \t\t$preview = false;\n \t}\n \t\n \treturn response()->view('post', ['data' => $post, 'url' => $post['url'], 'isadmin' => self::isAdmin(), 'ispreview' => $preview, 'meta' => $meta ]);\n }", "function get_parent($type) {\n $relationships = get_field('post_detail_page_relationship', 'option');\n $parent = null;\n foreach ($relationships as $relationship) {\n if ($relationship['post_type'] === $type) {\n return $relationship['detail_page'];\n }\n }\n}", "function _find_post_by_old_slug($post_type)\n {\n }", "public function getObjectType();", "public function getObjectType();", "private function WP_Post_types($graph, $post) {\r\n if ($post->post_type == 'post') {\r\n $post_resource = $graph->resource($post->guid);\r\n $post_resource->add('rdf:type', $graph->resource('sioc:BlogPost'));\r\n }\r\n\r\n return $graph;\r\n }", "public function getObjectType() {\n\t\t$type = $this->object->getType();\n\t\t$subtype = $this->object->getSubtype() ? : 'default';\n\t\t$keys = [\n\t\t\t\"interactions:$type:$subtype\",\n\t\t\t$this->object instanceof Comment ? \"interactions:comment\" : \"interactions:post\",\n\t\t];\n\t\tforeach ($keys as $key) {\n\t\t\tif (elgg_language_key_exists($key, $this->language)) {\n\t\t\t\treturn elgg_echo($key, array(), $this->language);\n\t\t\t}\n\t\t}\n\t\treturn elgg_echo('interactions:post', $this->language);\n\t}", "public function get_post_types(){ return $this->post_types; }", "public function get_post_type($value='') {\n\t\t\treturn $this->post_type;\n\t\t}", "private function get_post_type()\n {\n $post_id = get_the_ID();\n\n // Check post for post type\n if( $post_id )\n {\n return get_post_type($post_id);\n }\n\n // Check query vars for post type\n if( $post_type = get_query_var('post_type') )\n {\n return $post_type;\n }\n\n // No post type found\n return '';\n\n }", "public function for_post( $id ) {\n\t\t$indexable = $this->repository->find_by_id_and_type( $id, 'post' );\n\n\t\tif ( ! $indexable ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $this->build_meta( $this->context_memoizer->get( $indexable, 'Post_Type' ) );\n\t}", "function create_post_type() {\n\tregister_post_type( 'Architects', array(\n\t\t'labels' => array(\n\t\t\t'name' => __( 'Architects' ),\n\t\t\t'singular_name' => __( 'Architect' ),\n\t\t\t'add_new_item' => __( 'Add architect' ),\n\t\t\t'edit' => __( 'Edit' ),\n\t\t\t'edit_item' => __( 'Edit this architect' ),\n\t\t\t'new_item' => __( 'New architect' ),\n\t\t\t'view' => __( 'View architect' ),\n\t\t\t'view_item' => __( 'View this architect' ),\n\t\t\t'search_items' => __( 'Search architects' ),\n\t\t\t'not_found' => __( 'No architect was found' ),\n\t\t\t'not_found_in_trash' => __( 'No architects in the trash' ),\n\t\t\t'parent' => __( 'Parent' )\n\t\t),\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'exclude_from_search' => false,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => get_template_directory_uri() . '/images/icon-post.type-integrantes.png',\n\t\t'hierarchical' => true, // if true this post type will be as pages\n\t\t'query_var' => true,\n\t\t'supports' => array('title', 'editor','excerpt','custom-fields','author','page-attributes','trackbacks'),\n\t\t'rewrite' => array('slug'=>'architect','with_front'=>false),\n\t\t'can_export' => true,\n\t\t'_builtin' => false,\n\t\t'_edit_link' => 'post.php?post=%d',\n\t));\n\t// Remotes custom post type\n\tregister_post_type( 'Remotes', array(\n\t\t'labels' => array(\n\t\t\t'name' => __( 'Projects' ),\n\t\t\t'singular_name' => __( 'Project' ),\n\t\t\t'add_new_item' => __( 'Add projects' ),\n\t\t\t'edit' => __( 'Edit' ),\n\t\t\t'edit_item' => __( 'Edit this project' ),\n\t\t\t'new_item' => __( 'New project' ),\n\t\t\t'view' => __( 'View project' ),\n\t\t\t'view_item' => __( 'View this project' ),\n\t\t\t'search_items' => __( 'Search project' ),\n\t\t\t'not_found' => __( 'No project was found' ),\n\t\t\t'not_found_in_trash' => __( 'No project in the trash' ),\n\t\t\t'parent' => __( 'Parent' )\n\t\t),\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'exclude_from_search' => false,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => get_template_directory_uri() . '/images/icon-post.type-integrantes.png',\n\t\t'hierarchical' => false, // if true this post type will be as pages\n\t\t'query_var' => true,\n\t\t'supports' => array('title', 'editor','excerpt','custom-fields','author','comments','trackbacks'),\n\t\t'rewrite' => array('slug'=>'project','with_front'=>false),\n\t\t'can_export' => true,\n\t\t'_builtin' => false,\n\t\t'_edit_link' => 'post.php?post=%d',\n\t));\n\t// Scienticic custom post type\n\tregister_post_type( 'scientifics', array(\n\t\t'labels' => array(\n\t\t\t'name' => __( 'Scientifics' ),\n\t\t\t'singular_name' => __( 'Scientific' ),\n\t\t\t'add_new_item' => __( 'Add scientific' ),\n\t\t\t'edit' => __( 'Edit' ),\n\t\t\t'edit_item' => __( 'Edit this scientific' ),\n\t\t\t'new_item' => __( 'New scientific' ),\n\t\t\t'view' => __( 'View scientific' ),\n\t\t\t'view_item' => __( 'View this scientific' ),\n\t\t\t'search_items' => __( 'Search scientific' ),\n\t\t\t'not_found' => __( 'No scientific was found' ),\n\t\t\t'not_found_in_trash' => __( 'No scientifics in the trash' ),\n\t\t\t'parent' => __( 'Parent' )\n\t\t),\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'exclude_from_search' => false,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => get_template_directory_uri() . '/images/icon-post.type-integrantes.png',\n\t\t'hierarchical' => true, // if true this post type will be as pages\n\t\t'query_var' => true,\n\t\t'supports' => array('title', 'editor','excerpt','custom-fields','author','page-attributes','trackbacks'),\n\t\t'rewrite' => array('slug'=>'scientific','with_front'=>false),\n\t\t'can_export' => true,\n\t\t'_builtin' => false,\n\t\t'_edit_link' => 'post.php?post=%d',\n\t));\n\n}", "function clases_yoga_directo_post_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Clases directo', 'Post Type General Name', 'text_domain' ),\n\t\t'singular_name' => _x( 'Clase directo', 'Post Type Singular Name', 'text_domain' ),\n\t\t'menu_name' => __( 'Clases directo', 'text_domain' ),\n\t\t'name_admin_bar' => __( 'Clase directo', 'text_domain' ),\n\t\t'archives' => __( 'Item Archives', 'text_domain' ),\n\t\t'attributes' => __( 'Item Attributes', 'text_domain' ),\n\t\t'parent_item_colon' => __( 'Parent Clase:', 'text_domain' ),\n\t\t'all_items' => __( 'All Clase directo', 'text_domain' ),\n\t\t'add_new_item' => __( 'Add New Clase directo', 'text_domain' ),\n\t\t'add_new' => __( 'New Clase directo', 'text_domain' ),\n\t\t'new_item' => __( 'New Item', 'text_domain' ),\n\t\t'edit_item' => __( 'Edit Clas directo', 'text_domain' ),\n\t\t'update_item' => __( 'Update Clas directo', 'text_domain' ),\n\t\t'view_item' => __( 'View Clase directo', 'text_domain' ),\n\t\t'view_items' => __( 'View Items', 'text_domain' ),\n\t\t'search_items' => __( 'Search clases directo', 'text_domain' ),\n\t\t'not_found' => __( 'No clases directo found', 'text_domain' ),\n\t\t'not_found_in_trash' => __( 'No clases directo 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 item', 'text_domain' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),\n\t\t'items_list' => __( 'Items list', 'text_domain' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'text_domain' ),\n\t);\n\t$rewrite = array(\n\t\t'slug' => 'clases-directo',\n\t\t'with_front' => true,\n\t\t'pages' => true,\n\t\t'feeds' => true,\n\t);\n\t$args = array(\n\t\t'label' => __( 'Clase directo', 'text_domain' ),\n\t\t'description' => __( 'Clases de yoga directo post type', 'text_domain' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'comments', 'custom-fields' ),\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\n\t\t'hierarchical' => true,\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'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\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'rewrite' => $rewrite,\n\t\t'capability_type' => 'page',\n\t);\n\tregister_post_type( 'clases_yoga_directo', $args );\n\n}", "function owa_get_page_type() {\t\r\n\t\r\n\tif (is_home()):\r\n\t\t$type = \"Home\";\r\n\telseif (is_attachment()):\r\n\t\t$type = \"Attachment\";\r\n\telseif (is_page()):\r\n\t\t$type = \"Page\";\r\n\t// general page catch, should be after more specific post types\t\r\n\telseif (is_single()):\r\n\t\t$type = \"Post\";\r\n\telseif (is_feed()):\r\n\t\t$type = \"Feed\";\r\n\telseif (is_author()):\r\n\t\t$type = \"Author\";\r\n\telseif (is_category()):\r\n\t\t$type = \"Category\";\r\n\telseif (is_search()):\r\n\t\t$type = \"Search Results\";\r\n\telseif (is_month()):\r\n\t\t$type = \"Month\";\r\n\telseif (is_day()):\r\n\t\t$type = \"Day\";\r\n\telseif (is_year()):\r\n\t\t$type = \"Year\";\r\n\telseif (is_time()):\r\n\t\t$type = \"Time\";\r\n\telseif (is_tag()):\r\n\t\t$type = \"Tag\";\r\n\telseif (is_tax()):\r\n\t\t$type = \"Taxonomy\";\r\n\t// general archive catch, should be after specific archive types\t\r\n\telseif (is_archive()):\r\n\t\t$type = \"Archive\";\r\n\telse:\r\n\t\t$type = '(not set)';\r\n\tendif;\r\n\t\r\n\treturn $type;\r\n}", "protected function _applyPostPageLogic($object, $type = 'post')\n\t{\n\t\tif ($object->isBlogListingPage()) {\n\t\t\t//$this->_addRelNextPrev($object, __METHOD__);\n\t\t}\n\t\t\n\t\t$meta = new Varien_Object(array(\n\t\t\t'title' => $this->_getTitleFormat($object->getPostType()),\n\t\t\t'description' => trim($this->getData('metadesc_' . $object->getPostType())),\n\t\t\t'keywords' => trim($this->getData('metakey_' . $object->getPostType())),\n\t\t));\n\n\t\tif (($value = trim($object->getMetaValue('_yoast_wpseo_title'))) !== '') {\n \t\t$meta->setTitle($value);\n#\t\t\t$data = $this->getRewriteData();\n#\t\t\t$data['title'] = $value;\n#\t\t\t$this->setRewriteData($data);\n\t\t}\n\t\t\n\t\tif (($value = trim($object->getMetaValue('_yoast_wpseo_metadesc'))) !== '') {\n\t\t\t$meta->setDescription($value);\n\t\t}\n\t\t\n\t\tif (($value = trim($object->getMetaValue('_yoast_wpseo_metakeywords'))) !== '') {\n\t\t\t$meta->setKeywords($value);\n\t\t}\n\t\t\n\t\t$robots = array();\n\n\t\t$noIndex = (int)$object->getMetaValue('_yoast_wpseo_meta-robots-noindex');\n\n\t\tif ($noIndex === 0) {\n\t\t\t$robots['index'] = '';\n\t\t}\n\t\telse if ($noIndex === 1) {\n\t\t\t$robots['noindex'] = '';\n\t\t}\n\t\telse if ($noIndex === 2) {\n\t\t\t$robots['index'] = '';\n\t\t}\n\t\telse if ((int)$this->getData('noindex_' . $object->getPostType()) === 1) {\n\t\t\t$robots['noindex'] = '';\n\t\t}\n\n\t\tif ($object->getMetaValue('_yoast_wpseo_meta-robots-nofollow')) {\n\t\t\t$robots['nofollow'] = '';\n\t\t}\n\t\telse {\n\t\t\t$robots['follow'] = '';\n\t\t}\n\n\t\tif (($advancedRobots = trim($object->getMetaValue('_yoast_wpseo_meta-robots-adv'))) !== '') {\n\t\t\tif ($advancedRobots !== 'none') {\n\t\t\t\t$robots = explode(',', $advancedRobots);\n\t\t\t}\n\t\t}\n\n\t\t/* Allow custom fields in meta data */\n\t\t$data = $this->getRewriteData();\n\t\t\n\t\tforeach($meta->getData() as $key => $value) {\n\t\t\tif (strpos($value, '%%cf_') !== false) {\n\t\t\t\tif (preg_match_all('/%%cf_([^%]+)%%/', $value, $matches)) {\n\t\t\t\t\tforeach($matches[1] as $customField) {\n\t\t\t\t\t\t$data['cf_' . $customField] = $object->getMetaValue($customField);\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->setRewriteData($data);\n\n\t\t$robots = array_keys($robots);\n\n\t\tif (count($robots) > 0) {\n\t\t\t$meta->setRobots(implode(',', $robots));\n\t\t}\n\n\t\tif (!$meta->getDescription()) {\n\t\t\t$meta->setDescription($object->getMetaDescription());\n\t\t}\n\t\t\n\t\t$this->_applyMeta($meta->getData());\n\n\t\tif ($canon = $object->getMetaValue('_yoast_wpseo_canonical')) {\n\t\t\t$object->setCanonicalUrl($canon);\n\t\t}\n\t\t\n\t\tif (!$this->hasOpengraph() || (int)$this->getOpengraph() ===1) {\n\t\t\t$this->_addPostOpenGraphTags($object, $object->getPostType());\n\t\t}\n\t\t\n\t\tif ($this->getTwitter()) {\n\t\t\t$twitterData = array(\n\t\t\t\t'card' => $this->getTwitterCardType(),\n\t\t\t\t'site' => ($this->getTwitterSite() ? '@' . $this->getTwitterSite() : ''),\n\t\t\t\t'creator' => ($creator = $object->getAuthor()->getMetaValue('twitter')) ? '@' . $creator : '',\n\t\t\t\t'title' => $object->getMetaValue('_yoast_wpseo_twitter-title'),\n\t\t\t\t'description' => $object->getMetaValue('_yoast_wpseo_twitter-description'),\n\t\t\t\t'image' => $object->getMetaValue('_yoast_wpseo_twitter-image'),\n\t\t\t);\n\n\t\t\tif (!$twitterData['title']) {\n\t\t\t\t$twitterData['title'] = $object->getPostTitle();\n\t\t\t}\n\t\t\t\n\t\t\tif (!$twitterData['image']) {\n\t\t\t\t$twitterData['image'] = $object->getFeaturedImage() ? $object->getFeaturedImage()->getFullSizeImage() : null;\n\t\t\t}\n\n\t\t\t$this->_addTwitterCard($twitterData);\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "function get_post($post = \\null, $output = \\OBJECT, $filter = 'raw')\n {\n }", "public function create_post_type()\n \t{\n\t\t\t$labels = array(\n\t\t\t\t\t'name' => 'files',\n\t\t\t\t\t'singular_name' => 'file',\n\t\t\t\t\t'menu_name' => 'Files',\n\t\t\t\t\t'name_admin_bar' => 'Files',\n\t\t\t\t\t'parent_item_colon' => 'Parent Item:',\n\t\t\t\t\t'all_items' => 'All Items',\n\t\t\t\t\t'add_new_item' => 'Add New File',\n\t\t\t\t\t'add_new' => 'Add New',\n\t\t\t\t\t'new_item' => 'New File',\n\t\t\t\t\t'edit_item' => 'Edit File',\n\t\t\t\t\t'update_item' => 'Update File',\n\t\t\t\t\t'view_item' => 'View File',\n\t\t\t\t\t'search_items' => 'Search Item',\n\t\t\t\t\t'not_found' => 'Not found',\n\t\t\t\t\t'not_found_in_trash' => 'Not found in Trash',\n\t\t\t\t);\n\t\t\t\t\n\t\t\t$rewrite = array(\n\t\t\t\t\t'slug' => 'files',\n\t\t\t\t\t'with_front' => true,\n\t\t\t\t\t'pages' => false,\n\t\t\t\t\t'feeds' => false,\n\t\t\t\t);\n\t\t\t$args = array(\n\t\t\t\t\t'label' => 'file',\n\t\t\t\t\t'description' => 'A Post Type to provide the data for the sharing.',\n\t\t\t\t\t'labels' => $labels,\n\t\t\t\t\t'supports' => array( 'title', 'excerpt', 'custom-fields', ),\n\t\t\t\t\t'hierarchical' => false,\n\t\t\t\t\t'public' => true,\n\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t'show_in_menu' => true,\n\t\t\t\t\t'menu_position' => 5,\n\t\t\t\t\t'menu_icon' => 'dashicons-share',\n\t\t\t\t\t'show_in_admin_bar' => true,\n\t\t\t\t\t'show_in_nav_menus' => false,\n\t\t\t\t\t'can_export' => true,\n\t\t\t\t\t'has_archive' => false,\n\t\t\t\t\t'exclude_from_search' => true,\n\t\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t\t'rewrite' => $rewrite,\n\t\t\t\t\t'capability_type' => 'post',\n\t\t\t\t);\n\t\t\n\t\t\t/* register_post_type('name', $args) */\n \t\tregister_post_type(self::POST_TYPE, $args);\n \t}", "function get_post_data() {\n\t\tif (empty($this->post)) :\n\t\t\t$this->post = get_post( $this->id );\n\t\tendif;\n\t\t\n\t\treturn $this->post;\n\t}", "function carrousel_savePost($post_id, $post){\n\n if(!isset($_POST[\"caroussel_lien\"])){\n return $post_id;\n }\n\n $type = get_post_type_object($post->post_type);\n if(!current_user_can($type->cap->edit_post)){\n return $post_id;\n }\n\n update_post_meta($post_id, \"_monLink\", $_POST[\"caroussel_lien\"]);\n}", "function create_post_type($slug=false, $single = false, $plural=null, $type='page', $_args=array()) {\n\t\tglobal $wp_rewrite;\n\t\tif(!$slug && !$single) return;\n\t\tif($single && !$plural) $plural = $single . 's';\n\t\tif($single && $plural) {\n\t\t\t$labels = array(\n\t\t\t\t'name' => _x($plural, 'post type general name'),\n\t\t\t\t'singular_name' => _x($single, 'post type singular name'),\n\t\t\t\t'add_new' => _x('Add New', strtolower($single)),\n\t\t\t\t'add_new_item' => __('Add New ' . $single),\n\t\t\t\t'edit_item' => __('Edit ' . $single),\n\t\t\t\t'new_item' => __('New ' . $single),\n\t\t\t\t'view_item' => __('View ' . $single),\n\t\t\t\t'search_items' => __('Search ' . $plural),\n\t\t\t\t'not_found' => __('No ' . strtolower($plural) . ' found'),\n\t\t\t\t'not_found_in_trash' => __('No ' . strtolower($plural) . ' found in Trash'), \n\t\t\t\t'parent_item_colon' => '',\n\t\t\t\t'menu_name' => _x($plural, 'post type general name')\n\t\t\t);\n\t\t\tif($type=='page') {\n\t\t\t\t$args = array_merge(array(\n\t\t\t\t\t'labels' => $labels,\n\t\t\t\t\t'public' => true,\n\t\t\t\t\t'publically_queryable' => true,\n\t\t\t\t\t'exclude_from_search' => false,\n\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t'show_in_menu' => true,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'rewrite' => array(\"slug\" => $slug),\n\t\t\t\t\t'capability_type' => 'page',\n\t\t\t\t\t'hierarchical' => true,\n\t\t\t\t\t'supports' => array('title', 'editor', 'author', 'excerpt', 'custom-fields', 'page-attributes')\n\t\t\t\t), $_args);\n\t\t\t}\n\t\t\tif($type=='post') {\n\t\t\t\t$args = array_merge(array(\n\t\t\t\t\t'labels' => $labels,\n\t\t\t\t\t'public' => true,\n\t\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t\t'has_archive' => true,\n\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t'show_in_menu' => true,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'rewrite' => array(\"slug\" => $slug),\n\t\t\t\t\t'capability_type' => 'post',\n\t\t\t\t\t'hierarchical' => false,\t\t\t\t\t\n\t\t\t\t\t'menu_position' => null,\n\t\t\t\t\t'supports' => array('title', 'editor', 'author', 'excerpt', 'custom-fields', 'comments')\n\t\t\t\t), $_args);\n\t\t\t}\n\t\t\tregister_post_type($slug, $args);\n\t\t}\n\t}", "private function _get_relatives_of_object__posts( $post_type ) {\n\n\t\tif ( empty( $post_type ) ) {\n\t\t\t// find a way to get all post types?\n\t\t}\n\n\t\t// convert a single post type to an array.\n\t\tif ( is_string( $post_type ) ) {\n\t\t\t$post_type = array( $post_type );\n\t\t}\n\n\t\t// bail, if we still don't have an array.\n\t\tif ( ! is_array( $post_type ) ) {\n\t\t\t$this->error( \"$prefix-invalid-post-type\", __( 'An invalid post type was specified when getting relatives of current object.', 'bodh' ) );\n\t\t\treturn false;\n\t\t}\n\n\t\t// setup array to store relatives.\n\t\t$relatives = array();\n\n\t\t// fill up with relatives of each type.\n\t\tforeach ( $post_type as $type ) {\n\t\t\t$relatives += array( $type => $this->get_relatives_of_object_by_type( $type ) );\n\t\t}\n\n\t\treturn $relatives;\n\t}", "public function process_post($type, $id = null){\n\t\t$action = $_POST['action'];\n\t\t\n\t\tif($action == 'cancel'){\n\t\t\turl::redirect($this->section_url);\n\t\t}\n\t\t\n\t\tif($action == 'delete'){\n\t\t\tif(Auth::instance()->logged_in('admin')){\n\t\t\t\tif($this->model->update(array($this->model->db_column_prefix.'status' => 0,$this->model->db_column_prefix.'deleted' => 1,$this->model->db_column_prefix.'deleted_date' => date('Y-m-d H:i:s')))){\n\t\t\t\t\t$this->session->set('alert',array('type' => 'success', 'message' => 'Entry deleted'));\n\t\t\t\t} else {\n\t\t\t\t\t$this->session->set('alert',array('type' => 'danger', 'message' => 'Something went wrong'));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->session->set('alert',array('type' => 'danger', 'message' => 'Sorry, you don\\'t have permission to do that.'));\n\t\t\t}\n\t\t\t\n\t\t\turl::redirect($this->section_url);\n\t\t}\n\t\t\n\t\t$fields = $this->model->fields();\n\t\t\n\t\t// Remove default field values\n\t\tforeach ($fields as $key => $field){\n\t\t\tif (isset($_POST[$key]) && $field['type'] != 'select' && $field['type'] != 'radio' && $field['type'] != 'checkbox' && $_POST[$key] == $field['value']) {\n\t\t\t\t$_POST[$key] = '';\n\t\t\t}\n\t\t}\n\t\t\n\t\t$validation = $this->model->validation();\n\t \n\t if ($validation->validate()){\n\t \t// Pull out fields we want from POST.\n\t\t\t$data = $this->model->map_post($this->input->post());\n\n\t\t\t// Format data/fields \n\t\t\t$this->model->process_fields($data);\n\t\t\t\n\t // Add or Edit\n\t if($type == 'add'){\n\t $id = $this->model->insert($data);\n\t } elseif($type == 'edit') {\n\t $this->model->update($data);\n\t }\n\t\t\t\n\t\t\t// Process files\n\t\t\t$this->process_uploaded_files($id);\n\t \n\t // Audit trace\n\t $this->audit_record('edit',$this->section_url,$id,$data);\n\t \n\t // Handle redirect and success message\n\t if($action == 'save'){\n\t $this->session->set('alert',array('type' => 'success', 'message' => 'Saved'));\n\t\t\t\t\n\t url::redirect($this->section_url);\n\t } else {\n\t $this->session->set('alert',array('type' => 'success', 'message' => 'Updated'));\n\t\t\t\t\n\t url::redirect(Kohana::config('admin.url').'/'.$this->section_url.'/edit/'.$id);\n\t }\t \n\t } else {\t \t\n\t\t\t$this->session->set('alert',array('type' => 'danger', 'message' => 'There are form errors'));\n\n\t \treturn array($validation,0);\n\t\t}\n\t}", "function rest_get_route_for_post_type_items($post_type)\n {\n }", "public function single(Post $post)\n {\n// auth()->loginUsingId(1);\n// if (Gate::allows('show-post',$post)){\n// return $post;\n// }\n// abort(403,'not access');\n\n// authorization services by ACL PostPolicy\n auth()->loginUsingId(1);\n if (Gate::allows('view',$post)){\n return $post;\n }\n abort(403,'not access');\n }", "public static function post_is_object(){\n if( count($_POST)>=1) return (object)$_POST;\n }", "private function get_object( $name, $type, $args = '' ) {\n\n\t\t$types = array(\n\t\t\t'page',\n\t\t\t'field',\n\t\t);\n\n\t\tif ( in_array( $type, $types ) ) {\n\n\t\t\t$class_name = $this->make_class_name( $name, $type );\n\t\t\t$parent = '\\\\' . __NAMESPACE__ . '\\Abstracts\\\\' . implode( '_', array_map( 'ucfirst', explode( '-', $type ) ) );\n\t\t\t$class = class_exists( $class_name ) ? new $class_name( $args ) : false;\n\n\t\t\treturn $class instanceof $parent ? $class : null;\n\t\t}\n\n\t\treturn null;\n\t}", "function get_post_mime_type($post = \\null)\n {\n }", "function getPostObject($post_id) {\n\t\t$post_url = get_permalink($post_id);\n\t\t$title = strip_tags(get_the_title($post_id));\n\t\t$tagObjects = get_the_tags($post_id);\n\t\t$single = is_single();\n\t\t$tags = \"\";\n\t\tif (!empty($tagObjects)) {\n\t\t\t$tags .= $tagObjects[0]->name;\n\t\t\tfor ($i = 1; $i < count($tagObjects); $i++) {\n\t\t\t\t$tags .= \",\".$tagObjects[$i]->name;\n\t\t\t}\n\t\t}\n\t\t$category = get_the_category($post_id);\n\t\t$categories = \"\";\n\t\tif (!empty($category)) {\n\t\t\t$categories .= $category[0]->name;\n\t\t\tfor ($i=1; $i<count($category); $i++) {\n\t\t\t\t$categories .= \",\".$category[$i]->name;\n\t\t\t}\n\t\t}\n\t\t$author = get_the_author();\n\t\t$date = get_the_date('U', $post_id) * 1000;\n\t\t$comments = get_comments_number($post_id);\n\n\t\t$tmdb = get_post_meta($post_id,'imdb_id');\n\n\t\t$post_object = array(\n\t\t\t'id' => $post_id,\n\t\t\t'url' => $post_url,\n\t\t\t'title' => $title,\n\t\t\t'tags' => $tags,\n\t\t\t'categories' => $categories,\n\t\t\t'comments' => $comments,\n\t\t\t'date' => $date,\n\t\t\t'author' => $author,\n\t\t\t'single' => $single,\n\t\t\t'img' => get_the_post_thumbnail_url($post_id),\n\t\t\t'tmdb' => $tmdb\n\t\t);\n\t\treturn $post_object;\n\t}", "function post_types()\n{\n $collection = collect(get_post_types(array( '_builtin' => false ), 'objects'))\n ->pluck('label', 'name')\n ->except(array( 'acf-field', 'acf-field-group', 'wp_stream_alerts', 'wp_area' ))\n ->prepend(get_post_type_object('page')->labels->name, 'page')\n ->prepend(get_post_type_object('post')->labels->name, 'post')\n ->all();\n\n return $collection;\n}", "public function get_page_type()\n {\n switch ($this->type) {\n case self::TYPE_SLIDESHOW:\n return 'slideshow';\n break;\n default:\n return 'entry';\n }\n }", "function propuestasPostType() {\n\t$supports = array(\n\t'title', // post title\n\t'editor', // post content\n\t'author', // post author\n\t'thumbnail', // featured images\n\t'excerpt', // post excerpt\n\t'custom-fields', // custom fields\n\t// 'comments', // post comments\n\t// 'revisions', // post revisions\n\t'post-formats', // post formats\n\t'page-attributes'\n\t);\n\t$labels = array(\n\t'name' => _x('Propuesta', 'plural'),\n\t'singular_name' => _x('Propuestas', 'singular'),\n\t'menu_name' => _x('Propuestas', 'admin menu'),\n\t'name_admin_bar' => _x('Propuestas', 'admin bar'),\n\t'add_new' => _x('Añadir propuesta', 'add new'),\n\t'add_new_item' => __('Añadir nueva propuesta'),\n\t'new_item' => __('Nueva propuesta'),\n\t'edit_item' => __('Editar propuesta'),\n\t'view_item' => __('Ver propuesta'),\n\t'all_items' => __('Todas las propuestas'),\n\t'search_items' => __('Buscar'),\n\t'not_found' => __('No hay resultados.'),\n\t);\n\t$args = array(\n\t'supports' => $supports,\n\t'labels' => $labels,\n\t'public' => true,\n\t'query_var' => true,\n\t'rewrite' => array('slug' => 'propuestas'),\n\t'has_archive' => true,\n\t'hierarchical' => true,\n\t);\n\tregister_post_type('propuestasPostType', $args);\n\t}", "function getPost($pid)\n {\n $post= $this->db->getPost($pid);\n if ($post)\n {\n //show a quick reference url, poster and posted datetime\n $post['posttitle'] = \"Posted by {$post['poster']} on {$post['postdate']}\";\n \n $post['downloadurl'] = $this->conf['this_script'] . \"?dl=$pid\";\n $post['deleteurl'] = $this->conf['this_script'] . \"?erase=$pid\";\n $post['pid'] = $pid;\n }\n else\n {\n $post['code'] = '<b>Unknown post id, it may have been deleted</b><br />';\n $this->errors[] = 'Unknown post id, it may have expired or been deleted';\n } \n \n return $post;\n }", "public function getPost(): Post\n {\n return $this->post;\n }", "private function _get_object_is_relative_of__posts( $post_type = null ) {\n\n\t\t// if this is not a post type, bail with error.\n\t\tif ( 'post' !== $this->type ) {\n\t\t\t// Translators: WordPress object type.\n\t\t\t$error_msg = sprintf( __( '%s Objects cannot be relatives', 'bodh' ), ucfirst( $this->type ) );\n\t\t\t$this->error( \"$prefix-invalid-object\", $error_msg );\n\t\t\treturn array();\n\t\t}\n\n\t\t// if no post type is specified, allow any.\n\t\tif ( empty( $post_type ) ) {\n\t\t\t$post_type = 'any';\n\t\t}\n\n\t\t// right now, post type should either be a string (single post type) or an array.\n\t\tif ( ! is_string( $post_type ) || ! is_array( $post_type ) ) {\n\t\t\t$this->error( \"$prefix-invalid-post-type\", __( 'An invalid post type was specified when getting posts that the current object is a relative of.', 'bodh' ) );\n\t\t\treturn array();\n\t\t}\n\n\t\t// Set up meta key fragments.\n\t\t$meta_key_fragments = array(\n\t\t\t'prefix' => $prefix,\n\t\t\t'type' => $this->subtype,\n\t\t);\n\n\t\t// Generate meta key.\n\t\t$meta_key = '_' . implode( '_', $meta_key_fragments );\n\n\t\t/**\n\t\t * Runs before query for posts that this object is a relative of, is set up.\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @param int $id The post ID of the current object.\n\t\t * @param object $object The current wp object\n\t\t */\n\t\tdo_action( 'bodh_activity_stream_before_relative_of_query', $this->id, $this );\n\n\t\t$post_args = array(\n\t\t\t'meta_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'meta_key' => $meta_key,\n\t\t\t\t\t'meta_value' => $this->id,\n\t\t\t\t\t'type' => 'NUMERIC',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'fields' => 'ids',\n\t\t\t'post_type' => $post_type,\n\t\t);\n\n\t\t/**\n\t\t * Filters arguments for WP_Query for objects that are relative of an object.\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @param array $post_args WP_Query arguments.\n\t\t */\n\t\t$post_args = apply_filters( 'bodh_activity_stream_relative_of_query', $post_args );\n\n\t\t$indirect_relative_query = new WP_Query( $post_args );\n\n\t\t/**\n\t\t * Runs after query for posts that this object is a relative of, is run.\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @param int $id The post ID of the current object.\n\t\t * @param object $object The current wp object\n\t\t */\n\t\tdo_action( 'bodh_activity_stream_after_relative_of_query', $this->id, $this );\n\n\t\treturn $indirect_relative_query->posts;\n\t}", "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 cursos_post_type() {\n\n $labels = array(\n 'name' => _x( 'cursos', 'Post Type General Name', 'text_domain' ),\n 'singular_name' => _x( 'curso', 'Post Type Singular Name', 'text_domain' ),\n 'menu_name' => __( 'cursos', 'text_domain' ),\n 'name_admin_bar' => __( 'Post Type', 'text_domain' ),\n 'archives' => __( 'Item Archives', 'text_domain' ),\n 'attributes' => __( 'Item Attributes', 'text_domain' ),\n 'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n 'all_items' => __( 'Todos os cursos', 'text_domain' ),\n 'add_new_item' => __( 'Add nova pergunta', 'text_domain' ),\n 'add_new' => __( 'novo cursoa', 'text_domain' ),\n 'new_item' => __( 'nova pergunta', 'text_domain' ),\n 'edit_item' => __( 'Edit Item', 'text_domain' ),\n 'update_item' => __( 'Update Item', 'text_domain' ),\n 'view_item' => __( 'View Item', 'text_domain' ),\n 'view_items' => __( 'View Items', 'text_domain' ),\n 'search_items' => __( 'Search Item', 'text_domain' ),\n 'not_found' => __( 'não encontrato', 'text_domain' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n 'featured_image' => __( 'Featured Image', 'text_domain' ),\n 'set_featured_image' => __( 'Set featured image', 'text_domain' ),\n 'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),\n 'use_featured_image' => __( 'Use as featured image', 'text_domain' ),\n 'insert_into_item' => __( 'Insert into item', 'text_domain' ),\n 'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),\n 'items_list' => __( 'Items list', 'text_domain' ),\n 'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n 'filter_items_list' => __( 'Filter items list', 'text_domain' ),\n );\n $args = array(\n 'label' => __( 'cursos', 'text_domain' ),\n 'description' => __( 'cursos', 'text_domain' ),\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'excerpt'),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\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( 'cursos_post_type', $args );\n\n}", "public function getPost()\n {\n return $this->hasOne(Posts::className(), ['id' => 'post_id']);\n }", "function custom_post_type() {\n\t$labels = array(\n\t\t'name' => __( 'Post', 'themeSlug' ),\n\t\t'singular_name' => __( 'Post', 'themeSlug' ),\n\t\t'menu_name' => __( 'Post', 'themeSlug' ),\n\t\t'all_items' => __( 'All Post', 'themeSlug' ),\n\t\t'add_new' => __( 'Add New', 'themeSlug' ),\n\t\t'add_new_item' => __( 'Add New Post', 'themeSlug' ),\n\t\t'edit_item' => __( 'Edit Post', 'themeSlug' ),\n\t\t'new_item' => __( 'New Item', 'themeSlug' ),\n\t\t'view_item' => __( 'View Post', 'themeSlug' ),\n\t\t'search_items' => __( 'Search Post', 'themeSlug' ),\n\t\t'not_found' => __( 'No Post Found', 'themeSlug' ),\n\t\t'not_found_in_trash' => __( 'No Post in trash', 'themeSlug' ),\n\t\t'parent_item_colon' => __( 'Parent Post', 'themeSlug' ),\n\t\t'archives' => __( 'Post Archives', 'themeSlug' ),\n\t\t'insert_into_item' => __( 'Insert into Post', 'themeSlug' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this Post', 'themeSlug' ),\n\t\t'filter_items_list' => __( 'Filter Post List', 'themeSlug' ),\n\t\t'items_list_navigation' => __( 'Post list navigation', 'themeSlug' ),\n\t\t'items_list' => __( 'Post List', 'themeSlug' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'Post', 'text_domain' ),\n\t\t'description' => __( 'Post', 'text_domain' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor' ),\n\t\t'hierarchical' => false,\n\t\t'public' => false,\n\t\t'publicly_queryable' => false,\n\t\t'show_ui' => true,\n\t\t'show_in_rest' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 6,\n\t\t'menu_icon' => 'dashicons-format-status',\n\t\t'exclude_from_search' => false,\n\t\t'capability_type' => 'post',\n\t\t'rewrite' => array(\n\t\t\t'slug' => 'cpt',\n\t\t\t'with_front' => true,\n\t\t),\n\t);\n\n\tregister_post_type( 'cpt', $args );\n}", "public function getPostsTypes()\n\t {\n\t \t$args = array(\n\t\t\t 'public' => true,\n\t\t\t '_builtin' => false\n\t\t\t);\n\n\t\t\t$output = 'names'; // names or objects, note names is the default\n\t\t\t$operator = 'and'; // 'and' or 'or'\n\t\t\t$post_types = get_post_types( $args, $output, $operator ); \n\n\t\t\treturn $post_types;\n\t }", "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 dtm_get_wordpress_content_id( $post_type, $post_id ) {\n\t//$post_type = self::get_post_type( $post_type );\n\t//if ( WP_Base::is_toh() ) {\n\t//\tif ( in_array( $post_type, $accepted_post_type ) ) {\n\t//\t\treturn ( $post_id );\n\t//\t}\n\t//}\n\t$content_id = apply_filters( 'dtm_wordpress_content_id', '' );\n\n\treturn $content_id;\n}", "function wp_getPostTypes( $args ) {\n\n global $wp_xmlrpc_server;\n $wp_xmlrpc_server->escape( $args );\n\n $blog_ID = (int) $args[0];\n $username = $args[1];\n $password = $args[2];\n\n if ( ! $user = $wp_xmlrpc_server->login( $username, $password ) )\n return $wp_xmlrpc_server->error;\n\n $post_types = get_post_types( '','objects' );\n\n $struct = array();\n\n foreach( $post_types as $post_type ) {\n\n // capability check for post_types\n if( ! current_user_can( $post_type->cap->edit_posts ) )\n continue;\n\n $post_type = (array)$post_type;\n\n $post_type_data = array(\n 'labels' => $post_type['labels'],\n 'description' => $post_type['description'],\n 'capability_type' => $post_type['capability_type'],\n 'cap' => $post_type['cap'],\n 'map_meta_cap' => $post_type['map_meta_cap'],\n 'hierarchical' => $post_type['hierarchical'],\n 'menu_position' => $post_type['menu_position'],\n 'taxonomies' => get_object_taxonomies( $post_type['name'] ),\n );\n\n $struct[ $post_type['name'] ] = $post_type_data;\n\n }\n\n return $struct;\n \n}", "protected function get_object_type()\n {\n }", "public function testForcesAContentTypeOfPost(){\n\t\t$data = array(\n\t\t\t'Post'=>array(\n\t\t\t\t'controller'=>'Test',\n\t\t\t\t'controller'=>'test_action',\n\t\t\t\t'content_type'=>'post'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$this->Post->save($data);\n\t\t\n\t\t$results = $this->Post->find(\n\t\t\t'first',\n\t\t\tarray(\n\t\t\t\t'conditions'=>array(\n\t\t\t\t\t'Post.id' => $this->Post->id\n\t\t\t\t),\n\t\t\t\t'contain'=>array()\n\t\t\t)\n\t\t);\n\t\t\n\t\t$this->assertEqual($results['Post']['content_type'], 'post');\n\t}", "public function getModel()\n {\n $post = Post::class;\n return $post;\n }", "public function getPost()\n {\n return $this->hasOne(Post::className(), ['id' => 'post_id']);\n }", "public function savePostType($post_type)\n {\n //if normal was selected - do nothing\n //if main was selected\n if ($post_type == 1){\n //check if there is a previous post with main tag and make it normal\n $current_main = Article::where('post_type', $post_type)->first();\n if ($current_main){\n $current_main->post_type = 0;\n $current_main->save();\n }\n }\n //if post up is selected\n //check if there is a previous post with post-up tag and make it normal\n //if not just change post type to post up\n if ($post_type == 2){\n //check if there is a previous post with main tag and make it normal\n $current_up = Article::where('post_type', $post_type)->first();\n if ($current_up){\n $current_up->post_type = 0;\n $current_up->save();\n }\n }\n //if post down is selected\n //check if there is a previous post with post-down tag and make it normal\n //if not just change post type to post down\n if ($post_type == 3){\n //check if there is a previous post with main tag and make it normal\n $current_down = Article::where('post_type', $post_type)->first();\n if ($current_down){\n $current_down->post_type = 0;\n $current_down->save();\n }\n }\n }", "function horsaw_get_post($post_id = null, $model = null) {\n\tif ( is_null( $post_id ) ) {\n\t\t$post_id = get_the_id();\n\t}\n\n\t// Invalid\n\tif ( empty( $post_id ) ) {\n\t\treturn false;\n\t}\n}", "function directory_post_type() {\n \n// Set UI labels for Directory post type\n $labels = array(\n 'name' => _x( 'Directory Listings', 'Post Type General Name' ),\n 'singular_name' => _x( 'Listing', 'Post Type Singular Name' ),\n 'menu_name' => __( 'Boss Directory' ),\n 'parent_item_colon' => __( 'Parent Listing' ),\n 'all_items' => __( 'All Listings' ),\n 'view_item' => __( 'View Listing' ),\n 'add_new_item' => __( 'Add New Listing' ),\n 'add_new' => __( 'Add New' ),\n 'edit_item' => __( 'Edit Listing' ),\n 'update_item' => __( 'Update Listing' ),\n 'search_items' => __( 'Search Listings' ),\n 'not_found' => __( 'Not Found' ),\n 'not_found_in_trash' => __( 'Not found in Trash' ),\n );\n \n// Set other options for Directory post type\n \n $args = array(\n 'label' => __( 'listing' ),\n 'description' => __( 'Being Boss Directory Listings' ),\n 'labels' => $labels,\n // Features this CPT supports in Post Editor\n 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', ),\n /* A hierarchical CPT is like Pages and can have\n * Parent and child items. A non-hierarchical CPT\n * is like Posts.\n */ \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' => 55,\n 'can_export' => true,\n 'has_archive' => false,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'post',\n\t\t'menu_icon'\t\t\t => 'https://beingboss.club/wp-content/themes/beingboss2018/img/Icon_Resource_Blue.png'\n );\n \n // Registering your Custom Post Type\n register_post_type( 'listing', $args );\n \n}", "function diversity_get_header_content_type( $content_type, $obj ) {\n\tif ( $obj instanceof WP_Post ) {\n\t\t$post_type = $obj->post_type;\n\n\t\tif ( $post_type === 'post' ) {\n\t\t\t$content_type = 'post';\n\t\t}\n\t}\n\n\treturn $content_type;\n}", "public static function get_class_post_type()\n {\n return self::$post_type;\n }", "public static function get_class_post_type()\n {\n return self::$post_type;\n }", "public function deleteActionPost(): object\n {\n // Connects to db\n $this->app->db->connect();\n\n $contentId = getPost(\"contentId\");\n\n if (!is_numeric($contentId)) {\n return $this->app->response->redirect(\"admin\");\n }\n\n if (hasKeyPost(\"doDelete\")) {\n $contentId = getPost(\"contentId\");\n\n // Executes SQL statement\n $this->admin->deleteBlogpost($contentId);\n\n // Redirects\n return $this->app->response->redirect(\"admin\");\n }\n }", "public function createActionPost(): object\n {\n // Connects to db\n $this->app->db->connect();\n\n if (hasKeyPost(\"doCreate\")) {\n $title = getPost(\"contentTitle\");\n\n // Calls createProduct method\n $this->admin->createBlogpost($title);\n\n // Retrieves id\n $id = $this->app->db->lastInsertId();\n }\n\n // Redirects\n return $this->app->response->redirect(\"admin/edit?id=$id\");\n }", "public function dmaps_get_post_types() {\n\t\t\t\t\n\t\t$args = array(\n\t\t 'public' => true,\n\t\t '_builtin' => false\n\t\t);\n\n\t\t$post_types = get_post_types( $args ); \n\t\t$post_arr = array( 'post' => 'Post', 'page' => 'Page' );\n\n\t\tforeach ( $post_types as $post_type ) {\n\n\t\t\t$arr = array($post_type => $post_type);\n\t\t\t$post_arr += $arr;\n\n\t\t}\n\t\t\n\t\treturn $post_arr;\t\n\n\t}", "public function fromGetOrPost($id = null, $type = 'integer')\n {\n if (is_null($id)) {\n $id = 'id';\n $type = $this->id_type;\n }\n\n if (is_null($value = TIP::getGet($id, $type)) &&\n is_null($value = TIP::getPost($id, $type))) {\n TIP::warning(\"GET or POST not found ($id)\");\n TIP::notifyError('noparams');\n }\n\n return $value;\n }", "public function getPageType();", "public function getPageType();", "function get_by_type($type) {\r\n\t\t\t$output = array();\r\n\t\t\t$posts_array = get_posts( 'post_type=' . $type ); \r\n\t\t\tforeach( $posts_array as $post ) {\r\n\t\t\t\tsetup_postdata($post); \r\n\t\t\t\t$output[$post->ID] = $post->post_title ;\r\n\t\t\t}\r\n\t\t\treturn $output;\r\n\t\t}", "public function getPost ();", "public function test__GetPost()\n\t{\n\t\t$this->assertThat(\n\t\t\t$this->object->objects->post,\n\t\t\t$this->isInstanceOf('JAmazons3OperationsObjectsPost')\n\t\t);\n\t}" ]
[ "0.7147609", "0.6754253", "0.6714326", "0.64117664", "0.6273121", "0.62549907", "0.6247834", "0.61869997", "0.61488724", "0.6117223", "0.61043525", "0.60434896", "0.60413235", "0.6027562", "0.60134906", "0.59830374", "0.5980363", "0.5960375", "0.59589", "0.5953828", "0.5932684", "0.5900661", "0.5856875", "0.5842097", "0.58195555", "0.5818387", "0.5777072", "0.5770705", "0.57626426", "0.57324463", "0.5695104", "0.56908995", "0.5685364", "0.5674525", "0.567364", "0.56633615", "0.56463116", "0.5639412", "0.5629364", "0.56124413", "0.55753875", "0.5573026", "0.55515444", "0.5541102", "0.5541102", "0.55371916", "0.5523972", "0.55223095", "0.5519418", "0.5486333", "0.54547614", "0.5450718", "0.5448101", "0.5443439", "0.5438849", "0.54178035", "0.54141074", "0.5404397", "0.54040265", "0.5402003", "0.53912264", "0.5388802", "0.5379515", "0.536653", "0.53643686", "0.53612244", "0.53560007", "0.53525895", "0.53501296", "0.5345813", "0.53425634", "0.5341706", "0.5337484", "0.5333849", "0.532997", "0.53289604", "0.53261083", "0.53147155", "0.5303547", "0.52937156", "0.5286423", "0.52764356", "0.52738845", "0.52665764", "0.52583146", "0.5256678", "0.5252956", "0.524886", "0.5247755", "0.52465105", "0.52387685", "0.52387685", "0.52352387", "0.52327114", "0.5228163", "0.5211961", "0.52108425", "0.52108425", "0.52081764", "0.52070564", "0.5204412" ]
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
Display all articles in the main page
public function index(Request $request) { //dd($request); $data = []; if(isset($request->search)) { $articles = Article::search($request->search)->paginate(5); $data['search'] = $request->search; } else if(isset($request->tag)) { //Simple method //$articles = Article::search($request->tag)->paginate(5); $articles = Tag::where('name', $request->tag) ->firstOrFail() ->articles() ->orderBy('id', 'desc') ->paginate(5); $data['tagFilter'] = $request->tag; } else { $articles = Article::orderBy('id', 'desc')->paginate(5); } $data['articles'] = $articles; return view('home', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function allArticles()\n {\n $articles = Article::where('public', '=', 0)->latest()->paginate(10);\n $this->parseArticle($articles);\n return view('articles.index',compact('articles'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "function index() {\n\t\t$this->set('title_for_layout', 'Artykuły - Serwis społecznościowy dla właścicieli zwierząt');\n\t\t$this->Article->recursive = 0;\n\t\t$articles = $this->paginate();\n\t\t$this->set('articles', $articles);\n\t}", "function articles(){\n $articles = new ArticleManager();\n $allArticles = $articles->getArticles();\n\n require 'app/views/back/articles.php';\n }", "public function indexAction(){\n //Supply the view with a list of all articles\n $articles = Article::find([\n 'order' => 'creationDate DESC'\n ]);\n $this->view->setVar(\"articles\", $articles);\n }", "public function index ()\n\t{\n\t\n\t\t$this->data['articles'] = $this->article_m->get();\n\t\t\n\t\t// ielādē skatu\n\t\t$this->data['subview'] = 'admin/article/index';\n\t\t$this->load->view('admin/_layout_main', $this->data);\n\t}", "public function actionArticles()\n\t{\n\t\t$this -> layout = 'mainLayout';\n\t\t/*$stack = $this -> human_verbiages;\n\t\t$arts = Articles::GiveArticlesById(0, true);*/\n\t\t\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria -> compare('level',0);\n\t\t$criteria -> compare('parent_id',0);\n\t\t$criteria -> compare('id_type',ArticleType::model() -> getNumber('bibl'));\n\t\t$articles = Articles::model() -> findAll($criteria);\n\t\t\n\t\t$arts = array();\n\t\tforeach ($articles as $art) {\n\t\t\t$arr = array();\n\t\t\t$arr['name'] = $art -> name;\n\t\t\t$arr['verbiage'] = $art -> verbiage;\n\t\t\t$arr['id'] = $art -> id;\n\t\t\t$arr['text'] = $art -> text;\n\t\t\t\n\t\t\t$arts[] = $arr;\n\t\t}\n\t\t\n\t\t/*$arts = array_filter($arts,function ($art) use ($stack){\n\t\t\treturn (!in_array($art [\"verbiage\"], $stack));\n\t\t});*/\n\t\t$this->render('//articles/show_all', array(\n\t\t\t//'articles' => Articles::GiveArticlesById(0, true)\n\t\t\t'articles' => $arts\n\t\t));\n\t}", "public function index() {\n\t\t$page = Input::get('page', 1);\n\t\t$data = $this->article->findByPage($page, 5);\n\t\t$articles = new LengthAwarePaginator($data->items, $data->totalItems, 5);\n\t\t$articles->setPath('/articles');\n\t\tif($articles) {\n\t\t\treturn view('articles.index', compact('articles'));\n\t\t}\n\t}", "public function index() {\n\t\t$items = $this->user->getAllArticles();\n\t\t$id = 'all';\n\t\treturn View::make('front.articles.index', compact('items', 'id'));\n\t}", "public function index(){\n $articles = Article::all();\n\n \n\n }", "public function index() {\n // $header = 'Articles';\n\n // возврязает все выбранное из таблицы\n $articles = Article::select(['id','title','description'])->get();\n // dump($articles);\n\n return view('page')->with([\n 'message'=>$this->message,\n 'header'=>$this->header,\n 'articles'=>$articles\n ]);\n }", "public static function view() \n {\n $articleDAO = new ArticleDAO();\n $articles = $articleDAO->load();\n\n $dispatch = new Dispatch();\n $dispatch->render(\n 'main_page', [\n 'articles' => $articles\n ]\n );\n }", "public function indexAction()\n {\n $page = $this->request->getQuery('page', array('int'), 1);\n $limit = $this->config->application->pagination_limit;\n $params = array(\n 'conditions' => array(\n 'module' => \\ITECH\\Data\\Lib\\Constant::ARTICLE_MODULE_POST,\n 'status' => \\ITECH\\Data\\Lib\\Constant::ARTICLE_STATUS_ACTIVE\n ),\n 'page' => $page,\n 'limit' => $limit\n );\n\n $articleRepo = new \\ITECH\\Data\\Repo\\ArticleRepo();\n $articles = $articleRepo->getPaginationList($params);\n $categoryLayout = array();\n\n if ($articles->total_items > 0) {\n foreach ($articles->items as $item) {\n $params = array(\n 'conditions' => array(\n 'article_id' => $item->id\n )\n );\n $articleCategoryRepo = new \\ITECH\\Data\\Repo\\ArticleCategoryRepo();\n $articleCategory = $articleCategoryRepo->getList($params);\n if (count($articleCategory)) {\n foreach ($articleCategory as $category) {\n $categoryLayout[$item->id][] = $category->category_name;\n }\n }\n }\n }\n\n $query = array();\n $query['page'] = $page;\n\n $url = $this->url->get(array('for' => 'article'));\n $options = array(\n 'url' => $url,\n 'query' => $query,\n 'total_pages' => isset($articles->total_pages) ? $articles->total_pages : 0,\n 'page' => $page,\n 'pages_display' => 3\n );\n\n $layoutComponent = new \\ITECH\\Admin\\Component\\LayoutComponent();\n $paginationLayout = $layoutComponent->pagination(parent::$theme, $options);\n\n $breadcrumbs = [\n [\n 'title' => 'Dashboard',\n 'url' => $this->config->application->base_url,\n 'active' => false\n ],\n [\n 'title' => 'Danh sách bài viết',\n 'url' => $this->url->get([\n 'for' => 'article'\n ]),\n 'active' => true\n ]\n ];\n\n $this->view->setVars(array(\n 'breadcrumbs' => $breadcrumbs,\n 'paginationLayout' => $paginationLayout,\n 'articles' => $articles->items,\n 'categoryLayout' => $categoryLayout\n ));\n\n $this->view->pick(parent::$theme . '/article/index');\n }", "public function index()\n {\n $articles = Article::with(['category', 'author'])->visible()->paginate(2);\n\n return view('article.index')->with('articles', $articles);\n }", "public function index()\n {\n $articles = Article::orderBy('id', 'DESC')->paginate(10);\n\n return view('dashboard.article.index')->withArticles($articles);\n }", "public function index()\n {\n return view('articles.index')->with('articles', Article::all());\n }", "public function index(){\n $this->title = 'Articles management';\n $articles = $this->getArticles();\n $this->content = view(env('THEME').'.admin.articles_content')->with('articles', $articles)->render();\n return $this->renderOutput();\n }", "public function index() {\n\n // Add page scripts\n XCMS_Page::getInstance()->addScript(array(\n \"assets/scripts/backend/mng_articles.js\",\n \"assets/third-party/tinymce/tinymce.js\",\n \"assets/scripts/tinymce_config.js\"\n ));\n\n // Add page stylesheets\n XCMS_Page::getInstance()->addStylesheet(array(\n \"assets/css/backend/mng_articles.css\"\n ));\n\n // Show template\n $this->load->view(\"articles.tpl\", array(\n \"categories\" => (new CategoriesModel)->load()->toArray()\n ));\n\n }", "public function actionListArticles()\n {\n $query = Articles::find()->orderBy(['id'=>SORT_DESC]);\n $countQuery = clone $query;\n $pages = new Pagination(['pageSize' => 5,'totalCount' => $countQuery->count()]);\n $models = $query->offset($pages->offset)\n ->limit($pages->limit)\n ->all();\n $catArticles = CatArticles::find()->all();\n// $articles = Articles::find()->orderBy(['id'=>SORT_DESC])->all();\n return $this->render('list-articles', [\n// 'articles' => $articles,\n 'models' => $models,\n 'pages' => $pages,\n 'catArticles' => $catArticles,\n ]);\n }", "public function actionIndex()\n {\n $criteria = new CDbCriteria();\n $criteria->compare('status', Article::STATUS_PUBLISHED);\n $criteria->order = 'article_id DESC';\n \n $count = Article::model()->count($criteria);\n \n $pages = new CPagination($count);\n $pages->pageSize = 10;\n $pages->applyLimit($criteria);\n \n $articles = Article::model()->findAll($criteria);\n \n $this->setData(array(\n 'pageMetaTitle' => $this->data->pageMetaTitle.' | '.Yii::t('articles', 'Helpful articles'), \n 'pageBreadcrumbs' => array()\n ));\n\n $this->render('index', compact('articles', 'pages'));\n }", "public function index()\n {\n //Отобразить список материалов, которые уже добавлены\n $this->title = Lang::get('ru.manager_articles');\n\n //выбор статей из бд коллекции моделей\n $articles = $this->getArticles();\n //формируем контент - with - передать переменные\n $this->content = view(config('settings.theme') . '.admin.articles_content')->with('articles', $articles)->render();\n\n\n return $this->renderOut();\n }", "public function index()\n {\n $articles = Article::published()->orderBy('id', 'desc')->paginate(5);\n\n return view('article.index', compact('articles'));\n }", "public function index()\n {\n return Article::latest()->paginate(20);\n }", "public function index()\r\n {\r\n \r\n $articles = $this->article_model->get_latest();\r\n $article_list = $this->article_model->nav_listFront();\r\n $archives = $this->article_model->archive();\r\n $helper = new article_helper;\r\n $data = array(\r\n 'content' => 'article_list',\r\n 'articles' => $articles['articles'],\r\n 'block_title' => $articles['block_title'],\r\n 'helper' => $helper,\r\n 'article_list' => $article_list['articles'],\r\n 'block_title' => $article_list['block_title'],\r\n 'page_type' => 'home_page',\r\n 'archives' => $archives\r\n );\r\n \r\n $this->load->view($this->config->item('theme_path'), $data);\r\n\r\n }", "public function index() {\n //\n $list = $this->repository->with('manager')->paginate(option('PAGE_SIZE'));\n return view('admin.article.index', compact('list'));\n }", "public function index()\n {\n $articles = Article::paginate(10);\n return view('pages.articles.index',[\n 'articles' => $articles,\n ]);\n }", "public function index()\n {\n $articles = Article::paginate(10);\n\n return view('admin.articles.index', compact('articles'));\n }", "public function showArticles()\n\t{\n\n\t\t$req = $this->db->query('SELECT id, article_number, title FROM articles ORDER BY date_creation DESC');\n\n\t\t$req->execute();\n\n\t\t$values = $req->fetchAll(PDO::FETCH_ASSOC);\n\n\t\tforeach ($values as $value)\n\t\t{\n\t\t\t$articles[] = new Article($value);\n\t\t}\n\n\t\treturn $articles;\n\t}", "public function index()\n {\n $data=PagesController::dataCommune('articles',false);\n $data['articles']=ArticleController::nonRelu(9);\n $data['actuskes']=ActusKesController::getActus();\n return view('articles.index',$data);\n }", "public function index()\n {\n $articles = Article::where('user_id', '=', $this->userId())->latest()->paginate(10);\n $this->parseArticle($articles);\n return view('articles.index',compact('articles'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "public function index()\n {\n $articles = Article::paginate(15);\n\n return view('backend.articles.index', compact('articles'));\n }", "public function index()\n {\n $articles = $this->article->all();\n\n return view('pearlskin::admin.articles.index', compact('articles'));\n }", "public function index()\n {\n $articles = $this->article->page(config('blog.article.number'), config('blog.article.sort'), config('blog.article.sortColumn'));\n $tags = $this->tag->all();\n return view('article.index', compact('articles'), compact('tags'));\n }", "public function index()\n {\n $page_size=env('num_per_page');\n $articles = Article::with('tags', 'category')->published()->orderBy('updated_at', 'desc')->paginate($page_size);\n\n return view('blog.articles.index',compact('articles'));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $articles = $em->getRepository('ArticleBundle:Article')->findAll();\n\n return $this->render('article/index.html.twig', array(\n 'articles' => $articles,\n ));\n }", "public function index()\n {\n $articles = ArtikelModel::getAll();\n return view('article.index', compact('articles'));\n }", "public function index()\n {\n $articles = Article::paginate(4);\n return view('articles', [\n 'articles' => $articles,\n ]);\n }", "public function index()\n {\n $articles = Article::with('category')->paginate(25);\n\n return view('admin.articles.index', compact('articles'));\n }", "public function index() {\n $articles = Articles::paginate(45);\n return view('admin.articles.home', ['articles' => $articles]);\n }", "public function index()\n {\n if ($articles = $this->getArticles()){\n require 'View/articles/index.php';\n }\n\n // Load the view\n\n\n }", "public function index()\n {\n $data['items'] = Article::all(); \n return view('backend.article.list.index', $data);\n }", "public function index( )\n {\n $articles = $this->articleRepository->getAllArticles();\n\n return view('admin.articles.index',compact('articles'));\n }", "function article()\n {\n $id = $this->uri->segment(3);\n $article = $this->news->article($id);\n if($article == NULL) {\n flash('success', lang('Page not found'));\n redirect('news');\n }\n\n $articles = $this->news->articles(['limit' => 10]);\n\n page($this->module.'article', compact('article', 'articles'));\n }", "public function index()\n {\n $articles = $this->ArticlesRpt->getArticlesLists();\n return view('admin.article.index')->with(['articles' => $articles]);\n }", "public function index()\n {\n $articles = Article::latest()->paginate(15);\n return View('admin.articles', compact('articles'));\n }", "public function index()\n {\n $info=article::orderBy('arti_id','asc')->paginate(8);\n return view('Admin.Article.list',compact('info'));\n }", "public function index()\n {\n return Article::all();\n }", "public function actionIndex()\n {\n $query = Article::find()->published()->with('category', 'tags');\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => ['defaultPageSize' => 10],\n ]);\n\n $dataProvider->sort = [\n 'defaultOrder' => ['created_at' => SORT_DESC],\n ];\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n 'menuItems' => self::getMenuItems(),\n ]);\n }", "public function index()\n {\n $articles = Article::latest()->published()->paginate();\n return view('articles.index', compact('articles'));\n }", "public function index()\n {\n $article = Article::with('user')->paginate(10);\n\n return view('article.index', ['articles' => $article]);\n }", "public function index()\n {\n $articles = Articles::all();\n return view('articles.articles',compact('articles'));\n }", "public function index()\n {\n\t\t$totalComments = count($this->model->findAllWithTheirAuthor(\"p_datetime DESC\"));\n\t\t$itemPerpage = 5;\n\t\t$totalPages = ceil($totalComments/$itemPerpage); //ceil around superior number\n\t\t\n\t\tif(isset($_GET['page']) AND !empty($_GET['page']) AND $_GET['page'] > 0)\n {\n $_GET['page'] = intval($_GET['page']); //return an entier value\n $currentPage = $_GET['page'];\n }\n else\n {\n $currentPage = 1;\n\t\t}\n\t\t$start = ($currentPage - 1)*$itemPerpage;\n $posts = $this->model->countItems($start, $itemPerpage, \"p_datetime\");\n\t\t\n\t\t$pageTitle = \"Articles\";\n\t\t\n\t\t$description = \"Liste des articles\";\n\n\t\t$author = \"Invest People\";\n\n \\Renderer::render('post/index', compact('pageTitle', 'posts', 'description', 'author', 'totalPages')); \n\t}", "public function index()\n {\n $articles = Article::all();\n $articles = Article::orderBy('created_at', 'desc')->paginate(9);\n return view('articles.index', [\n 'articles' => $articles,\n ]);\n }", "public function index()\n {\n $articles = Article::latest()->paginate();\n return view('articles.index', compact('articles'));\n }", "public function index()\n {\n// $article = Article::all();\n $article = Article::paginate(10);\n return view('article.article',[\n 'title' => 'List Article',\n 'articles' => $article\n ]);\n }", "public function index()\n {\n $data = [\n 'articles' => Article::latestPaginatedArticles(6),\n 'articlesBad' => Article::orderBy('created_at', 'DESC')->paginate(6)\n ];\n\n return view('article.index')->with($data);\n }", "public function renderList()\n {\n $this->template->articles = $this->articleManager->getArticles();\n }", "public function index()\n {\n $articles = Article::orderBy('id', 'DESC')->paginate(10);\n return view('admin.articles.index', compact('articles'));\n }", "public function index()\n {\n $articles = Article::all(); //équivalent de select * dans article\n\n return view('articles.index', compact('articles'));\n }", "public function index()\n\t{\n\t\t$articles = Article::latest()->unpublished()->get();\n\n return view('articles.index', compact('articles'));\n\t}", "public function index()\n {\n $articles = Article::latest('published_at')->published()->paginate(8);\n return view('articles.index', compact('articles'));\n }", "public function index()\n {\n //\n $articles = Articles::all();\n \n return view(\"articles\")->with(\"articles\", $articles);\n }", "public function index()\n {\n $current_date = Carbon::now();\n \n $current_date = $current_date->toDateString();\n $articles = Article::where('datum', '>=', $current_date)->where('active', '=', 0)->paginate(2);\n \n $categories = Category::all();\n return view('Articles.index')->withArticles($articles)\n\t\t->withCategories($categories);\n }", "public function index()\n {\n $articles = Article::all(['id','title']);\n return view('admin::article.index', compact('articles'));\n }", "public function index()\n {\n $pagesize = $this->getBlogInfo('boxes_max_size', 5);\n\n $articles = Article::with(['tags', 'cate'])\n ->select(['Id', 'cate_id', 'title', 'summary', 'is_hidden', 'read_num', 'published_at', 'created_at', 'updated_at'])\n ->auth()\n ->orderBy('published_at', 'desc')\n ->orderBy('Id', 'asc')\n ->paginate($pagesize);\n\n // dd($articles->toArray());\n\n return view('home.index')->with([\n 'current_cate' => 0,\n 'articles' => $articles,\n 'pagination' => $articles->render(new ZuiThreePresenter($articles))\n ]);\n }", "public function index()\n {\n $articles = Article::all();\n return view('articles.index', compact('articles'));\n }", "public function index()\n {\n $listArticle = Article::all();\n return view('admin.article.listArticle', compact('listArticle'));\n }", "public function index()\n {\n $user = User::authUser();\n $articles = Article::paginate(10);\n return view('admin.articles.index', ['articles' => $articles,'user'=>$user]);\n }", "public function index()\n {\n\n $articles = Article::all();\n\n return view('articles.index', compact('articles'));\n }", "public function index()\n {\n $articles = Articles::latest()->simplePaginate(5);\n\n return view('articles.index', compact('articles'));\n }", "public function index()\n {\n $articles = Article::orderBy('created_at', 'desc')->paginate(10);\n return view('articles.index')->with('articles', $articles);\n }", "public function index()\n {\n // return collection of articles\n return ArticleResource::collection(Article::orderBy('created_at', 'desc')->paginate(6));\n }", "public function index()\n\t{\n\t\t$data = Article::paginate(15);\n\t\t//$data = DB::table('article')->get();\n\t\treturn view('backend.article.index',['data'=>$data]);\n\t}", "public function actionIndex()\n {\n $searchModel = new ArticlesSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function accueil()\n {\n $this->view->articles = ArticleModel::getAllArticles();\n $this->view->display(\"home/home\");\n }", "public function index()\n {\n $articles = Article::get();\n\n return view('pages.backend.articles.index', compact('articles'));\n }", "public function index()\n {\n $title = 'Index - article';\n $articles = Article::orderBy('id', 'desc')->paginate(6);\n return view('article.index',compact('articles','title'));\n }", "public function index()\n {\n $this->title = 'Менеджер статей блога';\n $articles = $this->getArticles();\n $this->content = view('admin.articles_content')->with('articles', $articles)->render();\n\n return $this->renderOutput();\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CestomArticleBundle:Article')->findAll();\n\n return $this->render($this->templates[\"index\"], array(\n 'entities' => $entities,\n\t\t\t'mesRoutes' => $this->mesRoutes,\n ));\n }", "public function index()\n {\n $articles=Article::withTrashed()->orderBy('created_at', 'DESC')->paginate(10);\n return view('admin.article.allArticles',['articles'=>$articles]);\n }", "public function indexAction() {\n //on forge la requete SQL\n $articles = $this->repo->getAll();\n \n if ($articles) {\n $nbRows = count($articles);\n \n \n \n \n \n \n \n }\n \n \n \n }", "public function index()\n {\n $articles = $this->service->index();\n return view(getThemeView('blog.article.list'))->with(compact('articles'));\n }", "public function actionIndex()\n {\n $searchModel = new ArticleSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new ArticleSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $articles = Article::all();\n return view('backend.articles.index', compact('articles'));\n }", "public function index()\n {\n $articles = Article::where('published_at', '<', Carbon::now())\n ->orderBy('created_at', 'desc')\n ->get();\n return view('articles.index', compact('articles'));\n }", "public function index()\n {\n $data = Article::orderBy('id','desc')->paginate(5);\n return view('Admin.Article.index',['article'=>$data]);\n }", "public function index()\n {\n //定义缓存的名字\n $cacheName='Admin_ArticleList_'.Input::get('page');\n $cacheData=Cache::get($cacheName);\n if($cacheData){\n $article_list=$cacheData;\n }else{\n $article_list=DB::table('rqbin_article')->select('article_id','title','subheading','content','author','created_at')->orderBy('article_id','DESC')->paginate(8);\n //将查询结果加入缓存\n Cache::tags('Admin_ArticleList','article')->add($cacheName, $article_list, 720);\n }\n return view('admin.article.index',compact(\"article_list\"));\n }", "public function index()\n {\n $articles = Article::all()->sortByDesc(\"updated_at\");\n $categorys = Category::where('parent_id', 0)->orderBy('name')->get();\n\n return view('articles/index', compact(['articles', 'categorys']));\n }", "public function index()\n {\n $articles = Auth::user()->article()->orderBy('created_at', 'desc')->paginate(4);\n return view('home', compact('articles'));\n }", "public function index()\n {\n $articles = Article::latest()->published()->get();\n\n return view('Article.index', compact('articles'));\n }", "public function index()\n {\n $articles = Article::getArticles();\n $featuredArticles = Article::getFeaturedArticles();\n // dd($featuredArticles);\n return view('article.index', compact('articles', 'featuredArticles'));\n }", "public function index()\n {\n return Article::orderBy('id','desc')->paginate(10);\n }", "public function indexAction()\n {\n $article = $this->getDoctrine()\n ->getManager()\n ->getRepository('BlogBundle:Articles')\n ->findAll();\n\n return array('articles' => $article);\n }", "public function index()\n {\n\n $data = array();\n\n $slug_cat = 'index';\n if (($cat_id = $this->model->checkNoneCatSlug($slug_cat))) {\n // var_dump($cat_id);exit();\n $data['home'] = array('list_article' => $this->model->list_article_all($cat_id, 10, 0),\n 'slug_cat' => $slug_cat);\n // var_dump($this->model->list_article_all($cat_id, 10, 0));exit();\n }\n\n\n $this->template->set_template('life');\n $this->template->write_view('content', 'FRONTEND/index', $data);\n $this->template->render();\n }", "protected function index() \n {\n //fetch all entries\n $rows = Article::where('group_id', Auth::user()->group_id)->where('status', '>=', 1)->get(); \n foreach ($rows as $row) \n { \n $row['owner_id'] = User::findOrFail($row['owner_id'])->name;\n\n //show 100st caracther of the description\n $content_length = strlen($row['content']);\n $row['content'] = substr(strip_tags($row['content']), 0, min(150, $content_length)) . (($content_length > 100) ? '...' : '');\n }\n return view('dashboard.article.view')->with('data', $rows);\n }", "public function index()\n {\n $articles = Article::orderBy('id' , 'DESC')->get();\n\n\n return view('articles.index' , compact('articles'));\n }", "function showArticles() {\n // $article2 = \"Article 2 from Route\";\n // $articles = [\"Article 1\", \"Article 2\", \"Article 3\"];\n $articles = Article::all(); //SELECT * FROM articles\n return view('articles/articles_list', compact('articles'));\n }", "public function index()\n {\n $articles = Article::all();//prendi tutti i dati e inviali alla index\n\n return view('articles.index', compact('articles'));\n }", "public function index()\n\t{\n if($sQuery = \\Input::get('q')) {\n $sQuery = strip_tags($sQuery);\n $oArticles = $this->_oArticleRepository->paginate($sQuery);\n $oArticles->appends(\\Input::except('page'));\n } else {\n $oArticles = $this->_oArticleRepository->paginate();\n }\n return view('es', ['articles' => $oArticles, 'query' => $sQuery]);\n\t}", "public function index_action(){\n\t\t$hot_article_list = model('article')->get_hot_article_list();\n\t\t$this->assign('article_list',$hot_article_list);\n\t\t$this->display();\n\t}", "public function actionIndex()\n {\n $searchModel = new ArticleSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->sort = [\n 'defaultOrder'=>['published_at'=>SORT_DESC]\n ];\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider\n ]);\n }" ]
[ "0.7976499", "0.7948455", "0.77854806", "0.7753503", "0.767045", "0.766912", "0.7596599", "0.7589439", "0.7524294", "0.75202906", "0.7499428", "0.74817014", "0.7457369", "0.74339956", "0.7433", "0.7421562", "0.7396617", "0.7395616", "0.73874927", "0.7366563", "0.73035216", "0.7290187", "0.7287562", "0.7282274", "0.72610766", "0.7258052", "0.724846", "0.7236701", "0.7221446", "0.7218595", "0.72151357", "0.7212293", "0.72064734", "0.72026485", "0.7202016", "0.7197376", "0.7195246", "0.71923715", "0.71869224", "0.718142", "0.7179821", "0.71650916", "0.71580243", "0.7152897", "0.71481955", "0.71443224", "0.7135559", "0.7120601", "0.71159613", "0.71123564", "0.71107036", "0.71076065", "0.7106142", "0.7102536", "0.7094089", "0.70903826", "0.7089895", "0.70893276", "0.70835346", "0.7082284", "0.7082042", "0.70766836", "0.7075273", "0.7075072", "0.70700926", "0.7068826", "0.7067188", "0.7065844", "0.7062885", "0.7062469", "0.70580924", "0.70555526", "0.70532423", "0.70520055", "0.70517755", "0.70347136", "0.7031895", "0.702995", "0.7027876", "0.70256686", "0.7025108", "0.7015284", "0.7015284", "0.70094436", "0.7004288", "0.69969773", "0.6996599", "0.6995763", "0.6991452", "0.69865394", "0.6985344", "0.6971861", "0.6971708", "0.6970478", "0.6968156", "0.696463", "0.6954879", "0.6948782", "0.6944384", "0.694266", "0.69426054" ]
0.0
-1
Get the appropriate reflector for a callable.
public function create($callable) { list($class, $name) = $this->normalize($callable); if (null === $class) { return new ReflectionFunction($name); } return new ReflectionMethod($class, $name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reflectCallable($callable)\n {\n if (!is_callable($callable))\n throw new \\InvalidArgumentException(sprintf(\n 'Argument provided is not callable; given: (%s).'\n , \\Poirot\\Std\\flatten($callable)\n ));\n\n\n if ($callable instanceof ipInvokableCallback)\n $callable = $callable->getCallable();\n\n if (is_array($callable))\n ## [className_orObject, 'method_name']\n $reflection = new \\ReflectionMethod($callable[0], $callable[1]);\n\n if (is_string($callable)) {\n if (strpos($callable, '::'))\n ## 'classname::method'\n $reflection = new \\ReflectionMethod($callable);\n else\n ## 'function_name'\n $reflection = new \\ReflectionFunction($callable);\n }\n\n if (method_exists($callable, '__invoke')) {\n ## Closure and Invokable\n if ($callable instanceof \\Closure)\n $reflection = new \\ReflectionFunction($callable);\n else\n $reflection = new \\ReflectionMethod($callable, '__invoke');\n }\n\n if (!isset($reflection))\n throw new \\ReflectionException;\n\n return $reflection;\n }", "public function getMethodReflector(): MethodReflectorInterface;", "protected function derive_function_reflector() {\n\t\ttry {\n\t\t\t$function_reflector = $this->is_function_reference() ? new ReflectionFunction( $this->get_function() ) : null;\n\t\t} catch ( ReflectionException $exception ) {\n\t\t\t$function_reflector = null;\n\t\t}\n\t\treturn $function_reflector;\n\t}", "protected function getCallReflector($callback)\r\n {\r\n if (is_string($callback) && strpos($callback, '::') !== false) {\r\n $callback = explode('::', $callback);\r\n }\r\n\r\n if (is_array($callback)) {\r\n return new ReflectionMethod($callback[0], $callback[1]);\r\n }\r\n\r\n return new ReflectionFunction($callback);\r\n }", "public function get_function_reflector() {\n\t\tif ( ! $this->is_function_reflector_set ) {\n\t\t\t$this->set_function_reflector( $this->derive_function_reflector() );\n\t\t}\n\t\treturn $this->function_reflector;\n\t}", "protected function getCallReflector($callback)\n {\n if (is_string($callback) && strpos($callback, '::') !== false) {\n $callback = explode('::', $callback);\n }\n if (is_array($callback)) {\n list ($class, $name) = $callback;\n if (!preg_match('/^[A-Za-z](\\w)*$/', $name)) {\n throw new ReflectionException('Method not provided.');\n }\n $method = new ReflectionMethod($class, $name);\n if (!$method->isPublic()) {\n throw new ReflectionException('Method not provided');\n }\n return $method;\n }\n\n return new ReflectionFunction($callback);\n }", "public function getReflector()\n {\n if ($this->reflector) {\n return $this->reflector;\n }\n\n return $this->reflector = new ReflectionClass($this->config);\n }", "protected static function getCallReflector($callback)\n {\n if (is_string($callback) && strpos($callback, '::') !== false) {\n $callback = explode('::', $callback);\n }\n\n return is_array($callback)\n ? new \\ReflectionMethod($callback[0], $callback[1])\n : new \\ReflectionFunction($callback);\n }", "public function getReflection(...$arguments): Reflector\n {\n $callback = $this->getValidCallback($arguments);\n\n if (is_string($callback)) {\n return new ReflectionFunction($callback);\n }\n\n if ($callback instanceof \\Closure) {\n return new ReflectionFunction($callback);\n }\n\n if (is_array($callback)) {\n if (is_string($callback[0])) {\n if (false === method_exists($callback[0], $callback[1])) {\n return new ReflectionClass($callback[0]);\n }\n\n return new ReflectionMethod($callback[0], $callback[1]);\n }\n\n $object = new ReflectionObject($callback[0]);\n\n if (null === $callback[1]) {\n return $object;\n }\n\n return $object->getMethod($callback[1]);\n }\n }", "public function getTargetCallable()\n {\n if (! is_string($this->name)) {\n // TODO no support for dynamic method name\n return null;\n }\n\n $class = $this->getTargetClass();\n\n if (! $class) {\n return null;\n }\n\n\n try {\n // TODO check the method is indeed static\n return $class->getMethod($this->name);\n } catch (\\LogicException $e) {\n Logger::warning('Static call on unknown method {class}::{method}()', [\n 'class' => $class->getFQN(),\n 'method' => $this->name,\n ]);\n return null;\n }\n }", "abstract public function getReflection($method);", "public function getReflector()\n {\n \n return new ReflectionObject($this->object);\n \n }", "protected function derive_class_method_reflector() {\n\t\ttry {\n\t\t\t$class_method_reflector = $this->is_class_reference() && $this->has_class_method() ? new ReflectionMethod( $this->get_class(), $this->get_class_method() ) : null;\n\t\t} catch ( ReflectionException $exception ) {\n\t\t\t$class_method_reflector = null;\n\t\t}\n\t\treturn $class_method_reflector;\n\t}", "public function get_callable() {\n\t\t$callable = null;\n\n\t\t// Handles the type of reference.\n\t\tif ( $this->is_class_reference() ) { // Class reference.\n\n\t\t\t// Handles whether the reference has a method.\n\t\t\tif ( $this->has_class_method() ) { // Has a method.\n\t\t\t\t$class_method_reflector = $this->get_class_method_reflector();\n\n\t\t\t\t// Handle the types of method.\n\t\t\t\tif ( $class_method_reflector->isStatic() ) { // Static method.\n\t\t\t\t\t$callable = array( $this->get_class(), $this->get_class_method() );\n\t\t\t\t} else { // Non-static method.\n\t\t\t\t\t$callable = array( $this->get_class_instance(), $this->get_class_method() );\n\t\t\t\t}\n\t\t\t} else { // Doesn't have a method.\n\t\t\t\t$callable = $this->get_class_instance();\n\t\t\t}\n\t\t} elseif ( $this->is_function_reference() ) { // Function reference.\n\t\t\t$callable = $this->get_function();\n\t\t}\n\t\treturn $callable;\n\t}", "protected function getCallable($callable, $method = null)\n {\n if (is_string($callable) && (strpos($callable, '::') === false)) {\n // If the string contains -> notation, get the method from that\n if (strpos($callable, '->') !== false) {\n $ary = explode('->', $callable);\n $class = $ary[0];\n $method = $ary[1];\n\n $obj = new $class();\n\n // If the object is a controller, set the project object\n if ($obj instanceof \\Pop\\Mvc\\Controller) {\n $obj->setProject($this);\n $this->controllerClass = $class;\n }\n\n $callable = array($obj, $method);\n // Else call using the method passed from the URI\n } else if (null !== $method) {\n $obj = new $callable();\n\n // If the object is a controller, set the project object\n if ($obj instanceof \\Pop\\Mvc\\Controller) {\n $obj->setProject($this);\n $this->controllerClass = $callable;\n }\n $callable = array($obj, $method);\n }\n }\n\n return $callable;\n }", "public function get_class_method_reflector() {\n\t\tif ( ! $this->is_class_method_reflector_set ) {\n\t\t\t$this->set_class_method_reflector( $this->derive_class_method_reflector() );\n\t\t}\n\t\treturn $this->class_method_reflector;\n\t}", "public function getFunction()\n {\n $fct_name = $this->getFunctionName();\n if (empty($this->function_reflection) && !empty($fct_name)) {\n $cls_name = $this->getClassName();\n if (\n !empty($cls_name) &&\n method_exists($cls_name, $fct_name)\n ) {\n $this->function_reflection = new \\ReflectionMethod($cls_name, $fct_name);\n } elseif (\n function_exists($fct_name)\n ) {\n $this->function_reflection = new \\ReflectionFunction($fct_name);\n }\n }\n return $this->function_reflection;\n }", "public function getReflectionService() {}", "private function tinydb_get_reflector()\n {\n if (!isset($this->tinydb_reflector)) {\n $this->tinydb_reflector = new \\ReflectionObject($this);\n }\n\n return $this->tinydb_reflector;\n }", "public static function getReflection()\n\t{\n\t\treturn new \\ReflectionClass( get_called_class() );\n\t}", "protected function derive_function() {\n\t\t$callable_reference = $this->get_callable_reference();\n\t\treturn is_string( $callable_reference ) && function_exists( $callable_reference ) ? $callable_reference : null;\n\t}", "public function getCustomConstructor(): callable;", "protected function derive_class_reflector() {\n\t\ttry {\n\t\t\t$class_reflector = $this->is_class_reference() ? new ReflectionClass( $this->get_class() ) : null;\n\t\t} catch ( ReflectionException $exception ) {\n\t\t\t$class_reflector = null;\n\t\t}\n\t\treturn $class_reflector;\n\t}", "public function callCallable(callable $callable)\n {\n try {\n $rf = new ReflectionFunction(Closure::fromCallable($callable));\n } catch (ReflectionException $e) {\n throw new LogicException('Failed reflecting callable', 0, $e);\n }\n return $callable(...$this->expandParameters($rf->getParameters()));\n }", "public static function fromReflector( $callable ) {\n\t\t$exporter = new Exporter();\n\n\t\t$uses = [];\n\t\tif ( ! empty( $callable->uses ) ) {\n\t\t\t$uses = $exporter->export_uses( $callable->uses );\n\t\t}\n\n\t\t$hooks = [];\n\t\tif ( ! empty( $callable->uses ) && ! empty( $callable->uses['hooks'] ) ) {\n\t\t\t$hooks = DocPartFactory::fromHooks( $callable->uses['hooks'] );\n\t\t}\n\n\t\treturn new self(\n\t\t\t$callable->getShortName(),\n\t\t\t$callable->getNamespace(),\n\t\t\t$callable->getNamespaceAliases(),\n\t\t\t$callable->getLineNumber(),\n\t\t\t$callable->getNode()->getAttribute( 'endLine' ),\n\t\t\t$exporter->export_arguments( $callable->getArguments() ),\n\t\t\t$exporter->export_docblock( $callable ),\n\t\t\t$uses,\n\t\t\t$hooks\n\t\t);\n\t}", "protected function derive_class_method() {\n\t\t$callable_reference = $this->get_callable_reference();\n\t\treturn is_array( $callable_reference ) && 2 === count( $callable_reference ) && method_exists( $callable_reference[0], $callable_reference[1] ) ? $callable_reference[1] : null;\n\t}", "protected function derive_class() {\n\t\t$class = null;\n\t\t$callable_reference = $this->get_callable_reference();\n\n\t\t// Validate the potential class name.\n\t\tif ( is_string( $callable_reference ) && class_exists( $callable_reference ) ) { // Just the class name.\n\t\t\t$class = $callable_reference;\n\t\t} elseif ( is_array( $callable_reference ) && isset( $callable_reference[0] ) && class_exists( $callable_reference[0] ) ) { // A class and method.\n\t\t\t$class = $callable_reference[0];\n\t\t}\n\t\treturn $class;\n\t}", "protected function getParameterType($callable): string\n {\n // This try-catch is only here to keep OCD linters happy about uncaught reflection exceptions.\n try {\n // See the docblock of isClassCallable() for why this needs to come first.\n if ($this->isClassCallable($callable)) {\n $reflect = new \\ReflectionClass($callable[0]);\n $params = $reflect->getMethod($callable[1])->getParameters();\n } else {\n $reflect = new \\ReflectionFunction(\\Closure::fromCallable($callable));\n $params = $reflect->getParameters();\n }\n\n $rType = $params[0]->getType();\n if ($rType === null) {\n throw new \\InvalidArgumentException('Listeners must declare an object type they can accept.');\n }\n $type = $rType->getName();\n }\n catch (\\ReflectionException $e) {\n throw new \\RuntimeException('Type error registering listener.', 0, $e);\n }\n\n return $type;\n }", "private function getParentReflectorMpc(Reflector $reflector, $what)\n {\n $hasWhat = 'has' . \\ucfirst($what);\n $getWhat = 'get' . \\ucfirst($what);\n if ($what === 'constant') {\n $getWhat = 'getReflectionConstant'; // php 7.1\n }\n $name = $reflector->getName();\n $reflectionClass = $reflector->getDeclaringClass();\n $interfaces = $reflectionClass->getInterfaceNames();\n foreach ($interfaces as $className) {\n $reflectionInterface = new ReflectionClass($className);\n if ($reflectionInterface->{$hasWhat}($name)) {\n return $reflectionInterface->{$getWhat}($name);\n }\n }\n $parentClass = $reflectionClass->getParentClass();\n if ($parentClass && $parentClass->{$hasWhat}($name)) {\n return $parentClass->{$getWhat}($name);\n }\n return null;\n }", "public function getReflectionClass()\n {\n return ReflectionPool::getInstance($this->className);\n }", "function getReflectionClass();", "private function getModifierConverter(): Closure\n {\n return function (Token $token) {\n $name = strtoupper($token->getValue());\n\n return constant(\"ReflectionMethod::IS_{$name}\");\n };\n }", "private static function reflectCallableParameters($callable)\n {\n /*\n loosely after https://github.com/technically-php/callable-reflection/blob/main/src/CallableReflection.php#L72-L86.\n Licence is compatible, both project use MIT\n */\n if ($callable instanceof Closure) {\n $reflection = new ReflectionFunction($callable);\n } elseif (is_string($callable) && function_exists($callable)) {\n $reflection = new ReflectionFunction($callable);\n } elseif (is_string($callable) && str_contains($callable, '::')) {\n $reflection = new ReflectionMethod($callable);\n } elseif (is_object($callable) && method_exists($callable, '__invoke')) {\n $reflection = new ReflectionMethod($callable, '__invoke');\n } else {\n throw new \\InvalidArgumentException('argument is not callable or the code is wrong');\n }\n\n return $reflection->getParameters();\n }", "public function getReflectionClass();", "public function get_class_reflector() {\n\t\tif ( ! $this->is_class_reflector_set ) {\n\t\t\t$this->set_class_reflector( $this->derive_class_reflector() );\n\t\t}\n\t\treturn $this->class_reflector;\n\t}", "protected function getFuncToMethod() {\r\n\t\t$class = $this->class;\r\n\t\t\r\n\t\tif (!isset(self::$classCache[$class])) {\r\n\t\t\t$reflClass = new \\ReflectionClass($class);\r\n\t\t\t$methods = [];\r\n\t\t\t\r\n\t\t\t/* @var $reflMethod \\ReflectionMethod */\r\n\t\t\tforeach ($reflClass->getMethods() as $reflMethod) {\r\n\t\t\t\t$methodName = $reflMethod->name;\r\n\t\t\t\t$functionName = strtolower(preg_replace('/[A-Z]/', '_$0', $methodName));\r\n\t\t\t\t\r\n\t\t\t\tif (!$reflMethod->isStatic() && ($reflMethod->isPublic() || $reflMethod->isProtected()) && strpos($methodName, '__') !== 0) {\r\n\t\t\t\t\t$methods[$functionName] = $methodName;\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself::$classCache[$class] = $methods;\r\n\t\t}\t\r\n\t\t\r\n\t\treturn self::$classCache[$class];\r\n\t}", "private function callableFromStringNotation(string $toResolve, ?string $defaultMethod = null)\n {\n $callable = $toResolve;\n\n if (preg_match(self::CALLABLE_PATTERN, $toResolve, $matches) === 1) {\n /** @var callable(): mixed $callable */\n $callable = [$matches['class'], $matches['method']];\n } elseif ($defaultMethod !== null) {\n /** @var callable(): mixed $callable */\n $callable = [$toResolve, $defaultMethod];\n }\n\n return $callable;\n }", "protected function getBindingCallable($binder, $value)\n {\n // If $binder is a callable then use it, otherwise resolve the callable :\n if (is_callable($binder)) {\n return $binder;\n\n // If $binder is string (class name or Class@method)\n } elseif (is_string($binder)) {\n // Check if binder is CLass@method callable style\n if (strpos($binder, '@') === false) {\n $class = $binder;\n $method = null;\n } else {\n list($class, $method) = explode('@', $binder);\n }\n\n if (!class_exists($class)) {\n throw new Exception(\"Route-Model-Binding : Class not found : [$class]\");\n }\n\n $instance = $this->resolveClass($class);\n\n // If a custom method defined, use it, Otherwise, use the default binding callable\n if ($method) {\n return [$instance, $method];\n } else {\n return $this->getDefaultBindingResolver($instance, $value);\n }\n }\n\n throw new InvalidArgumentException('Route-Model-Binding : Invalid binder value, Expected callable or string');\n }", "public function getReflected(): ReflectionClass\n {\n return $this->reflected;\n }", "public function getClass(): ReflectionClass;", "private function getReflectorsClassname(Reflector $reflector)\n {\n return \\method_exists($reflector, 'getDeclaringClass')\n ? $reflector->getDeclaringClass()->getName()\n : $reflector->getName();\n }", "public function getReflectionClass()\n {\n return new \\ReflectionClass($this->getName());\n }", "protected function createClassReflector() : ReflectionClass {\r\n return new ReflectionClass(EqualityComparer::class);\r\n }", "public function normalize($callable)\n {\n if ($callable instanceof Closure) {\n $class = null;\n $func = $callable;\n } elseif (is_object($callable)) {\n $class = get_class($callable);\n $func = '__invoke';\n } elseif (is_array($callable)) {\n list($class, $func) = $callable;\n if (is_object($class)) {\n $class = get_class($class);\n }\n } elseif (strpos($callable, '::') !== false) {\n list($class, $func) = explode('::', $callable, 2);\n } else {\n $class = null;\n $func = $callable;\n }\n\n return array($class, $func);\n }", "function zend_reflection_function2($one, $two = 'two') {\n \n return 'blah';\n}", "protected function parseClassMethod($userCallable)\n {\n list($class) = explode('@', $userCallable);\n\n $callable = str_replace('@', '::', $userCallable);\n\n try {\n $method = new ReflectionMethod($callable);\n\n $class = new ReflectionClass($class);\n } catch (ReflectionException $e) {\n throw new InvalidCallableException($e->getMessage());\n }\n\n return ($method->isStatic()) ? $callable : $this->getInstanceMethod($class, $method);\n }", "protected function set_function_reflector( $function_reflector ) {\n\t\t$this->function_reflector = $function_reflector;\n\t\t$this->is_function_reflector_set = true;\n\t}", "public static function getAsCallable($callable)\n {\n if (!is_callable($callable)) {\n if ($callable instanceof static) {\n $callable = $callable->getClosure();\n\n } else {\n throw new \\InvalidArgumentException('$callable arguments is not callable');\n }\n }\n\n return $callable;\n }", "public function get_callable_reference() {\n\t\tif ( ! $this->is_callable_reference_prepared ) {\n\t\t\t$prepared_callable_reference = $this->prepare_callable_reference( $this->callable_reference );\n\t\t\t$this->set_callable_reference( $prepared_callable_reference, true );\n\t\t}\n\t\treturn $this->callable_reference;\n\t}", "private function getReflectedMethod($method)\n {\n $reflection = new \\ReflectionClass(LinguaLeo::class);\n $method = $reflection->getMethod($method);\n $method->setAccessible(true);\n\n return $method;\n }", "public static function resolve(string $class): ReflectionMethod\n {\n if (!array_key_exists($class, self::$cache)) {\n self::$cache[$class] = self::getConstructor($class);\n }\n\n return self::$cache[$class];\n }", "public function getCreateCallable(): callable;", "protected function getCallable(ReflectionMethod $method)\n {\n $class = $method->getDeclaringClass();\n if ($method->isStatic()) {\n $handler = [$class->getName(), $method->getName()];\n } else {\n $handler = [$class->newInstance(), $method->getName()];\n }\n\n return $handler;\n }", "public function getReflectionClass()\n {\n if (!$this->reflClass) {\n $this->reflClass = new \\ReflectionClass($this->getClassName());\n }\n\n return $this->reflClass;\n }", "private function getParentReflectorC(ReflectionClass $reflector)\n {\n $parentReflector = $reflector->getParentClass();\n if ($parentReflector) {\n return $parentReflector;\n }\n $interfaces = $reflector->getInterfaceNames();\n foreach ($interfaces as $className) {\n return new ReflectionClass($className);\n }\n return null;\n }", "private function extractConstructor($name, $callable = null) {\n $constructor_args = func_get_args();\n $numArgs = func_num_args();\n if(is_string($parsedName = $this->parseCallable($name)) &&\n (is_callable($parsedName) || method_exists($this,$parsedName))) {\n $callable = $parsedName;\n } \n \n if(is_null($callable)) {\n $callable = $name;\n array_shift($constructor_args);\n array_shift($constructor_args);\n } else {\n $this->name = $name;\n array_shift($constructor_args);\n }\n \n if($numArgs > 2 && !is_null($callable)) {\n array_shift($constructor_args);\n array_shift($constructor_args);\n } elseif($numArgs === 2 && $name !== $callable) {\n array_shift($constructor_args);\n } \n \n return [$callable, $constructor_args];\n }", "public static function get_callable_name( $callable ) {\n\t\tif ( is_string( $callable ) ) {\n\t\t\treturn trim( $callable );\n\t\t} elseif ( is_array( $callable ) ) {\n\t\t\tif ( is_object( $callable[0] ) ) {\n\t\t\t\treturn sprintf( '%s::%s', get_class( $callable[0] ), trim( $callable[1] ) );\n\t\t\t} else {\n\t\t\t\treturn sprintf( '%s::%s', trim( $callable[0] ), trim( $callable[1] ) );\n\t\t\t}\n\t\t} elseif ( $callable instanceof \\Closure ) {\n\t\t\treturn 'closure';\n\t\t} else {\n\t\t\treturn 'unknown';\n\t\t}\n\t}", "public function reflectCallable(callable $callback): \\Generator\n {\n is_callable($callback, false, $target);\n\n if ( false !== strpos($target, '::') && $callback instanceof \\Closure ) {\n $hash = 'clsr:'.spl_object_hash($callback);\n\n if ( ! array_key_exists($hash, $this->parameters) ) {\n $this->parameters[$hash] = (new \\ReflectionFunction($callback))->getParameters();\n }\n\n yield from $this->parameters[$hash];\n }\n else if ( false !== strpos($target, '::') ) {\n yield from $this->reflectClassMethod($callback[0], $callback[1]);\n }\n else {\n $key = 'fnct:'.$callback;\n\n if ( ! array_key_exists($key, $this->parameters) ) {\n $this->parameters[$key] = (new \\ReflectionFunction($callback))->getParameters();\n }\n\n yield from $this->parameters[$key];\n }\n }", "public function getReflectionClass(): \\ReflectionClass\n {\n return $this->reflectionClass;\n }", "public function gettargetType()\n {\n if($this->type !== Null)\n return $this->type;\n \n $callable_name = '';\n if(!is_callable($this->target, False, $callable_name))\n $this->type = self::TYPE_FILE;\n else\n {\n $this->type = self::TYPE_CALLBACK;\n $this->target = $callable_name;\n }\n \n return $this->type;\n }", "public function getReflect()\n {\n return $this->_reflect;\n }", "public function getStrategy()\n {\n if (is_null($this->_strategy) === true) {\n $this->_strategy = new Introspection();\n }\n\n return $this->_strategy;\n }", "protected function getReflectionFrom($argument)\n {\n // Method name to use.\n $reflectionMethodName = Str::camel('get_reflection_'.$this->target.'_from');\n\n // Return Reflection\n return $this->{$reflectionMethodName}($argument);\n }", "public function getMethodFactory(string $method)\n {\n if (array_key_exists($method, $this->alias)) {\n $method = $this->alias[$method];\n }\n\n return $this->methodFactories[$method] ?? null;\n }", "public function createCallable()\n {\n $mock = $this->getMockBuilder('MyCallable')\n ->setMethods(['__invoke'])\n ->getMock();\n\n return $mock;\n }", "public function getReflection($param)\r\n {\r\n return $this->request->call(function() use ($param) {\r\n return $this->{$param};\r\n });\r\n }", "public function get_method();", "public static function callableToString($callable)\n {\n if (! isset($callable)) {\n return '{null}';\n } elseif (is_object($callable)) {\n return get_class($callable);\n } elseif (is_string($callable)) {\n return $callable;\n } elseif (is_array($callable)) {\n if (is_object($callable[0])) {\n return get_class($callable[0]) . '->' . $callable[1];\n } else {\n return $callable[0] . '::' . $callable[1];\n }\n }\n return '{unknown}';\n }", "public function detect(ReflectionMethod $method);", "public function getMethodInvokerName()\n {\n return $this->action['controller'] ?? 'Closure';\n }", "public static function fromReflection($reflection) : ?self\n {\n if ($reflection instanceof \\ReflectionProperty && \\PHP_VERSION_ID < 70400) {\n return null;\n } elseif ($reflection instanceof \\ReflectionMethod) {\n $type = $reflection->getReturnType() ?? (\\PHP_VERSION_ID >= 80100 ? $reflection->getTentativeReturnType() : null);\n } else {\n $type = $reflection instanceof \\ReflectionFunctionAbstract ? $reflection->getReturnType() : (\\method_exists($reflection, 'getType') ? $reflection->getType() : null);\n }\n return $type ? self::fromReflectionType($type, $reflection, \\true) : null;\n }", "protected function getReflectionMethodFrom($argument)\n {\n // No method name is given for targetting.\n if (is_null($this->keyName)) {\n throw new InvalidArgumentException('Method name to target is required');\n }\n\n // Argument is an Object.\n if (is_object($argument)) {\n $argument = get_class($argument);\n }\n\n // Get Reflected method of the object.\n return new ReflectionMethod($argument, $this->keyName);\n }", "function get_callback_type($callback) {\n if ((is_string($callback) && function_exists($callback))\n || (is_object($callback) && (get_class($callback) === 'Closure'))\n ) {\n return 'function';\n }\n\n return 'method';\n }", "private function getReflectionClass(): \\ReflectionClass\n {\n $target = $this->input->getArgument('target');\n\n if (!class_exists($target)) {\n throw new \\InvalidArgumentException('The class \"' . $target . '\" does not exist.');\n }\n\n return new \\ReflectionClass($target);\n }", "protected function getHydrator()\n {\n if (is_null(self::$hydrator)) {\n self::$hydrator = new ReflectionHydrator();\n }\n\n return self::$hydrator;\n }", "public static function reflectionFunction($strFunctionName)\n\t{\n\t\tJSONRPC_server::assertFunctionNameAllowed($strFunctionName);\n\n\n\t\tforeach(JSONRPC_server::$arrFilterPlugins as $objFilterPlugin)\n\t\t\t$objFilterPlugin->resolveFunctionName($strFunctionName);\n\n\n\t\tif(function_exists($strFunctionName))\n\t\t\t$reflector=new ReflectionFunction($strFunctionName);\n\t\telse if(is_callable($strFunctionName))\n\t\t{\n\t\t\t$arrClassAndStaticMethod=explode(\"::\", $strFunctionName);\n\t\t\t$reflector=new ReflectionMethod($arrClassAndStaticMethod[0], $arrClassAndStaticMethod[1]);\n\t\t}\n\t\telse\n\t\t\tthrow new JSONRPC_Exception(\"The function \\\"\".$strFunctionName.\"\\\" is not defined or loaded.\", JSONRPC_Exception::METHOD_NOT_FOUND);\n\n\n\t\t$arrFunctionReflection=array(\n\t\t\t\"function_return_type\"=>\"unknown\",\n\t\t\t\"function_documentation_comment\"=>$reflector->getDocComment(),\n\t\t\t\"function_params\"=>array(),\n\t\t);\n\n\t\tstatic $arrTypeMnemonicsToTypes=array(\n\t\t\t\"n\"=>\"integer\",\n\t\t\t\"f\"=>\"float\",\n\t\t\t\"str\"=>\"string\",\n\t\t\t\"arr\"=>\"array\",\n\t\t\t\"b\"=>\"boolean\",\n\t\t\t\"obj\"=>\"object\",\n\t\t\t\"mx\"=>\"mixed\",\n\t\t);\n\n\t\tstatic $arrPHPTypesToTypes=array(\n\t\t\t\"int\"=>\"integer\",\n\t\t\t\"double\"=>\"float\",\n\t\t\t\"float\"=>\"float\",\n\t\t\t\"string\"=>\"string\",\n\t\t\t\"array\"=>\"array\",\n\t\t\t\"bool\"=>\"boolean\",\n\t\t\t\"object\"=>\"object\",\n\t\t\t\"mixed\"=>\"mixed\",\n\t\t\t\"null\"=>\"null\",\n\t\t\t\"none\"=>\"unknown\",\n\t\t);\n\n\t\tif(strpos($arrFunctionReflection[\"function_documentation_comment\"], \"@return\")!==false)\n\t\t{\n\t\t\t$arrReturnParts=explode(\"@return\", $arrFunctionReflection[\"function_documentation_comment\"], 2);\n\t\t\t$arrReturnParts=explode(\".\", $arrReturnParts[1], 2);\n\t\t\t$strReturnType=trim($arrReturnParts[0]);\n\n\t\t\tif(in_array($strReturnType, $arrTypeMnemonicsToTypes))\n\t\t\t\t$arrFunctionReflection[\"function_return_type\"]=$strReturnType;\n\t\t\telse if(isset($arrPHPTypesToTypes[strtolower($strReturnType)]))\n\t\t\t\t$arrFunctionReflection[\"function_return_type\"]=$arrPHPTypesToTypes[strtolower($strReturnType)];\n\t\t}\n\n\t\t$nErrorsPosition=strpos($arrFunctionReflection[\"function_documentation_comment\"], \"@errors\");\n\t\tif($nErrorsPosition!==false)\n\t\t{\n\t\t\t$arrParts=preg_split(\"/[\\.\\r\\n]+/\", substr($arrFunctionReflection[\"function_documentation_comment\"], $nErrorsPosition+strlen(\"@errors \")));\n\t\t\t$arrFunctionReflection[\"function_error_constants\"]=preg_split(\"/[\\s,]+/\", $arrParts[0]);\n\t\t}\n\t\telse\n\t\t\t$arrFunctionReflection[\"function_error_constants\"]=array();\n\n\t\t$arrReflectionParameters=$reflector->getParameters();\n\t\tforeach($arrReflectionParameters as $reflectionParameter)\n\t\t{\n\t\t\t$arrParam=array(\n\t\t\t\t\"param_name\"=>str_replace(array(\"\\$\", \"&\"), array(\"\", \"\"), $reflectionParameter->getName()),\n\t\t\t);\n\n\t\t\t\n\t\t\t$arrParam[\"param_type\"]=\"unknown\";\n\t\t\tforeach($arrTypeMnemonicsToTypes as $strMnemonic=>$strType)\n\t\t\t{\n\t\t\t\tif(\n\t\t\t\t\tsubstr($arrParam[\"param_name\"], 0, strlen($strMnemonic))===$strMnemonic\n\t\t\t\t\t&& ctype_upper(substr($arrParam[\"param_name\"], strlen($strMnemonic), 1))\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$arrParam[\"param_type\"]=$strType;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif($reflectionParameter->isDefaultValueAvailable())\n\t\t\t{\n\t\t\t\t$arrParam[\"param_default_value_json\"]=json_encode($reflectionParameter->getDefaultValue());\n\t\t\t\t$arrParam[\"param_default_value_constant_name\"] = self::reflectionConstantName($reflectionParameter->getName(), $arrFunctionReflection[\"function_documentation_comment\"]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$arrParam[\"param_default_value_json\"]=\"\";\n\t\t\t\t$arrParam[\"param_default_value_constant_name\"] = \"\";\n\t\t\t}\n\t\t\t$arrFunctionReflection[\"function_params\"][]=$arrParam;\n\t\t}\n\t\t\n\t\tif(!self::$_bCodeComments)\n\t\t\tunset($arrFunctionReflection[\"function_documentation_comment\"]);\n\t\t\n\t\treturn $arrFunctionReflection;\n\t}", "protected function parse($callable)\n {\n list($callable, $args) = $this->parseArgs($callable);\n\n if ($this->isClassMethod($callable)) {\n $callable = $this->parseClassMethod($callable);\n } elseif ($this->isMutatorMethod($callable)) {\n $callable = [$this, $callable];\n } elseif (!function_exists($callable)) {\n throw new InvalidCallableException(\"Function [{$callable}] not found.\");\n }\n\n return [$callable, $args];\n }", "protected function initializeReflection() {}", "function resolveArgsForReflection(/*callable*/$reflectFunc, $parameters, $inDepth = true)\n {\n if (!($reflectFunc instanceof \\ReflectionFunction || $reflectFunc instanceof \\ReflectionMethod))\n throw new \\InvalidArgumentException(sprintf(\n '(%s) is not reflection.'\n , \\Poirot\\Std\\flatten($reflectFunc)\n ));\n\n $arguments = array();\n foreach ($parameters as $key => $val) {\n if (is_string($key)) {\n // Create Map Of \"field_name\" to \"fieldName\" and \"FieldName\" to Resolve To Callable\n $res = (string) \\Poirot\\Std\\cast($key)->camelCase();\n if (!isset($parameters[$res]))\n $arguments[strtolower($res)] = $val;\n\n $arguments[strtolower($key)] = $val;\n }\n\n $arguments[$key] = $val;\n }\n\n\n $matchedArguments = array();\n foreach ($reflectFunc->getParameters() as $reflectArgument)\n {\n /** @var \\ReflectionParameter $reflectArgument */\n $argValue = $notSet = uniqid(); // maybe null value is default\n\n if ($reflectArgument->isDefaultValueAvailable())\n $argValue = $reflectArgument->getDefaultValue();\n\n $argName = strtolower($reflectArgument->getName());\n if (array_key_exists($argName, $arguments)) {\n ## resolve argument value match with name given in parameters list\n $argValue = $arguments[$argName];\n unset($arguments[$argName]);\n } elseif($inDepth) {\n ## in depth argument resolver\n $av = null;\n foreach ($arguments as $k => $v) {\n if ( ( $class = $reflectArgument->getClass() ) && is_object($v) && $class->isInstance($v) )\n $av = $v;\n \n if ( $reflectArgument->isArray() && is_array($v) )\n $av = $v;\n \n if ( $reflectArgument->isCallable() && is_callable($v) )\n $av = $v;\n \n if ($av !== null) {\n unset($arguments[$k]);\n break;\n }\n }\n \n ($av === null) ?: $argValue = $av; \n }\n\n if ($argValue === $notSet)\n throw new \\InvalidArgumentException(sprintf(\n 'Callable (%s) has no match found on parameter (%s) from (%s) list.'\n , ($reflectFunc instanceof \\ReflectionMethod)\n ? $reflectFunc->getDeclaringClass()->getName().'::'.$reflectFunc->getName()\n : $reflectFunc->getName()\n , $reflectArgument->getName()\n , \\Poirot\\Std\\flatten($parameters)\n ));\n\n $matchedArguments[$reflectArgument->getName()] = $argValue;\n }\n\n return $matchedArguments;\n }", "public static function getResolver($driver)\n {\n return static::$resolvers[$driver] ?? null;\n }", "public function getMethodInvoker()\n {\n return $this->methodInvoker;\n }", "function choose_handler(): callable\n {\n $handler = null;\n $defaultHandler = DefaultHandler::getDefaultHandler();\n if (\\is_string($defaultHandler))\n {\n $handler = new $defaultHandler();\n }\n elseif (\\is_callable($defaultHandler))\n {\n $handler = $defaultHandler();\n }\n elseif (\\function_exists('curl_multi_exec') && \\function_exists('curl_exec'))\n {\n $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler());\n }\n elseif (\\function_exists('curl_exec'))\n {\n $handler = new CurlHandler();\n }\n elseif (\\function_exists('curl_multi_exec'))\n {\n $handler = new CurlMultiHandler();\n }\n\n if (ini_get('allow_url_fopen'))\n {\n $handler = $handler\n ? Proxy::wrapStreaming($handler, new StreamHandler())\n : new StreamHandler();\n }\n elseif (!$handler)\n {\n throw new \\RuntimeException('GuzzleHttp requires cURL, the ' . 'allow_url_fopen ini setting, or a custom HTTP handler.');\n }\n\n return $handler;\n }", "public function getCallable()\n {\n if ($this->callable === null) {\n throw new NativeFunctionNotInstalledException($this->libraryName, $this->functionName);\n }\n\n return $this->callable;\n }", "public function getType()\n {\n return new ReflectionClass($this);\n }", "public function getType()\n {\n return new ReflectionClass($this);\n }", "public static function getExtractor($fileOrUrl)\n\t{\n\t\t$params = JComponentHelper::getParams('com_jsolrindex', true);\r\n\t\t\r\n\t\t$params->loadArray(array('component'=>$params->toArray()));\t\t\t\r\n\t\t\n\t\t$type = JString::ucfirst($params->get('component.extractor'));\n\t\t\n\t\tjimport('jsolr.index.filesystem.'.$params->get('component.extractor'));\n\t\t$class = \"JSolrIndexFilesystemExtractor\".$type;\n\t\t\n\t\treturn new $class($fileOrUrl);\n\t}", "public static function protect($callable): callable\n {\n if (! is_object($callable) || ! method_exists($callable, '__invoke')) {\n throw new InvalidArgumentException(\n 'Callable is not a Closure or invokable object.'\n );\n }\n\n return function () use ($callable) {\n return $callable;\n };\n }", "private function locateClosure(\\ReflectionFunction $reflection)\n {\n try {\n $locator = new ClosureLocatorVisitor($reflection);\n $fileAst = $this->getFileAst($reflection);\n\n $fileTraverser = new \\PhpParser\\NodeTraverser();\n if ($this->options[self::HANDLE_CLASS_NAMES]) {\n $fileTraverser->addVisitor(new \\PhpParser\\NodeVisitor\\NameResolver);\n }\n $fileTraverser->addVisitor($locator);\n $fileTraverser->traverse($fileAst);\n } catch (\\PhpParser\\Error $e) {\n // @codeCoverageIgnoreStart\n throw new ClosureParsingException('There was an error parsing the file containing the closure.', 0, $e);\n // @codeCoverageIgnoreEnd\n }\n\n return $locator;\n }", "public function any(string $pattern, $callable): MethodsInterface;", "public function call(){\n if(is_string($this->callable)){\n $params = explode('#', $this->callable);\n $controller = \"Controllers\\\\\".$params[0].\"Controller\";\n $controller = new $controller();\n return call_user_func_array([$controller, $params[1]], $this->matches);\n } else {\n return call_user_func_array($this->callable, $this->matches);\n }\n }", "function getDecorator($type, $element, $position, $default);", "public function getPaymentMethodInfo()\n {\n return $this->paymentMethodInfo instanceof PaymentMethodInfoBuilder ? $this->paymentMethodInfo->build() : $this->paymentMethodInfo;\n }", "public function find(string $class): Instantiator;", "public function GetMethod ();", "public function reflect(string $functionName) : Reflection\n {\n $identifier = new Identifier($functionName, new IdentifierType(IdentifierType::IDENTIFIER_FUNCTION));\n\n $functionInfo = $this->sourceLocator->locateIdentifier($this->classReflector, $identifier);\n\n if (null === $functionInfo) {\n throw Exception\\IdentifierNotFound::fromIdentifier($identifier);\n }\n\n return $functionInfo;\n }", "public function getRouteResolver(): Closure\n {\n return $this->routeResolver ?: function () {\n //\n };\n }", "public function getDefiner();", "protected function maybe_resolve( $value ): string {\n\t\tif ( \\is_callable( $value ) && ! ( \\is_string( $value ) && \\function_exists( $value ) ) ) {\n\t\t\t$value = $value( $this->injector, $this->service_container );\n\t\t}\n\n\t\treturn $value;\n\t}", "protected function _getAddressReflection()\n {\n if ($this->_addressReflection === null) {\n $this->_addressReflection = new ReflectionClass(\n get_class(\n $this->getQuote()->getAddressesCollection()->getFirstItem()\n )\n );\n }\n\n return $this->_addressReflection;\n }", "public function getResolver()/*# : ParameterInterface */;" ]
[ "0.70849216", "0.69985676", "0.6698216", "0.6681776", "0.6659174", "0.6651455", "0.65886694", "0.6515129", "0.6480661", "0.6117489", "0.5911057", "0.5848887", "0.58394045", "0.58189803", "0.5759841", "0.57181156", "0.56079096", "0.5582063", "0.55740637", "0.556551", "0.5491795", "0.5487566", "0.53548723", "0.5315625", "0.5296856", "0.52898616", "0.52701503", "0.52364546", "0.5194243", "0.51863664", "0.5176516", "0.5174445", "0.517198", "0.513736", "0.51372963", "0.51342416", "0.51275194", "0.51042515", "0.50728005", "0.5028875", "0.50123024", "0.49865147", "0.49486494", "0.49037328", "0.48967856", "0.48950496", "0.4886096", "0.4878753", "0.48488548", "0.48469377", "0.48239484", "0.4822691", "0.4803158", "0.4792321", "0.479013", "0.47900504", "0.47741702", "0.47448385", "0.47221977", "0.47108173", "0.4708629", "0.46838537", "0.46821028", "0.46640733", "0.465558", "0.4652915", "0.4623549", "0.46227607", "0.46125636", "0.46091717", "0.46030965", "0.45934752", "0.4538038", "0.44926232", "0.44925514", "0.4463817", "0.44625437", "0.44202068", "0.441456", "0.44054422", "0.44044647", "0.43926293", "0.43914723", "0.4390788", "0.4390788", "0.43905303", "0.4389749", "0.43806198", "0.43772462", "0.4373024", "0.43682912", "0.4364387", "0.4363207", "0.4351601", "0.4347677", "0.4345387", "0.43395603", "0.4338195", "0.43341237", "0.43330494" ]
0.62436265
9
Normalize a callable into 2tuple form.
public function normalize($callable) { if ($callable instanceof Closure) { $class = null; $func = $callable; } elseif (is_object($callable)) { $class = get_class($callable); $func = '__invoke'; } elseif (is_array($callable)) { list($class, $func) = $callable; if (is_object($class)) { $class = get_class($class); } } elseif (strpos($callable, '::') !== false) { list($class, $func) = explode('::', $callable, 2); } else { $class = null; $func = $callable; } return array($class, $func); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function parse($callable)\n {\n list($callable, $args) = $this->parseArgs($callable);\n\n if ($this->isClassMethod($callable)) {\n $callable = $this->parseClassMethod($callable);\n } elseif ($this->isMutatorMethod($callable)) {\n $callable = [$this, $callable];\n } elseif (!function_exists($callable)) {\n throw new InvalidCallableException(\"Function [{$callable}] not found.\");\n }\n\n return [$callable, $args];\n }", "public function toTuple();", "protected function parseArgs($callable)\n {\n $args = [];\n\n if (strpos($callable, ':') !== false) {\n list($callable, $argsString) = explode(':', $callable);\n\n $args = explode(',', $argsString);\n }\n\n return [$callable, $args];\n }", "public function convert(callable $function);", "public function unpack(callable $func = null);", "protected function parseCallArguments(array $args, $callable) {\n if((is_array($callable) && \n array_key_exists(1,$callable) &&\n array_key_exists($name = $callable[1], $this->arguments)) ||\n (is_scalar($callable) &&\n array_key_exists($name = $callable, $this->arguments))) {\n $args = array_merge($args, $this->arguments[$name]);\n }\n \n return $args;\n }", "protected function prepareRule($callable, $attribute)\n {\n if (is_string($callable) || static::isFormattableOrClosure($callable)) {\n return $callable;\n }\n\n return parent::prepareRule($callable);\n }", "protected function prepare_callable_reference( $callable_reference ) {\n\n\t\t// Determine whether the callable reference might require additional preparation.\n\t\tif ( is_string( $callable_reference ) ) {\n\n\t\t\t// Check what type of additional preparation is required.\n\t\t\tif ( strpos( $callable_reference, '@' ) ) { // Method reference.\n\t\t\t\t$callable_reference = explode( '@', $callable_reference );\n\t\t\t} elseif ( strpos( $callable_reference, '::' ) ) { // Static method reference.\n\t\t\t\t$callable_reference = explode( '::', $callable_reference );\n\t\t\t}\n\t\t}\n\t\treturn $callable_reference;\n\t}", "protected function _call($callable, $args = array()) {\n\t\treturn call_user_func_array($callable, $args);\n\t}", "public function __invoke(): callable\n {\n /**\n * Trim and remove doubled-up whitespace.\n *\n * @param string $string The string to process.\n * @param string $chars The characters to process/trim.\n * @param string $replacement The string to replace instances with.\n * @return string\n */\n return function (string $string, string $chars = '', string $replacement = ''): string {\n return call_user_func_array([StringHelpers::class, 'unspace'], func_get_args());\n };\n }", "public static function parse($callables)\n {\n if (static::isFormattableOrClosure($callables)) {\n return [$callables, []];\n }\n\n return parent::parse($callables);\n }", "function call($callable, $args = null)\n {\n $args = (func_num_args() > 2) ? array_slice(func_get_args(), 1) : (array) $args;\n return call_user_func_array($callable, $args);\n }", "private function fn(): callable {\n\t\treturn function (mixed $expression): string { return $expression; };\n\t}", "public function callCallable(callable $callable)\n {\n try {\n $rf = new ReflectionFunction(Closure::fromCallable($callable));\n } catch (ReflectionException $e) {\n throw new LogicException('Failed reflecting callable', 0, $e);\n }\n return $callable(...$this->expandParameters($rf->getParameters()));\n }", "protected function parseCallable($callableName) {\n if(!is_string($callableName) || is_callable($callableName)) {\n return $callableName;\n }\n \n $argStart = strpos($callableName,'(');\n if($argStart !== false) {\n $argEnd = strpos($callableName,')');\n $argumentSignature = substr($callableName,$argStart+1,$argEnd-$argStart-1);\n $callableName = substr($callableName,0, $argStart);\n $this->arguments[$callableName] = explode(',', $argumentSignature);\n }\n \n return trim($callableName);\n }", "public static function fix(callable $f)\n {\n return call_user_func(\n function (callable $x) use ($f) {\n return $f(\n function () use ($f, $x) {\n return call_user_func_array($x($x), func_get_args());\n }\n );\n },\n function (callable $x) use ($f) {\n return $f(\n function () use ($f, $x) {\n return call_user_func_array($x($x), func_get_args());\n }\n );\n }\n );\n }", "private static function reflectCallableParameters($callable)\n {\n /*\n loosely after https://github.com/technically-php/callable-reflection/blob/main/src/CallableReflection.php#L72-L86.\n Licence is compatible, both project use MIT\n */\n if ($callable instanceof Closure) {\n $reflection = new ReflectionFunction($callable);\n } elseif (is_string($callable) && function_exists($callable)) {\n $reflection = new ReflectionFunction($callable);\n } elseif (is_string($callable) && str_contains($callable, '::')) {\n $reflection = new ReflectionMethod($callable);\n } elseif (is_object($callable) && method_exists($callable, '__invoke')) {\n $reflection = new ReflectionMethod($callable, '__invoke');\n } else {\n throw new \\InvalidArgumentException('argument is not callable or the code is wrong');\n }\n\n return $reflection->getParameters();\n }", "function cdr(callable $pair)\n{\n $res = function ($x, $y) {\n return $y;\n };\n return $pair($res);\n // END\n}", "public static function getAsCallable($callable)\n {\n if (!is_callable($callable)) {\n if ($callable instanceof static) {\n $callable = $callable->getClosure();\n\n } else {\n throw new \\InvalidArgumentException('$callable arguments is not callable');\n }\n }\n\n return $callable;\n }", "function resolveCallableWithArgs(/*callable*/$callable, $parameters)\n {\n if ($parameters instanceof \\Traversable)\n $parameters = \\Poirot\\Std\\cast($parameters)->toArray();\n \n \n $reflection = reflectCallable($callable);\n $matchedArguments = resolveArgsForReflection($reflection, $parameters);\n \n $callbackResolved = function() use ($callable, $matchedArguments) {\n return call_user_func_array($callable, $matchedArguments);\n };\n \n return $callbackResolved;\n }", "function tuple()\n{\n $arguments = func_get_args();\n if (is_array($arguments[0])) {\n $generators = $arguments[0];\n } else {\n $generators = $arguments;\n }\n return new TupleGenerator($generators);\n}", "function car(callable $pair)\n{\n $res = function ($x, $y) {\n return $x;\n };\n return $pair($res);\n // END\n}", "private function normalizeFunctions(array $args): array\n\t{\n\t\tif (isset($args[0])) {\n\t\t\treturn $args;\n\t\t}\n\n\t\t$processedArgs = [];\n\t\tforeach ($args as $argName => $argValue) {\n\t\t\t[$argName, $operator] = ConditionParserHelper::parsePropertyOperator($argName);\n\t\t\t$processedArgs[] = [CompareFunction::class, $argName, $operator, $argValue];\n\t\t}\n\t\treturn $processedArgs;\n\t}", "function convertArg($a)\n{\n if(is_callable($a))\n {\n // PHP Can't serialize closures\n $r = new ReflectionFunction($a);\n $a = array($r->getName() => array(\n \"parameters\" => array_map('convertParam', $r->getParameters())\n ));\n }\n if(is_array($a))\n {\n // Recursively convert arrays\n $a = convertArray($a);\n }\n if(is_object($a))\n {\n $r = new ReflectionClass($a);\n $a = array($r->getName() => array(\n \"properties\" => convertArray(get_object_vars($a)),\n \"methods\" => $r->getMethods()));\n }\n return $a;\n}", "public function transform(Closure $func): static;", "function extractParameters($callableOrClassname) : array {\n\tswitch (true) {\n\t\t// Handle closure\n\t\tcase $callableOrClassname instanceof Closure:\n\t\t\t$parameters = (new ReflectionFunction($callableOrClassname))->getParameters();\n\t\t\tbreak;\n\t\t\n\t\t// Handle clasname-object-method-array\n\t\tcase is_array($callableOrClassname) && is_callable($callableOrClassname):\n\t\t\t$class = is_string($callableOrClassname[0]) ? $callableOrClassname[0] : get_class($callableOrClassname[0]);\n\t\t\t$parameters = (new ReflectionMethod($class . '::' . $callableOrClassname[1]))->getParameters();\n\t\t\tbreak;\n\n\t\t// Handle callable-string classname::method or function name\n\t\tcase is_string($callableOrClassname) && is_callable($callableOrClassname):\n\t\t\t$parameters = strpos($callableOrClassname, '::') ?\n\t\t\t\t\t\t\t\t(new ReflectionMethod($callableOrClassname))->getParameters() :\n\t\t\t\t\t\t\t\t(new ReflectionFunction($callableOrClassname))->getParameters();\n\t\t\tbreak;\n\t\t\n\t\t// Handle class name\n\t\tcase is_string($callableOrClassname) && class_exists($callableOrClassname):\n\t\t\t$parameters = (new ReflectionMethod($callableOrClassname . '::__construct'))->getParameters();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tthrow new InvalidArgumentException(sprintf(\n\t\t\t\t'Cant extract parameters from given argument with type \\'%s\\'.', \n\t\t\t\tis_object($callableOrClassname) ? get_class($callableOrClassname) : gettype($callableOrClassname)\n\t\t\t));\n\t}\n\n\treturn array_map(function(ReflectionParameter $parameter){\n\t\treturn $parameter->name;\n\t}, $parameters);\n}", "public static function parseCallback($callback)\n {\n if (is_string($callback)) {\n $callbackParts = explode('@', $callback);\n $class = self::$namespace . '\\\\' . $callbackParts[0];\n $method = $callbackParts[1];\n $callback = [$class, $method];\n }\n\n return $callback;\n }", "public function pipeAndReturnCallbackResult(callable $callback);", "protected function getBindingCallable($binder, $value)\n {\n // If $binder is a callable then use it, otherwise resolve the callable :\n if (is_callable($binder)) {\n return $binder;\n\n // If $binder is string (class name or Class@method)\n } elseif (is_string($binder)) {\n // Check if binder is CLass@method callable style\n if (strpos($binder, '@') === false) {\n $class = $binder;\n $method = null;\n } else {\n list($class, $method) = explode('@', $binder);\n }\n\n if (!class_exists($class)) {\n throw new Exception(\"Route-Model-Binding : Class not found : [$class]\");\n }\n\n $instance = $this->resolveClass($class);\n\n // If a custom method defined, use it, Otherwise, use the default binding callable\n if ($method) {\n return [$instance, $method];\n } else {\n return $this->getDefaultBindingResolver($instance, $value);\n }\n }\n\n throw new InvalidArgumentException('Route-Model-Binding : Invalid binder value, Expected callable or string');\n }", "public function to_fn() {\n $self = $this;\n return static function ($values) use ($self) {\n return $self->apply($values);\n };\n }", "protected static function parseStringRule($callables)\n {\n $parameters = [];\n\n if (strpos($callables, ':') !== false) {\n [$callables, $parameter] = explode(':', $callables, 2);\n\n $parameters = static::parseParameters($callables, $parameter);\n }\n\n return [trim($callables), $parameters];\n }", "protected function callBindingCallable($callable, $args, $errorHandler)\n {\n try {\n // Try to call the resolver method and retrieve the model\n if (is_array($args)) {\n return call_user_func_array($callable, array_values($args));\n } else {\n return call_user_func($callable, $args);\n }\n } catch (Exception $e) {\n // If there's an error handler defined, call it, otherwise, re-throw the exception\n if (! is_null($errorHandler)) {\n return call_user_func($errorHandler, $e);\n } else {\n throw $e;\n }\n }\n }", "public function do_callback(&$callback)\n\t{\n\t\tif (is_string($callback)) {\n\t\t\tif (preg_match('/^([^\\[]++)\\[(.+)\\]$/', $callback, $matches)) {\n\t\t\t\t// Split the function and args\n\t\t\t\t$callback = $matches[1];\n\t\t\t\t$args = preg_split('/(?<!\\\\\\\\),\\s*/', $matches[2]);\n\t\t\t}\n\t\t}\n\n\t\tif (is_string($callback)) {\n\t\t\tif (strpos($callback, '::') !== FALSE) {\n\t\t\t\t$callback = explode('::', $callback);\n\t\t\t} elseif (function_exists($callback)) {\n\t\t\t\t// No need to check if the callback is a method\n\t\t\t\t$callback = $callback;\n\t\t\t}\n\t\t}\n\n\t\tif ($callback === 'array' && is_array($args) && !empty($args)) {\n\t\t\t$val = $args[0];\n\t\t\t# remove first element which is the value to be \"translated\"\n\t\t\tarray_shift($args);\n\t\t\tif (array_key_exists($val, $args)) {\n\t\t\t\treturn $args[$val];\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t$value = false;\n\t\t$name = false;\n\t\tif (is_callable($callback)) {\n\t\t\tif (is_array($callback)) {\n\t\t\t\tif (is_object($callback[0])) {\n\t\t\t\t\t// Object instance syntax\n\t\t\t\t\t$name = get_class($callback[0]).'->'.$callback[1];\n\t\t\t\t} else {\n\t\t\t\t\t// Static class syntax\n\t\t\t\t\t$name = $callback[0].'::'.$callback[1];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Function syntax\n\t\t\t\t$name = $callback;\n\t\t\t}\n\t\t}\n\n\t\tif (function_exists($name)) {\n\t\t\t$value = call_user_func_array($name, $args);\n\t\t}\n\t\treturn $value;\n\t}", "public function map(callable $fn);", "protected function parseClassMethod($userCallable)\n {\n list($class) = explode('@', $userCallable);\n\n $callable = str_replace('@', '::', $userCallable);\n\n try {\n $method = new ReflectionMethod($callable);\n\n $class = new ReflectionClass($class);\n } catch (ReflectionException $e) {\n throw new InvalidCallableException($e->getMessage());\n }\n\n return ($method->isStatic()) ? $callable : $this->getInstanceMethod($class, $method);\n }", "protected static function parseArrayRule(array $callables)\n {\n return [trim(Arr::get($callables, 0)), array_slice($callables, 1)];\n }", "public function execute($callable);", "abstract public function map(callable $func);", "public function map(callable $c);", "public static function protect($callable): callable\n {\n if (! is_object($callable) || ! method_exists($callable, '__invoke')) {\n throw new InvalidArgumentException(\n 'Callable is not a Closure or invokable object.'\n );\n }\n\n return function () use ($callable) {\n return $callable;\n };\n }", "protected function parseClassCallable($listener)\n {\n // If the listener has an @ sign, we will assume it is being used to delimit\n // the class name from the handle method name. This allows for handlers\n // to run multiple handler methods in a single class for convenience.\n return array_pad(explode('@', $listener, 2), 2, 'handle');\n }", "function invert(callable $x): callable\n{\n return function ($y) use ($x): bool {\n return ! $x($y);\n };\n}", "function zzz(callable $goal) {\n return function (State $state) use ($goal) {\n return new CallableStream(function () use ($goal, $state) {\n return $goal($state);\n });\n };\n}", "private function reworkArgs() {\n $this->functionArgs = array_diff(self::goodSplit($this->functionArgs, ','), array(''));\n }", "protected function getConnectionInitializerWrapper($callable)\n {\n return function () use ($callable) {\n $connection = call_user_func_array($callable, func_get_args());\n\n if (!$connection instanceof ConnectionInterface) {\n throw new UnexpectedValueException(\n 'The callable connection initializer returned an invalid type.'\n );\n }\n\n return $connection;\n };\n }", "public function combineAndValidator(...$args) : Closure\n {\n foreach ($args as $func) {\n if (!is_callable($func)) {\n throw NoCallableArgumentException(\"{$func} is not callable\");\n }\n }\n return function ($value) {\n return array_reduce(\n $args,\n function ($acc, $func) use ($value) {\n $check = call_user_func($func, $value);\n return array_merge(\n [\n 'result' => $acc['result'] && $check['result']\n ],\n $check['result']\n ? []\n : [\n 'message' => $acc['result']\n ? \"{$check['message']}\"\n : \"{$acc['message']}, {$check['message']}\"\n ]\n );\n },\n ['result' => true]\n );\n };\n }", "function sa_parseFuncArgs($argstr){\n $entries = array();\n $filteredData = $argstr;\n $userland = '[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*';\n if (preg_match_all(\"/$userland\\(([^)]*)\\)/\", $argstr, $matches)) {\n $entries = $matches[0];\n $filteredData = preg_replace(\"/$userland\\(([^)]*)\\)/\", \"-function-\", $argstr);\n }\n\n $arr = array_map(\"trim\", explode(\",\", $filteredData));\n\n if (!$entries) {\n return $arr;\n }\n\n $j = 0;\n foreach ($arr as $i => $entry) {\n if ($entry != \"-function-\") {\n continue;\n }\n\n $arr[$i] = $entries[$j];\n $j++;\n }\n\n return $arr;\n}", "function value(mixed $value, ...$args)\n{\n return $value instanceof Closure ? $value(...$args) : $value;\n}", "public function combineOrValidator(...$args) : Closure\n {\n foreach ($args as $func) {\n if (!is_callable($func)) {\n throw NoCallableArgumentException(\"{$func} is not callable\");\n }\n }\n return function ($value) use ($args) {\n return array_reduce(\n $args,\n function ($acc, $func) use ($value) {\n $check = $func($value);\n return array_merge(\n [\n 'result' => $acc['result'] || $check['result']\n ],\n $check['result']\n ? []\n : [\n 'message' => $acc['result']\n ? \"{$check['message']}\"\n : \"{$acc['message']}, {$check['message']}\"\n ]\n );\n },\n ['result' => true]\n );\n };\n }", "public static function useAsCallable($value)\n {\n return !is_string($value) and !is_array($value) and is_callable($value);\n }", "public static function callback(string $str): array\n {\n // Overloaded as parts are found\n $params = NULL;\n\n // command[param,param]\n if (preg_match('/^([^(]*+)\\((.*)\\)$/', $str, $match)) {\n // command\n $command = $match[1];\n\n if ($match[2] !== '') {\n // param,param\n $params = preg_split('/(?<!\\\\\\\\),/', $match[2]);\n $params = str_replace('\\,', ',', $params);\n }\n } else {\n // command\n $command = $str;\n }\n\n if (strpos($command, '::') !== FALSE) {\n // Create a static method callable command\n $command = explode('::', $command, 2);\n }\n\n return [$command, $params];\n }", "public function mutate($value, $callables)\n {\n if (!is_array($callables)) {\n $callables = explode('|', $callables);\n }\n\n foreach ($callables as $callable) {\n list($callable, $args) = $this->parse(trim($callable));\n\n $value = call_user_func_array($callable, array_merge([$value], $args));\n }\n\n return $value;\n }", "private function extractConstructor($name, $callable = null) {\n $constructor_args = func_get_args();\n $numArgs = func_num_args();\n if(is_string($parsedName = $this->parseCallable($name)) &&\n (is_callable($parsedName) || method_exists($this,$parsedName))) {\n $callable = $parsedName;\n } \n \n if(is_null($callable)) {\n $callable = $name;\n array_shift($constructor_args);\n array_shift($constructor_args);\n } else {\n $this->name = $name;\n array_shift($constructor_args);\n }\n \n if($numArgs > 2 && !is_null($callable)) {\n array_shift($constructor_args);\n array_shift($constructor_args);\n } elseif($numArgs === 2 && $name !== $callable) {\n array_shift($constructor_args);\n } \n \n return [$callable, $constructor_args];\n }", "public function flatMap(callable $fn);", "public static function normalizeCallNumber($callNumber);", "function compose(callable $x, callable $y): callable\n{\n return function ($z) use ($x, $y) {\n return $x($y($z));\n };\n}", "public static function denormalizeCallNumber($norm);", "public function testSimpleTuple(): void\n {\n $f = new TupleComparison(['field1', 'field2'], [1, 2], ['integer', 'integer'], '=');\n $binder = new ValueBinder();\n $this->assertSame('(field1, field2) = (:tuple0, :tuple1)', $f->sql($binder));\n $this->assertSame(1, $binder->bindings()[':tuple0']['value']);\n $this->assertSame(2, $binder->bindings()[':tuple1']['value']);\n $this->assertSame('integer', $binder->bindings()[':tuple0']['type']);\n $this->assertSame('integer', $binder->bindings()[':tuple1']['type']);\n }", "abstract public function convert($param1, $param2);", "public function testTupleWithExpressionValues(): void\n {\n $value1 = new QueryExpression(['a' => 1]);\n $f = new TupleComparison(['field1', 'field2'], [$value1, 2], ['integer', 'integer'], '=');\n $binder = new ValueBinder();\n $this->assertSame('(field1, field2) = (a = :c0, :tuple1)', $f->sql($binder));\n $this->assertSame(1, $binder->bindings()[':c0']['value']);\n $this->assertSame(2, $binder->bindings()[':tuple1']['value']);\n }", "protected function convertIps($unconverted_ips){\n $convert_ips = function($ip){ return long2ip($ip); };\n return array_map($convert_ips, $unconverted_ips);\n }", "abstract static function fmap(callable $callable, Functor $functor): Functor;", "public static function get_callable_name( $callable ) {\n\t\tif ( is_string( $callable ) ) {\n\t\t\treturn trim( $callable );\n\t\t} elseif ( is_array( $callable ) ) {\n\t\t\tif ( is_object( $callable[0] ) ) {\n\t\t\t\treturn sprintf( '%s::%s', get_class( $callable[0] ), trim( $callable[1] ) );\n\t\t\t} else {\n\t\t\t\treturn sprintf( '%s::%s', trim( $callable[0] ), trim( $callable[1] ) );\n\t\t\t}\n\t\t} elseif ( $callable instanceof \\Closure ) {\n\t\t\treturn 'closure';\n\t\t} else {\n\t\t\treturn 'unknown';\n\t\t}\n\t}", "public function testIsCallable() {\n\t\t$result = _::isCallable('Fibonacci::compute');\n\t\t$this->assertTrue($result);\n\n\t\t// test that a Closure is callable\n\t\t$result = _::isCallable(function(){});\n\t\t$this->assertTrue($result);\n\n\t\t// test that an integer is not callable\n\t\t$result = _::isCallable(5);\n\t\t$this->assertFalse($result);\n\t}", "public static function stream(callable $callable, ...$args)\n {\n while(true) {\n if (is_callable($callable)) {\n yield $callable(...$args);\n } else {\n yield $callable;\n }\n }\n }", "public function get_callable() {\n\t\t$callable = null;\n\n\t\t// Handles the type of reference.\n\t\tif ( $this->is_class_reference() ) { // Class reference.\n\n\t\t\t// Handles whether the reference has a method.\n\t\t\tif ( $this->has_class_method() ) { // Has a method.\n\t\t\t\t$class_method_reflector = $this->get_class_method_reflector();\n\n\t\t\t\t// Handle the types of method.\n\t\t\t\tif ( $class_method_reflector->isStatic() ) { // Static method.\n\t\t\t\t\t$callable = array( $this->get_class(), $this->get_class_method() );\n\t\t\t\t} else { // Non-static method.\n\t\t\t\t\t$callable = array( $this->get_class_instance(), $this->get_class_method() );\n\t\t\t\t}\n\t\t\t} else { // Doesn't have a method.\n\t\t\t\t$callable = $this->get_class_instance();\n\t\t\t}\n\t\t} elseif ( $this->is_function_reference() ) { // Function reference.\n\t\t\t$callable = $this->get_function();\n\t\t}\n\t\treturn $callable;\n\t}", "function apply($fn, $args) {\n return call_user_func_array($fn, $args);\n}", "protected function parse_twoVS_fun()\n {\n $this->check_param_num(2);\n\n $this->generate_instruction();\n\n $this->get_token();\n $this->check_var();\n $this->generate_arg(\"1\", \"var\");\n\n $this->get_token();\n $result = $this->check_symb();\n $this->generate_symb($result, \"2\");\n\n $this->xml->endElement();\n }", "function wponion_field_cloneable_sanitize( $value = '', $callback = '' ) {\n\t\tif ( wponion_is_array( $value ) ) {\n\t\t\tforeach ( $value as $i => $v ) {\n\t\t\t\t$value[ $i ] = wponion_callback( $callback, array( $v ) );\n\t\t\t}\n\t\t}\n\t\treturn $value;\n\t}", "public function checkCallable($value)\n {\n return new AssertionResult(\n is_callable($value),\n '{name} must be callable'\n );\n }", "public static function parseFunctionArgs($input)\n {\n $output = $input;\n\n if (false !== strpos($input, '(') && false !== strpos($input, ')')) {\n $open_paren_pos = strpos($input, '(');\n $method = mb_substr($input, 0, $open_paren_pos);\n if ($arg_string = mb_substr($input, $open_paren_pos + 1, (strpos($input, ')', $open_paren_pos) - $open_paren_pos) - 1)) {\n $arguments = explode(',', $arg_string);\n $arguments = array_map('trim', $arguments);\n $arguments = array_map(function ($n) {\n return trim($n, \"'\");\n }, $arguments);\n\n $output = [ $method, $arguments ];\n }\n }\n\n return $output;\n }", "protected function resolveCallback($callback)\n {\n if (($callback instanceof Closure) || is_array($callback)) {\n return $callback;\n }\n\n // If the callback is a string, we will try to resolve the class based ones.\n else if (is_string($callback)) {\n if (strpos($callback, '@') === false) {\n return $callback;\n }\n\n list ($class, $method) = explode('@', $callback);\n\n $instance = App::make('\\\\' . $class);\n\n return array($instance, $method);\n }\n\n return false;\n }", "private function doTransform($data, callable $func = null)\n {\n if (null === $func || null === $data) {\n return $data;\n }\n\n if (!is_array($data)) {\n $data = [$data];\n }\n\n return call_user_func_array($func, $data);\n }", "private function callableFromStringNotation(string $toResolve, ?string $defaultMethod = null)\n {\n $callable = $toResolve;\n\n if (preg_match(self::CALLABLE_PATTERN, $toResolve, $matches) === 1) {\n /** @var callable(): mixed $callable */\n $callable = [$matches['class'], $matches['method']];\n } elseif ($defaultMethod !== null) {\n /** @var callable(): mixed $callable */\n $callable = [$toResolve, $defaultMethod];\n }\n\n return $callable;\n }", "private function expandCallback($callback)\n {\n\n if (is_string($callback) && (bool) strpos($callback, '::') !== false) {\n $callback = explode('::', $callback);\n }\n\n if (is_array($callback) && isset($callback[0])) {\n if (is_string($callback[0])) {\n $callback[0] = $this->getInstanceOf($callback[0]);\n }\n\n $callback = [$callback[0], $callback[1]];\n }\n\n\n return $callback;\n }", "public function _parse_to_func_array($in) {\n\t\tif (preg_match('/^(.+)\\[(.+)\\]$/', $in, $matches)) {\n\t\t\t$rule = $matches[1];\n\t\t\t$params = ($matches[2] != '') ? explode(',', str_replace(', ', '', trim($matches[2]))) : array();\n\t\t}\n\t\telse {\n\t\t\t$rule = $in;\n\t\t\t$params = array();\n\t\t}\n\t\t\n\t\treturn array($rule, $params);\n\t}", "public static function unsafe($callable, Isolator $isolator = null)\n {\n $isolator = Isolator::get($isolator);\n\n $errorHandlers = static::removeErrorHandlers($isolator);\n $result = $callable();\n static::restoreErrorHandlers($errorHandlers, $isolator);\n\n return $result;\n }", "public static function toList(): callable {\r\n return function ($key, $val) {\r\n return new ListEntry($val);\r\n };\r\n }", "function compose(array $functions): Closure\n{\n return function ($value) use ($functions) {\n return array_reduce(\n array_reverse($functions),\n function ($value, $function) {\n return $function($value);\n },\n $value\n );\n };\n}", "function callback($retval, $callinfo) {\r\n\r\n var_dump($callinfo);\r\n print_r($retval . PHP_EOL);\r\n\r\n}", "public function execute($callable, array $params);", "public function __invoke()\n {\n $callable = $this->callable;\n return $callable(...$this->arguments);\n }", "protected function parseLooseArgumentOrder(array $args)\r\n {\r\n // Get the arguments in a very loose format\r\n $callback = array_pop($args);\r\n $path = array_pop($args);\r\n $method = array_pop($args);\r\n\r\n // Return a named parameter array\r\n return array(\r\n 'method' => $method,\r\n 'path' => $path,\r\n 'callback' => $callback,\r\n );\r\n }", "public function apply(callable ...$callables): self;", "function &func(callable $value, string $namespace = 'default'): callable\n{\n $var = new Variable\\CallableVariable($value);\n Repository::add($var, $namespace);\n return $var->getValue();\n}", "function grab($func,$args=NULL) {\n if (preg_match('/(.+)\\h*(->|::)\\h*(.+)/s',$func,$parts)) {\n // Convert string to executable PHP callback\n if (!class_exists($parts[1])){\n self::error(500,['Invalid Class', $parts[1].' class does not exist']);\n }\n if ($parts[2]=='->') {\n $ref=new ReflectionClass($parts[1]);\n $parts[1]=method_exists($parts[1],'__construct')?\n $ref->newinstanceargs($args):\n $ref->newinstance();\n \n }\n\n $func=array($parts[1],$parts[3]);\n }\n return $func;\n }", "function call($callback, array $args = [])\n{\n $result = null;\n if ($callback instanceof Closure) {\n $result = $callback(...$args);\n } elseif (is_object($callback) || (is_string($callback) && function_exists($callback))) {\n $result = $callback(...$args);\n } elseif (is_array($callback)) {\n [$object, $method] = $callback;\n $result = is_object($object) ? $object->{$method}(...$args) : $object::$method(...$args);\n } else {\n $result = call_user_func_array($callback, $args);\n }\n return $result;\n}", "static public function castClosure ($value) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:273: characters 3-15\n\t\treturn $value;\n\t}", "public static function callableToString($callable)\n {\n if (! isset($callable)) {\n return '{null}';\n } elseif (is_object($callable)) {\n return get_class($callable);\n } elseif (is_string($callable)) {\n return $callable;\n } elseif (is_array($callable)) {\n if (is_object($callable[0])) {\n return get_class($callable[0]) . '->' . $callable[1];\n } else {\n return $callable[0] . '::' . $callable[1];\n }\n }\n return '{unknown}';\n }", "function sanitize_callback( $value ) {\n\t\tif ( NULL === $this->sanitize_callback ) {\n\t\t\t// No sanitization by default\n\t\t\treturn $value;\n\t\t}\n\t\t// Custom sanitization callback\n\t\treturn call_user_func( $this->sanitize_callback, $value, $this );\n\t}", "function collect(&$out): callable\n{\n if (is_string($out)) {\n return function($line) use(&$out) { $out .= $line . PHP_EOL; };\n } elseif (is_array($out)) {\n return function($line) use(&$out) { $out[] = $line; };\n }\n\n throw new \\InvalidArgumentException(\n 'Parameter $out must be a string or an array, but was of type '\n . typeOf($out)\n );\n}", "public function isCallable()\n {\n return !\\is_string($this->value) && \\is_callable($this->value);\n }", "protected function parse_twoVT_fun()\n {\n $this->check_param_num(2);\n\n $this->generate_instruction();\n\n $this->get_token();\n $this->check_var();\n $this->generate_arg(\"1\", \"var\");\n\n $this->get_token();\n $this->check_type();\n $this->generate_arg(\"2\", \"type\");\n\n $this->xml->endElement();\n }", "protected function derive_function() {\n\t\t$callable_reference = $this->get_callable_reference();\n\t\treturn is_string( $callable_reference ) && function_exists( $callable_reference ) ? $callable_reference : null;\n\t}", "private function getNodeToStringConverter(): callable\n {\n return function (...$nodes) {\n $value = '';\n foreach ($nodes as $node) {\n if (is_scalar($node)) {\n $value .= $node;\n } else {\n $value .= $node->getValue();\n }\n }\n\n return $value;\n };\n }", "public function sanitizeCallback($type, $k) {\n\n switch($type) {\n\n case 'boolean':\n\n return function($v) use ($k) {\n if (!is_array($v)) return (bool) $v;\n if (isset($v[$k])) $v[$k] = (bool) $v[$k];\n return $v;\n };\n break;\n\n case 'integer' : \n\n return function($v) use ($k) {\n if (!is_array($v)) return intval($v);\n if (isset($v[$k])) $v[$k] = intval($v[$k]);\n return $v;\n };\n break;\n\n case 'number' : \n\n return function($v) use ($k) {\n if (!is_array($v)) return floatval($v);\n if (isset($v[$k])) $v[$k] = floatval($v[$k]);\n return $v;\n };\n break;\n\n case 'string' : \n return function($v) use ($k) {\n if (!is_array($v)) return trim($v);\n if (isset($v[$k])) $v[$k] = trim($v[$k]);\n return $v;\n };\n break;\n\n }\n\n return null;\n\n }", "public function extracting($arg) {\n if ($arg instanceof \\Closure) {\n return self::of($arg($this->value));\n } else if (is_array($arg)) {\n $value= [];\n foreach ($arg as $key => $extract) {\n $value[$key]= $this->extracting($extract)->value;\n }\n return self::of($value);\n } else {\n return self::of((new InstanceExtractor($this->value))->extract($arg));\n }\n }", "public static function unguarded(callable $callback)\n {\n if (static::$unguarded)\n return $callback();\n\n static::unguard();\n\n $result = $callback();\n\n static::reguard();\n\n return $result;\n }", "protected function getParseFunction($value)\n {\n if(strpos($value, \"(\") > 0 && strpos($value, \")\") == strlen($value)-1){\n\n $start = strpos($value, \"(\");\n $func = substr($value, 0,$start);\n preg_match(\"#\\((.*?)\\)#\", $value, $matches);\n $value = $matches[1];\n \n return [$func, $value];\n }\n\n return false;\n }", "public function getValidCallback(array &$arguments = [])\n {\n $callback = $this->_callback;\n $head = null;\n\n if (isset($arguments[0])) {\n $head = &$arguments[0];\n }\n\n // If method is undetermined, we find it (we understand event bucket and\n // stream).\n if (null !== $head &&\n is_array($callback) &&\n null === $callback[1]) {\n if ($head instanceof Event\\Bucket) {\n $head = $head->getData();\n }\n\n switch ($type = gettype($head)) {\n case 'string':\n if (1 === strlen($head)) {\n $method = 'writeCharacter';\n } else {\n $method = 'writeString';\n }\n\n break;\n\n case 'boolean':\n case 'integer':\n case 'array':\n $method = 'write' . ucfirst($type);\n\n break;\n\n case 'double':\n $method = 'writeFloat';\n\n break;\n\n default:\n $method = 'writeAll';\n $head = $head . \"\\n\";\n }\n\n $callback[1] = $method;\n }\n\n return $callback;\n }" ]
[ "0.574029", "0.5605994", "0.55629414", "0.556134", "0.5397531", "0.5327673", "0.500636", "0.49669617", "0.4955853", "0.49198663", "0.4821207", "0.47891495", "0.47592136", "0.47322276", "0.47072294", "0.46931612", "0.46281737", "0.45879304", "0.45803133", "0.4576079", "0.45749453", "0.4570304", "0.45603183", "0.4514647", "0.4494459", "0.44911546", "0.44735405", "0.43914038", "0.43897614", "0.43795928", "0.4354118", "0.43204653", "0.430598", "0.42546317", "0.42458686", "0.42272747", "0.42215443", "0.42141885", "0.4201289", "0.41959703", "0.4192807", "0.41691655", "0.41668752", "0.41597044", "0.4124805", "0.41197374", "0.4102181", "0.40975347", "0.40948072", "0.40818545", "0.40609705", "0.4059698", "0.40530658", "0.40453646", "0.40429235", "0.40226573", "0.40104783", "0.40078", "0.4007061", "0.4006377", "0.3996925", "0.3992826", "0.39786673", "0.39773014", "0.3969431", "0.3969263", "0.39614257", "0.3955898", "0.3953355", "0.3951657", "0.3949363", "0.393922", "0.39301038", "0.39238265", "0.39143118", "0.3911111", "0.39082658", "0.3903123", "0.3899546", "0.38991097", "0.38919067", "0.38865703", "0.3884948", "0.38653383", "0.38577744", "0.38519496", "0.38509166", "0.38468492", "0.38439193", "0.38415354", "0.3840666", "0.38387603", "0.38240707", "0.38183466", "0.3807853", "0.3807403", "0.38015965", "0.38015163", "0.38011947", "0.37907138" ]
0.6501608
0
Returns the inner generator
public function getGenerator() { return $this->generator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function intoGenerator(): \\Generator {\n\t\tforeach ($this as $value) {\n\t\t\tyield $value;\n\t\t}\n\t}", "public function getGenerator(): \\Generator;", "public function getIterator(): \\Generator\n {\n return $this->resolve();\n }", "public function generator() {}", "public function getGenerator();", "public function getGenerator();", "public function getIterator(): Generator\n {\n return $this->items;\n }", "public function generator();", "public function process(): \\Generator;", "function getInnerIterator()\n\t{\n\t\treturn $this->iterator;\n\t}", "function generateItems(): \\Generator;", "public function generator()\n {\n return $this->generator;\n }", "function gen() {\n yield from $i => $a;\n}", "public function getIterator(): \\Traversable\n {\n yield from $this->generator;\n }", "public function getIterator(): Generator\n {\n foreach ($this->api->getEach(\"{$this}/items\") as $data) {\n yield $this->api->factory(static::GRAPH[$data['resource_type']] ?? Data::class, $this, $data);\n }\n }", "public function getGenerator()\n\t{\n\t\treturn $this->_generator;\n\t}", "public function getIterator()\n {\n foreach ($this->iterable as $item) {\n yield $item;\n }\n }", "public function getIterator(): \\Generator\n {\n while (!$this->stream->eof()) {\n $item = $this->stream->read($this->chunkSize);\n // @codeCoverageIgnoreStart\n // I don't know how to fabricate this manually, so I can't test it.\n if ($item === '') {\n continue;\n }\n // @codeCoverageIgnoreEnd\n yield $item;\n }\n }", "public function next() {}", "public function next() {}", "public function next() {}", "public function next() {}", "public function next() {}", "public function next() {}", "public function next() {}", "public function next() {}", "public function iterate(): \\Generator {\n\t\tforeach ($this->addresses as $address) {\n\t\t\tyield $address;\n\t\t}\n\t}", "public function withGenerator(Generator $generator): self;", "#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n foreach ($this->iteratePages() as $page) {\n foreach ($page as $key => $element) {\n yield $key => $element;\n }\n }\n }", "public function next(): mixed;", "public function next();", "public function next();", "public function next();", "public function next();", "public function getIterator()\r\n {\r\n if (!is_array($this->data))\r\n {\r\n $this->data = array();\r\n }\r\n foreach ($this->data as $item => $key)\r\n {\r\n yield $item => $key;\r\n }\r\n }", "public function getIterator()\n {\n foreach ($this->models as $model) {\n yield $model;\n }\n }", "public function serializeGenerator()\r\n {\r\n if($this->__converter instanceof IListConverter)\r\n {\r\n foreach($this->__converter->toGenerator($this) as $index => $row)\r\n {\r\n yield $index => $row;\r\n }\r\n }\r\n else\r\n {\r\n foreach($this->toArray() as $index => $row)\r\n {\r\n yield $index => $row;\r\n }\r\n }\r\n }", "public function streamAll(): Generator;", "public function getIterator(): \\Traversable\n {\n yield from $this->source;\n }", "public function getIterator()\n {\n $statement = $this->db->pdo($this->connection)->prepare($this->query);\n\n $statement->execute($this->bindings);\n\n while ($row = $statement->fetch()) {\n yield $row;\n }\n }", "function getIterator() {\n foreach($this->data() as $record) {\n yield $record;\n }\n }", "final public function traverseObject(): Generator\n {\n yield from $this->data;\n }", "function test34($a, $b) {\n for ($i = 1; $i <= 3; $i++) {\n yield $i;\n }\n}", "public function next()\n {\n }", "public function next()\n {\n }", "public function next()\n {\n }", "public function next()\n {\n }", "public function next()\r\n\t{\r\n\t}", "public function eachSense(): Generator;", "function squareNumbers()\n{\n for ($i = 1; $i <= 10; $i++) {\n yield pow($i, 2);\n }\n}", "public function getInnerIterator(): Iterator\n {\n if (isset($this->innerIterator)) {\n return $this->innerIterator;\n }\n\n if (! $this->wrappedIterator instanceof FilesystemIterator) {\n return $this->innerIterator = $this->wrappedIterator;\n }\n\n $files = $folders = [];\n foreach ($this->wrappedIterator as $file) {\n if ($file->isDir()) {\n $folders[$file->getPathname()] = $file;\n } else {\n $files[$file->getPathname()] = $file;\n }\n }\n ksort($folders);\n ksort($files);\n\n // Make sure folders are handled after files\n $contents = Arrays::attach($files, $folders);\n\n // Inherit the info class\n $children = new self(new ArrayIterator($contents));\n $children->setInfoClass($this->infoClass);\n\n return $this->innerIterator = $children;\n }", "private function failingGenerator()\n {\n throw new Exception();\n yield;\n }", "public function iterator () {\n\t\t$ret = new \\Array_hx();\n\t\tBalancedTree::iteratorLoop($this->root, $ret);\n\t\treturn new ArrayIterator($ret);\n\t}", "public function getIterator()\n {\n if ($this->offset > 0) {\n $key = null;\n $index = 0;\n //Skip the first N\n while (false !== ($record = $this->statement->fetch())) {\n if ($key === $record[ $this->pkField ]) {\n continue;\n }\n $key = $record[ $this->pkField ];\n if ($index++ === $this->offset) {\n break;\n }\n }\n $current = $record;\n } else {\n $current = $this->statement->fetch();\n }\n\n $currentKey = $current[ $this->pkField ];\n\n $fetchedRecordCount = 1;\n do {\n yield $currentKey => $current;\n\n $current = $this->statement->fetch();\n if (empty($current)) {\n break;\n }\n if ($currentKey !== $current[ $this->pkField ]) {\n $currentKey = $current[ $this->pkField ];\n $fetchedRecordCount++;\n }\n } while ($fetchedRecordCount <= $this->limit);\n\n $this->statement->closeCursor();\n }", "public function getChildren() /*: Continuation<INode>*/ {\n if ($this->block !== null) {\n yield $this->block;\n }\n }", "public function iterateCollection() {\n foreach ($this->_collection as $item) {\n yield $item;\n }\n }", "public function next()\n {\n $data = $this->dataStore->query($this->getQuery());\n foreach ($data as $datum) {\n $this->current = $datum;\n yield;\n }\n }", "function g() {\n if (false) {\n yield true;\n }\n}", "public function getConditions(): \\Generator;", "public function getIterator() {}", "public function getIterator() {}", "abstract public function getIterator();", "public function getIterator()\n {\n return $this->multi()->load();\n }", "function next();", "#[\\ReturnTypeWillChange]\n public function next()\n {\n }", "#[\\ReturnTypeWillChange]\n public function next()\n {\n }", "public function inner()\n {\n return $this->inner;\n }", "public function inner()\n {\n return $this->inner;\n }", "public function get_generators() {\n return $this->get_items_by_type(static::$POWER);\n }", "public function accept()\n {\n return $this->getClosure()->__invoke($this->getInnerIterator()->current());\n }", "public function extract(): Generator\n {\n $reader = new Reader($this->options);\n $reader->open($this->file);\n\n $sheet = $reader->getSheetIterator()->current();\n\n return $this->readSheet($reader, $sheet);\n }", "private function generateArgumentLists()\n {\n for ($i = 0; $i < $this->max_tests; $i++) {\n $arg_list = [];\n\n foreach ($this->generators as &$generator) {\n $arg_list[] = $generator->current();\n $generator->next();\n }\n\n yield $arg_list;\n }\n }", "abstract protected function yieldWhitelistAccess(): Generator;", "protected function getIterator(): \\Traversable\n {\n return new MappingCallbackIterator(\n $this->getTemplateFilenameIterator(),\n $this->getDriver()->getTemplateNameMapper()\n );\n }", "public function getIterator()\n {\n return $this->iterator();\n }", "public function getRecursiveIterator()\n {\n return new \\RecursiveIteratorIterator($this, \\RecursiveIteratorIterator::SELF_FIRST);\n }", "public function next()\n {\n }", "public function next()\n {\n echo __METHOD__,PHP_EOL;\n next($this->a);\n }", "abstract protected function yieldSearchPaths(): Generator;", "public function getIterator()\n {\n return new StackIterator($this);//vracamo StackIterator za trenutni objekat\n }", "function test38($a, $b) {\n yield from [$a, $b];\n}", "public function getIterator()\n {\n return new \\ArrayIterator($this->stack);\n }", "public function TaggedObjects()\n {\n foreach ($this->DataObjectTaxonomyTerms() as $throughObject) {\n yield $throughObject->OwnerObject();\n }\n }", "function &generator()\r\n {\r\n if ( $this->Generator == false )\r\n {\r\n include_once( \"ezarticle/classes/\" . $this->RendererFile );\r\n $this->Generator = new $this->RendererClass( $this->Article, $this->Template );\r\n }\r\n\r\n return $this->Generator;\r\n }", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function read($generator);", "public function getExceptionGenerator() : callable\n {\n return $this->exceptionGenerator;\n }", "public function getIterator()\n {\n //\n // NOTE(Jake): I had to use ArrayIterator as generators do not work\n // in SS 3.2 due to SSViewer calling '$this->itemIterator->rewind();'\n //\n \t$result = array();\n \tforeach ($this->lists as $list) {\n \t\t$result = array_merge($result, $list->toArray());\n \t}\n \tif ($this->limit > 0) {\n \t\t$result = array_slice($result, $this->offset, $this->limit);\n \t} else {\n \t\t$result = array_slice($result, $this->offset);\n \t}\n \treturn new ArrayIterator($result);\n }", "public function getNext() {}", "public function getNext() {}", "public function getIterator()\n {\n return $this->getValue();\n }", "public function next() {\n return $this->_next($this->parent->children(), func_get_args());\n }", "public static function yield(mixed $data = null): mixed;", "function gen_one_to_three() {\n for ($i = 1; $i <= 3; $i++) {\n //注意变量$i的值在不同的yield之间是保持传递的。\n yield $i;\n }\n}", "public function iterator()\n {\n return $this->getIterator();\n }" ]
[ "0.7272094", "0.7143516", "0.7072148", "0.7057108", "0.6837963", "0.6837963", "0.6834218", "0.67859405", "0.6647879", "0.6593753", "0.6565597", "0.65124685", "0.6454402", "0.64011943", "0.6374461", "0.62777644", "0.6243825", "0.6226238", "0.61078423", "0.61078423", "0.61078423", "0.61078423", "0.61078423", "0.61078423", "0.61078423", "0.61078423", "0.6044298", "0.6043983", "0.60302687", "0.5967639", "0.5857784", "0.5857784", "0.5857784", "0.5857784", "0.58270437", "0.5816076", "0.5802714", "0.57988536", "0.5795283", "0.5760853", "0.57566774", "0.5732969", "0.57293475", "0.57122403", "0.57122403", "0.57122403", "0.57122403", "0.5684385", "0.5653801", "0.5625161", "0.56134623", "0.5610351", "0.56059", "0.55935574", "0.55592996", "0.55573386", "0.55364764", "0.5517897", "0.55167073", "0.5509868", "0.5509868", "0.5508045", "0.5499655", "0.54813296", "0.5476312", "0.547354", "0.5472032", "0.5472032", "0.54567116", "0.54550517", "0.54384226", "0.54292995", "0.54092795", "0.5402413", "0.54004395", "0.5390203", "0.5374068", "0.5324503", "0.53209513", "0.5317942", "0.52752346", "0.52751356", "0.52640414", "0.52615035", "0.52543575", "0.52543575", "0.52543575", "0.52543575", "0.52543575", "0.52543575", "0.52380407", "0.5225657", "0.521447", "0.52144074", "0.5213598", "0.52127856", "0.5212368", "0.52034175", "0.51922864", "0.51731294" ]
0.6255991
16
Returns the format to generate
public function getFormat() { return $this->format; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormat() {}", "public function getFormat() {}", "public function getFormat() {}", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public static function getFormat(): string;", "abstract public function getFormat();", "public function format() {\n return $this->format;\n }", "protected function getFormat()\n {\n return 'FORMAT: 1A';\n }", "public function getFormat()\n\t{\n\t\treturn $this->format; \n\n\t}", "abstract function format();", "public function getFormat() { return $this->_format; }", "public function defaultFormat()\n\t{\n\t\treturn $this->format();\n\t}", "public function GetFormat () {\n\t\treturn $this->format;\n\t}", "public function getFormat()\n {\n\n return $this->format;\n }", "public function format(): string;", "public function getFormat()\n {\n return $this->_format;\n }", "protected function getFormat()\n {\n return $this->format;\n }", "public function getFormat() {\n return $this->format;\n }", "public function getFormat() {\r\n\t\treturn $this->format;\r\n\t}", "public function getFormat(): string\n {\n if ($this->format === null) {\n $this->format = self::$default_format;\n }\n return $this->format;\n }", "public function getFormat()\n\t\t\t{\n\t\t\t\treturn $this->format;\n\t\t\t}", "public function getFormat() {\n\t\t\treturn $this->_format;\n\t\t}", "public function getFormat() {\n $result = TingOpenformatMethods::parseFields($this->_getDetails(), array('format'));\n return $result;\n }", "public function getFormat(): int;", "public function format($format);", "public function getFormatName();", "public function getToStringFormat()\n {\n return $this->_to_string_format;\n }", "abstract public function getFormat(): int;", "public function getFormatter();", "public function getFormat()\n {\n return get_post_format($this->id) ? get_post_format($this->id) : 'standard';\n }", "public function getFormat(): array;", "public function getFormatter()\n {\n }", "public function getFormatter()\n {\n }", "public static function getDefaultFormat(): string\n {\n return static::$default_format;\n }", "public static function formats()\n {\n return self::$formats;\n }", "public static function getFormats()\n {\n return self::$formats;\n }", "public static function getDefaultFormat()\n {\n return self::$defaultFormat;\n }", "public static function getFormats() {\n return array(\n 'none',\n 'pretty',\n 'php',\n 'php-data',\n 'json-pretty',\n 'json-strict',\n 'serialize',\n 'shell',\n );\n }", "public function driveFormat() {\r\n return \"\";\r\n }", "public function getFormat(): int\n {\n return self::FORMAT_6;\n }", "public function getResultFormat()\n {\n return $this->resultFormat;\n }", "public function format() {\r\n\t\t$this->resource->format();\r\n\t}", "public function getPublicationFormat() {\n $fields = array('format');\n $result = TingOpenformatMethods::parseFields($this->_getPublicationDetails(), $fields);\n return (is_array($result)) ? reset($result) : $result;\n }", "public function getFormatting() {\n\t\treturn $this->formatting;\n\t}", "public function getOutputFormat()\n {\n $formated = $this->formatTxt(0);\n $number = $this->formatTxt(0, array('display' => Zend_Currency::NO_SYMBOL));\n return str_replace($number, '%s', $formated);\n }", "public function getFormats()\n {\n\t $format_field = $this->getValue('format');\n\t return wed_decodeJSON($format_field,true);\n }", "function format()\r\n\t{\r\n\t\treturn $this->text;\r\n\t}", "public function format()\n {\n return json_decode($this->renderer->format(), false, JSON_FORCE_OBJECT);\n }", "public function getFormatSetting()\n {\n return $this->format_setting;\n }", "public function getFormats()\n {\n return $this->_formats;\n }", "protected function getOutputFormat()\n {\n return $this->_outputFormat;\n }", "function getFormat() {\n return 'xhtml';\n }", "public function GetFormat($formatType);", "public function getDataFormat()\n {\n return $this->data_format;\n }", "public function getDataFormat()\n {\n return $this->data_format;\n }", "public function supportedFormats();", "function getPhysicalFormat() {\n\t\treturn $this->getData('physicalFormat');\n\t}", "public function getFormatClass() {\n\t\t$formatClasses = array(\n\t\t\t'list' => 'CargoListFormat',\n\t\t\t'ul' => 'CargoULFormat',\n\t\t\t'ol' => 'CargoOLFormat',\n\t\t\t'template' => 'CargoTemplateFormat',\n\t\t\t'embedded' => 'CargoEmbeddedFormat',\n\t\t\t'csv' => 'CargoCSVFormat',\n\t\t\t'json' => 'CargoJSONFormat',\n\t\t\t'outline' => 'CargoOutlineFormat',\n\t\t\t'tree' => 'CargoTreeFormat',\n\t\t\t'table' => 'CargoTableFormat',\n\t\t\t'dynamic table' => 'CargoDynamicTableFormat',\n\t\t\t'googlemaps' => 'CargoGoogleMapsFormat',\n\t\t\t'openlayers' => 'CargoOpenLayersFormat',\n\t\t\t'calendar' => 'CargoCalendarFormat',\n\t\t\t'timeline' => 'CargoTimelineFormat',\n\t\t\t'category' => 'CargoCategoryFormat',\n\t\t\t'bar chart' => 'CargoBarChartFormat',\n\t\t);\n\n\t\tif ( array_key_exists( $this->mFormat, $formatClasses ) ) {\n\t\t\treturn $formatClasses[$this->mFormat];\n\t\t}\n\n\t\t$formatClass = null;\n\t\twfRunHooks( 'CargoGetFormatClass', array( $this->mFormat, &$formatClass ) );\n\t\tif ( $formatClass != null ) {\n\t\t\treturn $formatClass;\n\t\t}\n\n\t\tif ( count( $this->mFieldDescriptions ) > 1 ) {\n\t\t\t$format = 'table';\n\t\t} else {\n\t\t\t$format = 'list';\n\t\t}\n\t\treturn $formatClasses[$format];\n\t}", "public function getType()\n {\n return 'formatting';\n }", "function getFormatFilename()\n\n\t{\n\n\t\tglobal $config;\n\n\t\tglobal $config;\n\n\n\n\t\t$bitrate = $this->bitrate;\n\n\t\tfor ($i=0;$i<count($config['audioFormats']);$i++)\n\n\t\t\tif (abs($config['audioFormats'][$i]['bitrate'] - $this->bitrate) < $config['bitrateTolerance'])\n\n\t\t\t\t$bitrate = $config['audioFormats'][$i]['bitrate'];\n\n\t\treturn round($bitrate) . 'kbps_' . $this->channels . 'chn_' . $this->samplerate . 'Hz.' . $this->format;\n\n\t}", "public function __toString()\n {\n return $this->format();\n }", "public function __toString()\n {\n return $this->format();\n }", "public function __toString()\n {\n return $this->format();\n }", "public function getSourceFormat() {\n return $this->sourceFormat;\n }", "public function getFormatter()\n {\n return parent::getFormatter();\n }", "public static function sprintPayFormats()\n {\n return self::$sprintPayFormats;\n }", "public function getFormat($fileExtension);", "public function format($format = null)\n\t{\n\t\treturn parent::format($format ? $format : $this->defaultFormat);\n\t}", "public function format(string $format, array $options = []): string;", "public function getFormat()\n {\n if ($this->quality !== null || $this->progressive) {\n return 'jpg';\n }\n\n return $this->format;\n }", "function get_format( $id ) {\r\n switch( $id ) {\r\n case 0:\r\n $name = \"moodle_auto_format\";\r\n break;\r\n case 1:\r\n $name = \"html\";\r\n break;\r\n case 2:\r\n $name = \"plain_text\";\r\n break;\r\n case 3:\r\n $name = \"wiki_like\";\r\n break;\r\n case 4:\r\n $name = \"markdown\";\r\n break;\r\n default:\r\n $name = \"unknown\";\r\n }\r\n return $name;\r\n }", "public function get_strPathFormat()\n {\n return $this->strPathFormat;\n }", "public function &GetFormats()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_formats;\n }", "protected function formatter() {\n return '';\n }", "function getFormat(){\n\n // this should be 'dokutexit' usally, but we inherit from the xhtml renderer\n // and produce XHTML as well, so we can gain magically compatibility\n // by saying we're the 'xhtml' renderer here.\n return 'dokutexit';\n }", "public function getPrntfmt()\n {\n return $this->prntfmt;\n }", "protected function get_formatted_type()\n\t{\n\t\t$rc = '';\n\n\t\t$type = $this->type;\n\t\t$size = $this->size;\n\n\t\tif (!$size && $type == self::TYPE_VARCHAR)\n\t\t{\n\t\t\t$size = 255;\n\t\t}\n\n\t\tswitch ($type)\n\t\t{\n\t\t\tcase self::TYPE_INTEGER:\n\t\t\tcase self::TYPE_TEXT:\n\t\t\tcase self::TYPE_BLOB:\n\n\t\t\t\t$t = [\n\n\t\t\t\t\tself::TYPE_BLOB => 'BLOB',\n\t\t\t\t\tself::TYPE_INTEGER => 'INT',\n\t\t\t\t\tself::TYPE_TEXT => 'TEXT',\n\n\t\t\t\t][ $type ];\n\n\t\t\t\tif (\\is_numeric($size))\n\t\t\t\t{\n\t\t\t\t\t$rc .= \"$t( $size )\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$rc .= \\strtoupper($size) . $t;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\n\t\t\t\tif ($size)\n\t\t\t\t{\n\t\t\t\t\t$rc .= \\strtoupper($type) . \"( $size )\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$rc .= \\strtoupper($type);\n\t\t\t\t}\n\t\t}\n\n\t\treturn $rc;\n\t}", "public static function swaggerFormats()\n {\n return self::$swaggerFormats + parent::swaggerFormats();\n }", "public static function swaggerFormats()\n {\n return self::$swaggerFormats + parent::swaggerFormats();\n }", "public static function swaggerFormats()\n {\n return self::$swaggerFormats + parent::swaggerFormats();\n }", "public static function swaggerFormats()\n {\n return self::$swaggerFormats + parent::swaggerFormats();\n }", "public static function swaggerFormats()\n {\n return self::$swaggerFormats + parent::swaggerFormats();\n }", "public static function swaggerFormats()\n {\n return self::$swaggerFormats + parent::swaggerFormats();\n }", "public static function swaggerFormats()\n {\n return self::$swaggerFormats + parent::swaggerFormats();\n }", "public static function swaggerFormats()\n {\n return self::$swaggerFormats + parent::swaggerFormats();\n }", "public static function swaggerFormats()\n {\n return self::$swaggerFormats + parent::swaggerFormats();\n }" ]
[ "0.83414674", "0.83414674", "0.83414674", "0.81812805", "0.81812805", "0.81812805", "0.81812805", "0.81812805", "0.81812805", "0.8097912", "0.8026555", "0.7990642", "0.79142815", "0.76676077", "0.7612815", "0.75908107", "0.75843996", "0.75522226", "0.7548515", "0.754721", "0.75160444", "0.7506732", "0.7506502", "0.7487233", "0.7452493", "0.7379233", "0.73581874", "0.73387986", "0.73364294", "0.7255573", "0.72194886", "0.719061", "0.7178367", "0.7147844", "0.7092242", "0.70101804", "0.696311", "0.696311", "0.69399416", "0.6931024", "0.6900279", "0.68356717", "0.6826718", "0.67697436", "0.675944", "0.6758866", "0.6754626", "0.6727612", "0.6713175", "0.6706014", "0.66808325", "0.6650669", "0.661715", "0.65991473", "0.65866846", "0.6576883", "0.65750784", "0.657201", "0.65702856", "0.65702856", "0.65621483", "0.656023", "0.6546343", "0.6540467", "0.6504367", "0.65024805", "0.65024805", "0.65024805", "0.6495521", "0.6492879", "0.648101", "0.64570075", "0.64518404", "0.64473027", "0.64116424", "0.64009726", "0.63894236", "0.638852", "0.6385068", "0.63711387", "0.63657045", "0.6353964", "0.63489455", "0.63489455", "0.63489455", "0.63489455", "0.63489455", "0.63489455", "0.63489455", "0.63489455", "0.63489455" ]
0.75731033
25
Indicates whether a pdf document should be generated from the response for the specified request. The request must be for the 'pdf' format and the response format must be html.
public function isConvertable(Request $request, Response $response) { // Request must be for the 'pdf' format if ($request->getRequestFormat() !== $this->getFormat()) return false; // Current response must be html if (!$this->isHtmlResponse($response)) return false; // All checks ok return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function pdf($request, $response)\n {\n $id = $request->getAttribute('id');\n if (!ModelsRequests::generatePdfForId($id)) {\n return $response->withStatus(404)->withText(\"Il congedo non è stato trovato!\");\n }\n }", "public function generte_pdf(Request $request){\n }", "public function executeArticlePDF(sfWebRequest $request) {\n \t$this->setLayout(false);\n \t$filename = $request->getParameter('title_slug');\n \t$pdf_path = $this->_pdf_directory . $filename . '.pdf';\n \t$this->forward404Unless($this->isValidPDF($filename) && file_exists($pdf_path));\n \t$response = $this->getResponse();\n \t$response->clearHttpHeaders();\n \t$response->setContentType('application/pdf');\n \t$response->sendHttpHeaders();\n \t$response->setContent(readfile($pdf_path));\n \t$response->sendContent();\n\t\treturn sfView::HEADER_ONLY;\n }", "public function has_pdfs() {\n\t\treturn sizeof( $this->get_pdfs() ) ? true : false;\n\t}", "protected function formatPdf($response)\n\t{\n\n\t\t// #TODO: Implement BeforeRender Functionality\n\n\t\t$tmpfile_name = uniqid();\n\t\tif($this->build_path == \"\"){\n\t\t\t$this->build_path = getcwd().\"/\";\n\t\t}\n\n\t\t$tmpfile_path = $this->build_path.$tmpfile_name;\n\t\t$logfile_path = $this->build_path.$tmpfile_name.\".log\";\n\t\t$auxfile_path = $this->build_path.$tmpfile_name.\".aux\";\n\t\t$pdffile_path = $this->build_path.$tmpfile_name.\".pdf\";\n\n\t\t// Write temp file\n\t\t$fp = fopen($tmpfile_path, 'w+');\n\t\tfwrite($fp, $response->data);\n\t\tfclose($fp);\n\n\t\t// Start Process\n\t\t$process = new Process(\n\t\t\t[\n\t\t\t\t$this->latexbin,\n\t\t\t\t'-interaction=nonstopmode',\n\t\t\t\t$tmpfile_path,\n\t\t\t\t'-output-directory=$build_path'\n\t\t\t]\n\t\t);\n\n\t\t$process->setTimeout($this->timeout);\n\t\t$process->setIdleTimeout($this->idletimeout);\n\t\t$process->run();\n\n\t\tif (!$process->isSuccessful()) {\n\t\t\tunlink($logfile_path);\n\t\t\tunlink($auxfile_path);\n\t\t\tunlink($tmpfile_path);\n \tthrow new ProcessFailedException($process);\n\t\t}else{\n\t\t\tunlink($logfile_path);\n\t\t\tunlink($auxfile_path);\n\t\t\tunlink($tmpfile_path);\n\t\t\tif(file_exists($pdffile_path)){\n\t\t\t\t$pdf = file_get_contents($pdffile_path);\n\t\t\t\tunlink($pdffile_path);\n\t\t\t\treturn $pdf;\n\t\t\t}\n\t\t}\n\t}", "function convert_to_pdf($document_content, $file_name = false, $test = false) {\n\t$response = @file_get_contents('https://docraptor.com/docs?user_credentials=95gWBkqAtpdvRLTmfOU', false, stream_context_create(array(\n\t\t'http' => array (\n\t\t\t'method' => 'POST',\n\t\t\t'header' => 'Content-type: application/x-www-form-urlencoded' . \"\\r\\n\",\n\t\t\t'content' => http_build_query(array(\n\t\t\t\t'doc[document_content]' => $document_content, \n\t 'doc[document_type]' => 'pdf',\n\t 'doc[name]' => 'voucher.pdf',\n\t 'doc[test]' => ($test ? 'true' : false)\n\t\t\t))\n\t\t)\n\t)));\n\tif ($response && $file_name) {\n\t\t$path = '/tmp/'.$file_name;\n\t\t$file = fopen ($path, 'w'); \n\t\tfwrite($file, $response); \n\t\tfclose ($file);\n\t\treturn $path;\n\t} else if ($response) {\n\t\treturn $response;\n\t} else {\n\t\treturn false;\n\t}\n}", "function convert_to_pdf($document_content, $file_name = false, $test = false) {\n\t$response = @file_get_contents('https://docraptor.com/docs?user_credentials=95gWBkqAtpdvRLTmfOU', false, stream_context_create(array(\n\t\t'http' => array (\n\t\t\t'method' => 'POST',\n\t\t\t'header' => 'Content-type: application/x-www-form-urlencoded' . \"\\r\\n\",\n\t\t\t'content' => http_build_query(array(\n\t\t\t\t'doc[document_content]' => $document_content, \n\t 'doc[document_type]' => 'pdf',\n\t 'doc[name]' => 'voucher.pdf',\n\t 'doc[test]' => ($test ? 'true' : false)\n\t\t\t))\n\t\t)\n\t)));\n\tif ($response && $file_name) {\n\t\t$path = '/tmp/'.$file_name;\n\t\t$file = fopen ($path, 'w'); \n\t\tfwrite($file, $response); \n\t\tfclose ($file);\n\t\treturn $path;\n\t} else if ($response) {\n\t\treturn $response;\n\t} else {\n\t\treturn false;\n\t}\n}", "protected function ConvertToPdfRequest(Requests\\ConvertToPdfRequest $request)\n {\n\n $resourcePath = '/conversion/pdf';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = \"\";\n $multipart = false;\n \n\n // query params\n if ($request->outPath !== null) {\n $localName = lcfirst('OutPath');\n $localValue = is_bool($request->outPath) ? ($request->outPath ? 'true' : 'false') : $request->outPath;\n if (strpos($resourcePath, '{' . $localName . '}') !== false) {\n $resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);\n } else {\n $queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);\n }\n }\n \n \n $resourcePath = $this->_parseURL($resourcePath, $queryParams);\n\n // body params\n $_tempBody = null;\n if (isset($request->settings)) {\n if (is_string($request->settings)) {\n $_tempBody = \"\\\"\" . $request->settings . \"\\\"\"; \n } else {\n $_tempBody = $request->settings;\n }\n }\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml'],\n ['application/json', 'application/xml']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = $formParams[\"data\"];\n }\n }\n \n $this->_requestToken();\n\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['x-groupdocs-client'] = $this->config->getUserAgent();\n }\n \n $defaultHeaders['x-groupdocs-client-version'] = $this->config->getClientVersion();\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n \n $req = new Request(\n 'POST',\n $this->config->getHost() . $resourcePath,\n $headers,\n $httpBody\n );\n if ($this->config->getDebug()) {\n $this->_writeRequestLog('POST', $this->config->getHost() . $resourcePath, $headers, $httpBody);\n }\n \n return $req;\n }", "public function convert(Request $request, Response $response)\n {\n $generator = $this->getGenerator();\n $options = $request->attributes->get(\"{$this->getFormat()}_options\", []);\n $headers = array_merge($request->headers->all(), [\n 'Content-Type' => 'application/pdf',\n ]);\n\n return new StreamedResponse(function () use ($response, $generator, $options) {\n\n // Buffer the original response\n ob_start();\n $response->sendContent();\n $html = ob_get_contents();\n ob_end_clean();\n\n // Output converted response\n echo $generator->getOutputFromHtml($html, $options);\n\n }, $response->getStatusCode(), $headers);\n }", "protected function formatPdf($response)\n {\n $mpdf = new \\mPDF();\n if ($this->rotated) {\n $mpdf->AddPage('L');\n }\n $mpdf->WriteHTML($response->data);\n return $mpdf->Output('', 'S');\n }", "public function pdf(Request $request)\n {\n /**\n * toma en cuenta que para ver los mismos\n * datos debemos hacer la misma consulta\n **/\n\n $id=$request->input('codigoOt');\n\n $ordenDeTrabajoAsignada = ot_orden_trabajo::where('OT_ID','1');\n\n $pdf = PDF::loadView('pdfs.pdfOT', compact('ordenDeTrabajoAsignada'));\n\n return $pdf->download('ot.pdf');\n }", "private function shouldDepict(Request $request): bool\n {\n return app()->environment(config('depictr.environments', []))\n && $this->comesFromCrawler($request)\n && $request->isMethod('GET')\n && ! $request->header('X-Inertia')\n && ! $this->urlIsExcluded($request);\n }", "public function format($response)\n\t{\n\t\t$response->getHeaders()->set('Content-Type', 'application/pdf');\n\t\t$response->content = $this->formatPdf($response);\n\t}", "public function generarPDF(Request $request){\n\n\t\t$mes = $request->mes;\n\t\t$annio = $request->annio;\n\t\t$concepto = $request->concepto;\n\t\t$mayor_obrero = 0;\n\t\t$mayor_empleado = 0;\n\n\t\tif($concepto == 20100){\n\t\t\t$nominas_obrero = DB::table('nomina')\n\t\t\t\t\t\t\t\t\t->where('fecha_inicio', 'like', '%/'.$mes.'/'.$annio.'%')\n\t\t\t\t\t\t\t\t\t->where('tipo', 'obrero')\n\t\t\t\t\t\t\t\t\t->get();\n\n\t\t\t$nominas_empleado = DB::table('nomina')\n\t\t\t\t\t\t\t\t\t->where('fecha_inicio', 'like', '%/'.$mes.'/'.$annio.'%')\n\t\t\t\t\t\t\t\t\t->where('tipo', 'empleado')\n\t\t\t\t\t\t\t\t\t->get();\n\n\t\t\tforeach ($nominas_obrero as $obrero) {\n\t\t\t\tif($obrero->id > $mayor_obrero){\n\t\t\t\t\t$mayor_obrero = $obrero->id;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ($nominas_empleado as $empleado) {\n\t\t\t\tif($empleado->id > $mayor_empleado){\n\t\t\t\t\t$mayor_empleado = $empleado->id;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\t$html = view('pdf.retenciones.retenciones_fideicomiso')->with('mayor_obrero', $mayor_obrero)->with('mayor_empleado', $mayor_empleado)->with('mes', $mes)->with('annio', $annio)->render();\n \t\treturn PDF::load($html)->show();\n \t\n\t\t}\n\n\t\telse if($concepto == 20222){\n\t\t\t$nominas_obrero = DB::table('nomina')\n\t\t\t\t\t\t\t\t\t->where('fecha_inicio', 'like', '%/'.$mes.'/'.$annio.'%')\n\t\t\t\t\t\t\t\t\t->where('tipo', 'obrero')\n\t\t\t\t\t\t\t\t\t->get();\n\n\t\t\t$nominas_empleado = DB::table('nomina')\n\t\t\t\t\t\t\t\t\t->where('fecha_inicio', 'like', '%/'.$mes.'/'.$annio.'%')\n\t\t\t\t\t\t\t\t\t->where('tipo', 'empleado')\n\t\t\t\t\t\t\t\t\t->get();\n\n\t\t\tforeach ($nominas_obrero as $obrero) {\n\t\t\t\tif($obrero->id > $mayor_obrero){\n\t\t\t\t\t$mayor_obrero = $obrero->id;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ($nominas_empleado as $empleado) {\n\t\t\t\tif($empleado->id > $mayor_empleado){\n\t\t\t\t\t$mayor_empleado = $empleado->id;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$html = view('pdf.retenciones.retenciones_tesoreria_seguridad')->with('mayor_obrero', $mayor_obrero)->with('mayor_empleado', $mayor_empleado)->with('mes', $mes)->with('annio', $annio)->render();\n \t\treturn PDF::load($html)->show();\n \t\n\t\t}\n\n\t\telse if($concepto == 20134){\n\n\t\t\t\t$html = view('pdf.retenciones.retenciones_caja_ahorro')->with('annio', $annio)->with('mes', $mes)->render();\n \t\treturn PDF::load($html)->show();\n\t\t}\n\n\t\telse if($concepto == 30121){\n\n\t\t\t$nominas_obrero = DB::table('nomina')\n\t\t\t\t\t\t\t\t\t->where('fecha_inicio', 'like', '%/'.$mes.'/'.$annio.'%')\n\t\t\t\t\t\t\t\t\t->where('tipo', 'obrero')\n\t\t\t\t\t\t\t\t\t->get();\n\n\t\t\t$nominas_empleado = DB::table('nomina')\n\t\t\t\t\t\t\t\t\t->where('fecha_inicio', 'like', '%/'.$mes.'/'.$annio.'%')\n\t\t\t\t\t\t\t\t\t->where('tipo', 'empleado')\n\t\t\t\t\t\t\t\t\t->get();\n\t\t\tforeach ($nominas_obrero as $obrero) {\n\t\t\t\tif($obrero->id > $mayor_obrero){\n\t\t\t\t\t$mayor_obrero = $obrero->id;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ($nominas_empleado as $empleado) {\n\t\t\t\tif($empleado->id > $mayor_empleado){\n\t\t\t\t\t$mayor_empleado = $empleado->id;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($nominas_obrero != null && $nominas_empleado != null){\n\t\t\t\t$html = view('pdf.retenciones.retenciones_faov')->with('mayor_empleado', $mayor_empleado)->with('mayor_obrero', $mayor_obrero)->with('mes', $mes)->with('annio', $annio)->render();\n \t\treturn PDF::load($html)->show();\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn redirect()->back()->with('alert', 'No existen retenciones para esta fecha');\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function format($response)\n {\n $response->getHeaders()->set('Content-Type', 'application/pdf');\n $response->content = $this->formatPdf($response);\n }", "public function pdfAction(Request $request, $id)\n {\n $donation=new donation();\n $facture = new facture();\n $em=$this->getDoctrine()->getManager();\n $facture= $em->getRepository(\"DonationBundle:facture\")->find($id);\n $donation = $em->getRepository(\"DonationBundle:donation\")->find($facture->getDonationid());\n\n $snappy = $this->get('knp_snappy.pdf');\n $snappy->setOption('no-outline', true);\n $snappy->setOption('page-size','LETTER');\n $snappy->setOption('encoding', 'UTF-8');\n\n $html = $this->renderView('facture/pdf.html.twig', array(\n 'donation'=>$donation,\n 'facture' => $facture,\n ));\n\n $filename = 'myFirstSnappyPDF';\n\n return new Response(\n $snappy->getOutputFromHtml($html),\n 200,\n array(\n 'Content-Type' => 'application/pdf',\n 'Content-Disposition' => 'inline; filename=\"'.$filename.'.pdf\"'\n )\n );\n }", "public function attachment_is_pdf( $id ) {\n\t\treturn wp_attachment_is( 'pdf', $id );\t\t\n\t}", "protected function checkPDF(): void\n {\n if ('application/pdf' === $this->mimeType ||\n 'pdf' === $this->fileExtension\n ) {\n $this->iconClass = self::ICON_PDF;\n }\n }", "public function validateDoc($document)\n\t\t{\n\t\t\tif ($document == 'terms_and_conditions' ||\n\t\t\t\t$document == 'privacy_policy') {\n\t\t\t\t\n\t\t\t\t$render = $document;\n\n\t\t\t}else{\n\n\t\t\t\t$render = \"no_document\";\n\n\t\t\t}\n\n\t\t\treturn $render;\n\t\t}", "function _wp_kses_allow_pdf_objects($url)\n {\n }", "public function getPdfUrl() {\n $ch = curl_init();\n $timeout = 10;\n curl_setopt($ch, CURLOPT_URL, $this->url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n $response = curl_exec($ch);\n curl_close($ch);\n\n // If you accidentally look at this, I suggest pretending you haven't seen it.\n $matches = array();\n preg_match(\"/\\<span class=\\\"application-pdf\\\"\\>.*\\<\\/span\\>/\", $response, $matches);\n \n // If no PDF URL that means there is no bill to download yet (boo)\n if (!isset($matches[0]))\n return false;\n \n $pdfUrl = $matches[0];\n $pdfUrl = str_replace('<span class=\"application-pdf\"><a href=\"', '', $pdfUrl);\n $pdfUrl = preg_replace(\"/\\\"\\>PDF version,(.*)\\<\\/a\\>\\<\\/span\\>/\", '', $pdfUrl);\n // Forcably fix some incorrectly parsed URLs\n $pdfUrl = preg_replace(\"/^.*http\\:/\", 'http:', $pdfUrl);\n $pdfUrl = preg_replace(\"/\\.pdf.*$/\", '.pdf', $pdfUrl);\n \n return $pdfUrl;\n }", "function _testXpdf() {\r\n \tglobal $output, $status;\r\n @exec('pdftotext', $output, $status);\r\n if (!empty($output[0])) {\r\n if (preg_match(\"/pdftotext/i\",$output[0], $matches)) {\r\n return \"pdftotext\";\r\n }\r\n }\r\n unset($output, $status);\r\n }", "public static function pdf_mime_header() {\n\t//--\n\treturn (string) 'application/pdf';\n\t//--\n}", "function pdf() {\n if($this->active_invoice->isLoaded()) {\n if($this->active_invoice->canView($this->logged_user)) {\n InvoicePDFGenerator::download($this->active_invoice, Invoices::getInvoicePdfName($this->active_invoice));\n \tdie();\n } else {\n $this->response->forbidden();\n } // if\n } else {\n $this->response->notFound();\n } // if\n }", "public function shouldRender()\n {\n if ($this->totalPages > 1) {\n \n return true;\n }\n \n return false;\n }", "public function handleRequest($request)\r\n { \r\n $logClass= new LogClass('jobtracker', 'GeneratePDFChain');\r\n $sharedClass = new SharedClass();\r\n \r\n \t\r\n //2 - initialize instances\r\n $pdf = new JobPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\r\n \r\n //3 - get the parts connected\r\n $pdfParams = $request['pdfParams'];\r\n \r\n $jobData = $request['jobData'];\r\n $documentData = $request['documentData'];\r\n $documentData = $documentData['data'];\r\n $imagesData = $request['imagesData'];\r\n $notesData = $request['notesData'];\r\n $notesData = $notesData['data'];\r\n $userData = $request['userData'];\r\n $printOptions = explode(\",\", $pdfParams['print_options']);\r\n \r\n //contact rules\r\n $ContactRules = $sharedClass->getCustomerRules($userData['customerid'], $userData['role']);\r\n \r\n if (count($jobData)==0) {\r\n return false;\r\n }\r\n \r\n $headerImage = array('image'=> K_PATH_IMAGES.'banner.jpg','imagetype'=>'jpg');\r\n $footerImage = array('image'=> K_PATH_IMAGES.'banner.jpg','imagetype'=>'jpg');\r\n $logoImage = array('image'=>K_PATH_IMAGES.'logo.png', 'imagetype'=>'PNG');\r\n \r\n \r\n $brandingImage = $sharedClass->getBrandingImage('H', 'R');\r\n if (count($brandingImage)>0) {\r\n $dirpath = $this->config->item('branding_dir').$brandingImage['documentid'].'.'.$brandingImage['docformat'];\r\n \r\n if (file_exists($dirpath)) {\r\n $headerImage = array('image'=> $this->config->item('branding_dir').$brandingImage['documentid'].'.'.$brandingImage['docformat'],'imagetype'=> $brandingImage['docformat']);\r\n }\r\n }\r\n \r\n $brandingImage = $sharedClass->getBrandingImage('F', 'R');\r\n if (count($brandingImage)>0) {\r\n $dirpath = $this->config->item('branding_dir').$brandingImage['documentid'].'.'.$brandingImage['docformat'];\r\n \r\n if (file_exists($dirpath)) {\r\n $footerImage = array('image'=> $this->config->item('branding_dir').$brandingImage['documentid'].'.'.$brandingImage['docformat'],'imagetype'=> $brandingImage['docformat']);\r\n }\r\n }\r\n \r\n //set document information\r\n $pdf->SetCreator(PDF_CREATOR);\r\n $pdf->SetAuthor(PDF_AUTHOR);\r\n $pdf->SetTitle('JOB - ' .$jobData[\"jobid\"]);\r\n $pdf->SetSubject('JOB');\r\n \r\n // set header and footer fonts\r\n $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));\r\n $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));\r\n\r\n // set default monospaced font\r\n $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\r\n\r\n // set margins\r\n $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP+25, PDF_MARGIN_RIGHT,PDF_MARGIN_BOTTOM+20);\r\n $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\r\n $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\r\n\r\n // set auto page breaks\r\n $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\r\n\r\n // set image scale factor\r\n $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\r\n\r\n // set some language-dependent strings (optional)\r\n if (@file_exists(dirname(__FILE__) . '/lang/eng.php')) {\r\n require_once(dirname(__FILE__) . '/lang/eng.php');\r\n $pdf->setLanguageArray($l);\r\n }\r\n \r\n\r\n\r\n // ---------------------------------------------------------\r\n // set font\r\n $pdf->SetFont('helvetica', '', 8);\r\n \r\n $pdf->SetTextColor(0, 0, 0);\r\n $pdf->SetFont('helvetica', '', 8);\r\n $border = array('LTRB' => array('width' => 0.3, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));\r\n \r\n //Company Info \r\n $address = nl2br($sharedClass->getSysValue(\"dochead\"));\r\n $owner= nl2br($sharedClass->getSysValue(\"tradingname\"));\r\n $abn= nl2br($sharedClass->getSysValue(\"abn\"));\r\n\r\n $CompanyDetail = '<table>\r\n <tr><td style =\"width:5px;height:3px;font-size:3px;\">&nbsp;</td><td style =\"height:3px;font-size:3px;width:250px;\"></td></tr>\r\n <tr><td style =\"width:5px;\">&nbsp;</td><td ><b>'. $owner.'</b>';\r\n $CompanyDetail .='<br>ABN : '.$abn;\r\n $CompanyDetail .='<br>'.$address;\r\n \r\n $CompanyDetail .='</td></tr>\r\n </table>';\r\n \r\n $pdf->setHeaderImage($headerImage);\r\n $pdf->setfooterImage($footerImage);\r\n $pdf->setLogoImage($logoImage);\r\n $pdf->setjobTitle('JOB - ' .$jobData[\"jobid\"]);\r\n $pdf->setjobid($jobData[\"jobid\"]);\r\n $pdf->setCompanyDetail($CompanyDetail);\r\n \r\n // add a page\r\n $pdf->AddPage();\r\n \r\n //Job Detail Section\r\n if(is_array($printOptions) && (array_search('jl', $printOptions) > -1)) {\r\n $pdf->Ln(4);\r\n $pdf->SetFont('helvetica', 'B', 10);\r\n $pdf->SetFillColor(31,73,125); // Grey\r\n $pdf->SetTextColor(255, 255, 255);\r\n $pdf->Cell(0, 7, 'Job Detail', 0, false, 'L', true, '', 0, false, 'M', 'M');\r\n\r\n $pdf->SetFont('helvetica', '', 9);\r\n $pdf->SetFillColor(255, 255, 255);\r\n $pdf->SetTextColor(0, 0, 0);\r\n\r\n $pdf->Ln(3.8);\r\n\r\n $border = array('LTRB' => array('width' => 0.3, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));\r\n\r\n //Job Data formating for display\r\n $jobData['sitecontact'] = '';\r\n if($jobData['sitecontact'] != '') {\r\n $jobData['sitecontact'] = $jobData['sitecontact'];\r\n if($jobData['sitephone'] != '') {\r\n $jobData['sitecontact'] = $jobData['sitecontact'].' - ('.$jobData['sitephone'].')';\r\n }\r\n }\r\n\r\n $jobData['notexceed'] = format_amount($jobData['notexceed']);\r\n $jobData['pdate'] = format_datetime($jobData['pdate'], RAPTOR_DISPLAY_DATEFORMAT, RAPTOR_DISPLAY_TIMEFORMAT);\r\n $jobData['duedate'] = format_date($jobData['duedate'], RAPTOR_DISPLAY_DATEFORMAT);\r\n $jobData['duetime'] = format_time($jobData['duetime'], RAPTOR_DISPLAY_TIMEFORMAT);\r\n $jobData['jcompletedate'] = format_datetime($jobData['jcompletedate'], RAPTOR_DISPLAY_DATEFORMAT, RAPTOR_DISPLAY_TIMEFORMAT);\r\n\r\n $jobData['custordref1_label'] = isset($ContactRules[\"custordref1_label\"]) ? $ContactRules[\"custordref1_label\"] : 'Order Ref 1';\r\n $jobData['custordref2_label'] = isset($ContactRules[\"custordref2_label\"]) ? $ContactRules[\"custordref2_label\"] : 'Order Ref 2';\r\n $jobData['custordref3_label'] = isset($ContactRules[\"custordref3_label\"]) ? $ContactRules[\"custordref3_label\"] : 'Order Ref 3';\r\n\r\n $jobData['custordref3_access'] = isset($ContactRules[\"hide_custordref3_in_client_portal\"]) ? $ContactRules[\"hide_custordref3_in_client_portal\"] : 0;\r\n\r\n //Job Data\r\n $jobDetail = '<table cellpadding=\"2\" style=\"border:solid 1px black;\">';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;height:3px;font-size:3px;\">&nbsp;</td><td style =\"height:3px;font-size:3px;width:476px;\"></td></tr>';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;\">Job Id</td><td>'. $jobData['jobid'].'</td></tr>';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;\">Job Status</td><td>'. $jobData['portaldesc'].'</td></tr>';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;\">Site</td><td>'. $jobData['siteline1'].'</td></tr>';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;\">Site Address</td><td>'. $jobData['site'].'</td></tr>';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;\">Territory</td><td>'. $jobData['territory'].'</td></tr>';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;\">'.$jobData['custordref1_label'].'</td><td>'. $jobData['custordref'].'</td></tr>';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;\">'.$jobData['custordref2_label'].'</td><td>'. $jobData['custordref2'].'</td></tr>';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;\">'.$jobData['custordref3_label'].'</td><td>'. $jobData['custordref3'].'</td></tr>';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;\">Priority</td><td>'. $jobData['priority'].'</td></tr>';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;\">$ Limit</td><td>'. $jobData['notexceed'].'</td></tr>';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;\">Quoted Required?</td><td>'. $jobData['quoted'].'</td></tr>';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;\">Entry Date</td><td>'. $jobData['pdate'].'</td></tr>';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;\">Due Date</td><td>'. $jobData['duedate'].'</td></tr>';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;\">Completion Date</td><td>'. $jobData['jcompletedate'].'</td></tr>';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;\">Site FM</td><td>'. $jobData['sitefm'].'</td></tr>';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;\">Site Contact</td><td>'. $jobData['sitecontact'].'</td></tr>';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;\">Job Description</td><td>'. $jobData['jobdescription'].'</td></tr>';\r\n $jobDetail .= '<tr><td style =\"width:10px;\">&nbsp;</td><td style =\"width:150px;height:3px;font-size:3px;\">&nbsp;</td><td style =\"height:3px;font-size:3px;width:476px;\"></td></tr>';\r\n\r\n $jobDetail .='</table>';\r\n\r\n // output the HTML content\r\n\r\n $pdf->writeHTML($jobDetail, true, false, true, false, '');\r\n }\r\n \r\n \r\n //Job Note Section\r\n if(is_array($printOptions) && (array_search('jn', $printOptions) > -1)) {\r\n $pdf->Ln(7);\r\n $pdf->SetFont('helvetica', 'B', 10);\r\n $pdf->SetFillColor(31,73,125); // Grey\r\n $pdf->SetTextColor(255, 255, 255);\r\n $pdf->Cell(0, 7, 'Job Notes', 0, false, 'L', true, '', 0, false, 'M', 'M');\r\n\r\n $pdf->SetFont('helvetica', '', 9);\r\n $pdf->SetFillColor(255, 255, 255);\r\n $pdf->SetTextColor(0, 0, 0);\r\n\r\n $pdf->Ln(3.8);\r\n $color1 = \"#FFFFFF\";\r\n $color2 = \"#F4F9FF\";\r\n $html = '<table style =\"border:1px solid black;\" cellspacing=\"0\" cellpadding=\"4\">\r\n <thead>\r\n <tr nobr=\"true\">\r\n <th style =\"border:1px solid black;font-weight:bold;width:100px;background-color:#CCCCCC;\">Job Note Id</th>\r\n\r\n <th style =\"border:1px solid black;font-weight:bold;width:356px;background-color:#CCCCCC;\">Notes</th>\r\n <th style =\"border:1px solid black;font-weight:bold;width:100px;background-color:#CCCCCC;\">Note Type</th>\r\n <th style =\"border:1px solid black;font-weight:bold;width:80px;background-color:#CCCCCC;\">Date</th>\r\n </tr></thead><tbody>';\r\n\r\n $count = 0;\r\n foreach ($notesData as $row) {\r\n $count = $count+1;\r\n $row_color = ($count % 2) ? $color1 : $color2;\r\n $html .= '<tr nobr=\"true\" bgcolor=\"'. $row_color.'\">\r\n <td style =\"border:1px solid black;width:100px;\">'.$row['jobnoteid'].'</td>\r\n <td style =\"border:1px solid black;width:356px;\">' . $row['notes'] . '</td>\r\n <td style =\"border:1px solid black;width:100px;\">' . $row['notetype'] . '</td>\r\n <td style =\"border:1px solid black;width:80px;\">' . format_date($row['date'], RAPTOR_DISPLAY_DATEFORMAT) . '</td>\r\n </tr>';\r\n }\r\n\r\n /*for ($i= $count;$i<=4;$i++) {\r\n $row_color = ($i % 2) ? $color2:$color1;\r\n $html .= '<tr bgcolor=\"'. $row_color.'\">\r\n <td style =\"border:1px solid black;width:100px;\">&nbsp;</td>\r\n <td style =\"border:1px solid black;width:356px;\">&nbsp;</td>\r\n <td style =\"border:1px solid black;width:100px;\">&nbsp;</td>\r\n <td style =\"border:1px solid black;width:80px;\">&nbsp;</td>\r\n </tr>';\r\n\r\n }*/\r\n $html .= '</tbody></table>';\r\n\r\n // output the HTML content\r\n $pdf->writeHTML($html, true, false, true, false, '');\r\n }\r\n \r\n \r\n \r\n //job documents\r\n if(is_array($printOptions) && (array_search('jd', $printOptions) > -1)) {\r\n $pdf->Ln(7);\r\n $pdf->SetFont('helvetica', 'B', 10);\r\n $pdf->SetFillColor(31,73,125); // Grey\r\n $pdf->SetTextColor(255, 255, 255);\r\n $pdf->Cell(0, 7, 'Job Docs', 0, false, 'L', true, '', 0, false, 'M', 'M');\r\n\r\n $pdf->SetFont('helvetica', '', 9);\r\n $pdf->SetFillColor(255, 255, 255);\r\n $pdf->SetTextColor(0, 0, 0);\r\n\r\n $pdf->Ln(3.8);\r\n $color1 = \"#FFFFFF\";\r\n $color2 = \"#F4F9FF\";\r\n $html = '<table style =\"border:1px solid black;\" cellspacing=\"0\" cellpadding=\"4\">\r\n <thead>\r\n <tr nobr=\"true\">\r\n <th style =\"border:1px solid black;font-weight:bold;width:338px;background-color:#CCCCCC;\">Document Name</th>\r\n\r\n <th style =\"border:1px solid black;font-weight:bold;width:218px;background-color:#CCCCCC;\">Docfolder</th>\r\n <th style =\"border:1px solid black;font-weight:bold;width:80px;background-color:#CCCCCC;\">Date Added</th>\r\n </tr></thead><tbody>';\r\n\r\n $count = 0;\r\n foreach ($documentData as $row) {\r\n $count = $count+1;\r\n $row_color = ($count % 2) ? $color1 : $color2;\r\n $html .= '<tr nobr=\"true\" bgcolor=\"'. $row_color.'\">\r\n <td style =\"border:1px solid black;width:338px;\">'.$row['docname'].'</td>\r\n <td style =\"border:1px solid black;width:218px;\">' . $row['docfolder'] . '</td>\r\n <td style =\"border:1px solid black;width:80px;\">' . format_date($row['dateadded'], RAPTOR_DISPLAY_DATEFORMAT) . '</td>\r\n </tr>';\r\n }\r\n\r\n /*for ($i= $count;$i<=4;$i++) {\r\n $row_color = ($i % 2) ? $color2:$color1;\r\n $html .= '<tr bgcolor=\"'. $row_color.'\">\r\n <td style =\"border:1px solid black;width:338px;\">&nbsp;</td>\r\n <td style =\"border:1px solid black;width:218px;\">&nbsp;</td>\r\n <td style =\"border:1px solid black;width:80px;\">&nbsp;</td>\r\n </tr>';\r\n\r\n }*/\r\n $html .= '</tbody></table>';\r\n\r\n // output the HTML content\r\n $pdf->writeHTML($html, true, false, true, false, '');\r\n }\r\n \r\n //images\r\n if(is_array($printOptions) && (array_search('im', $printOptions) > -1)) {\r\n $pdf->Ln(7);\r\n $pdf->SetFont('helvetica', 'B', 10);\r\n $pdf->SetFillColor(31,73,125); // Grey\r\n $pdf->SetTextColor(255, 255, 255);\r\n $pdf->Cell(0, 7, 'Images', 0, false, 'L', true, '', 0, false, 'M', 'M');\r\n\r\n $pdf->SetFont('helvetica', '', 9);\r\n $pdf->SetFillColor(255, 255, 255);\r\n $pdf->SetTextColor(0, 0, 0);\r\n\r\n $pdf->Ln(3.8);\r\n\r\n $html = '<table cellspacing=\"0\" cellpadding=\"10\">';\r\n foreach ($imagesData as $k => $value) {\r\n $imagepath = $this->config->item('document_path').$value['documentid'].'_thumb.'.$value['docformat'];\r\n $dirpath = $this->config->item('document_dir').$value['documentid'].'_thumb.'.$value['docformat'];\r\n if (file_exists($dirpath)) {\r\n $html .= '<tr nobr=\"true\"><td style =\"border-bottom:1px solid gray;width:150px;\"><img src=\"'.$imagepath.'\" /></td>'\r\n . '<td style =\"border-bottom:1px solid gray;width:486px;vertical-align:middle;\" valign=\"middle\">Id: '.$value['documentid'].' '.format_date($value['dateadded'], RAPTOR_DISPLAY_DATEFORMAT).'<br />'.$value['docname'].'<br />'.$value['documentdesc'].'</td></tr>';\r\n }\r\n } \r\n\r\n $html .= '</table>';\r\n\r\n $pdf->writeHTML($html, true, false, true, false, '');\r\n }\r\n \r\n //echo $html;\r\n //exit;\r\n \r\n $filelocation = $this->config->item('document_dir');\r\n if(!$filelocation){\r\n $filelocation = $_SERVER['DOCUMENT_ROOT'].'/infomaniacDocs/jobdocs';\r\n \r\n }\r\n $open = false;\r\n if(isset($pdfParams['open'])){\r\n $open = (bool)$pdfParams['open'];\r\n }\r\n \r\n //5 - get inserted id values\r\n $file_name = 'job_' . $jobData[\"jobid\"] . '.pdf';\r\n \r\n $fileNL = $filelocation . \"/\" . $file_name; //Linux\r\n \r\n if (!is_dir($filelocation)) {\r\n mkdir($filelocation, 0755, true);\r\n }\r\n \r\n //6 - return the result object\r\n //Close and output PDF document\r\n $pdf->Output($fileNL, 'F');\r\n \r\n if ($open) {\r\n ob_end_clean();\r\n $pdf->Output($file_name, 'I');\r\n }\r\n \r\n \r\n $logClass->log('Create Job PDF');\r\n \r\n if ($this->successor != NULL)\r\n {\r\n $this->successor->handleRequest ($request);\r\n }\r\n //it should be at the last part of chain\r\n $this -> returnValue = $request;\r\n \r\n\r\n }", "public function authorize() {\n\t\treturn $this->user()->can('create', Pdf::class);\n\t}", "public static function isRequest() {\n\t return http_response_code()!==FALSE;\n\t}", "public function pdf($no, $download = false)\n {\n $handle = $this->getHandle($no);\n $pdf = $this->client\n ->Quotation_GetPdf([\n 'quotationHandle' => $handle,\n ])\n ->Quotation_GetPdfResult;\n\n if (!$download) {\n return $pdf;\n }\n\n header('Content-type: application/pdf');\n header('Content-Disposition: attachment; filename=\"' . $no . '.pdf\"');\n echo $pdf;\n\n return true;\n }", "public function testSupportedMIMETypes()\n {\n $this->assertContains('application/x-pdf', self::$client->getSupportedMIMETypes());\n }", "public function can_download_chat_as_pdf()\n {\n\n $user = factory(User::class)->create();\n View::share('user', $user);\n\n $chat = Chat::forceCreate(['name' => 'Chat1' ]);\n\n //TODO -> Afegir missatges al xat.\n\n $response = $this->actingAs($user)->get('/chat/' .$chat->id.'/pdf');\n\n $response->assertSuccessful();\n\n //TODO comprovar que realment el pdf conté la info. (si és pot ?\n }", "public function executeDescargarReporte($request)\n {\n //$this->forward404Unless($request->isXmlHttpRequest());\n $this->forward404Unless($request->getParameter('pdfTimestamp'));\n\n if ($request->getParameter('pdfTimestamp')) {\n $pdfNombre = $request->getParameter('pdfTimestamp') . 'reporte.pdf';\n $fullPath = realpath('./pdf/' . $pdfNombre);\n if (file_exists($fullPath)) {\n header('Content-type: application/pdf');\n readfile($fullPath);\n unlink($fullPath); // eliminar PDF\n }\n else {\n $this->forward404();\n }\n }\n }", "private function shouldProcess($response): bool\n {\n if ($response->isRedirection()) {\n return false;\n }\n\n if (!($response instanceof Response)) {\n return false;\n }\n\n return $this->isHtml($response);\n }", "public function documentview($docname)\n {\n \t\t$extension = explode('.', $docname);\n $file = 'uploads/employer_document/'.$docname;\n\n if (File::isFile($file))\n $file = File::get($file);\n $response = Response::make($file, 200);\n $content_types = [\n 'application/octet-stream', // txt etc\n 'application/msword', // doc\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', //docx\n 'application/vnd.ms-excel', // xls\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', // xlsx\n 'application/pdf', // pdf\n ];\n // using this will allow you to do some checks on it (if pdf/docx/doc/xls/xlsx)\n if ($extension[2] =='pdf' || $extension[2] =='PDF') {\n \t$response->header('Content-Type', 'application/pdf');\n }\n elseif ($extension[2] =='docx' || $extension[2] =='DOCX') {\n \t$response->header('Content-Type', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document');\n\n }\n elseif ($extension[2] =='txt') {\n \t$response->header('Content-Type', 'application/octet-stream');\n\n }\n else{\n \t$response->header('Content-Type', 'application/msword');\n }\n \n return $response;\n }", "public function downloadPdf() {\n $file_name = get('name');\n return \\Response::download(temp_path($file_name . '.pdf'));\n }", "public function has_documents() {\n\t\t\treturn $this->hasdocuments == 'Y' ? true : false;\n\t\t}", "public function getPdfContent();", "public function isExpectingDocument();", "public function testValidateDocumentPdfValidation()\n {\n }", "public function getPDF() {\n $data = Input::all();\n $document = document::where(\"id\", \"=\", $data['docuId'])->first();\n $this->makePDF($document->path);\n return str_replace(\"/var/www/sphinx/\", \"\", $document->path) . \"/build/latex/\" . $document->name . \".pdf\";\n }", "public function createPDF(Request $request) {\n if($request->get('mobil') == 1){\n $data = sewa_kendaraan_pribadi::with('kendaraan_pribadi','User')->where('id',$request->get('id'))->first();\n }else if($request->get('mobil') == 0){\n $data = sewa_kendaraan_umum::with('kendaraan_umum','User')->where('id',$request->get('id'))->first();\n }\n $user_detail = detail_user::with('user')->where('user_id',$data->user->id)->first();\n $mobil =$request->get('mobil');\n \n // share data to view\n $pdf = PDF::loadview('resi', ['data'=>$data , 'mobil'=>$mobil ,'user_detail'=>$user_detail])->stream();\n // download PDF file with download method\n // return $mobil;\n // return $data->kendaraan_umum->harga;\n return view('resi', ['data'=>$data , 'mobil'=>$mobil, 'user_detail'=>$user_detail]);\n\n // return $data;\n }", "public function pdf($value) {\n return $this->setProperty('pdf', $value);\n }", "public function medications(Request $request)\n {\n $user = Auth::getUser();\n $client = $user->client();\n\n $application = $user->getApplication();\n $agencyId = $user->getAgencyId();\n $patientId = $user->getPatientId();\n $patientContactId = $user->getPatientContactId();\n $page = $request->get('page', 1);\n $medications = Query::fetch('PatientMedicationsQuery', compact('application', 'agencyId', 'patientId', 'patientContactId', 'page'));\n\n $locationId = $client->AgencyLocationId;\n $provider = Query::fetch('PatientAgencyLocationQuery', compact('agencyId', 'locationId', 'patientId', 'patientContactId'));\n\n $print = in_array($request->get('print'), ['all', 'active'])\n ? $request->get('print')\n : 'all';\n\n $view = view('pdf.medications', [\n 'client' => $client,\n 'medications' => $medications, // TODO - sortByDesc('Active')\n 'provider' => $provider,\n 'options' => [\n 'active' => $print == 'active' || $print == 'all',\n 'inactive' => $print == 'all',\n ],\n ]);\n\n $body = sprintf(\"'%s'\", $view->render());\n $content = Http::withBody($body, 'application/json')->post(config('axxess.pdf_service_api'));\n\n if (! $content->successful()) {\n abort(500);\n }\n\n $method = $request->get('download') ? 'attachment' : \"inline\";\n $filename = \"medications_{$print}.pdf\";\n $length = strlen($content);\n\n return response($content)\n ->header(\"Content-type\", \"application/pdf;charset:utf-8\")\n ->header(\"Content-Length\", $length)\n ->header(\"Content-Disposition\", \"{$method}; filename={$filename}\");\n }", "private function checkResponseFormat(){\n\n }", "public function generatePDF() {\n $this->generateFirstPage();\n // check data barang, if there's more than 1, spawn additional page\n $this->generateNextPage([]);\n }", "public function outputPdfToBrowser();", "protected function desiredResponseFormat($request) {\n return $request->responseFormat ?? $request->format() ?? 'html';\n }", "public function pdfview(Request $request)\n {\n if(session('liste') == \"attente\") \n $liste = DB::table('candidats')\n ->where('promo_id', session('promo_id'))\n ->whereIn('liste', ['attente', 'candidat'])\n ->orderby('Nom', 'asc'); \n else\n $liste = DB::table('candidats')->where([['liste', session('liste')], ['promo_id', session('promo_id')]] )->orderby('Nom', 'asc');\n \n view()->share('liste',$liste->get());\n // Set extra option\n \tPDF::setOptions(['dpi' => 150, 'defaultFont' => 'sans-serif']);\n \t// pass view file\n $pdf = PDF::loadView('promo.liste');\n // download pdf\n return $pdf->download('liste.pdf');\n\n \n }", "public function scheduled_pdf( Request $request ) {\n\t\t$id = $request->input( 'id' );\n\t\t// $pdf = PDF::loadView(\n\t\t// \t'admin.invoice.Voucher',\n\t\t// \t[\n\t\t// \t\t'user' => $id, // user,\n\t\t// \t]\n\t\t// );\n\t\t$pdf = PDF2::loadView( 'admin.invoice.Voucher', [ 'asdf' => '2' ] )\n\t\t\t->setOption( 'margin-bottom', 0 )\n\t\t\t->setOption( 'page-width', '170' )\n\t\t\t->setOption( 'page-height', '324' );\n\n\t\t// $pdf->save(storage_path().rand().'filename.pdf');\n\t\treturn $pdf->download( 'voucher.pdf' );\n\t}", "public function scheduled_pdf( Request $request ) {\n\t\t$id = $request->input( 'id' );\n\t\t// $pdf = PDF::loadView(\n\t\t// \t'admin.invoice.Voucher',\n\t\t// \t[\n\t\t// \t\t'user' => $id, // user,\n\t\t// \t]\n\t\t// );\n\t\t$pdf = PDF2::loadView( 'admin.invoice.Voucher', [ 'asdf' => '2' ] )\n\t\t\t->setOption( 'margin-bottom', 0 )\n\t\t\t->setOption( 'page-width', '170' )\n\t\t\t->setOption( 'page-height', '324' );\n\n\t\t// $pdf->save(storage_path().rand().'filename.pdf');\n\t\treturn $pdf->download( 'voucher.pdf' );\n\t}", "public function pdfRecepcion(Request $request) {\n\t\t$items = DB::table('tbrecepcion as re')\n\t\t\t->join('tbcliente as cl', 'cl.id', '=', 're.idCliente')\n\t\t\t->join('tbproducto as pr', 'pr.id', '=', 're.idProducto')\n\t\t\t->select('re.id as id',\n\t\t\t\t'numeroRecepcion',\n\t\t\t\t'clNombre',\n\t\t\t\t'clRut',\n\t\t\t\t'idProducto',\n\t\t\t\t'fechaRecepcion',\n\t\t\t\t'tipoTrabajo',\n\t\t\t\t'contactoTecnico',\n\t\t\t\t'descripcionVisual',\n\t\t\t\t'pr.prNombre as nombreProducto',\n\t\t\t\t'prBarcode as codEquipo',\n\t\t\t\t'mailContacto')\n\t\t\t->where('re.id', $request->id)\n\t\t\t->where('re.estado', 0)\n\t\t\t->get()->first();\n\n\t\t//$items = DB::table(\"tbrecepcion\")->get();\n\n\t\tview()->share('items', $items);\n\n\t\tif ($request->has('download')) {\n\t\t\t$pdf = PDF::loadView('pdfview');\n\t\t\t$namePdf = 'Recepcion-' . $items->numeroRecepcion . '.pdf';\n\t\t\treturn $pdf->download($namePdf);\n\t\t}\n\n\t\treturn view('pdfview');\n\t}", "public function isResponse(): bool {\n return $this->options['response'] ?? false;\n }", "private function verifyPdfIsGenerated()\n {\n if (!isset($this->pdfContent) || $this->pdfContent == '') {\n throw new \\Exception(\"No PDF has been generated. Unable to output to the browser.\");\n }\n }", "public function getPdfVersion() {}", "public function getPdfVersion() {}", "public function getPdfVersion() {}", "public function showCorreoPDFAction(Request $request)\n {\n $folio = $request->query->get('folio');\n $tipo = $request->query->get('tipo');\n\n $mhc = $this->getDoctrine()\n ->getRepository('AppBundle:MarinaHumedaCotizacion')\n ->getCotizacionByFolio($folio);\n\n // Si existe una cotizacion de marina humeda entonces despliega el archivo\n if (null !== $mhc) {\n $html = $this->renderView('marinahumeda/cotizacion/pdf/cotizacionpdf.html.twig', [\n 'title' => 'Cotizacion-' . $mhc->getFolio() . '.pdf',\n 'marinaHumedaCotizacion' => $mhc\n ]);\n $header = $this->renderView('marinahumeda/cotizacion/pdf/pdfencabezado.twig', [\n 'marinaHumedaCotizacion' => $mhc\n ]);\n $footer = $this->renderView('marinahumeda/cotizacion/pdf/pdfpie.twig', [\n 'marinaHumedaCotizacion' => $mhc\n ]);\n $hojapdf = $this->get('knp_snappy.pdf');\n $options = [\n 'margin-top' => 23,\n 'margin-right' => 0,\n 'margin-bottom' => 25,\n 'margin-left' => 0,\n 'header-html' => utf8_decode($header),\n 'footer-html' => utf8_decode($footer)\n ];\n\n /*return $this->render(':marinahumeda/cotizacion/pdf:cotizacionpdf.html.twig', [\n 'marinaHumedaCotizacion' => $mhc\n ]);*/\n return new PdfResponse(\n $hojapdf->getOutputFromHtml($html, $options),\n 'Cotizacion-' . $mhc\n ->getFolio() . '-' . $mhc\n ->getFoliorecotiza() . '.pdf', 'application/pdf', 'inline'\n );\n } // En el caso de que no exista una cotizacion de marina humeda entonce es de astillero\n else {\n $ac = $this->getDoctrine()\n ->getRepository('AppBundle:AstilleroCotizacion')\n ->getCotizacionByFolio($folio);\n\n $html = $this->renderView('astillero/cotizacion/pdf/cotizacionpdf.html.twig', [\n 'title' => 'Cotizacion-0.pdf',\n 'astilleroCotizacion' => $ac\n ]);\n $header = $this->renderView('astillero/cotizacion/pdf/pdfencabezado.twig', [\n 'astilleroCotizacion' => $ac\n ]);\n $footer = $this->renderView('astillero/cotizacion/pdf/pdfpie.twig', [\n 'astilleroCotizacion' => $ac\n ]);\n\n $hojapdf = $this->get('knp_snappy.pdf');\n $options = [\n 'margin-top' => 30,\n 'margin-right' => 0,\n 'margin-bottom' => 10,\n 'margin-left' => 0,\n 'header-html' => utf8_decode($header),\n 'footer-html' => utf8_decode($footer)\n ];\n return new PdfResponse(\n $hojapdf->getOutputFromHtml($html, $options),\n 'Cotizacion-' . $ac->getFolio() . '-' . $ac->getFoliorecotiza() . '.pdf', 'application/pdf', 'inline'\n );\n }\n }", "function file_pdf_serve($file, $pre='', $filename=''){\n \n if (file_exists($file)) {\n header('Content-Description: File Transfer');\n \n // set filename if the file name is provided.\n if($filename!=''){\n header('Content-Disposition: inline; filename=\"'.$filename.'\"');\n }\n \n header('Content-Type: application/pdf');\n header('Expires: 0');\n header('Cache-Control: must-revalidate');\n header('Pragma: public');\n header('Content-Length: ' . filesize($file));\n ob_clean();\n flush();\n readfile($file);\n exit;\n }\n \n}", "function isValidDocument($docFormat, $document){\n $name = $document['name'];\n $ext = explode('.', $name);\n $ext = '.' . $ext[1];\n\n if($ext == $docFormat){\n if($document['error'] === 0){\n return true;\n }\n else{\n echo \"error uploading document\";\n return false;\n }\n }\n else{\n echo \"doc type does not match documents true extension\";\n }\n }", "public function getInscriptionsReportPDF(Request $request)\n {\n $data = $this->service->getInscriptionsReport($request, true);\n $data = [\n 'tournament' => $data->tournament,\n 'groups' => $data->groups\n ];\n \n $pdf = PDF::loadView('reports/participantsReport', $data);\n return $pdf->download('participantsReport.pdf');\n \n }", "public function generatepdf()\n\t\t {\n\t\t\t App::import('Vendor', 'linnwork/api/Auth');\n\t\t\t\tApp::import('Vendor', 'linnwork/api/Factory');\n\t\t\t\tApp::import('Vendor', 'linnwork/api/PrintService');\n\t\t\t\n\t\t\t\t$username = Configure::read('linnwork_api_username');\n\t\t\t\t$password = Configure::read('linnwork_api_password');\n\t\t\t\t\n\t\t\t\t$multi = AuthMethods::Multilogin($username, $password);\n\t\t\t\t\n\t\t\t\t$auth = AuthMethods::Authorize($username, $password, $multi[0]->Id);\t\n\n\t\t\t\t$token = $auth->Token;\t\n\t\t\t\t$server = $auth->Server;\n\t\t\t\t\n\t\t\t\t$orderIdArray[]\t=\t$this->request->data['pkorderid'];\n\t\t\t\t\n\t\t\t\t$IDs = $orderIdArray;\n\t\t\t\t$parameters = '[]';\n\t\t\t\n\t\t\t $result \t= \tPrintServiceMethods::CreatePDFfromJobForceTemplate('Invoice Template',$IDs,27,$parameters,'PDF',$token, $server);\n\t\t\t $results \t= \tPrintServiceMethods::CreatePDFfromJobForceTemplate('Invoice Template',$IDs,27,$parameters,'PDF',$token, $server);\n\t\t\t $pdf\t\t=\t$result->URL.\"#\".$results->URL;\n\t\t\t if($result->URL && $result->URL)\n\t\t\t {\n\t\t\t\t\t\techo $pdf; \n\t\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\techo \"2\"; \n\t\t\t\t\t\texit;\n\t\t\t\t}\n\t\t }", "public function deletePdf()\n {\n \tif(Storage::disk('local')->exists('public/processo_seletivo_pdf/' . $this->url_pdf)) {\n \t\treturn Storage::disk('local')->delete('public/processo_seletivo_pdf/' . $this->url_pdf);\n \t} else {\n \t\treturn false;\n \t}\n }", "public function download(Request $request)\n {\n if ($request->filled('reports')) {\n $orders = Order::orderBy('id', 'DESC')\n ->when(is_array($request->reports), function ($query) use ($request) {\n return $query->whereIn('id', $request->reports);\n })\n ->when(!is_array($request->reports), function ($query) use ($request) {\n return $query->where('id', $request->reports);\n })\n ->get();\n } else {\n $orders = collect([]);\n }\n\n $firstOrder = optional($orders->first());\n $pdfName = strtolower(\"order-{$firstOrder->ref}-{$firstOrder->status}\");\n\n $pdf = PDF::loadView('ecommerce::pdfs.invoice', ['orders' => $orders])\n ->setPaper('a4')\n ->setOrientation('portrait')\n ->setOption('print-media-type', true)\n ->setOption('images', true)\n ->setOption('lowquality', true)\n ->setOption('image-dpi', 300)\n ->setOption('image-quality', 50);\n return $pdf->download(\"{$pdfName}.pdf\");\n }", "public function getPdfReport(Request $request)\n {\n $input = $request->all();\n $depot_id = $input['depot_id'];\n $from_date = date('Y-m-d', strtotime($input['from_date']));\n $to_date = date('Y-m-d', strtotime($input['to_date']));\n $route_id = $input['route_id'];\n $data = [];\n\n $routeName = $this->findNameById('route_master', 'route_name', $route_id);\n $duties = Duty::where('route_id', $route_id)->get(['id', 'duty_number', 'start_time']);\n $depotName = $this->findNameById('depots', 'name', $depot_id);\n \n $title = 'Date-wise Denomination Report'; // Report title\n\n /*\n *meta data shoul be an array as below\n *['Depot : Balewadi', 'ETM No. : 1222', 'ETC.']\n */\n\n $meta = [ // For displaying filters description on header\n 'Depot : ' . $depotName,\n 'From : '.date('d-m-Y', strtotime($from_date)),\n 'To : '.date('d-m-Y', strtotime($to_date)),\n 'Route : '.$routeName\n ]; \n\n if($duties)\n {\n foreach ($duties as $key => $duty) \n {\n $data[$route_id][$duty->duty_number] = $this->getData($routeName, $depot_id, $from_date, $to_date, $route_id, $duty->id);\n }\n } \n\n return response()->json(['status'=>'Ok', 'title'=>$title, 'meta'=>$meta, 'data'=>$data, 'serverDate'=>date('d-m-Y H:i:s'), 'takenBy'=>Auth::user()->name, 'route_id'=>$route_id, 'duties'=>$duties], 200);\n }", "public function downloadPdfAction() {\r\n $this->checkSession();\r\n $offerId = $this->Request()->getParam(\"offerId\");\r\n $hash = $this->Request()->getParam(\"hash\");\r\n $mediaId = $this->Request()->getParam(\"mediaId\");\r\n\r\n $document = Shopware()->Models()->getRepository('Shopware\\CustomModels\\Offer\\Document\\Document')->findOneBy(array('offerId' => $offerId, 'hash' => $hash));\r\n\r\n if(!$document instanceof \\Shopware\\CustomModels\\Offer\\Document\\Document) {\r\n $document = Shopware()->Models()->getRepository('Shopware\\CustomModels\\Offer\\Document\\Document')->findOneBy(array('offerId' => $offerId));\r\n }\r\n\r\n $isMedia = true;\r\n $docMediaId = $document->getMediaId();\r\n if(!isset($docMediaId) || empty($docMediaId) || $docMediaId==-1) {\r\n $isMedia = false;\r\n }\r\n\r\n try {\r\n $name = basename($document->getHash()) . '.pdf';\r\n $file = Shopware()->DocPath('files/documents') . $name;\r\n if(!file_exists($file)) {\r\n $this->View()->assign(array(\r\n 'success' => false,\r\n 'data' => $this->Request()->getParams(),\r\n 'message' => 'File not exist'\r\n ));\r\n return;\r\n }\r\n\r\n $docId = $document->getDocumentId();\r\n $response = $this->Response();\r\n $response->setHeader('Cache-Control', 'public');\r\n $response->setHeader('Content-Description', 'File Transfer');\r\n $response->setHeader('Content-disposition', 'attachment; filename='.($isMedia?'Angebot':$docId).\".pdf\" );\r\n $response->setHeader('Content-Type', 'application/pdf');\r\n $response->setHeader('Content-Transfer-Encoding', 'binary');\r\n $response->setHeader('Content-Length', filesize($file));\r\n echo file_get_contents($file);\r\n } catch (Exception $e) {\r\n $this->View()->assign(array(\r\n 'success' => false,\r\n 'data' => $this->Request()->getParams(),\r\n 'message' => $e->getMessage()\r\n ));\r\n return;\r\n }\r\n $this->forward('offers');\r\n }", "private function _isResource() {\n $Info = explode('.', $_SERVER[\"REQUEST_URI\"]);\n $rVal = false;\n\n if ( count($Info) > 1 ) { $rVal = true; }\n\n // Return the Boolean Response\n return $rVal;\n }", "public function getPdfType()\n {\n return $this->pdfType;\n }", "public function getPdfVersion();", "function send_response() {\n $nocrypt = isset($_POST[\"nocrypt\"]);\n $cert = isset($_POST[\"cert\"]) ? trim($_POST[\"cert\"]) : \"\";\n if (!$nocrypt && !$cert) {\n header(\"HTTP/1.1 400 Bad Request\");\n echo \"No recipient certificate specified!\\n\";\n return;\n }\n\n if (!create_response()) {\n header(\"HTTP/1.1 500 Internal Server Error\");\n echo \"Error creating response\";\n return;\n }\n\n $err = digidoc::initialize();\n if ($err != digidoc::ERR_OK) {\n header(\"HTTP/1.1 500 Internal Server Error\");\n echo \"Error initializing libdigidoc: \" . digidoc::get_error($err);\n return;\n }\n $err = sign_response();\n if ($err != digidoc::ERR_OK) {\n header(\"HTTP/1.1 500 Internal Server Error\");\n echo \"Error signing response: \" . digidoc::get_error($err);\n digidoc::finalize();\n return;\n }\n if (!$nocrypt) {\n $err = encrypt_response($cert);\n if ($err != digidoc::ERR_OK) {\n header(\"HTTP/1.1 500 Internal Server Error\");\n echo \"Error encrypting response: \" . digidoc::get_error($err);\n digidoc::finalize();\n return;\n }\n }\n digidoc::finalize();\n\n if ($err == digidoc::ERR_OK) {\n $ext = $nocrypt ? \"ddoc\" : \"cdoc\";\n $resp = File::readLocalFile(get_response_prefix() . \".$ext\");\n File::saveAs(\"response.$ext\", $resp, \"application/x-$ext\", \"utf-8\");\n }\n}", "public function generateMemberPDF (Request $request){\n\n \n\n if($request->type ==='director'){\n if(isset($request->memberId)){\n $directorDetails = CompanyMember::where('id',$request->memberId)->first();\n $fname = $directorDetails['first_name'];\n $lname = $directorDetails['last_name'];\n $fullName = $fname .' '. $lname ;\n $addressId = $directorDetails['address_id'];\n $address = Address::where('id',$addressId)->first();\n if(isset($address)){\n // $address1 = $address['address1'];\n // $address2 = $address['address2'];\n // $city = $address['city'];\n // $rAddress = $address1 .' '. $address2 .' '. $city ;\n\n $address1 = $address['address1'].',<br/>';\n $address2 = ($address['address2']) ? $address['address2'].',<br/>' : '';\n $city = $address['city'].',<br/>';\n $postcode = 'postcode:'.$address['postcode'];\n $rAddress = $address1 . $address2 . $city . $postcode ;\n }else{\n $rAddress = '';\n }\n $companyId = $directorDetails['company_id'];\n\n $companyCertificate = CompanyCertificate::where('company_id', $companyId)\n ->where('is_sealed', 'yes')\n ->first();\n $certificate_no = isset($companyCertificate->registration_no) && $companyCertificate->registration_no ? $companyCertificate->registration_no : '';\n\n $companyDetails = Company::where('id',$companyId)->first();\n $companyName = $companyDetails ->name;\n $occupation = $directorDetails['occupation'];\n $nic = $directorDetails['nic'];\n $passport = $directorDetails['passport_no'];\n $passport_issued_country = $directorDetails['passport_issued_country'];\n $doa = $directorDetails['date_of_appointment'];\n $createdUserId = Company::where('id', $companyId)->value('created_by');\n $createdUserDetails = User::where('id', $createdUserId)->first();\n $loginPeopleId = $createdUserDetails->people_id;\n $usrDetails = People::where('id',$loginPeopleId)->first();\n $ufname = $usrDetails['first_name'];\n $ulname = $usrDetails['last_name'];\n $ufullName = $ufname .' '. $ulname ;\n $uemail = $usrDetails['email'];\n $umobile = $usrDetails['mobile'];\n $utelephone = $usrDetails['telephone'];\n $usrAddressId = $usrDetails->address_id; \n $usrAddress = Address::where('id', $usrAddressId)->first();\n if(isset($usrAddress)){\n $uaddress1 = $usrAddress['address1'].',<br/>';\n $uaddress2 = ($usrAddress['address2']) ? $usrAddress['address2'].',<br/>' : '';\n $ucity = $usrAddress['city'].',<br/>';\n $postcode = 'postcode:'.$usrAddress['postcode'];\n $urAddress = $uaddress1 . $uaddress2 . $ucity . $postcode ;\n }else{\n $urAddress = '';\n }\n $paymentDate= '';\n $payment_row = Order::where('module_id', $companyId)\n ->where('module', $this->settings('MODULE_INCORPORATION','key')->id)\n ->first();\n $paymentDate = isset($payment_row->updated_at) ? strtotime($payment_row->updated_at) : '';\n $data = [\n 'public_path' => public_path(),\n 'eroc_logo' => url('/').'/images/forms/eroc.png',\n 'gov_logo' => url('/').'/images/forms/govlogo.jpg',\n 'css_file' => url('/').'/images/forms/form1/form1.css',\n 'comname' => $companyName,\n 'postfix' => $companyDetails->postfix,\n 'name' => $fullName,\n 'fname' => $fname,\n 'lname' => $lname,\n 'raddress' => $rAddress,\n 'occupation' => $occupation,\n 'nic' => $nic,\n 'passport' => $passport,\n 'passport_issued_country' => $passport_issued_country,\n 'doa' => $doa,\n 'paymentdate' => $paymentDate,\n 'ufullname' => $ufullName,\n 'uemail' => $uemail,\n 'umobile' => $umobile,\n 'utelephone' => $utelephone,\n 'uraddress' => $urAddress, \n 'certificate_no' => $certificate_no ,\n 'directorDetails' => $directorDetails \n ]; \n $pdf = PDF::loadView('diretor-secretary-change/form18', $data);\n return $pdf->stream('form18.pdf'); \n }else{ \n return response()->json([\n 'message' => 'We can \\'t find a director.',\n 'status' =>false,\n ], 200);\n }\n }else if($request->type ==='secretary'){\n if(isset($request->memberId)){\n $secretaryDetails = CompanyMember::where('id',$request->memberId)->first();\n $fname = $secretaryDetails['first_name'];\n $lname = $secretaryDetails['last_name'];\n $fullName = $fname .' '. $lname ;\n $addressId = $secretaryDetails['address_id'];\n $address = Address::where('id',$addressId)->first();\n if(isset($address)){\n //$address1 = $address['address1'];\n // $address2 = $address['address2'];\n // $city = $address['city'];\n // $rAddress = $address1 .' '. $address2 .' '. $city ;\n $address1 = $address['address1'].',<br/>';\n $address2 = ($address['address2']) ? $address['address2'].',<br/>' : '';\n $city = $address['city'].',<br/>';\n $postcode = 'postcode:'.$address['postcode'];\n $rAddress = $address1 . $address2 . $city . $postcode ;\n \n }else{\n $rAddress = '';\n }\n $companyId = $secretaryDetails['company_id'];\n $companyCertificate = CompanyCertificate::where('company_id', $companyId)\n ->where('is_sealed', 'yes')\n ->first();\n $certificate_no = isset($companyCertificate->registration_no) && $companyCertificate->registration_no ? $companyCertificate->registration_no : '';\n $companyDetails = Company::where('id',$companyId)->first();\n $companyName = $companyDetails ->name;\n $doa = $secretaryDetails['date_of_appointment'];\n $regNum = $secretaryDetails['secretary_registration_no'];\n $createdUserId = Company::where('id', $companyId)->value('created_by');\n $createdUserDetails = User::where('id', $createdUserId)->first();\n $loginPeopleId = $createdUserDetails->people_id;\n $usrDetails = People::where('id',$loginPeopleId)->first();\n $ufname = $usrDetails['first_name'];\n $ulname = $usrDetails['last_name'];\n $ufullName = $ufname .' '. $ulname ;\n $uemail = $usrDetails['email'];\n $umobile = $usrDetails['mobile'];\n $utelephone = $usrDetails['telephone'];\n $usrAddressId = $usrDetails->address_id; \n $usrAddress = Address::where('id', $usrAddressId)->first();\n if(isset($usrAddress)){\n // $uaddress1 = $usrAddress['address1'];\n // $uaddress2 = $usrAddress['address2'];\n // $ucity = $usrAddress['city'];\n // $urAddress = $uaddress1 .' '. $uaddress2 .' '. $ucity ;\n $uaddress1 = $usrAddress['address1'].',<br/>';\n $uaddress2 = ($usrAddress['address2']) ? $usrAddress['address2'].',<br/>' : '';\n $ucity = $usrAddress['city'].',<br/>';\n $postcode = 'postcode:'.$usrAddress['postcode'];\n $urAddress = $uaddress1 . $uaddress2 . $ucity . $postcode ;\n }else{\n $urAddress = '';\n }\n $paymentDate= '';\n $payment_row = Order::where('module_id', $companyId)\n ->where('module', $this->settings('MODULE_INCORPORATION','key')->id)\n ->first();\n $paymentDate = isset($payment_row->updated_at) ? strtotime($payment_row->updated_at) : '';\n $data = [\n 'comname' => $companyName,\n 'regnum' => $regNum,\n 'postfix' => $companyDetails->postfix,\n 'name' => $fullName,\n 'fname' => $fname,\n 'lname' => $lname,\n 'raddress' => $rAddress,\n 'doa' => $doa,\n 'paymentdate' => $paymentDate,\n 'ufullname' => $ufullName,\n 'uemail' => $uemail,\n 'umobile' => $umobile,\n 'utelephone' => $utelephone,\n 'uraddress' => $urAddress, \n 'certificate_no' => $certificate_no \n ]; \n $pdf = PDF::loadView('diretor-secretary-change/form19', $data);\n return $pdf->stream('form19.pdf'); \n }else{ \n return response()->json([\n 'message' => 'We can \\'t find a secretary.',\n 'status' =>false,\n ], 200);\n }\n }else if($request->type ==='secretaryFirm'){\n if(isset($request->memberId)){\n $secretaryFirmDetails = CompanyFirms::where('id',$request->memberId)->first();\n $fname = $secretaryFirmDetails['name'];\n $lname = '';\n $fullName = $fname;\n $addressId = $secretaryFirmDetails['address_id'];\n $address = Address::where('id',$addressId)->first();\n if(isset($address)){\n // $address1 = $address['address1'];\n // $address2 = $address['address2'];\n // $city = $address['city'];\n // $rAddress = $address1 .' '. $address2 .' '. $city ;\n\n $address1 = $address['address1'].',<br/>';\n $address2 = ($address['address2']) ? $address['address2'].',<br/>' : '';\n $city = $address['city'].',<br/>';\n $postcode = 'postcode:'.$address['postcode'];\n $rAddress = $address1 . $address2 . $city . $postcode ;\n }else{\n $rAddress = '';\n }\n $companyId = $secretaryFirmDetails['company_id'];\n $companyCertificate = CompanyCertificate::where('company_id', $companyId)\n ->where('is_sealed', 'yes')\n ->first();\n $certificate_no = isset($companyCertificate->registration_no) && $companyCertificate->registration_no ? $companyCertificate->registration_no : '';\n $companyDetails = Company::where('id',$companyId)->first();\n $companyName = $companyDetails->name;\n $doa = $secretaryFirmDetails['date_of_appointment'];\n $regNum = $secretaryFirmDetails['registration_no'];\n $createdUserId = Company::where('id', $companyId)->value('created_by');\n $createdUserDetails = User::where('id', $createdUserId)->first();\n $loginPeopleId = $createdUserDetails->people_id;\n $usrDetails = People::where('id',$loginPeopleId)->first();\n $ufname = $usrDetails['first_name'];\n $ulname = $usrDetails['last_name'];\n $ufullName = $ufname .' '. $ulname;\n $uemail = $usrDetails['email'];\n $umobile = $usrDetails['mobile'];\n $utelephone = $usrDetails['telephone'];\n $usrAddressId = $usrDetails->address_id; \n $usrAddress = Address::where('id', $usrAddressId)->first();\n if(isset($usrAddress)){\n // $uaddress1 = $usrAddress['address1'];\n // $uaddress2 = $usrAddress['address2'];\n // $ucity = $usrAddress['city'];\n // $urAddress = $uaddress1 .' '. $uaddress2 .' '. $ucity ;\n $uaddress1 = $usrAddress['address1'].',<br/>';\n $uaddress2 = ($usrAddress['address2']) ? $usrAddress['address2'].',<br/>' : '';\n $ucity = $usrAddress['city'].',<br/>';\n $postcode = 'postcode:'.$usrAddress['postcode'];\n $urAddress = $uaddress1 . $uaddress2 . $ucity . $postcode ;\n }else{\n $urAddress = '';\n }\n $paymentDate= '';\n $payment_row = Order::where('module_id', $companyId)\n ->where('module', $this->settings('MODULE_INCORPORATION','key')->id)\n ->first();\n $paymentDate = isset($payment_row->updated_at) ? strtotime($payment_row->updated_at) : '';\n $data = [\n 'comname' => $companyName,\n 'regnum' => $regNum,\n 'postfix' => $companyDetails->postfix,\n 'name' => $fullName,\n 'fname' => $fname,\n 'lname' => $lname,\n 'raddress' => $rAddress,\n 'doa' => $doa,\n 'paymentdate' => $paymentDate,\n 'ufullname' => $ufullName,\n 'uemail' => $uemail,\n 'umobile' => $umobile,\n 'utelephone' => $utelephone,\n 'uraddress' => $urAddress, \n 'certificate_no' => $certificate_no \n ]; \n $pdf = PDF::loadView('diretor-secretary-change/form19', $data);\n return $pdf->stream('form19.pdf'); \n }else{ \n return response()->json([\n 'message' => 'We can \\'t find a secretary firm.',\n 'status' =>false,\n ], 200);\n }\n }else if($request->type ==='form20'){\n if(isset($request->memberId) && isset($request->requestId)){\n\n\n\n\n $companyID = $request->memberId;\n $requestID = $request->requestId;\n $companyCertificate = CompanyCertificate::where('company_id', $companyID)\n ->where('is_sealed', 'yes')\n ->first();\n $certificate_no = isset($companyCertificate->registration_no) && $companyCertificate->registration_no ? $companyCertificate->registration_no : '';\n\n // newly added\n $directorListCount = CompanyMember::where('company_id',$companyID)\n ->where('designation_type',$this->settings('DERECTOR','key')->id)\n ->where('status',$this->settings('COMMON_STATUS_PENDING','key')->id)\n ->count();\n\n $secretaryListCount = CompanyMember::where('company_id',$companyID)\n ->where('designation_type',$this->settings('SECRETARY','key')->id)\n ->where('status',$this->settings('COMMON_STATUS_PENDING','key')->id)\n ->count();\n $secretaryFirmListCount = CompanyFirms::where('company_id',$companyID)\n ->where('type_id',$this->settings('SECRETARY','key')->id)\n ->where('status',$this->settings('COMMON_STATUS_PENDING','key')->id)\n ->count();\n\n // changed \n $directorChangeListCount = CompanyMember::where('company_id',$companyID)\n ->where('designation_type',$this->settings('DERECTOR','key')->id)\n ->where('status',$this->settings('COMMON_STATUS_EDIT','key')->id)\n ->count();\n\n $secretaryChangeListCount = CompanyMember::where('company_id',$companyID)\n ->where('designation_type',$this->settings('SECRETARY','key')->id)\n ->where('status',$this->settings('COMMON_STATUS_EDIT','key')->id)\n ->count();\n $secretaryChangeFirmListCount = CompanyFirms::where('company_id',$companyID)\n ->where('type_id',$this->settings('SECRETARY','key')->id)\n ->where('status',$this->settings('COMMON_STATUS_EDIT','key')->id)\n ->count();\n \n // changed detail array bulding\n \n $editedCMitems = CompanyItemChange::where('request_id',$requestID)\n ->where('changes_type',$this->settings('EDIT','key')->id)\n ->where('item_table_type',$this->settings('COMPANY_MEMBERS','key')->id)\n ->get();\n $editedCFitems = CompanyItemChange::where('request_id',$requestID)\n ->where('changes_type',$this->settings('EDIT','key')->id)\n ->where('item_table_type',$this->settings('COMPANY_MEMBER_FIRMS','key')->id)\n ->get(); \n $editedDirectors = array();\n $editedSecs = array();\n $editedSecfirms = array();\n foreach ($editedCMitems as $key => $value) {\n $old = CompanyMember::where('id',$value->old_record_id)\n ->first();\n $oldaddress = Address::where('id',$old->address_id)\n ->first(); \n $new = CompanyMember::where('id',$value->item_id)\n ->first();\n $newaddress = Address::where('id',$new->address_id)\n ->first(); \n\n if($old->designation_type == $this->settings('DERECTOR','key')->id){\n $editedDirectors[] = [\n \"oldid\" => $old->id,\n \"newid\" => $new->id,\n 'type' => 0,\n \"old_title\" => $old->title,\n \"new_title\" => $new->title,\n \"old_firstname\" => $old->first_name,\n \"old_lastname\" => $old->last_name,\n \"new_firstname\" => $new->first_name,\n \"new_lastname\" => $new->last_name,\n \"old_address\" => $oldaddress->address1 . ',' . $oldaddress->address2 . ',' . $oldaddress->city,\n \"new_address\" => $newaddress->address1 . ',' . $newaddress->address2 . ',' . $newaddress->city,\n \"date\" => $new->date_of_change,\n ];\n\n }\n elseif($old->designation_type == $this->settings('SECRETARY','key')->id){\n $editedSecs[] = [\n \"oldid\" => $old->id,\n \"newid\" => $new->id,\n 'type' => 0,\n \"old_title\" => $old->title,\n \"new_title\" => $new->title,\n \"old_firstname\" => $old->first_name,\n \"old_lastname\" => $old->last_name,\n \"new_firstname\" => $new->first_name,\n \"new_lastname\" => $new->last_name,\n \"old_address\" => $oldaddress->address1 . ',' . $oldaddress->address2 . ',' . $oldaddress->city,\n \"new_address\" => $newaddress->address1 . ',' . $newaddress->address2 . ',' . $newaddress->city,\n \"date\" => $new->date_of_change,\n ];\n }\n\n }\n\n foreach ($editedCFitems as $key => $value) {\n $old = CompanyFirms::where('id',$value->old_record_id)\n ->first();\n $oldaddress = Address::where('id',$old->address_id)\n ->first(); \n $new = CompanyFirms::where('id',$value->item_id)\n ->first();\n $newaddress = Address::where('id',$new->address_id)\n ->first(); \n\n if($old->type_id == $this->settings('SECRETARY','key')->id){\n $editedSecfirms[] = [\n \"oldid\" => $old->id,\n \"newid\" => $new->id,\n 'type' => 0,\n \"title\" => $value->title,\n \"old_name\" => $old->name,\n \"new_name\" => $new->name,\n \"old_address\" => $oldaddress->address1 . ',' . $oldaddress->address2 . ',' . $oldaddress->city,\n \"new_address\" => $newaddress->address1 . ',' . $newaddress->address2 . ',' . $newaddress->city,\n \"date\" => $new->date_of_change,\n ];\n\n }\n\n }\n\n /// all directors and secretaries array building\n\n $oldMemberList = CompanyMember::where('company_id',$companyID)\n ->where('designation_type','!=',$this->settings('SHAREHOLDER','key')->id)\n // ->where(function ($query) {\n // $query->where('ceased_reason', '=', '')\n // ->orWhere('ceased_reason', '=', NULL);\n // }) \n ->where('status',$this->settings('COMMON_STATUS_ACTIVE','key')->id)\n ->get();\n $oldSecretaryFirmList = CompanyFirms::where('company_id',$companyID)\n ->where('type_id',$this->settings('SECRETARY','key')->id)\n // ->where(function ($query) {\n // $query->where('ceased_reason', '=', '')\n // ->orWhere('ceased_reason', '=', NULL);\n // })\n ->where('status',$this->settings('COMMON_STATUS_ACTIVE','key')->id)\n ->get(); \n $activemembers = array(); \n $activesecs_firms = array(); \n foreach($oldMemberList as $member){\n\n $isMemberEdited = CompanyItemChange::where('request_id',$requestID)\n ->where('changes_type',$this->settings('EDIT','key')->id)\n ->where('item_table_type',$this->settings('COMPANY_MEMBERS','key')->id)\n ->where('old_record_id',$member['id'])\n ->first();\n\n $isMemberDeleted = CompanyItemChange::where('request_id',$requestID)\n ->where('changes_type',$this->settings('DELETE','key')->id)\n ->where('item_table_type',$this->settings('COMPANY_MEMBERS','key')->id)\n ->where('item_id',$member['id'])\n ->first(); \n // $directorID = $director['id'];\n // $newdirectorID = null;\n // $isdeleted = null;\n\n if($isMemberEdited){\n\n $newEditedMember = CompanyMember::where('id',$isMemberEdited->item_id)\n ->where('company_id',$companyID)\n ->where(function ($query) {\n $query->where('ceased_reason', '=', '')\n ->orWhere('ceased_reason', '=', NULL);\n }) \n ->where('status',$this->settings('COMMON_STATUS_EDIT','key')->id)\n ->first();\n\n $member = $newEditedMember;\n\n // $directorID = $isDirectorEdited->old_record_id;\n // $newdirectorID = $newEditedDirector->id; \n\n }\n if($isMemberDeleted){\n\n continue; \n\n }\n \n \n $address ='';\n $forAddress = '';\n if( $member->address_id) {\n $address = Address::where('id',$member->address_id)->first();\n }\n if( $member->foreign_address_id) {\n $forAddress = Address::where('id', $member->foreign_address_id)->first();\n }\n\n $rec = array(\n // 'id' => $directorID,\n // 'newid' => $newdirectorID,\n // 'isdeleted' => $isdeleted,\n 'type' => ($member->is_srilankan =='yes' ) ? 'local' : 'foreign', \n 'firstname' => $member->first_name,\n 'lastname' => $member->last_name,\n 'fullname' => $member->first_name . ' ' . $member->last_name,\n 'title' => $member->title, \n 'province' => ( isset($address->province) && $address->province) ? $address->province : '',\n 'district' => ( isset($address->district) && $address->district) ? $address->district : '',\n 'city' => ( isset($address->city) && $address->city) ? $address->city : '',\n 'localAddress1' => ( isset($address->address1) && $address->address1) ? $address->address1 : '',\n 'localAddress2' => ( isset($address->address2) && $address->address2) ? $address->address2 : '',\n 'postcode' => (isset($address->postcode) && $address->postcode) ? $address->postcode : '', \n 'forProvince' => ( isset($forAddress->province) && $forAddress->province) ? $forAddress->province : '',\n 'forCity' => ( isset($forAddress->city) && $forAddress->city) ? $forAddress->city : '',\n 'forAddress1' => ( isset($forAddress->address1) && $forAddress->address1) ? $forAddress->address1 : '',\n 'forAddress2' => ( isset($forAddress->address2) && $forAddress->address2) ? $forAddress->address2 : '',\n 'forPostcode' => (isset($forAddress->postcode) && $forAddress->postcode) ? $forAddress->postcode : '', \n 'resaddress' => $address->address1 . ',' . $address->address2 . ',' . $address->city, \n 'nic' => $member->nic,\n 'passport' => $member->passport_no,\n // 'country' =>($address->country) ? $address->country : '',\n 'country' => ( $member->foreign_address_id) ? $forAddress->country : $address->country,\n 'passport_issued_country' => $member->passport_issued_country,\n // 'share' => $director->no_of_shares, \n 'date' => '1970-01-01' == $member->date_of_appointment ? null : $member->date_of_appointment,\n 'changedate' => '1970-01-01' == $member->date_of_change ? null : $member->date_of_change,\n 'phone' => $member->telephone,\n 'mobile' => $member->mobile,\n 'email' => $member->email,\n 'occupation' => $member->occupation,\n 'designation_type' => ($member->designation_type == $this->settings('SECRETARY','key')->id) ? 'Secretary' : 'Director',\n // 'directors_as_sh' => $directors_as_sh,\n // 'can_director_as_sec' => $can_director_as_sec,\n // 'secRegDate' => $sec_reg_no \n );\n $activemembers[] = $rec;\n }\n foreach($oldSecretaryFirmList as $sec){\n $isSecEdited = CompanyItemChange::where('request_id',$requestID)\n ->where('changes_type',$this->settings('EDIT','key')->id)\n ->where('item_table_type',$this->settings('COMPANY_MEMBER_FIRMS','key')->id)\n ->where('old_record_id',$sec['id'])\n ->first();\n $isSecDeleted = CompanyItemChange::where('request_id',$requestID)\n ->where('changes_type',$this->settings('DELETE','key')->id)\n ->where('item_table_type',$this->settings('COMPANY_MEMBER_FIRMS','key')->id)\n ->where('item_id',$sec['id'])\n ->first(); \n\n // $secID = $sec['id'];\n // $newsecID = null;\n // $isdeleted = null;\n\n if($isSecEdited){\n\n $newEditedSec = CompanyFirms::where('id',$isSecEdited->item_id)\n ->where('company_id',$companyID)\n ->where('type_id',$this->settings('SECRETARY','key')->id)\n ->where(function ($query) {\n $query->where('ceased_reason', '=', '')\n ->orWhere('ceased_reason', '=', NULL);\n }) \n ->where('status',$this->settings('COMMON_STATUS_EDIT','key')->id)\n ->first();\n\n $sec = $newEditedSec;\n\n // $secID = $isSecEdited->old_record_id;\n // $newsecID = $newEditedSec->id; \n\n }\n if($isSecDeleted){\n\n continue; \n\n }\n\n \n\n $address_id = $sec->foreign_address_id ? $sec->foreign_address_id : $sec->address_id;\n if(!$sec->foreign_address_id){\n $address = Address::where('id',$address_id)->first();\n }else{\n $address = Address::where('id',$address_id)->first();\n }\n $rec = array(\n // 'id' => $secID,\n // 'newid' => $newsecID,\n // 'isdeleted' => $isdeleted,\n 'type' => ($address->country != 'Sri Lanka') ? 'foreign' : 'local',\n 'pvNumber' => $sec->registration_no,\n 'firm_name' => $sec->name,\n 'firm_address' => $address->address1 . ',' . $address->address2 . ',' . $address->city,\n 'firm_province' => ( $address->province) ? $address->province : '',\n 'firm_district' => ($address->district) ? $address->district : '',\n 'firm_city' => ( $address->city) ? $address->city : '',\n 'firm_localAddress1' => ($address->address1) ? $address->address1 : '',\n 'firm_localAddress2' => ($address->address2) ? $address->address2 : '',\n 'firm_country' => ($address->country) ? $address->country : '',\n 'firm_postcode' => ($address->postcode) ? $address->postcode : '',\n 'firm_email' => $sec->email,\n 'firm_phone' => $sec->phone,\n 'firm_mobile' => $sec->mobile,\n 'firm_date' => $sec->date_of_appointment,\n 'firm_date_change' => $sec->date_of_change,\n 'secType' => 'Secretary Firm'\n );\n $activesecs_firms[] = $rec;\n } \n /// all directors and secs array end\n \n \n ///signed by member\n $changeRequest = CompanyChangeRequestItem::where('id',$requestID)->first();\n\n if($changeRequest->signed_by_table_type == $this->settings('COMPANY_MEMBERS','key')->id){\n\n $member = CompanyMember::leftJoin('settings','company_members.designation_type','=','settings.id')\n ->where('company_members.id',$changeRequest->signed_by)\n ->get(['company_members.id','company_members.first_name','company_members.last_name','settings.value as designation']);\n\n $date = array();\n \n $date[] = [\n \"id\" => $member[0]['id'],\n \"type\" => 0,\n \"title\" => '',\n \"first_name\" => $member[0]['first_name'],\n \"last_name\" => $member[0]['last_name'],\n \"designation\" => $member[0]['designation'],\n ];\n \n\n }\n else{\n $member = CompanyFirms::leftJoin('settings','company_member_firms.type_id','=','settings.id')\n ->where('company_member_firms.id',$changeRequest->signed_by)\n ->get(['company_member_firms.id','company_member_firms.name','settings.value as designation']);\n\n $date = array();\n \n $date[] = [\n \"id\" => $member[0]['id'],\n \"type\" => 1,\n \"title\" => '',\n \"first_name\" => $member[0]['name'],\n \"last_name\" => '',\n \"designation\" => $member[0]['designation'],\n ];\n\n }\n ///signed by member\n\n $companyDetails = Company::where('id',$companyID)->first();\n $companyName = $companyDetails->name;\n $postfix = $companyDetails->postfix;\n $createdUserId = Company::where('id', $companyID)->value('created_by');\n $createdUserDetails = User::where('id', $createdUserId)->first();\n $loginPeopleId = $createdUserDetails->people_id;\n $usrDetails = People::where('id',$loginPeopleId)->first();\n $ufname = $usrDetails['first_name'];\n $ulname = $usrDetails['last_name'];\n $ufullName = $ufname .' '. $ulname;\n $uemail = $usrDetails['email'];\n $umobile = $usrDetails['mobile'];\n $utelephone = $usrDetails['telephone'];\n $todayDate = date(\"Y-m-d\");\n\n $newMembers = CompanyMember::leftJoin('addresses','company_members.address_id','=','addresses.id')\n ->leftJoin('settings','company_members.designation_type','=','settings.id')\n ->where('company_members.company_id',$companyID)\n ->where('company_members.designation_type','!=',$this->settings('SHAREHOLDER','key')->id)\n ->where('company_members.status',$this->settings('COMMON_STATUS_PENDING','key')->id)\n ->get(['company_members.first_name','company_members.last_name','company_members.email','company_members.date_of_appointment','addresses.address1 as address1','addresses.address2 as address2','addresses.city as city','settings.value as value']);\n\n $newMemberFirms = CompanyFirms::leftJoin('addresses','company_member_firms.address_id','=','addresses.id')\n ->leftJoin('settings','company_member_firms.type_id','=','settings.id')\n ->where('company_member_firms.company_id',$companyID)\n ->where('company_member_firms.type_id','!=',$this->settings('SHAREHOLDER','key')->id)\n ->where('company_member_firms.status',$this->settings('COMMON_STATUS_PENDING','key')->id)\n ->get(['company_member_firms.name','company_member_firms.email','company_member_firms.date_of_appointment','addresses.address1 as address1','addresses.address2 as address2','addresses.city as city','settings.value as value']);\n\n $removedMembers = CompanyMember::leftJoin('company_change_requests','company_members.company_id','=','company_change_requests.company_id')\n ->leftJoin('company_item_changes','company_members.id','=','company_item_changes.item_id')\n ->leftJoin('addresses','company_members.address_id','=','addresses.id')\n ->leftJoin('settings','company_members.designation_type','=','settings.id')\n ->where('company_members.company_id',$companyID)\n ->where('company_item_changes.request_id',$requestID)\n ->where('company_members.ceased_reason','!=','')\n ->where('company_members.status',$this->settings('COMMON_STATUS_ACTIVE','key')->id)\n ->where('company_item_changes.changes_type',$this->settings('DELETE','key')->id) \n ->get(['company_members.id','company_members.first_name','company_members.last_name','company_members.ceased_reason','company_members.ceased_date','addresses.address1 as address1','addresses.address2 as address2','addresses.city as city','settings.value as value']);\n \n\n $removedFirms = CompanyFirms::leftJoin('company_change_requests','company_member_firms.company_id','=','company_change_requests.company_id')\n ->leftJoin('company_item_changes','company_member_firms.id','=','company_item_changes.item_id')\n ->leftJoin('addresses','company_member_firms.address_id','=','addresses.id')\n ->leftJoin('settings','company_member_firms.type_id','=','settings.id')\n ->where('company_member_firms.company_id',$companyID)\n ->where('company_item_changes.request_id',$requestID)\n ->where('company_member_firms.ceased_reason','!=','')\n ->where('company_member_firms.status',$this->settings('COMMON_STATUS_ACTIVE','key')->id)\n ->where('company_item_changes.changes_type',$this->settings('DELETE','key')->id) \n ->get(['company_member_firms.id','company_member_firms.name','company_member_firms.ceased_reason','company_member_firms.ceased_date','addresses.address1 as address1','addresses.address2 as address2','addresses.city as city','settings.value as value']);\n \n\n $removedDirCount = CompanyMember::leftJoin('company_change_requests','company_members.company_id','=','company_change_requests.company_id')\n ->leftJoin('company_item_changes','company_members.id','=','company_item_changes.item_id')\n ->leftJoin('addresses','company_members.address_id','=','addresses.id')\n ->leftJoin('settings','company_members.designation_type','=','settings.id')\n ->where('company_members.designation_type',$this->settings('DERECTOR','key')->id)\n ->where('company_members.company_id',$companyID)\n ->where('company_item_changes.request_id',$requestID)\n ->where('company_members.ceased_reason','!=','')\n ->where('company_members.status',$this->settings('COMMON_STATUS_ACTIVE','key')->id)\n ->where('company_item_changes.changes_type',$this->settings('DELETE','key')->id) \n ->count();\n $removedSecCount = CompanyMember::leftJoin('company_change_requests','company_members.company_id','=','company_change_requests.company_id')\n ->leftJoin('company_item_changes','company_members.id','=','company_item_changes.item_id')\n ->leftJoin('addresses','company_members.address_id','=','addresses.id')\n ->leftJoin('settings','company_members.designation_type','=','settings.id')\n ->where('company_members.designation_type',$this->settings('SECRETARY','key')->id)\n ->where('company_members.company_id',$companyID)\n ->where('company_item_changes.request_id',$requestID)\n ->where('company_members.ceased_reason','!=','')\n ->where('company_members.status',$this->settings('COMMON_STATUS_ACTIVE','key')->id)\n ->where('company_item_changes.changes_type',$this->settings('DELETE','key')->id) \n ->count();\n $removedFirmCount = CompanyFirms::leftJoin('company_change_requests','company_member_firms.company_id','=','company_change_requests.company_id')\n ->leftJoin('company_item_changes','company_member_firms.id','=','company_item_changes.item_id')\n ->leftJoin('addresses','company_member_firms.address_id','=','addresses.id')\n ->leftJoin('settings','company_member_firms.type_id','=','settings.id')\n ->where('company_member_firms.type_id',$this->settings('SECRETARY','key')->id)\n ->where('company_member_firms.company_id',$companyID)\n ->where('company_item_changes.request_id',$requestID)\n ->where('company_member_firms.ceased_reason','!=','')\n ->where('company_member_firms.status',$this->settings('COMMON_STATUS_ACTIVE','key')->id)\n ->where('company_item_changes.changes_type',$this->settings('DELETE','key')->id) \n ->count(); \n \n \n \n \n\n $data = [\n 'comname' => $companyName,\n 'postfix' => $postfix,\n 'newMembers' => $newMembers,\n 'member' => $date,\n 'activemembers' => $activemembers,\n 'activesecs_firms' => $activesecs_firms,\n 'todayDate' => $todayDate,\n 'editedDirectors' => $editedDirectors,\n 'editedSecs' => $editedSecs,\n 'editedSecfirms' => $editedSecfirms,\n 'newMemberFirms' => $newMemberFirms,\n 'removedMembers' => $removedMembers,\n 'removedFirms' => $removedFirms,\n 'ufullname' => $ufullName,\n 'uemail' => $uemail,\n 'umobile' => $umobile,\n 'utelephone' => $utelephone,\n 'certificate_no' => $certificate_no,\n 'directorChanged' => ( ($directorListCount + $directorChangeListCount + $removedDirCount) >0 ),\n 'secChagned' => ( ($secretaryListCount + $secretaryChangeListCount + $removedSecCount) > 0 || ($secretaryFirmListCount + $secretaryChangeFirmListCount + $removedFirmCount) > 0 )\n ]; \n $pdf = PDF::loadView('diretor-secretary-change/form20', $data);\n return $pdf->stream('form20.pdf');\n }else{ \n return response()->json([\n 'message' => 'We can \\'t find a secretary firm.',\n 'status' =>false,\n ], 200);\n }\n }\n }", "public function isGeneratePage() {}", "public function isRequest();", "public function isExpectedContent(array $configOptions, Request $request);", "public function GetParamsPdf() {\n if ($this->get_request_method() != \"POST\") {\n $this->response('', 406);\n }\n\n if (isset($_REQUEST['data'])) {\n $idSociete = $_REQUEST['data'][\"idSociete\"];\n // Input validations\n if (!empty($idSociete)) {\n try {\n $sql = $this->db->prepare(\"SELECT * FROM paramsPdf WHERE idSociete = :idSociete LIMIT 1\");\n $sql->bindParam('idSociete', $idSociete, PDO::PARAM_INT);\n $sql->execute();\n\n if ($sql->rowCount() > 0) {\n $result = $sql->fetch();\n\n // If success everythig is good send header as \"OK\" and user details\n $this->response($this->json($result), 200);\n }\n $this->response('', 204); // If no records \"No Content\" status\n } catch (Exception $ex) {\n $this->response('', $ex->getMessage());\n }\n }\n }\n\n // If invalid inputs \"Bad Request\" status message and reason\n $error = array('status' => \"Failed\", \"msg\" => \"Invalid param\");\n $this->response($this->json($error), 400);\n }", "public function printPDF()\n {\n $abc = Product::all();\n $data = [\n 'title' => 'Generate PDF',\n 'heading' => 'Invoices from UNILUXX',\n 'content' => 'Product',\n 'abc' => $abc\n ];\n\n $pdf = PDF::loadView('pages.pdf_view', $data);\n return $pdf->download('uni-invoice.pdf');\n }", "public function dailyReportPdf(Request $request)\n {\n $sdate = date('Y-m-d',strtotime($request->start_date));\n $edate = date('Y-m-d',strtotime($request->end_date));\n $data['alldata'] = Invoice::whereBetween('date',[$sdate,$edate])->where('status','1')->get();\n $data['start_date'] = date('Y-m-d',strtotime($request->start_date));\n $data['end_date'] = date('Y-m-d',strtotime($request->end_date));\n\n $pdf = PDF::loadView('backend.pdf.daily-invoice-report-pdf', $data);\n $pdf->SetProtection(['copy', 'print'], '', 'pass');\n return $pdf->stream('dailyInvoice.pdf');\n }", "public function testInboundDocumentUploadFilePdf()\n {\n }", "public function IsHtmlRequested(){\r\n\t\treturn $this->ForceOutputHtml||(strlen(file_get_contents('php://input'))<1&&!$this->ForceNotOutputHtml);\r\n\t}", "public function store(Request $request)\n {\n if (isset($request->syllabus_preview)) {\n $pdf = PDF::loadView('pdf.invoice', ['data' => $request->all()]);\n\n return $pdf->download('invoice.pdf');\n }\n\n $c_description_paragraphs = isset($request->course_description['paragraphs']) ? count($request->course_description['paragraphs']) : 1;\n\n $c_outcomes_paragraphs = isset($request->course_outcomes['paragraphs']) ? count($request->course_outcomes['paragraphs']) : 1;\n $c_outcomes_lists = isset($request->course_outcomes['lists']) ? count($request->course_outcomes['lists']) : 1;\n\n $l_outcomes_paragraphs = isset($request->learning_outcomes['paragraphs']) ? count($request->learning_outcomes['paragraphs']) : 1;\n $l_outcomes_lists = isset($request->learning_outcomes['lists']) ? count($request->learning_outcomes['lists']) : 1;\n\n $l_plan_lo = isset($request->learning_plan['lo']) ? count($request->learning_plan['lo']) : 1;\n $l_plan_topic = isset($request->learning_plan['topic']) ? count($request->learning_plan['topic']) : 1;\n $l_plan_activities = isset($request->learning_plan['activities']) ? count($request->learning_plan['activities']) : 1;\n $l_plan_resources = isset($request->learning_plan['resources']) ? count($request->learning_plan['resources']) : 1;\n $l_plan_assessment_tools = isset($request->learning_plan['assessment_tools']) ? count($request->learning_plan['assessment_tools']) : 1;\n\n $s_outputs_paragraphs = isset($request->student_outputs['paragraphs']) ? count($request->student_outputs['paragraphs']) : 1;\n $s_outputs_lists = isset($request->student_outputs['lists']) ? count($request->student_outputs['lists']) : 1;\n\n $validator = Validator::make($request->all(), [\n 'course_code' => 'required',\n 'course_title' => 'required',\n 'credit' => 'required',\n 'time_allotment' => 'required',\n 'professor' => 'required',\n\n 'course_description.paragraphs.*' => 'required',\n\n 'course_outcomes.paragraphs.*' => 'required',\n 'course_outcomes.lists.*' => 'required',\n\n 'learning_outcomes.paragraphs.*' => 'required',\n 'learning_outcomes.lists.*' => 'required',\n\n 'learning_plan.lo.*' => 'required',\n 'learning_plan.weeks.*' => 'required',\n 'learning_plan.topic.*' => 'required',\n 'learning_plan.activities.*' => 'required',\n 'learning_plan.resources.*' => 'required',\n 'learning_plan.assessment_tools.*' => 'required',\n\n 'student_outputs.paragraphs.*' => 'required',\n 'student_outputs.lists.*' => 'required',\n ]);\n\n if ($validator->fails()) {\n return redirect()->route(\n 'syllabi.create',\n [\n 'courseDescriptionParagraphs' => $c_description_paragraphs,\n 'courseOutcomesParagraphs' => $c_outcomes_paragraphs,\n 'courseOutcomesLists' => $c_outcomes_lists,\n 'learningOutcomesParagraphs' => $l_outcomes_paragraphs,\n 'learningOutcomesLists' => $l_outcomes_lists,\n 'learningPlanLo' => $l_plan_lo,\n 'learningPlanTopic' => $l_plan_topic,\n 'learningPlanActivities' => $l_plan_activities,\n 'learningPlanResources' => $l_plan_resources,\n 'learningPlanAssessmentTools' => $l_plan_assessment_tools,\n 'studentOutputsParagraphs' => $s_outputs_paragraphs,\n 'studentOutputsLists' => $s_outputs_lists,\n ]\n )\n ->withErrors($validator)\n ->withInput();\n }\n\n $newFileName = 'syllabus-' . date('Ymd') . '-' . time() . '.pdf';\n $r = Resource::create([\n 'course_id' => Course::where('program_id', auth()->user()->program_id)->first()->id,\n 'user_id' => auth()->id(),\n 'batch_id' => Str::uuid(),\n 'description' => 'lorem',\n 'is_syllabus' => 1,\n ]);\n\n $r->users()->attach($r->user_id, ['batch_id' => $r->batch_id]);\n\n $merged = collect($validator->validated())->merge(['resource_id' => $r->id]);\n $s = Syllabus::create(\n $merged->all()\n );\n\n $pdf = PDF::loadView('pdf.invoice', ['data' => $s])->stream();\n\n $r->addMediaFromStream($pdf)\n ->usingFileName($newFileName)\n ->toMediaCollection();\n\n event(new ResourceCreated($r));\n\n if ($request->check_stay) {\n return redirect()\n ->route('syllabi.create')\n ->with('success', 'Resource was created successfully');\n }\n\n return redirect()\n ->route('resources.index')\n ->with('success', 'Resource was created successfully');\n }", "function pdf() {\n if($this->active_invoice->isLoaded()) {\n\n require_once INVOICING_MODULE_PATH . '/models/InvoicePDFGenerator.class.php';\n InvoicePDFGenerator::download($this->active_invoice, lang(':invoice_id.pdf', array('invoice_id' => $this->active_invoice->getName())));\n die();\n } else {\n $this->response->notFound();\n } // if\n }", "public function IsWsdlRequested(){\r\n\t\treturn $this->ForceOutputWsdl||((isset($_GET['wsdl'])||isset($_GET['WSDL']))&&!$this->ForceNotOutputWsdl);\r\n\t}", "public function isDocuments() {\n return $this->_documents;\n }", "public function printActivityReport(Request $request) {\n $data['data'] = ItemOrder::where('staff_id', auth()->user()->id)->orderBy('created_at', 'desc')->get();\n\n $pdf = PDF::loadView('orders.activity_report', $data); \n\n return $pdf->download('activity_report'.time().'.pdf');\n }", "public function isRequest(): bool {\n return $this->options['request'] ?? false;\n }", "public function confirm_saving(Request $request)\n\t\t{\t\t\n\t\t\t\\File::delete('storage/copier_files/copier-pdf/temp/PahodaImageProducts_' . $request->guid . '.pdf');\t\t\n\t\t\t$file_exists = \\File::exists('storage/copier_files/copier-pdf/temp/PahodaImageProducts_' . $request->guid . '.pdf');\n\t\t\t\n\t\t\treturn response()->json(array('message' => $file_exists));\n\t\t}", "public function pdf($form=''){\n $this->load->model('Report');\n $this->Report->downloadpdf($form);\n }", "public function generatePDF()\n {\n $data = [\n 'title' => 'List of Houses',\n 'company' => 'Real Construction',\n 'date' => date('m/d/Y'),\n 'location' => 'KK 705 St, Kigali',\n 'email' => '[email protected]',\n 'contact' => '+250 788306817',\n 'contact1' => '+250 788314255',\n ];\n \n $products = DB::table('products')->get();\n \n $pdf = PDF::loadView('myPDF', $data, compact('products'));\n \n return $pdf->download('Houseslist.pdf');\n }", "public function download() {\n if(empty($this->customer['id'])) {\n $this->response['error'][] = $this->locale['ERR_4002'];\n $this->response['logout'] = 1;\n return false;\n }\n\n if(empty($this->params['object']) || !$this->validator->isPositiveInteger($this->params['object'])) {\n $this->response['error'][] = $this->locale['ERR_1005'];\n return false;\n }\n\n $item = $this->orderModel->getOne($this->params['object'], $this->language['id']);\n \n if(!$item || empty($item['id'])) {\n $this->response['error'][] = $this->locale['ERR_1005'];\n return false;\n }\n\n $cars = $this->orderModel->getCars($item['id']);\n if(!$cars || count($cars) < 1) {\n $this->response['error'][] = $this->locale['ERR_1005'];\n return false;\n }\n \n $euro = $this->getCurrency($this->defaults['currencyEuroId']);\n\n $html = '';\n\n $this->template->set( $this->tplPath . 'pdf.html');\n $this->template->set( $this->tplPath . 'pdf-item.html', false);\n\n $count = count($cars);\n for($j = 0; $j < $count; $j++) {\n $car = $this->carModel->getOne($cars[$j]['car_id'], $this->language['id']);\n\n if($this->currency['id'] != $euro['id']) {\n $cars[$j]['final_price'] = $this->getFormatMoney($cars[$j]['final_price'] / $this->currency['in_euro']);\n $cars[$j]['price'] = $this->getFormatMoney($cars[$j]['price'] / $this->currency['in_euro']);\n $cars[$j]['one_time_fee'] = $this->getFormatMoney($cars[$j]['one_time_fee'] / $this->currency['in_euro']);\n $cars[$j]['renewal_fee'] = $this->getFormatMoney($cars[$j]['renewal_fee'] / $this->currency['in_euro']);\n $cars[$j]['holidays_fee'] = $this->getFormatMoney($cars[$j]['holidays_fee'] / $this->currency['in_euro']);\n $cars[$j]['discount_days_fee'] = $this->getFormatMoney($cars[$j]['discount_days_fee'] / $this->currency['in_euro']);\n $cars[$j]['termination_penalty_fee'] = $this->getFormatMoney($cars[$j]['termination_penalty_fee'] / $this->currency['in_euro']);\n }\n\n $details = '';\n if($cars[$j]['one_time_fee'] > 0) {\n $details .= $this->locale['STR_ONE_TIME_FEE'] . ': <strong>' . $cars[$j]['one_time_fee'] . $this->currency['sign'] . '</strong><br/>';\n }\n if($cars[$j]['renewal_fee'] > 0) {\n $details .= $this->locale['STR_RENEWAL_FEE'] . ': <strong>' . $cars[$j]['renewal_fee'] . $this->currency['sign'] . '</strong><br/>';\n }\n if($cars[$j]['holidays_fee'] > 0) {\n $details .= $this->locale['STR_HOLIDAYS_FEE'] . ': <strong>' . $cars[$j]['holidays_fee'] . $this->currency['sign'] . '</strong><br/>';\n }\n if($cars[$j]['discount_days_fee'] > 0) {\n $details .= $this->locale['STR_DISCOUNT_DAYS_FEE'] . ': <strong>' . $cars[$j]['discount_days_fee'] . $this->currency['sign'] . '</strong><br/>';\n }\n if($cars[$j]['termination_penalty_fee'] > 0) {\n $details .= $this->locale['STR_TERMINATION_FEE'] . ': <strong>' . $cars[$j]['termination_penalty_fee'] . $this->currency['sign'] . '</strong><br/>';\n }\n\n if(!empty($cars[$j]['termination_date'])) {\n $cars[$j]['end_date'] = $cars[$j]['termination_date'];\n }\n\n $tplVars = [\n 'TITLE' => $car['title'], \n 'CATEGORY' => $car['category'], \n 'DATE_FROM' => date($this->dayFormat, strtotime($cars[$j]['start_date'])), \n 'DATE_TILL' => date($this->dayFormat, strtotime($cars[$j]['end_date'])), \n 'BASE_PRICE' => $this->getFormatMoney($cars[$j]['price']), \n 'DETAILS' => $details, \n 'PRICE' => $this->getFormatMoney($cars[$j]['final_price']), \n 'CURRENCY_SIGN' => $this->currency['sign']\n ];\n\n $this->template->setVars( $tplVars );\n $html .= $this->template->parse(false);\n }\n\n if($this->currency['id'] != $euro['id']) {\n $item['final_price'] = $this->getFormatMoney($item['final_price'] / $this->currency['in_euro']);\n $item['price'] = $this->getFormatMoney($item['price'] / $this->currency['in_euro']);\n $item['one_time_fee'] = $this->getFormatMoney($item['one_time_fee'] / $this->currency['in_euro']);\n $item['renewal_fee'] = $this->getFormatMoney($item['renewal_fee'] / $this->currency['in_euro']);\n $item['holidays_fee'] = $this->getFormatMoney($item['holidays_fee'] / $this->currency['in_euro']);\n $item['discount_days_fee'] = $this->getFormatMoney($item['discount_days_fee'] / $this->currency['in_euro']);\n $item['termination_penalty_fee'] = $this->getFormatMoney($item['termination_penalty_fee'] / $this->currency['in_euro']);\n }\n\n $details = '';\n if($item['one_time_fee'] > 0) {\n $details .= $this->locale['STR_ONE_TIME_FEE'] . ': <strong>' . $item['one_time_fee'] . $this->currency['sign'] . '</strong><br/>';\n }\n if($item['renewal_fee'] > 0) {\n $details .= $this->locale['STR_RENEWAL_FEE'] . ': <strong>' . $item['renewal_fee'] . $this->currency['sign'] . '</strong><br/>';\n }\n if($item['holidays_fee'] > 0) {\n $details .= $this->locale['STR_HOLIDAYS_FEE'] . ': <strong>' . $item['holidays_fee'] . $this->currency['sign'] . '</strong><br/>';\n }\n if($item['discount_days_fee'] > 0) {\n $details .= $this->locale['STR_DISCOUNT_DAYS_FEE'] . ': <strong>' . $item['discount_days_fee'] . $this->currency['sign'] . '</strong><br/>';\n }\n if($item['termination_penalty_fee'] > 0) {\n $details .= $this->locale['STR_TERMINATION_FEE'] . ': <strong>' . $item['termination_penalty_fee'] . $this->currency['sign'] . '</strong><br/>';\n }\n\n if(!empty($item['termination_date'])) {\n $item['end_date'] = $item['termination_date'];\n }\n\n $tplVars = [\n 'STR_ORDER_DATE' => $this->locale['STR_ORDER_DATE'], \n 'STR_CAR' => $this->locale['STR_CAR'], \n 'STR_RENT_DATE' => $this->locale['STR_RENT_DATE'], \n 'STR_BASE_PRICE' => $this->locale['STR_BASE_PRICE'], \n 'STR_DETAILS' => $this->locale['STR_DETAILS'], \n 'STR_PRICE' => $this->locale['STR_PRICE'], \n 'STR_TOTAL' => $this->locale['STR_TOTAL'], \n 'INVOICE' => $item['invoice'], \n 'DATE_FROM' => date($this->dayFormat, strtotime($item['start_date'])), \n 'DATE_TILL' => date($this->dayFormat, strtotime($item['end_date'])), \n 'ITEMS' => $html, \n 'BASE_PRICE' => $this->getFormatMoney($item['price']), \n 'DETAILS' => $details, \n 'TOTAL_PRICE' => $this->getFormatMoney($item['final_price']), \n 'CURRENCY_SIGN' => $this->currency['sign']\n ];\n\n $this->template->setVars( $tplVars );\n $html = $this->template->parse();\n\n $mpdf = new \\Mpdf\\Mpdf();\n $mpdf->WriteHTML($html);\n $mpdf->Output($item['invoice'] . '.pdf','D');\n }", "public function get_pdfs() {\n\t\treturn apply_filters( 'wc_product_catalog_pdfs', $this->pdfs, $this );\n\t}", "public function generate(Request $request)\n {\n if(!$request->has('type')) {\n abort(500);\n } elseif ($request->input('type') == 'single' && !$request->has('id')) {\n abort(500);\n }\n\n $records = $request->input('type') == 'all' ? Patient::all() : [Patient::find($request->input('id'))];\n\n $file = md5(uniqid());\n\n return view('app.print.card')->with(compact('records'));\n\n// return response($this->pdf->generate($records), 200)->withHeaders([\n// 'Content-Type' => 'application/pdf',\n// 'Content-Disposition' => \"{$this->pdf->action()}; filename='{$file}.pdf'\",\n// ]);\n }", "public function pdf()\n {\n $pdf = \\App::make('dompdf.wrapper');\n $pdf->loadHTML($this->convert_sales_data_to_html());\n return $pdf->stream();\n }", "protected function _needsRenderer()\n {\n $types = $this->getRequest()->getAcceptTypes();\n $htmlPos = array_search(Clockworkgeek_Extrarestful_Model_Api2_Block_Renderer::MIME_TYPE, $types);\n if ($htmlPos !== false) {\n /** @var $helper Mage_Api2_Helper_Data */\n $helper = Mage::helper('api2');\n $adapters = $helper->getResponseRenderAdapters();\n foreach ($adapters as $item) {\n $typePos = array_search($item->type, $types);\n if ($typePos < $htmlPos) {\n return false;\n }\n }\n return true;\n }\n return false;\n }", "public function testCustomerInvoicesV2GetPdfReplacement()\n {\n }", "public function isDoc($ext=null){\n global $VALID_DOCS;\n if (!$ext)\n $ext = $this->ext; \n return (in_array( $ext, $VALID_DOCS )); \n }", "protected function convertWebHtmlToDocxRequest($input_request)\n {\n // verify the required parameter 'input_request' is set\n if ($input_request === null || (is_array($input_request) && count($input_request) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $input_request when calling convertWebHtmlToDocx'\n );\n }\n\n $resourcePath = '/convert/html/to/docx';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($input_request)) {\n $_tempBody = $input_request;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Apikey');\n if ($apiKey !== null) {\n $headers['Apikey'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function memberUploadPdf (Request $request){\n if(isset($request)){\n $fileName = uniqid().'.pdf';\n $token = md5(uniqid()); \n $companyId = $request->companyId;\n $requestId = $request->requestId;\n $memberID = $request->memberID;\n $firmID = $request->firmID;\n $docType = $request->docType;\n $pdfName = $request->filename; \n $path = 'memberChange/'.$companyId;\n $path= $request->file('uploadFile')->storeAs($path,$fileName,'sftp');\n $docId;\n if($docType=='form18Upload'){\n $docId = Documents::where('key','DIRSEC_CHANGE_FORM18')->value('id');\n $description=NULL;\n }elseif($docType=='form19Upload' || $docType=='form19UploadFirm'){\n $docId = Documents::where('key','DIRSEC_CHANGE_FORM19')->value('id');\n $description=NULL; \n }elseif($docType=='form20Upload'){\n $docId = Documents::where('key','DIRSEC_CHANGE_FORM20')->value('id');\n $description=NULL; \n }elseif($docType=='resignationUpload'){\n $docId = Documents::where('key','DIRSEC_CHANGE_RESIGNATION_LETTER')->value('id');\n $description = $request->description;\n if($description=='undefined'){\n $description=NULL;\n } \n }elseif($docType=='extraUpload'){\n $docId = Documents::where('key','EXTRA_DOCUMENT')->value('id');\n $description = $request->description;\n if($description=='undefined'){\n $description=NULL;\n } \n }\n\n\n $query = CompanyDocuments::query();\n $query->where('company_id', $companyId );\n $query->where('document_id',$docId);\n $query->where('request_id', $requestId);\n\n if ($memberID) {\n $query->where('company_member_id', $memberID );\n $query->delete();\n }\n if ($firmID) {\n $query->where('company_firm_id', $firmID );\n $query->delete();\n }\n if ($docType=='form20Upload') {\n $docId = Documents::where('key','DIRSEC_CHANGE_FORM20')->value('id'); \n $query->where('document_id', $docId );\n $query->delete();\n }\n\n\n $memDoc = new CompanyDocuments;\n $memDoc->company_id = $companyId;\n $memDoc->document_id = $docId;\n $memDoc->no_of_pages = 1;\n $memDoc->name = $pdfName;\n $memDoc->file_description = $description;\n $memDoc->file_token = $token;\n $memDoc->path = $path;\n if($memberID){\n $memDoc->company_member_id = $memberID;\n }else if($firmID){\n $memDoc->company_firm_id = $firmID;\n }\n $memDoc->request_id = $requestId; \n $memDoc->status = $this->settings('DOCUMENT_PENDING','key')->id;\n $memDoc->save(); \n $memdocId = $memDoc->id; \n return response()->json([\n 'message' => 'File uploaded successfully.',\n 'status' =>true,\n 'name' =>basename($path),\n 'doctype' =>$docType,\n 'docid' =>$memdocId, // for delete pdf...\n 'token' =>$token,\n 'memberID' =>$memberID,\n 'firmID' =>$firmID,\n 'pdfname' =>$pdfName,\n ], 200); \n }\n }", "private function verify_store_request(Request $request): bool\n\t{\n\t\tif (\n\t\t\tisset($request->document_id) &&\n\t\t\tisset($request->state) &&\n\n\t\t\tisset($request->field_hierarchy) &&\n\t\t\tcount($request->field_hierarchy) > 0 &&\n\n\t\t\tisset($request->document_template) &&\n\t\t\tisset($request->signatories)\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function mfcs_request_statistics_0_page_pdf($year = NULL, $month = NULL, $day = NULL) {\n $statistics = mfcs_request_statistics_0_page_markup($year, $month, $day);\n if ($markup === FALSE) {\n drupal_not_found();\n drupal_exit();\n }\n\n $statistics_name = '';\n if (is_null($month)) {\n if (is_null($year)) {\n $year = date('Y', $statistics['year_start']);\n }\n\n mfcs_add_canonical_headers('pdf-0/statistics/' . $year);\n mfcs_add_alternate_link('requests/statistics-0/' . $year, 'text/html', 'View as HTML');\n\n $title = 'Request Statistics for the year ' . $year;\n $statistics_name = $year;\n }\n elseif (is_null($day)) {\n $month = strtolower(date('F', $statistics['month_start']));\n $year = date('Y', $statistics['month_start']);\n\n mfcs_add_canonical_headers('pdf-0/statistics/' . $year . '/' . $month);\n mfcs_add_alternate_link('requests/statistics-0/' . $year . '/' . $month, 'text/html', 'View as HTML');\n\n $title = 'Request Statistics for ' . $statistics['month_name'] . ' ' . $year;\n $statistics_name = $year . '_' . $month;\n }\n else {\n $month = strtolower(date('F', $statistics['day_start']));\n $year = date('Y', $statistics['day_start']);\n $day = date('d', $statistics['day_start']);\n\n mfcs_add_canonical_headers('pdf-0/statistics/' . $year . '/' . $month . '/' . $day);\n mfcs_add_alternate_link('requests/statistics-0/' . $year . '/' . $month . '/' . $day, 'text/html', 'View as HTML');\n\n $title = 'Request Statistics for ' . $statistics['month_name'] . ' ' . $day . ', ' . $year;\n $statistics_name = $year . '_' . $month . '_' . $day;\n }\n\n drupal_set_title($title);\n\n // turn off devel shutdown functionality.\n $GLOBALS['devel_shutdown'] = FALSE;\n\n $page['html']['content'] = array(\n '#type' => 'markup',\n '#markup' => $statistics['markup'],\n );\n unset($statistics);\n\n $renderred = drupal_render($page);\n $html = drupal_render_page($renderred);\n unset($renderred);\n\n mfcs_include(MFCS_INCLUDE_OUTPUT);\n\n $parameters = array(\n 'page_title' => FALSE,\n 'title' => $title,\n );\n\n $contained = mfcs_output_print_page_view($html, $parameters);\n\n if (!is_string($contained)) {\n drupal_not_found();\n drupal_exit();\n }\n\n $result = mfcs_request_pdf_0_page_using_wkhtmltopdf_generic('fcs-statistics-' . $statistics_name . '.pdf', $contained, FALSE);\n if ($result) {\n exit();\n }\n}", "public function createPDF() {\n $data = Product::all();\n\n // share data to view\n view()->share('products',$data);\n $pdf = PDF::loadView('admin.pdf.product_pdf', $data);\n\n // download PDF file with download method\n return $pdf->download('pdf_file.pdf');\n }", "public function gdprAgreement(Request $request): Response\n {\n return $this->render('gdpr-agreement.twig');\n }" ]
[ "0.6752349", "0.59716284", "0.5959558", "0.59247404", "0.5795268", "0.5757904", "0.5757904", "0.57113576", "0.5634374", "0.5624991", "0.56138057", "0.5599685", "0.5538908", "0.54689413", "0.54665947", "0.5413307", "0.5399296", "0.5374836", "0.5370826", "0.53654677", "0.5355895", "0.5354883", "0.5354804", "0.5344209", "0.53128785", "0.5257816", "0.52429956", "0.5236997", "0.522802", "0.52261114", "0.5220755", "0.5212017", "0.52070457", "0.51957136", "0.51757276", "0.517339", "0.5169626", "0.5167226", "0.51650333", "0.515636", "0.51473206", "0.51216495", "0.51214683", "0.5117206", "0.51136696", "0.5103007", "0.5091615", "0.50892687", "0.50846356", "0.50846356", "0.507941", "0.50790614", "0.505658", "0.5050742", "0.5050742", "0.5050742", "0.5034734", "0.5026747", "0.502499", "0.5020895", "0.50086313", "0.5006317", "0.49964643", "0.49914253", "0.4987953", "0.4987107", "0.49868956", "0.4980027", "0.49783733", "0.49680972", "0.49670386", "0.49645486", "0.49619716", "0.4961061", "0.49563333", "0.49552423", "0.49522132", "0.49476412", "0.49416956", "0.4940446", "0.4940294", "0.4939426", "0.49390572", "0.49322072", "0.4930559", "0.492926", "0.49254587", "0.49238595", "0.49238318", "0.49203584", "0.49186227", "0.49148917", "0.4912648", "0.49125755", "0.4910743", "0.49088418", "0.49084005", "0.49072662", "0.4906677", "0.49062148" ]
0.7042534
0
Converts the response The replacement response should be returned from this method and will replace the current response.
public function convert(Request $request, Response $response) { $generator = $this->getGenerator(); $options = $request->attributes->get("{$this->getFormat()}_options", []); $headers = array_merge($request->headers->all(), [ 'Content-Type' => 'application/pdf', ]); return new StreamedResponse(function () use ($response, $generator, $options) { // Buffer the original response ob_start(); $response->sendContent(); $html = ob_get_contents(); ob_end_clean(); // Output converted response echo $generator->getOutputFromHtml($html, $options); }, $response->getStatusCode(), $headers); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function Transform_Response($response)\n\t{\n\t\t\n\t\tif (is_string($response))\n\t\t{\n\t\t\t$response = new OLP_Response($response);\n\t\t}\n\t\t\n\t\t// we want the merged result so we have tokens for promo_id, etc.\n\t\t$data = array_merge($response->Signature()->To_Array(), $response->Collection()->To_Array());\n\t\t\n\t\t$proxy = new stdClass();\n\t\t$proxy->session_id = $response->Unique_ID();\n\t\t$proxy->page = $response->Page();\n\t\t$proxy->data = $data;\n\t\t$proxy->errors = $response->Errors()->To_Array();\n\t\t$proxy->event = array();\n\t\t\n\t\t// if we have a <section> element, turn it into\n\t\t// the eds_page in the response, using XSLT\n\t\tif (count($response->Content()->Sections()))\n\t\t{\n\t\t\t\n\t\t\t// which style-sheet?\n\t\t\t$xslt = DIR_SHARED.\"/xsl/{$response->Page()}.xsl\";\n\t\t\t\n\t\t\tif (is_file($xslt))\n\t\t\t{\n\t\t\t\t// transform our response\n\t\t\t\t$content = Transform_XML($xslt, $response->Received());\n\t\t\t\t$proxy->eds_page = array('content'=>$content, 'type'=>'text/html');\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $proxy;\n\t\t\n\t}", "abstract public function convertFromResponse(SimplifiedResponse $response);", "abstract public function simplifyResponse($request, $response);", "public function prepareResponse();", "public function convertResponse($values)\n {\n\t}", "public function alterResponse(Response &$response)\n {\n // Do nothing.\n }", "public function convertResponse($values)\n {\n\n\t}", "function responseToDialogue($response){\n $response = json_encode(array_merge($response, array_filter(['extendedIds' => SUtl::translatedExtendedIdCols()]), ['extras' => Tfk::getExtras(), 'feedback' => Feedback::get()]));\n if ($response){\n $this->dialogue->response->setContent(Tfk::$registry->get('translatorsStore')->substituteTranslations($response));\n }else{\n Tfk::debug_mode('error', 'AbstractController->responseToDialogue - json_encoding error: ', json_last_error());\n }\n }", "public function convert($response)\n {\n return $this->serializer->unserialize($response);\n }", "protected function restoreResponse($response, $data)\n {\n foreach (['format', 'version', 'statusCode', 'statusText', 'content'] as $name) {\n $response->{$name} = $data[$name];\n }\n foreach (['headers', 'cookies'] as $name) {\n if (isset($data[$name]) && is_array($data[$name])) {\n $response->{$name}->fromArray(array_merge($data[$name], $response->{$name}->toArray()));\n }\n }\n if (!empty($data['dynamicPlaceholders']) && is_array($data['dynamicPlaceholders'])) {\n $response->content = $this->updateDynamicContent($response->content, $data['dynamicPlaceholders'], true);\n }\n $this->afterRestoreResponse(isset($data['cacheData']) ? $data['cacheData'] : null);\n }", "public function process(Response $response): Response {\n return $response;\n }", "public function getOriginalResponse() : ResponseInterface;", "protected function _response() {}", "public function apply($response): Response\n {\n UnionTypes::assert('response', $response, Response::class);\n\n foreach ($this->getHeaders() as $name => $values) {\n /** @var HeaderValue $header */\n foreach ($values as $header) {\n $response->headers->set($name, $header->getValue(), $header->isReplace());\n }\n }\n return $response;\n }", "public function setResponse(Response $response) {}", "protected abstract function prepareResponse(stubResponse $response);", "function changeResponseModel(IResponseModel $responseModel) {\n $this->body = $responseModel;\n }", "public function getOriginalResponse()\n {\n return $this->originalResponse;\n }", "public function prepareResponse($response)\n\t{\n\t\tif ($response instanceof modProcessorResponse) {\n\t\t\t$output = $response->getResponse();\n\t\t} else {\n\t\t\t$message = $response;\n\t\t\tif (empty($message)) {\n\t\t\t\t$message = $this->lexicon('err_unknown');\n\t\t\t}\n\t\t\t$output = $this->failure($message);\n\t\t}\n\t\tif ($this->config['jsonResponse'] AND is_array($output)) {\n\t\t\t$output = $this->modx->toJSON($output);\n\t\t} elseif (!$this->config['jsonResponse'] AND !is_array($output)) {\n\t\t\t$output = $this->modx->fromJSON($output);\n\t\t}\n\n\t\treturn $output;\n\t}", "public function onResponseLate(FilterResponseEvent $event)\n {\n if (!$this->isActive($event)) {\n return;\n }\n $request = $event->getRequest();\n $response = $event->getResponse();\n if ($request->getRequestFormat() === self::FORMAT_JSON\n && $request->query->has('callback')\n && $response instanceof JsonResponse\n ) {\n switch ($request->query->get('_wrapper')) {\n case self::WRAPPER_POST_MESSAGE:\n $response->setContent(\n $this->twig->render(\n 'MediaMonksRestApiBundle::post_message.html.twig',\n [\n 'request' => $request,\n 'response' => $response,\n 'callback' => $request->query->get('callback'),\n 'origin' => $this->getOrigin()\n ]\n )\n )->headers->set('Content-Type', 'text/html');\n break;\n default:\n $response->setCallback($request->query->get('callback'));\n break;\n }\n }\n }", "private function resetReponse()\n {\n $this->app->singleton(\"response\", function () {\n return new Response();\n });\n }", "private function parseResponse() {\n $headers = Strings::split(substr($this->response, 0, $this->info['header_size']), \"~[\\n\\r]+~\", PREG_SPLIT_NO_EMPTY);\n $this->headers = static::parseHeaders($headers);\n $this->body = substr($this->response, $this->info['header_size']);\n $this->response = NULL;\n }", "public function process($response) {\n return $response;\n }", "public function overwrite_rest_api_response( $response ) {\n\t\tif ( is_wp_error( $response ) ) {\n\t\t\treturn $response;\n\t\t}\n\t\tif ( ! $response instanceof WP_REST_Response ) {\n\t\t\treturn $response;\n\t\t}\n\t\t$data = $response->data;\n\t\tif ( ! isset( $data['code'] ) ) {\n\t\t\t$response->data = array(\n\t\t\t\t'code'\t\t => 'rest_success',\n\t\t\t\t'message'\t => 'Rest Success',\n\t\t\t\t'data'\t\t => $data,\n\t\t\t);\n\t\t}\n\t\tunset( $data );\n\t\treturn $response;\n\t}", "protected function parseResponse()\n {\n $data = simplexml_load_string($this->body);\n \n $this->data = $data;\n }", "public function prepare_response_for_collection($response)\n {\n }", "public function toResponse(): Response\n {\n $response = clone RequestContext::getResponse();\n return $response->setException($this->getException())->auto($this->handleBody(), $this->getStatusCode());\n }", "public function setResponse() {\n }", "protected function flattenResponse(ResourceResponseInterface $response) {\n $final_response = ($response instanceof CacheableResponseInterface) ? new CacheableResponse() : new Response();\n $final_response->setContent($response->getContent());\n $final_response->setStatusCode($response->getStatusCode());\n $final_response->setProtocolVersion($response->getProtocolVersion());\n if ($response->getCharset()) {\n $final_response->setCharset($response->getCharset());\n }\n $final_response->headers = clone $response->headers;\n if ($final_response instanceof CacheableResponseInterface) {\n $final_response->addCacheableDependency($response->getCacheableMetadata());\n }\n return $final_response;\n }", "public function decode($response);", "protected function cleanResponse()\n {\n // If the option to strip bad characters is not set, then we shouldn't\n // do anything here.\n if (!$this->options['strip_bad_chars']) {\n return;\n }\n\n // Strip invalid characters from the XML response body.\n $count = 0;\n $this->__last_response = preg_replace(\n '/(?!&#x0?(9|A|D))(&#x[0-1]?[0-9A-F];)/',\n ' ',\n $this->__last_response,\n -1,\n $count\n );\n\n // If the option to warn on bad characters is set, and some characters\n // were stripped, then trigger a warning.\n if ($this->options['warn_on_bad_chars'] && $count > 0) {\n trigger_error(\n 'Invalid characters were stripped from the XML SOAP response.',\n E_USER_WARNING\n );\n }\n }", "abstract protected function writeToResponse(Response $response) : Response;", "abstract protected function writeToResponse(Response $response) : Response;", "public function prepareResponse($response)\n {\n $request = app(Request::class);\n\n if (!$response instanceof BaseResponse) {\n $response = new Response($response);\n }\n return $response->prepare($request);\n }", "public function setResponse(Response $response) {\n $this->_response = $response;\n $this->_isHandled = true;\n }", "public function onResponseLate(ResponseEvent $event)\n {\n if (!$this->eventRequestMatches($event)) {\n return;\n }\n $this->responseTransformer->transformLate($event->getRequest(), $event->getResponse());\n }", "public function format($response)\r\n {\r\n $charset = $this->encoding === null ? $response->charset : $this->encoding;\r\n if (stripos($this->contentType, 'charset') === false) {\r\n $this->contentType .= '; charset=' . $charset;\r\n }\r\n $response->getHeaders()->set('Content-Type', $this->contentType);\r\n\r\n $content = false;\r\n\r\n // If successful response, trying to auto render view\r\n if ($response->getIsSuccessful()) {\r\n\r\n // Turning off layout for xml request\r\n //\\Yii::$app->requestedAction->controller->layout = false;\r\n\r\n // Rendering data\r\n if ($content = $this->render(\\Yii::$app->requestedAction->id, $response->data)) {\r\n $response->content = $content;\r\n }\r\n\r\n }\r\n\r\n // No content means, no view file, thus, simple xml encoding\r\n if (!$content) {\r\n $dom = new DOMDocument($this->version, $charset);\r\n $root = new DOMElement($this->rootTag);\r\n $dom->appendChild($root);\r\n $this->buildXml($root, $response->data);\r\n $response->content = $dom->saveXML();\r\n }\r\n }", "public function format($response)\n {\n parent::format($response);\n if (!is_string($response->content)) {\n $response->content =\n \"<PRE>\"\n . var_export($response->content, true)\n . \"</PRE>\";\n }\n }", "public function resetResponse()\n\t{\n\t\t$this->_response = NULL;\n\t\t$this->_redirect = NULL;\n\t}", "public function modify_api_response( $results ) {\n\n\t\t// Sanity check.\n\t\tif ( ! is_object( $results ) || ! $this->should_update() ) {\n\t\t\treturn $results;\n\t\t}\n\n\t\t// Make sure the translations property is defined in the object.\n\t\tif ( ! isset( $results->translations ) || ! is_array( $results->translations ) ) {\n\t\t\t$results->translations = [];\n\t\t}\n\n\t\t// Set the translations from our custom API.\n\t\t$results->translations[] = [\n\t\t\t'type' => $this->type,\n\t\t\t'slug' => $this->slug,\n\t\t\t'language' => $this->lang,\n\t\t\t'version' => $this->ver,\n\t\t\t'updated' => $this->get_updated(),\n\t\t\t'package' => $this->get_package(),\n\t\t\t'autoupdate' => true,\n\t\t];\n\t\treturn $results;\n\t}", "protected function prepareResponse($response, Request $request, $format)\n {\n if ($response instanceof IlluminateResponse) {\n $response = Response::makeFromExisting($response);\n } elseif ($response instanceof JsonResponse) {\n $response = Response::makeFromJson($response);\n }\n\n if ($response instanceof Response) {\n // If we try and get a formatter that does not exist we'll let the exception\n // handler deal with it. At worst we'll get a generic JSON response that\n // a consumer can hopefully deal with. Ideally they won't be using\n // an unsupported format.\n try {\n $response->getFormatter($format)->setResponse($response)->setRequest($request);\n } catch (NotAcceptableHttpException $exception) {\n return $this->exception->handle($exception);\n }\n\n $response = $response->morph($format);\n }\n\n if ($response->isSuccessful() && $this->requestIsConditional()) {\n if (! $response->headers->has('ETag')) {\n $response->setEtag(sha1($response->getContent() ?: ''));\n }\n\n $response->isNotModified($request);\n }\n\n return $response;\n }", "public function Response($response) {\n\t\t\n\t}", "static function setResponseFormatPlain(){\n self::$responseFormat = 'plain';\n }", "function makeNewResponseArray($response, $oldResponse){\n\t\t$newResponse = $oldResponse;\n\t\tforeach($response as $responseAttribute => $value){\n\t\t\tif($value != null){\n\t\t\t\t$newResponse[$responseAttribute] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $newResponse;\n\t}", "public function after($response)\n {\n // If request in inner call, partialRender Only\n if ($this->request->inner and !$response) {\n $this->request->inner = false;\n\n $response = $this->template->partialRender();\n }\n\n // Need to render the template\n if (is_null($response)) {\n $response = $this->template->render();\n }\n\n if (! $response instanceof SymfonyResponse) {\n\n $response = Response::make($response, $this->HTTPstatus);\n\n $response->prepare($this->app['request']);\n\n // Inject the CSRF Token to Response\n $response = $this->app->injectCSRFToken($response);\n }\n\n if ($this->Etag) {\n $response->setEtag(md5($response->getContent()));\n }\n\n return $response;\n }", "protected function bindResponse()\r\n {\r\n $responseArray = explode( '&', $this->responseString );\r\n \r\n foreach ( $responseArray as $value ){\r\n $pair = explode( '=', $value );\r\n $this->$pair[0] = $pair[1];\r\n }\r\n }", "private function setResponseObject($aResponse)\n {\n $this->aRepsonse = (array)$aResponse;\n }", "public function after($response)\n\t{\n\t\tif ( ! $response instanceof Response\\Base)\n\t\t{\n\t\t\t$response = $this->app->forge('Response', $response);\n\t\t}\n\n\t\treturn $response;\n\t}", "public function processResponse(array $jsonResponse): IResponse\n {\n return new PresentationResponse($jsonResponse['response']['result']['presentation']);\n }", "protected function _unwrapResponse($response) {\n $startPosition = strlen(self::WRAPWORD);\n $symbolsToExtract = strlen($response) - $startPosition - 1;\n return substr($response, $startPosition, $symbolsToExtract);\n }", "public function setResponse( $response ){\n \n $this->response = $response;\n \n }", "public function unbox()\n {\n APIHelper::deserialize(self::getResponseBody(), $this, false, false);\n }", "public function onResponse(FilterResponseEvent $event)\n {\n if (!$this->isActive($event)) {\n return;\n }\n\n $request = $event->getRequest();\n $response = $event->getResponse();\n $content = $response->getContent();\n\n // convert content to content container\n if (!$content instanceof ResponseContainer) {\n $content = ResponseContainer::createAutoDetect($response);\n }\n\n // override http status code if needed\n $statusCode = $content->getStatusCode();\n if (!empty($statusCode)) {\n $response->setStatusCode($content->getStatusCode());\n }\n\n // set 204 header for empty content\n if ($content->isEmpty() && !$response->isRedirect()) {\n $response->setStatusCode(Response::HTTP_NO_CONTENT);\n $content->setStatusCode(Response::HTTP_NO_CONTENT);\n }\n\n // put statusCode in response and force 200 OK in header?\n if ($request->headers->has('X-Force-Status-Code-200')\n || ($request->getRequestFormat() == self::FORMAT_JSON && $request->query->has('callback'))\n ) {\n $content->setReturnStatusCode(true);\n $response->setStatusCode(Response::HTTP_OK);\n $response->headers->set('X-Status-Code', Response::HTTP_OK);\n }\n\n // serialize content container\n try {\n $context = new SerializationContext();\n $context->setSerializeNull(true);\n $format = $event->getRequest()->getRequestFormat();\n $contentSerialized = $this->serializer->serialize($content->toArray(), $format, $context);\n switch ($format) {\n case self::FORMAT_XML:\n $response->setContent($contentSerialized);\n break;\n default:\n $headers = $response->headers;\n $response = new JsonResponse(null, $response->getStatusCode());\n $response->headers = $headers;\n $response->setContent($contentSerialized);\n break;\n }\n } catch (\\Exception $e) {\n $response = new JsonResponse([\n 'error' => [\n 'code' => 'error.api.middleware',\n 'message' => $e->getMessage()\n ]\n ]);\n }\n\n // force empty output on a no-content response\n if ($content->isEmpty() && $response->isEmpty()) {\n $response->setContent('');\n }\n\n $event->setResponse($response);\n }", "protected function parseResponse()\n {\n // get the status code from response.\n $statusCode = $this->httpResponse->getStatusCode();\n\n // set as error, if http status code is not between 200 and 299 (inclusive).\n $this->networkError = !($statusCode >= 200 && $statusCode <= 299);\n\n // decode the response body.\n $body = $this->decodeBody();\n\n // stop when no body is present.\n if ($body) {\n // parse the response id from the body.\n $this->id = (int) array_get($body, 'id', null);\n\n // set as error when there is a an error key and it's not null.\n $this->isError = array_get($body, 'error', null) !== null;\n\n // parse the response data, from result or error.\n $this->data = collect(array_get($body, $this->isError ? 'error' : 'result', []));\n }\n\n // just return the response body.\n return $this->body;\n }", "public function modifyResponse(string $view, Response $response): Response\n {\n $response->headers->setCookie($this->createCookie($view));\n\n return $response;\n }", "public function prepareResponse($value, Request $request)\n\t{\n\t\tif ( ! $value instanceof Response) $value = new Response($value);\n\n\t\treturn $value->prepare($request);\n\t}", "private function response() {\n if ($this->responseStatus !== 200) {\n $this->request['format'] = self::DEFAULT_RESPONSE_FORMAT;\n }\n $method = $this->request['format'] . 'Response';\n $this->response = array('status' => $this->responseStatus, 'body' => $this->$method());\n return $this;\n }", "private function setResponse($response)\n {\n if (!is_array($response) && !is_object($response)) {\n\n $this->response = json_decode((string) $response, true);\n }\n }", "protected function afterResponse()\n {\n }", "public function setResponse(Response $response)\n\t{\n\t\t$this->_output = $output = new Output;\n\t\t$response->setBodyGenerator(function() use($output)\n\t\t{\n\t\t\t$output->sendBody();\n\t\t});\n\t}", "public function setResponse(Response $response): void;", "public function response() {\n return json_decode($this->response);\n }", "public function parseResponseStringToObject()\n {\n /** @var TransporterInterface $transporter */\n $transporter = TransporterFactory::build();\n\n return $transporter->parseResponseStringToObject($this->response);\n }", "public function updateOutOfResponse($response)\n {\n if (isset($response->_id)) {\n $this->setUserId($response->_id);\n }\n\n if (isset($response->createdAt)) {\n $this->setCreatedAt($response->createdAt);\n }\n\n if (isset($response->emails[0]->address)) {\n $this->setEmail($response->emails[0]->address);\n }\n\n if (isset($response->emails[0]->verified)) {\n $this->setVerified($response->emails[0]->verified);\n }\n\n if (isset($response->type)) {\n $this->setType($response->type);\n }\n\n if (isset($response->status)) {\n $this->setStatusValue($response->status);\n }\n\n if (isset($response->statusText)) {\n $this->setStatusText($response->statusText);\n }\n\n if (isset($response->message)) {\n $this->setStatusText($response->message);\n }\n\n if (isset($response->active)) {\n $this->setActive($response->active);\n }\n\n if (isset($response->roles)) {\n $this->setRoles($response->roles);\n }\n\n if (isset($response->name)) {\n $this->setName($response->name);\n }\n\n if (isset($response->lastLogin)) {\n $this->setLastLogin($response->lastLogin);\n }\n\n if (isset($response->statusConnection)) {\n $this->setStatusConnection($response->statusConnection);\n }\n\n if (isset($response->connectionStatus)) {\n $this->setStatusConnection($response->connectionStatus);\n }\n\n if (isset($response->utcOffset)) {\n $this->setUtcOffset($response->utcOffset);\n }\n\n if (isset($response->username)) {\n $this->setUsername($response->username);\n }\n\n if (isset($response->avatarUrl)) {\n $this->setAvatarUrl($response->avatarUrl);\n }\n\n if (isset($response->settings) && isset($response->settings->preferences)) {\n $preferences = new Preferences();\n $this->setPreferencesData($preferences->updateOutOfResponse($response->settings->preferences));\n }\n\n return $this;\n }", "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 }", "public static function processResponse( $oResponse, $sClass = __CLASS__ )\r\n\t{\r\n\t\t//\tOverride to do stuff here\r\n\t\treturn new $sClass();\r\n\t}", "function response() {\n return new Response;\n }", "abstract public function responseProvider();", "public function processRequest(ActionRequest $request, ActionResponse $response)\n {\n $this->initializeController($request, $response);\n\n $actionMethodName = $this->resolveActionMethodName();\n $actionResponse = call_user_func_array([$this, $actionMethodName], [$request, $response]);\n\n if ($actionResponse instanceof ResponseInterface) {\n $response->setComponentParameter(ReplaceHttpResponseComponent::class, ReplaceHttpResponseComponent::PARAMETER_RESPONSE, $actionResponse);\n } elseif (is_null($actionResponse)) {\n //if nothing is returned the passed response has beeb populated\n } else {\n throw new \\UnexpectedValueException('The action response has return a PSR7 response or a string');\n }\n }", "public function tagResponse(ResponseInterface $response, $replace = false)\n {\n if (!$this->hasTags()) {\n return $response;\n }\n\n $tagsHeaderValue = $this->getTagsHeaderValue();\n $this->clear();\n\n if ($replace) {\n return $response->withHeader($this->getTagsHeaderName(), $tagsHeaderValue);\n }\n\n return $response->withAddedHeader($this->getTagsHeaderName(), $tagsHeaderValue);\n }", "function http_parse_response()\n\t{\n\t\tlist($headers, $body) = explode(\"\\r\\n\\r\\n\", $this->http_response, 2);\n\t\t$this->http_parse_headers($headers);\n\n\t\tif(isset($this->http_response_headers['Transfer-Encoding']) && 'chunked' == $this->http_response_headers['Transfer-Encoding']):\n \t\t$this->http_response_body = $this->http_chunked_decode($body);\n\t\telse:\n\t\t\t$this->http_response_body = $body;\n\t\tendif;\n\n\t\t$this->http_set_content_type($this->http_default_content_type);\n\t}", "private function webhookResponseToFrontendResponse($res) {\n $res = (object) $res;\n if ($res->success == true) {\n $message = self::$order_successful_msg;\n } else {\n $res_error = json_decode($res->message);\n if ($res_error !== null && array_key_exists(\"errors\", $res_error) && count($res_error->errors) > 0 && array_key_exists(\"message\", $res_error->errors[0]) && array_key_exists(\"value\", $res_error->errors[0])) {\n $message = $res_error->errors[0]->message . \": \" . $res_error->errors[0]->value;\n } else {\n $message = self::$order_error_msg;\n }\n }\n return $this->generateResponse($res->success, $message);\n }", "public function onResponse(FilterResponseEvent $event)\n {\n $response = $event->getResponse();\n $request = $event->getRequest();\n\n if (!$event->isMasterRequest()) {\n return;\n }\n\n if ($request->isXmlHttpRequest()) {\n return;\n }\n\n if ($response->isRedirection()\n || ($response->headers->has('Content-Type') && false === strpos($response->headers->get('Content-Type'), 'html'))\n || 'html' !== $request->getRequestFormat()\n ) {\n return;\n }\n\n $http = $request->isSecure() ? 'https' : 'http';\n\n if (empty($this->extensions))\n return;\n\n if (count($this->extensions) == 0)\n return;\n\n $extensions = implode('|', $this->extensions);\n\n $content = $response->getContent();\n $pattern = '/=\"[^\"]*\\/(css|js|var|bundles)\\/(.*)\\.(' . $extensions . ')([^\"]*)\"/i';\n $replace = '=\"' . $http . '://' . $this->domain . '/${1}/${2}.${3}${4}\"';\n\n $content = preg_replace($pattern, $replace, $content);\n\n $response->setContent($content);\n }", "public function response($response)\n {\n\n return new Response($response);\n\n }", "public function _response($response) {\n\t\treturn $this->_instance($this->_classes['response'], array(\n\t\t\t'body' => $response\n\t\t));\n\t}", "protected function mapRedirectResponse($request, $response) {\n $methodName = 'mapRedirectFor' . ucfirst($this->desiredResponseFormat($request));\n\n if (method_exists($this, $methodName)) {\n $response = $this->{$methodName}($response);\n }\n\n return $response;\n }", "public function processRequest(F3_FLOW3_MVC_Request $request, F3_FLOW3_MVC_Response $response) {\n\t\t// return $response;\n\t\t$this->content = $request->getArgument('content');\n\t\t$this->settings = $request->getArgument('settings');\n\t\t\n\t\tif ($this->isContentToBeParsed()) {\n\t\t\t$response->setContent($this->parser->parse($this->content));\n\t\t\t// TODO Implement Inverse of Control for Parser/Content\n\t\t\t// $processorChain = $this->componentManager->getComponent('F3_Contentparser_ProcessorChain');\n\t\t\t// $processorChain->addProcessor($this->parser);\n\t\t\t// $processorChain->addProcessor($this->postProcessor);\n\t\t\t// $this->content->setProcessorChain($processorChain);\n\t\t\t// return $this->content->processChain();\n\t\t} else {\n\t\t\t$response->setContent($this->content);\n\t\t}\n\t\treturn $response;\n\t}", "public function setResponse(namespace\\Response $response)\n {\n $this->response = $response;\n }", "public function getPhpResponse() {\n return \\Lib\\Format::forge($this->_response)->to_php();\n }", "function erase_response() {\n $this->performed = FALSE;\n $this->response = new Trails_Response();\n }", "public function onKernelResponse(ResponseEvent $event): void\n {\n $response = $event->getResponse();\n if ($response instanceof TurboStreamResponse) {\n return;\n }\n\n $request = $event->getRequest();\n if (TurboStreamResponse::STREAM_FORMAT === $request->getRequestFormat(null)) {\n $request->setRequestFormat(null);\n }\n }", "function updateResponse($name, $value) {\n\t\t\t$this->responseVar[$name] = $value;\n\t\t}", "public static function prepare($response)\n {\n if (! $response instanceof Response) {\n $response = new static($response);\n }\n\n return $response;\n }", "public function onResponse(ResponseEvent $event) {\n $response = $event->getResponse();\n if (!$response instanceof ResourceResponseInterface) {\n return;\n }\n\n $request = $event->getRequest();\n $format = $this->getResponseFormat($this->routeMatch, $request);\n $this->renderResponseBody($request, $response, $this->serializer, $format);\n $event->setResponse($this->flattenResponse($response));\n }", "public function onResponse($rep) \n {\n if($rep->get('correlation_id') == $this->correlation_id) {\n $this->response = $rep->body;\n }\n }", "public function clearResponse()\n {\n $this->responseContent = '';\n $this->responseHeader = array();\n $this->responseCode = '200 Ok';\n }", "public function getResponse($response) {\r\n\r\n\r\n }", "protected function _getResponse() {\n\t\treturn new Response;\n\t}", "public function setResponse(Response $response) {\n $this->response = $response;\n }", "abstract protected function updateResponse(Model $data);", "public static function processOutgoingResponse(Response $response)\n {\n header('HTTP/1.1 '.$response->getStatusCode().' '.$response->getStatusMessage());\n foreach ($response->_headers as $name => $value) {\n header($name.': '.$value, true);\n }\n echo $response->_body;\n }", "public function onResponse(FilterResponseEvent $event) {\n if (!$event->isMasterRequest()) {\n return;\n }\n $response = $event->getResponse();\n $response->headers->set('X-Commerce-Core', '2');\n }", "public function set_response($response_data)\n\t{\n\t\t$this->response = (is_array($response_data))\n\t\t\t? $this->array2json($response_data)\n\t\t\t: $response_data;\n\t}", "protected function transferToResponse($response, ServerRequestInterface $request): ResponseInterface\n {\n if (is_string($response)) {\n return $this->response()->withAddedHeader('content-type', 'text/plain')->withBody(new SwooleStream($response));\n }\n\n if (is_array($response) || $response instanceof Arrayable) {\n if ($response instanceof Arrayable) {\n $response = $response->toArray();\n }\n return $this->response()\n ->withAddedHeader('content-type', 'application/json')\n ->withBody(new SwooleStream(json_encode($response, JSON_UNESCAPED_UNICODE)));\n }\n\n if ($response instanceof Jsonable) {\n return $this->response()\n ->withAddedHeader('content-type', 'application/json')\n ->withBody(new SwooleStream((string) $response));\n }\n\n if ($response instanceof Responsable) {\n return $response->toResponse($request);\n }\n\n return $this->response()->withAddedHeader('content-type', 'text/plain')->withBody(new SwooleStream((string) $response));\n }", "public function setResponse(Response $response)\n {\n $this->_response = $response;\n }", "public function popolate_full_response($response){\n\t\t\n\t\tif(!is_array($response)){\n\t\t\t$response = json_decode(json_encode($response), true);\n\t\t}\n\t\t\n\t\tif(!is_array($response)){\n\t\t\tthrow new \\Exception(\"\\$response type must be iterable\");\n\t\t}\n\t\t\n\t\tforeach($response as $key => $value){\n\t\t\t\n\t\t\tif(!property_exists(self::class, $key)){\n\t\t\t\t$this->{$key} = $value;\n\t\t\t}\n\t\t}\n\t}", "abstract public function processResponse($response);", "protected function asObject()\n\t{\n\t\treturn \\json_decode($this->response);\n\t}", "public function prepare_item_for_response($doc, $request) {\n $data = [\n 'id' => $doc->ID,\n 'date' => mysql_to_rfc3339($doc->post_date),\n 'date_gmt' => mysql_to_rfc3339($doc->post_date_gmt),\n 'modified' => mysql_to_rfc3339($doc->post_modified),\n 'modified_gmt' => mysql_to_rfc3339($doc->post_modified_gmt),\n 'slug' => $doc->post_name,\n 'permalink' => get_permalink($doc),\n 'title' => [\n 'rendered' => get_the_title($doc->ID)\n ],\n 'content' => [\n 'rendered' => post_password_required($doc) ? '' : apply_filters('the_content', $doc->post_content),\n ],\n 'parent' => $doc->post_parent,\n 'order' => $doc->menu_order,\n ];\n if ($request['context'] == 'edit') {\n $data['title']['raw'] = $doc->post_title;\n $data['content']['raw'] = $doc->post_content;\n }\n $response = rest_ensure_response($data);\n $links = $this->prepare_links($doc);\n $response->add_links($links);\n return $response;\n }", "function _parseResponse($res) {\n\n\t\t// set defaults\n\t\t$response = $this->response;\n\t\t$response['raw']['response'] = $res;\n\n\t\t// parse header\n\t\tif (preg_match(\"/^(.+\\r\\n)(.*)(?<=\\r\\n)\\r\\n/Us\", $res, $match)) {\n\t\t\t\n\t\t\tlist($null, $response['raw']['status-line'], $response['raw']['header']) = $match;\n\t\t\t$response['raw']['body'] = substr($res, strlen($match[0]));\n\n\t\t\tif (preg_match(\"/(.+) ([0-9]{3}) (.+)\\r\\n/DU\", $response['raw']['status-line'], $match)) {\n\t\t\t\t$response['status']['http-version'] = $match[1];\n\t\t\t\t$response['status']['code'] = (int) $match[2];\n\t\t\t\t$response['status']['reason-phrase'] = $match[3];\n\t\t\t}\n\n\t\t\t$response['header'] = $this->_parseHeader($response['raw']['header']);\n\t\t\t$response['body'] = $response['raw']['body'];\n\n\t\t\tif (!empty($response['header'])) {\n\t\t\t\t$response['cookies'] = $this->parseCookies($response['header']);\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t$response['body'] = $res;\n\t\t\t$response['raw']['body'] = $res;\n\t\t}\n\n\t\tif (isset($response['header']['Transfer-Encoding']) && $response['header']['Transfer-Encoding'] == 'chunked') {\n\t\t\t$response['body'] = $this->_decodeChunkedBody($response['body']);\n\t\t}\n\n\t\tforeach ($response['raw'] as $field => $val) {\n\t\t\tif ($val === '') {\n\t\t\t\t$response['raw'][$field] = null;\n\t\t\t}\n\t\t}\n\n\t\treturn $response;\n\t}" ]
[ "0.6662942", "0.66546786", "0.64773995", "0.6319476", "0.62475926", "0.62037396", "0.62012994", "0.62001705", "0.6192364", "0.60928905", "0.608477", "0.6063771", "0.5978834", "0.5953515", "0.58966315", "0.5875891", "0.58654475", "0.58611166", "0.58577436", "0.5824209", "0.58166444", "0.5794374", "0.5783496", "0.575997", "0.5719337", "0.57087535", "0.56863916", "0.56718516", "0.5666929", "0.56443644", "0.56364834", "0.5619685", "0.5619685", "0.5608458", "0.5606244", "0.5562911", "0.5546893", "0.55422753", "0.55356103", "0.5533776", "0.5515165", "0.551191", "0.55066663", "0.5491535", "0.54859155", "0.547127", "0.54710215", "0.5455568", "0.545038", "0.5444291", "0.54281014", "0.54201216", "0.54003465", "0.54002225", "0.5400219", "0.5399631", "0.5386771", "0.53810656", "0.5376144", "0.53621477", "0.5360253", "0.53574044", "0.53518546", "0.5343575", "0.5341584", "0.530723", "0.5302641", "0.529534", "0.52926236", "0.52870035", "0.5286617", "0.5279227", "0.5271352", "0.5268983", "0.5251711", "0.52510726", "0.5244677", "0.52383757", "0.5233229", "0.52256393", "0.5225569", "0.5223994", "0.5222882", "0.5220058", "0.5218154", "0.52178156", "0.5213342", "0.521066", "0.5208683", "0.5205732", "0.51913", "0.51897234", "0.51869416", "0.5181652", "0.51814675", "0.5181085", "0.5180827", "0.5180757", "0.5173777", "0.5169114" ]
0.5396677
56
Indicates whether the response contains html content
protected function isHtmlResponse(Response $response) { $headers = $response->headers; // Check the content type of the response, when there is no content type // set just assume that it's html. return strtolower($headers->get('Content-Type', 'text/html')) === 'text/html'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function isHtml(Response $response): bool\n {\n return 0 === strpos($response->headers->get('Content-Type'), 'text/html');\n }", "public function isHtml()\n\t{\n\t\treturn stripos($this->getContentType(), 'html') !== false;\n\t}", "public function isHtml(): bool;", "public function IsHtmlRequested(){\r\n\t\treturn $this->ForceOutputHtml||(strlen(file_get_contents('php://input'))<1&&!$this->ForceNotOutputHtml);\r\n\t}", "public function hasHtml($content) {\n\t\t$result = FALSE;\n\t\t//we compare the length of the string with html tags and without html tags\n\t\tif (strlen($content) != strlen(strip_tags($content))) {\n\t\t\t$result = TRUE;\n\t\t}\n\t\treturn $result;\n\t}", "private function hasHTMLTags()\n {\n return !(strcmp($this->content, strip_tags($this->content)) == 0);\n }", "public function isHtml() {}", "static public function isHTML() {\n\t\treturn (self::$page_type === 0);\n\t}", "public function isHTML(): bool\n\t{\n\t\treturn $this->isOfType( static::TYPE_HTML );\n\t}", "public function hasContent()\n {\n return false;\n }", "public function hasContent(){ return !empty($this->content); }", "public function headerIsHtml(): bool\n {\n return $this->headerIsHtml;\n }", "function isHTMLContent($c)\t{\n\t\t$c = trim($c);\n\t\t$first = strtolower(substr($c,0,6));\n\t\t$last = strtolower(substr($c,-7));\n\t\tif ($first.$last=='<html></html>')\treturn 1;\n\t}", "function has_html() {\n\t\treturn $this->settings['popup'];\n\t}", "public static function hasContent(): bool\n {\n return true;\n }", "public function hasContent() {}", "function isValid() {\n return $this->isValidHTML;\n }", "public function isXhtml() {}", "public function html() {\r\n\t\tif (!@$_REQUEST['noCache'] && ($this->cacheable === true\r\n\t\t|| $this->cacheable === 'true')) {\r\n\t\t\t$this->cache();\r\n\t\t} else {\r\n\t\t\techo $this->getContent();\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function hasContent(){\n return $this->_has(4);\n }", "public function hasContent(): bool\n {\n return (empty($this->content) === false);\n }", "private function shouldProcess($response): bool\n {\n if ($response->isRedirection()) {\n return false;\n }\n\n if (!($response instanceof Response)) {\n return false;\n }\n\n return $this->isHtml($response);\n }", "abstract public function hasContent();", "public function hasContent()\n {\n return isset($this->content);\n }", "public function hasContent(){\n return $this->_has(6);\n }", "public function canHaveBody() {\n return ( $this->status < 100 || $this->status >= 200 ) &&\n (!in_array($this->status, array(201, 204, 304)));\n }", "public function contentNotGiven()\n {\n return empty($this->content);\n }", "public function hasContent()\n {\n return ($this->contentStream !== null);\n }", "public function has_PLAIN_not_HTML()\n\t{\n\t\treturn $this->PLAIN != '' && $this->HTML == '';\n\t}", "function isHTML($a_text)\n\t{\n\t\tif (preg_match(\"/<[^>]*?>/\", $a_text))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE; \n\t\t}\n\t}", "public function parseResponse() {\r\r\n\r\r\n return true;\r\r\n }", "protected function isContentToBeParsed() {\n\t\t$result = FALSE;\n\t\t$currentPageUid = $GLOBALS['TSFE']->id;\n\t\t// get rootline of the current page\n\t\t$rootline = $GLOBALS['TSFE']->sys_page->getRootline($currentPageUid);\n\t\t// build an array of uids of pages the rootline\n\t\tfor ($i=count($rootline)-1; $i>=0; $i--) {\n\t\t\t$pageUidsInRootline[] = $rootline[\"$i\"]['uid'];\n\t\t}\n\t\t// check if the root page is in the rootline of the current page\n\t\tforeach (t3lib_div::trimExplode(',',$this->settings['includeRootPages'],1) as $includeRootPageUid) {\n\t\t\tif (t3lib_div::inArray((array)$pageUidsInRootline,$includeRootPageUid))\n\t\t\t\t$result = TRUE;\n\t\t}\n\t\tforeach (t3lib_div::trimExplode(',',$this->settings['excludeRootPages'],1) as $excludeRootPageUid) {\n\t\t\tif (t3lib_div::inArray((array)$pageUidsInRootline,$excludeRootPageUid))\n\t\t\t\t$result = FALSE;\n\t\t}\n\t\tif (t3lib_div::inList($this->settings['includePages'],$currentPageUid)) {\n\t\t\t$result = TRUE;\n\t\t}\n\t\tif (t3lib_div::inList($this->settings['excludePages'],$currentPageUid)) {\n\t\t\t$result = FALSE;\n\t\t}\n\t\tif ( $GLOBALS['TSFE']->page['f3_contentparser_dont_parse'] == 1) {\n\t\t\t$result = FALSE;\n\t\t}\n\t\t// if ( $this->cObj->getFieldVal('f3_contentparser_dont_parse') == 1) {\n\t\t// \t$result = FALSE;\n\t\t// }\n\n\t\treturn $result;\n\t}", "public function noContent()\n {\n return is_null($this->content) || empty($this->content);\n }", "protected function isContentCorrect() {}", "private function hasContent( $node ) {\n return $node->count() > 0 ? true : false;\n }", "public static function is_html(string $str): bool\n {\n if ($str === '') {\n return false;\n }\n\n // init\n $matches = [];\n\n $str = self::emoji_encode($str); // hack for emoji support :/\n\n \\preg_match(\"/<\\\\/?\\\\w+(?:(?:\\\\s+\\\\w+(?:\\\\s*=\\\\s*(?:\\\".*?\\\"|'.*?'|[^'\\\">\\\\s]+))?)*\\\\s*|\\\\s*)\\\\/?>/u\", $str, $matches);\n\n return $matches !== [];\n }", "public function isValidResponse(){\n\t\treturn $this->isLoaded(); \n\t}", "public static function is_html(string $str)\n {\n return strlen(strip_tags($str)) < strlen($str);\n }", "public static function isHtml($string)\n\t{\n \t\treturn preg_match(\"/<[^<]+>/\",$string,$m) != 0;\n\t}", "function fcl_utilities_is_html($string) {\r\n return preg_match('/<\\s?[^\\>]*\\/?\\s?>/i', $string);\r\n}", "static function is_html_document($path)\r\n {\r\n return (preg_match('/\\.x?html?$/', $path) === 1);\r\n }", "public function isHtml($string)\n {\n return preg_match('/<[^<]+>/', $string, $m) != 0;\n }", "protected function containsHtml($string)\n {\n return preg_match(\"/<[^<]+>/\", $string, $m) != 0;\n }", "public function hasResponse()\n {\n return null !== $this->response;\n }", "private function hasContent($node)\n {\n return $node->count() > 0 ? true : false;\n }", "public function hasContent(): bool\n {\n return !empty($this->getAssetId());\n }", "public function isResponse(): bool {\n return $this->options['response'] ?? false;\n }", "protected function htmlOrJson() {\n\t\tif ($this->isDataPost) {\n\t\t\t$response = array(\n\t\t\t\t'html' => $this->response);\n\t\t\t$this->jsonResult($response);\n\t\t} else {\n\t\t\techo $this->response;\n\t\t}\n\t}", "public function isHTML($isHtml = true)\n {\n }", "public function hasContent()\n {\n $c = $this->_getParentContentData();\n if (!$c) return false;\n return $c->hasContent();\n }", "public function hasReturnBody()\n {\n return isset($this->return_body);\n }", "public function isPlain()\n\t{\n\t\treturn Str::contains($this->getHeaderLine('Content-Type'), '/plain');\n\t}", "function hasBody() {\n\t\t$body = strip_tags($this->body, \"<img><a>\");\n\t\t$body = trim($body);\n\t\tif (empty($body)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function IsHTML($ishtml = true) {\n\t if ($ishtml) {\n\t $this->ContentType = 'text/html';\n\t } else {\n\t $this->ContentType = 'text/plain';\n\t }\n\t}", "public function check()\n {\n if ($this->getResponse()->status == 'error') {\n return true;\n }\n\n return false;\n }", "public function hasResponse(): bool\n {\n return null !== $this->response;\n }", "public function containsHtml(string $text): bool\n {\n return $text !== \\htmlspecialchars_decode($text);\n }", "function is_html(string $string): bool\n {\n return strcasecmp($string, strip_tags($string)) !== 0;\n }", "public function hasResponse(): bool\n {\n return $this->response !== null;\n }", "public function isValid()\n\t{\n\t\treturn $this->response\n\t\t\t&& $this->response->isValid();\n\t}", "public function hasInfluencedContent();", "public function getContent()\r\n\t{\r\n\t\t$return = $this->response !== false ? preg_replace('#.+(\\r\\n){2}(.+)$#s', '$2', $this->response) : false;\r\n\t\treturn $return;\r\n\t}", "protected function responseIsJson() : bool\n {\n $type = json_encode($this->responseHeaders->get('Content-Type'));\n\n return Str::contains($type, 'json');\n }", "public function hasResponse(): bool\n {\n return ! ($this->response === null);\n }", "public function isHTML($isHtml = true)\n {\n if ($isHtml) {\n $this->ContentType = 'text/html';\n } else {\n $this->ContentType = 'text/plain';\n }\n }", "public function html($value=''): bool\n\t{\n\t\treturn (strip_tags($value) != $value)? true:false;\n\t}", "protected function _setContent() {\n\t\tif (in_array($this->_status, array(304, 204))) {\n\t\t\t$this->body('');\n\t\t}\n\t}", "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 }", "public function hasNoContent()\n {\n return $this->properties['content'] === null;\n }", "function ok()\r\n {\r\n \tif (!$this->_socket || !is_resource($this->_socket)) {\r\n \t\treturn FALSE;\r\n \t}\r\n \t\r\n \t$response = $this->getresp();\r\n\t\tforeach ($response as $v)\r\n\t\t{\r\n\t\t\tif (!empty($v) && !preg_match(\"/^[123]/\", $v)) return false;\r\n\t\t}\r\n\t\treturn true;\r\n\t\t/*\r\n\t\tif (ereg(\"^[123]\", $response)) {\r\n \t\treturn TRUE;\r\n \t} else {\r\n \t\treturn FALSE;\r\n \t}*/\r\n }", "public function isEmpty()\n {\n return $this->getContent()->isEmpty();\n }", "public function isEmpty()\n {\n return $this->getContent()->isEmpty();\n }", "public function hasContentElement(): bool\n {\n return $this->isChildElementSet(1);\n }", "protected function _needsRenderer()\n {\n $types = $this->getRequest()->getAcceptTypes();\n $htmlPos = array_search(Clockworkgeek_Extrarestful_Model_Api2_Block_Renderer::MIME_TYPE, $types);\n if ($htmlPos !== false) {\n /** @var $helper Mage_Api2_Helper_Data */\n $helper = Mage::helper('api2');\n $adapters = $helper->getResponseRenderAdapters();\n foreach ($adapters as $item) {\n $typePos = array_search($item->type, $types);\n if ($typePos < $htmlPos) {\n return false;\n }\n }\n return true;\n }\n return false;\n }", "private static final function getContainerHTMLStatus () {\r\n // Do return ...\r\n return self::$objContainerHTML;\r\n }", "public function isOK()\n {\n return $this->getHTTPCode() == 200;\n }", "public static function hasOutput()\n {\n $session = self::getSession();\n return isset($session->content);\n }", "public function isButtonValidHtmlSourceGivenExpectTrue() {}", "private static function _fetch_url_content($url) {\n curl_setopt_array(self::$curl, array(\n CURLOPT_URL => $url,\n CURLOPT_RETURNTRANSFER => 1,\n ));\n $result = curl_exec(self::$curl);\n if (curl_errno(self::$curl)) {\n return FALSE;\n }\n $curl_info = curl_getinfo(self::$curl);\n if (strpos($curl_info['content_type'], 'text/html') === FALSE ) {\n return FALSE;\n }\n return $result;\n }", "protected function response()\r\n {\r\n return true;\r\n }", "public function isOk()\n {\n if ($this->statusCode >= 200 && $this->statusCode < 400) {\n return true;\n }\n\n return false;\n }", "public function hasHtmlOutput()\n {\n if ($this->currentUser->getUserId() == \\Gems_User_UserLoader::SYSTEM_USER_ID) {\n $this->addMessage($this->getNotAllowedMessage());\n return false;\n }\n\n return parent::hasHtmlOutput();\n }", "public static function hasData()\n {\n if (Request::METHOD_GET === static::getMethod()) {\n return !empty($_GET);\n }\n\n return 0 < intval(static::getHeader('Content-Length'));\n }", "public function isRespond()\n {\n return null !== $this->accepted;\n }", "public function exists() {\r\n return strlen($this->contents) > 0;\r\n }", "public function isSuccessful()\n {\n return $this->response->getStatusCode() >= 200 && $this->response->getStatusCode() < 300;\n }", "public function isValid()\n {\n $valid = TRUE;\n\n if ($this->body && !$this->hasHeader('Content-Length')) {\n $valid = 400;\n }\n\n return $valid;\n }", "public function isHtmlBlock()\n {\n return (! $this->isPhpBlock());\n }", "private function checkDataInURL() {\n $html = @file_get_contents($this->url);\n if ($html === FALSE) throw new Exception('Unable to get html from URL.');\n return strpos($html, $this->data) !== FALSE;\n }", "function wp_is_local_html_output($html)\n {\n }", "public function isSent(): bool {\n return $this->response->isSent();\n }", "public function isOk() : bool\n {\n return $this->m_responseCode === 200;\n }", "function validateResponse($page) {\n\treturn array_key_exists('headers', $page) && array_key_exists('headersRaw', $page) && array_key_exists('body', $page) && array_key_exists('error', $page)\n\t\t&& is_array($page['headers']) && is_array($page['headersRaw']) && is_string($page['body']);\n}", "public static function is_embedded_html( $p ) {\n\t\treturn is_array( $p ) && ! wp_is_numeric_array( $p ) && isset( $p['value'] ) && isset( $p['html'] );\n\t}", "public function containsJson(): bool\n {\n return Str::contains($this->getContentType(), 'application/json');\n }", "public function hasError()\n {\n return $this->info['http_code'] != '200';\n }", "public function htmlIsValid()\n {\n if (!$this->scan_attributes) {\n return false;\n }\n\n return $this->versionIsValid($this->scan_attributes->html_version);\n }", "public function get_true_body()\n {\n return parent::__get('body');\n }", "public function hasSuccessHTTPStatus() { return ($this->status == 200); }", "public function getHtmlResponse() {\n return \\Lib\\Format::forge($this->_response)->to_html();\n }" ]
[ "0.79415995", "0.74773306", "0.7284421", "0.72704756", "0.7109057", "0.7105647", "0.70924926", "0.70425594", "0.70178795", "0.67502123", "0.66897285", "0.66847825", "0.66829515", "0.66519916", "0.66516846", "0.66315794", "0.65965873", "0.6574762", "0.6492977", "0.6478759", "0.64757645", "0.6467711", "0.64263034", "0.635599", "0.6353007", "0.6339074", "0.63377506", "0.63343954", "0.6309943", "0.6298714", "0.62780976", "0.62428844", "0.6169544", "0.6152476", "0.6097733", "0.6092231", "0.6081162", "0.60497093", "0.6042919", "0.6041954", "0.60345787", "0.60236156", "0.5998032", "0.5993601", "0.597701", "0.59711236", "0.5964054", "0.5921166", "0.5899944", "0.5898065", "0.5893178", "0.5876634", "0.5862989", "0.58455527", "0.58248365", "0.5822673", "0.5803143", "0.5801227", "0.57663697", "0.57582307", "0.5753837", "0.57509214", "0.5736863", "0.5712339", "0.57118356", "0.5686974", "0.56807715", "0.56745124", "0.56741416", "0.56734675", "0.56629163", "0.56629163", "0.5653702", "0.56398636", "0.5635452", "0.56352174", "0.56236064", "0.56167746", "0.56077087", "0.55522037", "0.5539357", "0.55374855", "0.55364037", "0.55238396", "0.5515912", "0.551192", "0.55055827", "0.54964334", "0.5495529", "0.54944485", "0.54857767", "0.5485269", "0.5482729", "0.54807764", "0.5477843", "0.5476726", "0.545904", "0.5452629", "0.54521585", "0.5442585" ]
0.74559325
2
every thing in this calss is copied from socialite repo// Redirect the user to the GitHub authentication page.
public function redirectToProvider($provider) { return Socialite::driver($provider)->redirect(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function githubRedirect(){\n $user = Socialite::driver('github')->user();\n\n // if this user does not exist, add them \n // If they do, get the model,\n // either way authenticate the user into the application and redirect afterwards\n\n Auth::login($user);\n }", "public function githubRedirect(){\n //return Socialite::driver('github')->redirect();\n // save user in the database for login\n $github_user = Socialite::driver('github')->redirect();\n\n\n }", "public function redirectToGithub()\n {\n return Socialite::driver('github')->redirect();\n }", "public function redirectToGithub()\n {\n return Socialite::driver('github')->redirect();\n }", "public function redirectToGithub()\n {\n return Socialite::driver('github')->redirect();\n }", "public function github ()\n {\n return Socialite::driver('github')->redirect();\n\n }", "public function github(){\n return Socialite::driver('github')->redirect();\n\n }", "public function facebookRedirect(){\n $github_user = Socialite::driver('facebook')->redirect();\n }", "public function githubRedirect ()\n {\n $user = Socialite::driver('github')->stateless()->user();\n\n // register if not existing in DB\n\n $user = User::firstOrNew([\n 'email' => $user->email\n ], [\n 'name' => ($user->name = null ? $user->name : $user->nickname ),\n 'password' => Hash::make(Str::random(24)),\n 'role' => 0\n ]);\n\n Auth::login($user, true);\n\n\n if (\\Cart::getTotal() == 0.0) {\n return redirect('/');\n }\n\n return redirect('/cart');\n }", "public function gitHub()\n {\n return Socialite::driver('github')->redirect();\n }", "public function redirectToProvider() {\n\t\treturn \\Socialize::with ( 'github' )->redirect ();\n\t}", "public function redirectToProvider()\n {\n return Socialite::driver('github')->scopes('public_repo')->redirect(); //access to public repo's\n }", "public function googleRedirect(){\n $github_user = Socialite::driver('google')->redirect();\n }", "public function gitHubRedirect()\n {\n $user = Socialite::driver('github')->user();\n $user = User::firstOrCreate([\n 'email'=> $user->email,\n ],\n [\n 'name' => $user->nickname,\n 'email'=> $user->email,\n 'password' => Hash::make(Str::random(24))\n ]\n );\n Auth::login($user,true);\n return redirect(route('shop'));\n }", "public function redirectToProvider()\n {\n return Socialite::driver('github')->redirect();\n }", "public function redirectToProvider()\n {\n return Socialite::driver('github')->redirect();\n }", "public function redirectToProvider()\n {\n \t\\Session::put('domain', 'api');\n\n return Socialite::driver('github')->redirect('/');\n }", "public function redirectToProvider(Request $request)\n {\n Log::debug('Redirecting to github');\n Log::debug('Post-GitHub redirect URL set to: ' . $request->input('redirect'));\n return Socialite::driver('github')\n ->scopes(['repo', 'write:repo_hook', 'read:user', 'user:email'])\n ->with(['redirect_uri' => env('GITHUB_CALLBACK_URL') . '?redirect=' . $request->input('redirect')])\n ->redirect();\n }", "public function handleGithubCallback()\n {\n try {\n $socialUser = Socialite::driver('github')->user();\n $user = User::where('github_id', $socialUser->id)->first();\n\n if($user){\n Auth::login($user);\n return redirect()->intended('dashboard');\n }else{\n //проверим, нет ли уже пользователя с таким email\n $isRegistered = User::where('email', $socialUser->email)->first();\n if($isRegistered) {\n return redirect('/login')->with('error', 'С таким email пользователь уже зарегистрирован');\n }\n\n $newUser = User::create([\n 'name' => $socialUser->nickname ?? $socialUser->name ?? $socialUser->email,\n 'email' => $socialUser->email,\n 'github_id'=> $socialUser->id,\n 'password' => Hash::make(random_bytes(12))\n ]);\n\n Auth::login($newUser);\n\n return redirect()->intended('dashboard');\n }\n\n } catch (Exception $e) {\n Log::error('handleGithubCallbackError ' . $e->getMessage());\n\n return redirect('/login')->with('status', $e->getMessage());\n }\n }", "public function __invoke(): RedirectResponse\n {\n return Socialite::driver('github')->redirect();\n }", "public function redirectToAuth()\n {\n return Socialite::with('reddit')->scopes(['identity'])->redirect();\n }", "public function githubCallback(){\n //$user = Socialite::driver('github')->user();\n //print_r($user);\n $github_user = Socialite::driver('github')->user();\n $user = $this->GithubuserFindOrCreate($github_user);\n //print_r($user);\n Auth::login($user , true);\n return redirect()->route('home')->with('user',$user);\n\n }", "public function logInWithGithub()\n\t{\n\t\t// Get data from input\n\t\t$code = Input::get('code');\n\n\t\t// Get github service\n\t\t$this->github = OAuth::consumer('Github', 'http://gitstars.dev/github');\n\n\t\t// If code is provided get user data and sign in\n\t\tif ( ! empty($code))\n\t\t{\n\t\t\t// Get access token\n\t\t\t$token = $this->github->requestAccessToken($code)->getAccessToken();\n\n\t\t\t// Redirect to update function, with access token\n\t\t\tif ($redirect = Session::get('redirect'))\n\t\t\t\treturn Redirect::to($redirect)->with('token', $token);\n\t\t\telse\n\t\t\t\treturn Redirect::to('github/update')->with('token', $token);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Get guthub authorisation\n\t\t\t$url = $this->github->getAuthorizationUri();\n\n\t\t\t// Return to github login url\n\t\t\treturn Response::make()->header('Location', (string) $url);\n\t\t}\n\t}", "public function linkedinRedirect()\n {\n $user = Socialite::driver('linkedin')->user();\n $user = User::firstOrCreate([\n 'email'=> $user->email,\n ],\n [\n 'name' => $user->nickname,\n 'email'=> $user->email,\n 'password' => Hash::make(Str::random(24))\n ]\n );\n Auth::login($user,true);\n return redirect(route('shop'));\n }", "public function redirectToProvider(SocialiteManager $socialite)\n {\n return $socialite->driver('github')->redirect();\n }", "function auth_redirect() {\n\n\t\tauth_redirect();\n\n\t}", "public function handleProviderCallback(SocialiteManager $socialite)\n {\n try \n {\n $user = $socialite->driver('github')->user();\n\n $authenticatedUser = $this->users->findOrCreateUserFromProviderData($user);\n $this->auth->login($authenticatedUser, true);\n\n return redirect()->route('pages.home');\n } \n catch (Exception $e) \n {\n return redirect()->route('auth.github');\n }\n }", "private function _authRedirect() {\n $options = array('scope' => $this->settings['permissions']);\n if (!empty($this->settings['appUrl'])) {\n $options['redirect_uri'] = $this->settings['appUrl'];\n }\n $url = $this->facebook->getLoginUrl($options);\n echo \"<script type=\\\"text/javascript\\\">top.location.href = '$url';</script>\";\n exit;\n }", "public function get_login_url() {\n\n $returnurl = new moodle_url('/repository/repository_callback.php');\n $returnurl->param('callback', 'yes');\n $returnurl->param('repo_id', $this->id);\n $returnurl->param('sesskey', sesskey());\n $returnurl->param('reloadparentpage', true);\n\n $url = new moodle_url($this->client->createAuthUrl());\n $url->param('state', $returnurl->out_as_local_url(false));\n return '<a target=\"repo_auth\" href=\"'.$url->out(false).'\">'.get_string('connectyourgoogleaccount', 'repository_googledrive').'</a>';\n }", "public function urlSocialAuthRedirect($provider) {\n //Session::put('url.failed', URL::previous());\n return Socialite::driver($provider)->redirect();\n }", "function template_redirect() {\r\n\t\tappthemes_auth_redirect_login();\r\n\t}", "public function redirectToLogin() {\n\t\t//\tcreate and save the state parameter\n\t\t$openIdStateMap =& storageFindOrCreate( \"openIdStateMap\" );\n\t\t$state = generatePassword(10);\n\t\t$openIdStateMap[ $state ] = $this->code;\n\n\t\t//\tcreate the URL\n\t\t$config = $this->getConfig();\n\t\t$request = new HttpRequest( $config[\"authorization_endpoint\"], \"GET\", array( \n\t\t\t\"response_type\" => \"code\",\n\t\t\t\"scope\" => $this->scope,\n\t\t\t\"client_id\" => $this->clientId,\n\t\t\t\"state\" => $state,\n\t\t\t\"redirect_uri\" => projectURL() . GetTableLink(\"openidcallback\")\n\t\t));\n\n\t\theader( \"Location: \" . $request->getUrl() );\n\t}", "public function redirectToProvider()\n {\n return Socialite::driver('linkedin')->redirect();\n }", "public function githubLogin(){\n\t\t//\n\t\tif( ! Session::has('github_access_token') )\n\t\t\treturn Response::make('Unauthorized GitHub access.', 401);\n\n\t\t$token = Session::get('github_access_token');\n\n\t\t$ch = curl_init('https://api.github.com/user');\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array( \"Authorization: token $token\" ));\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, 'SWAMP');\n\t\t$response = curl_exec($ch);\n\n\t\t$github_user = json_decode( $response );\n\n\t\tif( ! property_exists( $github_user, 'id' ) )\n\t\t\treturn Response::make('Unable to authenticate with GitHub.', 401);\n\n\t\t$account = LinkedAccount::where('user_external_id', '=', $github_user->id)->first();\n\t\tif( $account ){\n\t\t\t$user = User::getIndex($account->user_uid);\n\t\t\tif ($user) {\n\t\t\t\tif ($user->hasBeenVerified()) {\n\t\t\t\t\tif ($user->isEnabled()) {\n\t\t\t\t\t\t$userAccount = $user->getUserAccount();\n\t\t\t\t\t\t$userAccount->penultimate_login_date = $userAccount->ultimate_login_date;\n\t\t\t\t\t\t$userAccount->ultimate_login_date = gmdate('Y-m-d H:i:s');\n\t\t\t\t\t\t$userAccount->save();\n\n\t\t\t\t\t\t$userEvent = new UserEvent(array(\n\t\t\t\t\t\t\t'user_uid' \t\t=> $user->user_uid,\n\t\t\t\t\t\t\t'event_type' \t=> 'linkedAccountSignIn',\n\t\t\t\t\t\t\t'value' => json_encode(array(\n\t\t\t\t\t\t\t\t'linked_account_provider_code' \t=> 'github',\n\t\t\t\t\t\t\t\t'user_external_id' \t\t\t\t=> $account->user_external_id,\n\t\t\t\t\t\t\t\t'user_ip' \t\t\t\t\t\t=> $_SERVER['REMOTE_ADDR']\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t));\n\t\t\t\t\t\t$userEvent->save();\n\n\t\t\t\t\t\t$res = Response::json(array(\n\t\t\t\t\t\t\t'user_uid' => $user->user_uid,\n\t\t\t\t\t\t\t'access_token' => $token\n\t\t\t\t\t\t));\n\n\t\t\t\t\t\tSession::set('timestamp', time());\n\t\t\t\t\t\tSession::set('user_uid', $user->user_uid);\n\t\t\t\t\t\treturn $res;\n\t\t\t\t\t} else\n\t\t\t\t\t\treturn Response::make('User has not been approved.', 401);\n\t\t\t\t} else\n\t\t\t\t\treturn Response::make('User email has not been verified.', 401);\n\t\t\t} else\n\t\t\t\treturn Response::make('Incorrect username or password.', 401);\n\t\t} else {\n\t\t\treturn Response::make('Account not found.', 401);\n\t\t}\n\t}", "public function handleProviderCallback()\n {\n try {\n $user = Socialite::driver('linkedin')->user();\n } catch (Exception $e) {\n return Redirect::to('socialite/linkedin');\n }\n\n $authUser = User::findOrCreateUser($user);\n\n Auth::login($authUser, true);\n\n return redirect('/');\n }", "public function linkedin()\n {\n return Socialite::driver('linkedin')->redirect();\n }", "public function handleGithubCallback(Request $request)\n {\n try \n {\n $user = Socialite::driver('github')->user();\n \n $finduser = User::where('oauth_id', $user->id)->first();\n \n if($finduser){\n \n Auth::login($finduser);\n \n return redirect()->intended('dashboard');\n \n }else{\n\n $email_exists = User::where('email', $user->user)->count();\n\n if($email_exists)\n return redirect()->route('login')->with('danger', 'Email address associated with your Github account is already registered with us.');\n\n $newUser = User::create([\n 'first_name' => $user->name,\n 'email' => $user->email,\n 'oauth' => 'github',\n 'oauth_id'=> $user->id,\n 'email_verified_at' => Now(),\n 'support_pin' => encrypt(RPG::Generate('d',4)),\n 'is_2fa_enabled' => false,\n 'access_key' => RPG::Generate('ud',30,1,1),\n ]);\n \n Auth::login($newUser);\n \n return redirect()->intended('dashboard');\n }\n \n } catch (\\Exception $e) {\n\n if($e->getCode() == '401')\n $error = $request->error_description;\n\n elseif($e->getCode() == '23000')\n $error = 'Email address associated with your Github account is already registered with us.';\n\n else\n $error = $e->getMessage();\n\n return redirect()->route('login')->with('danger', $error);\n }\n }", "public function handleProviderCallback(Request $request)\n {\n $userSocial = Socialite::driver('github')->stateless()->user();\n\n $user = User::where(['email' => $userSocial->getEmail()])->first();\n\n if (!$user) {\n $user = User::create([\n 'name' => $userSocial->getName(),\n 'nickname' => $userSocial->getNickname(),\n 'email' => $userSocial->getEmail(),\n 'image' => $userSocial->getAvatar(),\n 'provider_id' => $userSocial->getId(),\n 'provider' => 'github',\n 'github_token' => $userSocial->token,\n ]);\n } else {\n $user->github_token = $userSocial->token;\n $user->save();\n }\n\n Auth::login($user, true);\n $redirect = $request->input('redirect');\n if ($redirect) {\n Log::debug('Redirect URL detected. Redirecting user back to: ' . $redirect);\n return redirect($redirect);\n }\n\n return redirect()->route('home');\n }", "public function actionSignin() {\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_URL, 'https://dribbble.com/oauth/authorize?client_id='.Yii::app()->params['client_id']);\n\t\t$redirect = curl_getinfo($curl, CURLINFO_EFFECTIVE_URL);\n\t\tcurl_close($curl);\n\n\t\t// Redirect to Index function with \"code\" value\n\t\t$this->redirect($redirect);\n\t}", "public function handleGithubCallback()\n {\n $user = Socialite::driver('github')->user();\n\t\t//dd($user);\n // $user->token;\n }", "public function pinterestRedirect()\n {\n $user = Socialite::driver('pinterest')->user();\n $user = User::firstOrCreate([\n 'email'=> $user->email,\n ],\n [\n 'name' => $user->nickname,\n 'email'=> $user->email,\n 'password' => Hash::make(Str::random(24))\n ]\n );\n Auth::login($user,true);\n return redirect(route('shop'));\n }", "public function redirectToProvider() {\n\n if (!Auth::check()) {\n return redirect('/');\n }\n\n try {\n return Socialite::driver('twitter')->redirect();\n } catch (\\Exception $e) {\n return redirect()->route('twitter.error');\n }\n\n }", "public function getAccess()\n {\n return Redirect::away('https://github.com/login/oauth/authorize' .\n '?client_id=' . env('GITHUB_ID') .\n '&scope=admin:repo_hook repo' .\n '&redirect_uri=' . env('APP_URL') . '/github/access/callback'\n );\n }", "public function getAccessCallback()\n {\n $token = $this->github->getAccessToken(request('code'));\n\n Auth::user()->update([\n 'github_access_token' => Crypt::encryptString($token)\n ]);\n\n return redirect()->route('view.profile')->with(['message' => 'Successfully linked up GitHub account']);\n }", "function auth_redirect()\n {\n }", "public function redirectToFacebook()//redirects user to facebook authentication\n {\n return Socialite::driver('facebook')->redirect();\n }", "public function handleGithubCallback()\n {\n $user = Socialite::driver('github')->user();\n\n // $user->token;\n }", "function redirectLogin()\n\t{\n\t\tredirect('auth/login');\n\t}", "public function redirectToDropbox()\n {\n return Socialite::driver('dropbox')->setScopes(['account_info.read'])->redirect();\n }", "public function callback()\n {\n try {\n $user = Socialite::with('reddit')->user();\n } catch (Exception $e) {\n return redirect()->route('home')->with('message', [\n 'type' => 'danger',\n 'body' => 'There was an error authenticating with Reddit. Try again later.'\n ]);\n }\n\n $name = $user->nickname;\n $auth = User::firstOrCreate([\n 'id' => $user->id,\n 'name' => strtolower($name),\n 'nickname' => $name\n ]);\n\n Auth::login($auth, true);\n\n $redirectPath = session('redirect_to', '/');\n session()->forget('redirect_to');\n return redirect($redirectPath)->with('message', [\n 'type' => 'success',\n 'body' => 'You have successfully logged in!'\n ]);\n }", "public function redirect($provider)\n {\n return Socialite::driver($provider)->redirect(); \n }", "public function redirect()\n {\n return SocialLogin::driver('facebook')->redirect();\n }", "public function redirect()\n {\n return Socialite::driver('twitter')->redirect();\n }", "public function handleProviderCallback() {\n\n try {\n $socialUser = Socialite::driver('facebook')->user();\n } catch (Exception $ex) {\n return redirect('/');\n }\n\n $user = $this->findOrCreateUser($socialUser);\n\n Auth::login($user, true);\n\n //return redirect($this->socialRedirectTo);\n return redirect($this->socialRedirectTo);\n }", "public function github() {\n\t\t$user = Socialize::with ( 'github' )->user ();\n\t\t// Do your stuff with user data.\n\t\tprint_r ( $user );\n\t\tdie ();\n\t}", "public function handleProviderCallback()\n {\n $user = Socialite::driver('github')->user();\n session(['user_token' => $user->token]);\n // dd($user);\n User::where('id', Auth::user()->id)->update(\n [\n 'github_access_token' => $user->token,\n 'github_nickname' => $user->nickname,\n 'github_email' => $user->email,\n ]\n );\n\n if (Auth::user()->role == 3) {\n return redirect()->route('student');\n }\n return redirect()->route('modules.index');\n }", "public function redirectToGoogle()\n {\n \treturn Socialite::driver($this->googleProvider)->stateless()->redirect();\n }", "public function authenticateWith($provider) {\n return Socialite::driver($provider)->redirect();\n }", "public function redirect()\n {\n return Socialite::driver('facebook')->redirect();\n }", "function dokan_redirect_login() {\n if ( ! is_user_logged_in() ) {\n wp_redirect( dokan_get_page_url( 'myaccount', 'woocommerce' ) );\n exit;\n }\n}", "public function main_redirectToGoogle()\n {\n return Socialite::driver('google')->redirect();\n }", "public function callback()\n {\n if( isset( $this->config['oauth_id'] ) && isset( $this->config['oauth_secret'] ) && isset( $this->config['oauth_token'] ) )\n $this->redirect( '' );\n \n // Make sure we got our auth code\n if( !isset( $this->input['code'] ) )\n $this->redirect( 'oauth/token' );\n \n // Exchange for a token\n $req = new HTTP_Request2( \"https://github.com/login/oauth/access_token?client_id={$this->config['oauth_id']}&redirect_uri=http://\".$_SERVER['HTTP_HOST'].$this->baseURL.\"oauth/callback&client_secret={$this->config['oauth_secret']}&code={$this->input['code']}\" );\n $req->setConfig( 'ssl_verify_peer', false );\n $req->setMethod( HTTP_Request2::METHOD_POST );\n \n try \n {\n $res = $req->send();\n \n if( 200 == $res->getStatus() )\n $response = $res->getBody(); \n } \n catch( Exception $e ) \n {\n $this->err = $e;\n }\n \n // Got a valid response\n if( strstr( $response, 'access_token=' ) )\n {\n $this->token = str_replace( 'access_token=', '', $response );\n }\n else\n $this->err = \"Something went wrong\";\n }", "public function googleRedirect()\n {\n $user = Socialite::driver('google')->user();\n $user = User::firstOrCreate([\n 'email'=> $user->email,\n ],\n [\n 'name' => $user->nickname,\n 'email'=> $user->email,\n 'password' => Hash::make(Str::random(24))\n ]\n );\n Auth::login($user,true);\n return redirect(route('shop'));\n }", "public function index()\n {\n // redirect the user\n return redirect()->to($this->github->getOauthRedirectUrl(url('tokens/github/exchange')));\n }", "public function redirectToProvider()\n {\n // echo \"Hello\";\n return Socialite::driver('google')->stateless()->redirect();\n }", "public function redirect()\n {\n return Socialite::driver('google')->redirect();\n }", "public function redirect()\n {\n return Socialite::driver('instagram')->redirect();\n }", "public function handle(Request $request, Closure $next)\n {\n $auth = \\Auth::driver('github');\n\n if ($auth->guest()) {\n return $next($request);\n }\n\n return redirect()->route('main');\n }", "public function redirectToGoogle()\n {\n return Socialite::driver('google')->redirect(); // Using socialite driver for redirecting to the google\n }", "public function redirect()\n {\n return Socialite::driver('facebook')->redirect();\n }", "public function redirect()\n {\n return Socialite::driver('facebook')->redirect();\n }", "public function redirectToProvider()\n {\n return Socialite::driver('twitter')->redirect();\n }", "function index()\n {\n\t\t$url = 'https://github.com/login/oauth/authorize';\n\t\t$params = array('client_id' => 'cdaf3997df7900e348ae',\n\t\t\t\t\t\t'redirect_uri'=>'http://github.ap01.aws.af.cm/?url=callback');\n\t\t$return = Http::request($url, $params, 'GET');\n\t\techo $return;\n\t\techo 'okkkkk';\n\t\t//http://github.ap01.aws.af.cm/?url=index/index&client_id=cdaf3997df7900e348ae\n\t\t//http://github.ap01.aws.af.cm/?code=138d9c69dc08ea494a2d&url=callback\n//https://github.com/login?return_to=%2Flogin%2Foauth%2Fauthorize%3Fclient_id%3Dcdaf3997df7900e348ae%26redirect_uri%3Dhttp%253A%252F%252Fgithub.ap01.aws.af.cm%252F%253Furl%253Dcallback\n }", "public function redirectToProvider()\n {\n return Socialite::driver('facebook')->redirect();\n }", "public function redirectToProvider()\n {\n return Socialite::driver('facebook')->redirect();\n }", "public function redirectToProvider()\n {\n return Socialite::driver('facebook')->redirect();\n }", "public function redirectToProvider()\n {\n return Socialite::driver('facebook')->redirect();\n }", "public function redirectToProvider()\n {\n return Socialite::driver('facebook')->redirect();\n }", "public function redirectToProvider()\n {\n return Socialite::driver('facebook')->redirect();\n }", "public function redirectToGoogle()\n \t{\n \t\treturn Socialite::driver('google')->redirect();\n \t}", "public function triggerFacebookLogin() {\n return Redirect::to( Facebook::getLoginUrl() );\n }", "public function redirectToProvider() {\n return Socialite::driver('facebook')->redirect();\n }", "public function redirectToProvider()\n {\n \n return Socialite::driver('facebook')->redirect();\n }", "public function redirectAction()\n {\n $this->facebookOAuth->authorize();\n }", "public function post_signin()\n\t{\n\t\tif(Service\\Validation\\Login::passes(Input::all()))\n\t\t{\n\t\t\tif(Service\\Security::authorize(array('username' => Input::get('username'), 'password' => Input::get('password'))))\n\t\t\t{\n\t\t\t\treturn Redirect::home();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn Redirect::to_route('login')->with_input()->with_errors(new Messages(array(\n\t\t\t\t\t__('login.failed')->get()\n\t\t\t\t)));\n\t\t\t}\n\t\t}\n\n\t\treturn Redirect::to_route('login')->with_input()->with_errors(Service\\Validation::errors());\n\t}", "public function oauthRedirect($driver)\n {\n $this->exist($driver);\n\n return Socialite::driver($driver)\n ->stateless()\n ->redirect();\n }", "public function redirectToProvider($provider)\n { \n return Socialite::driver($provider)->redirect();\n }", "function attemptOAuthLogin(Request $request, Response $response, $args){\n if(isset($_SESSION['access_token'])){\n //echo \"already Logged In\";\n header('Location: https://cc-contest-arena.herokuapp.com');\n die();\n return $response;\n }\n\n\t$CC_URL = \"https://api.codechef.com/oauth/authorize\";\n\t\n\t$params = array('response_type'=>'code', 'client_id'=> $GLOBALS['CLIENT_ID'], \t\t\t\t\t\t\t\t'redirect_uri'=> $GLOBALS['REDIRECT_URI'], 'state'=> 'xyz');\n \n \n\t$reqMaker = CurlRequestMaker::getInstance();\n $reqMaker->makeRedirectRequest($CC_URL,$params);\n \n return $response;\n}", "function good_login()\n\t{\n\t\tif( $GLOBALS['appshore_data']['api']['nextop'] )\n\t\t\theader('Location: '.$GLOBALS['appshore']->session->baseurl.base64_decode($GLOBALS['appshore_data']['api']['nextop']));\n\t}", "public function github(){\n\n\t\t$user = '';\n\t\tif(isset($this->request->get['user'])){\n\t\t\t$user = $this->request->get['user'];\n\t\t}\n\t\t$repo = '';\n\t\tif(isset($this->request->get['repo'])){\n\t\t\t$repo = $this->request->get['repo'];\n\t\t}\n\t\t$branch = '';\n\t\tif(isset($this->request->get['branch'])){\n\t\t\t$branch = $this->request->get['branch'];\n\t\t}\n\t\tnew d_shopunity\\GitHub($user, $repo, str_replace(\"catalog/\", \"\", DIR_APPLICATION), $branch );\n\t}", "public function login()\n {\n require_once(app_path().'/config/id.php');\n\n // if user is already logged in, redirect to current page\n if (Session::has('user'))\n {\n try {\n return Redirect::back();\n }\n catch (Exception $e) {\n return Redirect::to('/');\n }\n }\n\n // else redirect user to CS50 ID\n else\n {\n //store url in session\n Session::put('redirect', URL::previous());\n\n return Redirect::to(CS50::getLoginUrl(TRUST_ROOT, RETURN_TO));\n }\n }", "function redirect_author_page() {\r\n\t\t\tif ( UM()->options()->get( 'author_redirect' ) && is_author() ) {\r\n\t\t\t\t$id = get_query_var( 'author' );\r\n\t\t\t\tum_fetch_user( $id );\r\n\t\t\t\texit( wp_redirect( um_user_profile_url() ) );\r\n\t\t\t}\r\n\t\t}", "public function handleGoogleCallback() {\n \n try {\n $google = Socialite::driver('google')->user();\n } \n catch (Exception $e) {\n return redirect('/');\n }\n\n $user = User::where('google_id', $google->getId())->first();\n\n if (!$user) {\n $user = User::create([\n 'google_id' => $google->getId(),\n 'username' => $google->getName(),\n 'email' => $google->getEmail(),\n 'password' => bcrypt($google->getId()),\n 'avatar' => $google->getAvatar(),\n 'users_status_id' => 1,\n 'users_role_id' => 3 \n ]);\n }\n\n auth()->login($user);\n #return redirect()->to('/home'); \n return redirect()->intended($this->socialRedirectTo);\n }", "public function redirectToProvider()\n {\n return Socialite::driver('vkontakte')->redirect();\n }", "public function redirect()\n {\n return Socialite::driver('google')->redirect();\n }", "public function redirectToProvider()\n {\n return Socialite::driver('keycloak')->redirect();\n }", "public function redirect() {\n return Socialite::driver('google')->redirect();\n }", "public function redirectToProvider()\n {\n return Socialite::driver('facebook')\n ->scopes(['email', 'user_birthday','user_about_me','user_education_history',\n 'user_location','user_work_history','user_hometown','user_likes'])\n ->redirect();\n }", "public function redirectToFacebook()\n {\n \treturn Socialite::driver('facebook')->redirect();\n }", "public function redirect_author_link()\n {\n return home_url('/');\n }", "public function actionAuthLink() {\n $localAt = gp('localAt');\n if ($localAt) {\n $s = Yii::$app->getSession();\n $s->set('localAt', $localAt);\n $s->set('linkRequestTs', time());\n $direction = ['site/auth'] + ['authclient' => gp('authclient')];\n $this->redirect($direction);\n } else {\n throw new \\yii\\web\\NotFoundHttpException();\n }\n\n }" ]
[ "0.83033866", "0.8265829", "0.80978984", "0.80978984", "0.80978984", "0.7734659", "0.7728145", "0.7687468", "0.7582287", "0.75486165", "0.7462744", "0.744874", "0.7434986", "0.7425647", "0.73443484", "0.73443484", "0.7209252", "0.7076142", "0.6969529", "0.69578713", "0.6937177", "0.68258154", "0.67396206", "0.6593413", "0.6549847", "0.6511197", "0.6492779", "0.64658296", "0.64420784", "0.64056927", "0.6402482", "0.639886", "0.63885266", "0.6387607", "0.6369878", "0.6367806", "0.63045377", "0.6289771", "0.628471", "0.6277753", "0.6275156", "0.6262433", "0.62519276", "0.62348294", "0.6225956", "0.619451", "0.6168533", "0.6164193", "0.61610377", "0.61231756", "0.60872275", "0.6086519", "0.6072333", "0.60657245", "0.60348797", "0.6033534", "0.60334015", "0.60159093", "0.6009051", "0.600445", "0.59994775", "0.599648", "0.59955364", "0.59682745", "0.59681404", "0.59437805", "0.592915", "0.59285307", "0.59282815", "0.5926715", "0.5926715", "0.5922725", "0.5921956", "0.5909372", "0.5909372", "0.5909372", "0.5909372", "0.5909372", "0.5909372", "0.5894776", "0.58945066", "0.5888781", "0.58866495", "0.5881132", "0.58791035", "0.58790517", "0.5865832", "0.5855485", "0.58537775", "0.5847237", "0.5832083", "0.5830874", "0.58294004", "0.5827018", "0.58188355", "0.5817751", "0.58097637", "0.5805579", "0.57959235", "0.57882684", "0.5786724" ]
0.0
-1
Obtain the user information from GitHub for ex..
public function handleProviderCallback($provider) { $user = Socialite::driver($provider)->user(); $selectProvider = Provider::where('provider_id', $user->getId())->first(); if(!$selectProvider)//new user { $registeredUser = User::where('email', $user->getEmail())->first();//the user is already registered with the same email if(!$registeredUser) {//totally new user $registeredUser = new User(); $registeredUser->name = $user->getName(); $registeredUser->email = $user->getEmail(); $registeredUser->save(); } $newProvider = new Provider(); $newProvider->provider_id = $user->getId(); $newProvider->provider_name = $provider; $newProvider->user_id = $registeredUser->id; $newProvider->save(); } else //registered user { $registeredUser = User::find($selectProvider->user_id); } auth()->login($registeredUser); return Redirect('/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function github() {\n\t\t$user = Socialize::with ( 'github' )->user ();\n\t\t// Do your stuff with user data.\n\t\tprint_r ( $user );\n\t\tdie ();\n\t}", "private static function getGithubInfo($username)\n {\n $client = new Client([\"base_uri\" => \"https://api.github.com/users/\"]);\n\n try {\n $response = $client->get($username);\n return $response->getBody(true);\n } catch (ClientException $e) {\n if ($e->getCode() === 404) {\n throw new UserNotFoundException(\n \"The user \" . $username . \" was not found on GitHub.\"\n );\n }\n }\n }", "function getUserInfo(){\n\n\t\t/* Fetch user info from Flickr */\n\t\t$user = $this->askFlickr('people.getinfo','user_id='.$this->user);\n\n\t\t/* Return User info */\n\t\treturn $user;\n\t}", "public function githubUser(){\n\n\t\tif( ! Session::has('github_access_token') )\n\t\t\treturn Response::make('Unauthorized GitHub access.', 401);\n\n\t\t$token = Session::get('github_access_token');\n\n\t\t$ch = curl_init('https://api.github.com/user');\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array( \"Authorization: token $token\" ));\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, 'SWAMP');\n\t\t$response = curl_exec($ch);\n\n\t\t$github_user = json_decode( $response, true );\n\t\t$github_user['email'] = array_key_exists( 'email', $github_user ) ? $github_user['email'] : '';\n\n\t\t$user = array(\n\t\t\t'user_external_id' \t=> $github_user['id'],\n\t\t\t'username' \t\t\t=> $github_user['login'],\n\t\t\t'email' \t\t\t=> $github_user['email']\n\t\t);\n\n\t\treturn $user;\n\t}", "public function handleGithubCallback()\n {\n $user = Socialite::driver('github')->user();\n\t\t//dd($user);\n // $user->token;\n }", "function getUserInfo() {\n\t$page = $this -> get('http://vk.com/al_profile.php') -> body;\n\n\t$pattern = '/\"user_id\":([0-9]*),\"loc\":([\"a-z0-9_-]*),\"back\":\"([\\W ]*|[\\w ]*)\",.*,\"post_hash\":\"([a-z0-9]*)\",.*,\"info_hash\":\"([a-z0-9]*)\"/';\n\tpreg_match($pattern, $page, $matches);\n\tarray_shift($matches);\n\t\n\t$this -> user['id'] = $matches[0];\n\t$this -> user['alias'] = $matches[1];\n\t$this -> user['name'] = $matches[2];\n\t$this -> user['post_hash'] = $matches[3];\n\t$this -> user['info_hash'] = $matches[4];\n\n\treturn $this -> user;\n\t}", "public function getUserInfo() {}", "public function handleGithubCallback()\n {\n $user = Socialite::driver('github')->user();\n\n // $user->token;\n }", "abstract public function getUserInfo();", "public function get_user_info()\n\t{\n\t\tif ( function_exists('wp_remote_get') ) {\n\t\t\t$json = wp_remote_get($this->API_URL . '?username='. $this->user);\n\t\t\t$user_info = @json_decode($json['body'], true);\n\t\t} else {\n\t\t\t$json = @file_get_contents($this->API_URL . '?username='. $this->user);\n\t\t\t$user_info = @json_decode($json, true);\n\t\t}\n\t\t\n\t\treturn $user_info['resp'];\n\t}", "public static function getUser();", "public function getGitHubUsername()\n {\n return 'etiennemarais';\n }", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUserInfo()\n {\n }", "private function getUserInfo()\n\t{\n\t\t$user = Sentry::user();\n\t\t$result = array(\n\t\t\t'username' => $user->get('username'),\n\t\t\t'isAdmin' => $user->in_group('admin'),\n\t\t);\n\t\treturn $result;\n\t}", "private function getUserInfo()\n {\n // TODO This could be cached\n return $this->userInfoApi->getUserInfo();\n }", "public function getUserInfo() {\n\t\t$userInfo = $this->HttpSocket->get(FLICKR_API_URL,\n\t\t\tarray(\n\t\t\t\t'method' => USERINFO,\n\t\t\t\t'format' => DATAFORMAT,\n\t\t\t\t'api_key' => $this->api_key,\n\t\t\t\t'user_id' => $this->photo['owner'],\n\t\t\t));\n\t\treturn unserialize($userInfo->body);\n\t}", "public function getUser(){\r\n $urlUser = \"{$this->apiHost}/api/v1/me\";\r\n // return $urlUser;\r\n return self::runCurl($urlUser);\r\n }", "private function get_user_info() {\n $user_info = $this->_api_call('https://api.twitter.com/1.1/account/settings.json');\n return $user_info;\n }", "public function getUser() {\n\t\t$urlUser = \"{$this->apiHost}/me.json\";\n\t\treturn $this->runCurl ( $urlUser );\n\t}", "public function actionUser()\n {\n $login = Yii::$app->request->get('id');\n $response = GitHubApi::getUser($login);\n\n return $this->render('user', [\n 'response' => $response,\n ]);\n }", "private function userinfo($access_token){\n //CakeLog::write(LOG_DEBUG, __CLASS__ . '.' . __FUNCTION__ . '(), just entered');\n $userinfo = $this->serverGet($this->strategy['base_url'] . 'me', array('access_token' => $access_token), null, $headers); // 'me' from flask; google uses this naming convention, as do others.\n if (!empty($userinfo)){\n return $this->recursiveGetObjectVars(json_decode($userinfo));\n }\n else{\n $error = array(\n 'code' => 'userinfo_error',\n 'message' => 'Failed when attempting to query for user information',\n 'raw' => array(\n 'response' => $userinfo,\n 'headers' => $headers\n )\n );\n\n $this->errorCallback($error);\n }\n //CakeLog::write(LOG_DEBUG, __CLASS__ . '.' . __FUNCTION__ . '(), done');\n }", "public function getInfo()\n {\n if(Sentry::check())\n {\n $user = Sentry::getUser();\n $data = $this->app->json([\n \"username\" => $user->first_name,\n \"password\" => \" \",\n \"email\" => $user->email\n ]);\n return $data;\n } else {\n return false;\n }\n }", "function get_user_info( $user, $key )\n {\n //Unimplemented\n }", "public function getUserInfo()\n {\n return $this->_process('user/info')->user;\n }", "abstract protected function getUserInfo($username);", "protected function getUserFromAccessToken()\n {\n try {\n return $this->api('GET', '/v1/people/~:(id,firstName,lastName,headline)');\n } catch (LinkedInApiException $e) {\n return;\n }\n }", "public function user_information($user_name)\n {\n $url = preg_replace('/set/i', 'user:' . $user_name, $this->public_url);\n return $this->curl($url)->user;\n }", "public function getUser() {}", "public function getUserInfo()\n {\n $request = new Resource('GET', 'https://api.dropbox.com/1/account/info', array(\n 'oauth_consumer_key' => $this->consumer->client_id,\n 'oauth_token' => $this->token->access_token,\n ));\n\n // Sign the request using the consumer and token\n $request->sign($this->signature, $this->consumer, $this->token);\n\n $user = json_decode($request->execute());\n\n // Create a response from the request\n return array(\n 'uid' => $this->token->uid,\n 'name' => $user->display_name,\n 'email' => $user->email,\n 'location' => $user->country,\n );\n }", "function get_user()\n{\n$response = $GLOBALS['http']->request('GET', '/api/users/@me', [\n 'headers' => [\n 'Authorization' => 'Bearer ' . $_SESSION['auth_token']\n ]\n]);\n\n$responseBody = $response->getBody(true); \n$response = json_decode($responseBody, true);\n$_SESSION['username'] = $response['username'];\n$_SESSION['discrim'] = $response['discriminator'];\n$_SESSION['user_id'] = $response['id'];\n$_SESSION['user_avatar'] = $response['avatar'];\n}", "function getUserInfo()\n {\n return $this->userinfo;\n }", "public function get_userInfo()\n {\n return $this->call_method(\"get/userInfo\",\n array()\n );\n }", "private function get_repository_info() {\n if ( is_null( $this->github_response ) ) {\n $request_uri = sprintf( 'https://api.github.com/repos/%s/%s/releases', $this->username, $this->repository );\n\n $response = json_decode( wp_remote_retrieve_body( wp_remote_get( $request_uri ) ), true );\n if( is_array( $response ) ) {\n $response = current( $response );\n }\n $this->github_response = $response;\n }\n }", "public function handleProviderCallback()\n {\n $user = Socialite::driver('github')->user();\n\n // $user->token;\n }", "abstract protected function getUser();", "public function githubLogin(){\n\t\t//\n\t\tif( ! Session::has('github_access_token') )\n\t\t\treturn Response::make('Unauthorized GitHub access.', 401);\n\n\t\t$token = Session::get('github_access_token');\n\n\t\t$ch = curl_init('https://api.github.com/user');\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array( \"Authorization: token $token\" ));\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, 'SWAMP');\n\t\t$response = curl_exec($ch);\n\n\t\t$github_user = json_decode( $response );\n\n\t\tif( ! property_exists( $github_user, 'id' ) )\n\t\t\treturn Response::make('Unable to authenticate with GitHub.', 401);\n\n\t\t$account = LinkedAccount::where('user_external_id', '=', $github_user->id)->first();\n\t\tif( $account ){\n\t\t\t$user = User::getIndex($account->user_uid);\n\t\t\tif ($user) {\n\t\t\t\tif ($user->hasBeenVerified()) {\n\t\t\t\t\tif ($user->isEnabled()) {\n\t\t\t\t\t\t$userAccount = $user->getUserAccount();\n\t\t\t\t\t\t$userAccount->penultimate_login_date = $userAccount->ultimate_login_date;\n\t\t\t\t\t\t$userAccount->ultimate_login_date = gmdate('Y-m-d H:i:s');\n\t\t\t\t\t\t$userAccount->save();\n\n\t\t\t\t\t\t$userEvent = new UserEvent(array(\n\t\t\t\t\t\t\t'user_uid' \t\t=> $user->user_uid,\n\t\t\t\t\t\t\t'event_type' \t=> 'linkedAccountSignIn',\n\t\t\t\t\t\t\t'value' => json_encode(array(\n\t\t\t\t\t\t\t\t'linked_account_provider_code' \t=> 'github',\n\t\t\t\t\t\t\t\t'user_external_id' \t\t\t\t=> $account->user_external_id,\n\t\t\t\t\t\t\t\t'user_ip' \t\t\t\t\t\t=> $_SERVER['REMOTE_ADDR']\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t));\n\t\t\t\t\t\t$userEvent->save();\n\n\t\t\t\t\t\t$res = Response::json(array(\n\t\t\t\t\t\t\t'user_uid' => $user->user_uid,\n\t\t\t\t\t\t\t'access_token' => $token\n\t\t\t\t\t\t));\n\n\t\t\t\t\t\tSession::set('timestamp', time());\n\t\t\t\t\t\tSession::set('user_uid', $user->user_uid);\n\t\t\t\t\t\treturn $res;\n\t\t\t\t\t} else\n\t\t\t\t\t\treturn Response::make('User has not been approved.', 401);\n\t\t\t\t} else\n\t\t\t\t\treturn Response::make('User email has not been verified.', 401);\n\t\t\t} else\n\t\t\t\treturn Response::make('Incorrect username or password.', 401);\n\t\t} else {\n\t\t\treturn Response::make('Account not found.', 401);\n\t\t}\n\t}", "public function getMe()\n {\n return $this->_execute('/user/', self::METHOD_GET);\n }", "function get_user_details($username)\n {\n }", "function get_oauth_identity($wpoa) {\n\t// set the access token param:\n\t$params = array(\n\t\t'access_token' => $_SESSION['WPOA']['ACCESS_TOKEN'], // PROVIDER SPECIFIC: the access_token is passed to Google via POST param\n\t);\n\t$url_params = http_build_query($params);\n\t// perform the http request:\n\tswitch (strtolower(HTTP_UTIL)) {\n\t\tcase 'curl':\n\t\t\t$url = URL_USER . $url_params; // TODO: we probably want to send this using a curl_setopt...\n\t\t\t$curl = curl_init();\n\t\t\tcurl_setopt($curl, CURLOPT_URL, $url);\n\t\t\t// PROVIDER NORMALIZATION: Github/Reddit require a User-Agent here...\n\t\t\t// PROVIDER NORMALIZATION: PayPal/Reddit require that we send the access token via a bearer header, PayPal also requires a Content-Type: application/json header, LinkedIn requires an x-li-format: json header...\n\t\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\t\t\t$result = curl_exec($curl);\n \n\t\t\t$result_obj = json_decode($result, true);\n\t\t\tbreak;\n\t\tcase 'stream-context':\n\t\t\t$url = rtrim(URL_USER, \"?\");\n\t\t\t$opts = array('http' =>\n\t\t\t\tarray(\n\t\t\t\t\t'method' => 'GET',\n\t\t\t\t\t// PROVIDER NORMALIZATION: Reddit/Github requires User-Agent here...\n\t\t\t\t\t'header' => \"Authorization: Bearer \" . $_SESSION['WPOA']['ACCESS_TOKEN'] . \"\\r\\n\" . \"x-li-format: json\\r\\n\", // PROVIDER SPECIFIC: i think only LinkedIn uses x-li-format...\n\t\t\t\t)\n\t\t\t);\n\t\t\t$context = $context = stream_context_create($opts);\n\t\t\t$result = @file_get_contents($url, false, $context);\n\t\t\tif ($result === false) {\n\t\t\t\t$wpoa->wpoa_end_login(\"Sorry, we couldn't log you in. Could not retrieve user identity via stream context. Please notify the admin or try again later.\");\n\t\t\t}\n\t\t\t$result_obj = json_decode($result, true);\n\t\t\tbreak;\n\t}\n\t// parse and return the user's oauth identity:\n \n\t$oauth_identity = array();\n\t$oauth_identity['provider'] = $_SESSION['WPOA']['PROVIDER'];\n\t$oauth_identity['id'] = $result_obj['id']; // PROVIDER SPECIFIC: Google returns the user's OAuth identity as id\n $_SESSION['WPOA']['USERSELF'] = $result_obj;\n\t//$oauth_identity['email'] = $result_obj['emails'][0]['value']; // PROVIDER SPECIFIC: Google returns an array of email addresses. To respect privacy we currently don't collect the user's email address.\n\tif (!$oauth_identity['id']) {\n\t\t$wpoa->wpoa_end_login(\"Sorry, we couldn't log you in. User identity was not found. Please notify the admin or try again later.\");\n\t}\n \n\treturn $oauth_identity;\n}", "function github_request($url)\r\n{\r\n $ch = curl_init();\r\n\r\n $access = 'username:db1ff77b2eb06b3aa967e28f1943193ac831f064';\r\n\r\n curl_setopt($ch, CURLOPT_URL, $url);\r\n //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/xml'));\r\n curl_setopt($ch, CURLOPT_USERAGENT, 'Agent smith');\r\n curl_setopt($ch, CURLOPT_HEADER, 0);\r\n curl_setopt($ch, CURLOPT_USERPWD, $access);\r\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\r\n $output = curl_exec($ch);\r\n curl_close($ch);\r\n $result = json_decode(trim($output), true);\r\n return $result;\r\n}", "function get_the_author_login()\n {\n }", "public function getUserInfo()\n {\n return $this->userInfo;\n }", "public function getUserInfo()\n {\n return $this->userInfo;\n }", "public function getUserInfo()\n {\n return $this->userInfo;\n }", "public function getUserInfo(): array;", "public function get_user_info($access_token, $access_token_secret = '');", "function searchForUser($searchString) {\n $GitHubResponse = basicCurl(\"https://api.github.com/search/users?q=\".$searchString);\n $jsonResult = json_decode($GitHubResponse, true);\n $returnString = \"You searched for \".$searchString.\", I found: <br />\";\n $itemsArray = $jsonResult['items'];\n foreach ($itemsArray as $currentItem) {\n $returnString = $returnString.$currentItem['login'].\"<br />\";\n }\n return $returnString;\n}", "function GetUserProfileInfo($access_token) {\t\n\t\t$url = 'https://www.googleapis.com/plus/v1/people/me';\t\t\t\n\t\t\n\t\t$ch = curl_init();\t\t\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\t\t\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer '. $access_token));\n\t\t$data = json_decode(curl_exec($ch), true);\n\t\t$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\t\t\n\t\tif($http_code != 200) \n\t\t\tthrow new Exception('Error : Failed to get user information');\n\t\t\t\n\t\treturn $data;\n\t}", "public function get_user()\n {\n $token = $this->CI->input->get_request_header('Authorization', TRUE);\n $token_json = base64_decode($token);\n $token = json_decode($token_json);\n $userid = $token->userId;\n $username = $token->userName;\n return ['id'=>$userid,'name'=>$username];\n }", "function xarbb_userapi_getuserinfo($args)\r\n{\r\n static $users = array();\r\n extract $args;\r\n\r\n // uid is mandatory\r\n if (!isset($uid) || !is_numeric($uid) || $uid < 0) return;\r\n\r\n // If the user is cached, then return it.\r\n // Returning all details for now.\r\n if (isset($users[$uid])) return $users[$uid];\r\n\r\n // Get the details.\r\n $name = xarUserGetVar('name', $uid);\r\n\r\n // The url is set only if we have read permission.\r\n // TODO: these URLs, fetched from this central place, could be directed to some other place.\r\n if (xarSecurityCheck('ReadRole', 0, 'Roles', $uid)) {\r\n $display = xarModUrl('roles', 'user', 'display', array('uid' => $uid));\r\n $mailto = xarModUrl('roles', 'user', 'email', array('uid' => $item['xar_uid']));\r\n } else {\r\n $display = NULL;\r\n $mailto = NULL;\r\n }\r\n\r\n // TODO: detect and handle anonymous users appropriately.\r\n}", "function get_user_info(){\t\t\n\t\t// Fetch user data from database\n\t\t$user_data_array=$this->UserModel->get_user_data(array('member_id'=>$this->session->userdata('member_id')));\n\t\techo $user_data_array[0]['company'].\"|\".$user_data_array[0]['address_line_1'].\"|\".$user_data_array[0]['city'].\"|\".$user_data_array[0]['state'].\"|\".$user_data_array[0]['zipcode'].\"|\".$user_data_array[0]['country_id'].\"|\".$user_data_array[0]['country_name'];\n\t}", "private function get_userInfo() {\n $params = [ 'user_ids' => $this->user_id ];\n $result = $this->api->users->get($params);\n $params['fields'] = '';\n $result2 = $this->api2->users->get($params);\n $result['hidden'] = (int)array_has($result2, 'hidden');\n return $result;\n }", "function mozilla_get_user_info($me, $user, $logged_in) {\n $object = new stdClass();\n $object->value = $user->user_nicename;\n $object->display = true;\n \n $data = Array(\n 'username' => $object,\n 'id' => $user->ID\n );\n\n $is_me = $logged_in && intval($me->ID) === intval($user->ID);\n $meta = get_user_meta($user->ID);\n $community_fields = isset($meta['community-meta-fields'][0]) ? unserialize($meta['community-meta-fields'][0]) : Array();\n\n // First Name\n $object = new stdClass();\n $object->value = isset($meta['first_name'][0]) ? $meta['first_name'][0] : false;\n $object->display = mozilla_display_field('first_name', isset($meta['first_name_visibility'][0]) ? $meta['first_name_visibility'][0] : false, $is_me, $logged_in);\n \n $data['first_name'] = $object;\n\n // Last Name\n $object = new stdClass();\n $object->value = isset($meta['last_name'][0]) ? $meta['last_name'][0] : false;\n $object->display = mozilla_display_field('last_name', isset($meta['last_name_visibility'][0]) ? $meta['last_name_visibility'][0] : false, $is_me, $logged_in);\n $data['last_name'] = $object;\n\n // Email\n $object = new stdClass();\n $object->value = isset($meta['email'][0]) ? $meta['email'][0] : false;\n $object->display = mozilla_display_field('email', isset($meta['email_visibility'][0]) ? $meta['email_visibility'][0] : false , $is_me, $logged_in);\n $data['email'] = $object;\n\n // Location\n global $countries;\n $object = new stdClass();\n if(isset($community_fields['city']) && strlen($community_fields['city']) > 0 && isset($community_fields['country']) && strlen($community_fields['country']) > 1) {\n $object->value = \"{$community_fields['city']}, {$countries[$community_fields['country']]}\";\n } else {\n if(isset($community_fields['city']) && strlen($community_fields['city']) > 0) {\n $object->value = $community_fields['city'];\n } elseif(isset($community_fields['country']) && strlen($community_fields['country']) > 0) {\n $object->value = $countries[$community_fields['country']];\n } else {\n $object->value = false;\n }\n }\n \n $object->display = mozilla_display_field('location', isset($meta['profile_location_visibility'][0]) ? $meta['profile_location_visibility'][0] : false , $is_me, $logged_in);\n $data['location'] = $object;\n\n // Profile Image\n $object = new stdClass();\n $object->value = isset($community_fields['image_url']) && strlen($community_fields['image_url']) > 0 ? $community_fields['image_url'] : false;\n $object->display = mozilla_display_field('image_url', isset($community_fields['profile_image_url_visibility']) ? $community_fields['profile_image_url_visibility'] : false , $is_me, $logged_in);\n $data['profile_image'] = $object;\n\n // Bio\n $object = new stdClass();\n $object->value = isset($community_fields['bio']) && strlen($community_fields['bio']) > 0 ? $community_fields['bio'] : false;\n $object->display = mozilla_display_field('bio', isset($community_fields['bio_visibility']) ? $community_fields['bio_visibility'] : false , $is_me, $logged_in);\n $data['bio'] = $object;\n\n // Pronoun Visibility \n $object = new stdClass();\n $object->value = isset($community_fields['pronoun']) && strlen($community_fields['pronoun']) > 0 ? $community_fields['pronoun'] : false;\n $object->display = mozilla_display_field('pronoun', isset($community_fields['pronoun_visibility']) ? $community_fields['pronoun_visibility'] : false , $is_me, $logged_in);\n $data['pronoun'] = $object;\n\n // Phone\n $object = new stdClass();\n $object->value = isset($community_fields['phone']) ? $community_fields['phone'] : false;\n $object->display = mozilla_display_field('phone', isset($community_fields['phone_visibility']) ? $community_fields['phone_visibility'] : false , $is_me, $logged_in);\n $data['phone'] = $object;\n\n // Groups Joined\n $object = new stdClass();\n $object->display = mozilla_display_field('groups_joined', isset($community_fields['profile_groups_joined_visibility']) ? $community_fields['profile_groups_joined_visibility'] : false , $is_me, $logged_in);\n $data['groups'] = $object;\n\n // Events Attended\n $object = new stdClass();\n $object->display = mozilla_display_field('events_attended', isset($community_fields['profile_events_attended_visibility']) ? $community_fields['profile_events_attended_visibility'] : false , $is_me, $logged_in);\n $data['events_attended'] = $object;\n\n // Events Organized\n $object = new stdClass();\n $object->display = mozilla_display_field('events_organized', isset($community_fields['profile_events_organized_visibility']) ? $community_fields['profile_events_organized_visibility'] : false , $is_me, $logged_in);\n $data['events_organized'] = $object;\n \n // Campaigns\n $object = new StdClass();\n $object->display = mozilla_display_field('campaigns_participated', isset($community_fields['profile_campaigns_visibility']) ? $community_fields['profile_campaigns_visibility'] : false , $is_me, $logged_in);\n $data['campaigns_participated'] = $object;\n\n // Social Media \n $object = new stdClass();\n $object->value = isset($community_fields['telegram']) && strlen($community_fields['telegram']) > 0 ? $community_fields['telegram'] : false;\n $object->display = mozilla_display_field('telegram', isset($community_fields['profile_telegram_visibility']) ? $community_fields['profile_telegram_visibility'] : false , $is_me, $logged_in);\n $data['telegram'] = $object;\n\n $object = new stdClass();\n $object->value = isset($community_fields['facebook']) && strlen($community_fields['facebook']) > 0 ? $community_fields['facebook'] : false;\n $object->display = mozilla_display_field('facebook', isset($community_fields['profile_facebook_visibility']) ? $community_fields['profile_facebook_visibility'] : false , $is_me, $logged_in);\n $data['facebook'] = $object;\n\n $object = new stdClass();\n $object->value = isset($community_fields['twitter']) && strlen($community_fields['twitter']) > 0 ? $community_fields['twitter'] : false;\n $object->display = mozilla_display_field('twitter', isset($community_fields['profile_twitter_visibility']) ? $community_fields['profile_twitter_visibility'] : false , $is_me, $logged_in);\n $data['twitter'] = $object;\n\n $object = new stdClass();\n $object->value = isset($community_fields['linkedin']) && strlen($community_fields['linkedin']) > 0 ? $community_fields['linkedin'] : false;\n $object->display = mozilla_display_field('linkedin', isset($community_fields['profile_linkedin_visibility']) ? $community_fields['profile_linkedin_visibility'] : false , $is_me, $logged_in);\n $data['linkedin'] = $object;\n\n $object = new stdClass();\n $object->value = isset($community_fields['discourse']) && strlen($community_fields['discourse']) > 0 ? $community_fields['discourse'] : false;\n $object->display = mozilla_display_field('discourse', isset($community_fields['profile_discourse_visibility']) ? $community_fields['profile_discourse_visibility'] : false , $is_me, $logged_in);\n $data['discourse'] = $object;\n\n $object = new stdClass();\n $object->value = isset($community_fields['github']) && strlen($community_fields['github']) > 0 ? $community_fields['github'] : false;\n $object->display = mozilla_display_field('github', isset($community_fields['profile_github_visibility']) ? $community_fields['profile_github_visibility'] : false , $is_me, $logged_in);\n\t$data['github'] = $object;\n\t\n\t$object = new stdClass();\n $object->value = isset($community_fields['matrix']) && strlen($community_fields['matrix']) > 0 ? $community_fields['matrix'] : false;\n $object->display = mozilla_display_field('matrix', isset($community_fields['profile_matrix_visibility']) ? $community_fields['profile_matrix_visibility'] : false , $is_me, $logged_in);\n $data['matrix'] = $object;\n\n //Languages\n $object = new stdClass();\n $object->value = isset($community_fields['languages']) && sizeof($community_fields['languages']) > 0 ? $community_fields['languages'] : false;\n $object->display = mozilla_display_field('languages', isset($community_fields['profile_languages_visibility']) ? $community_fields['profile_languages_visibility'] : false , $is_me, $logged_in);\n $data['languages'] = $object;\n\n // Tags\n $object = new stdClass();\n $object->value = isset($community_fields['tags']) && strlen($community_fields['tags']) > 0 ? $community_fields['tags'] : false;\n $object->display = mozilla_display_field('tags', isset($community_fields['profile_tags_visibility']) ? $community_fields['profile_tags_visibility'] : false , $is_me, $logged_in);\n $data['tags'] = $object;\n \n $object = null;\n return $data;\n}", "public function github(){\n\n\t\t$user = '';\n\t\tif(isset($this->request->get['user'])){\n\t\t\t$user = $this->request->get['user'];\n\t\t}\n\t\t$repo = '';\n\t\tif(isset($this->request->get['repo'])){\n\t\t\t$repo = $this->request->get['repo'];\n\t\t}\n\t\t$branch = '';\n\t\tif(isset($this->request->get['branch'])){\n\t\t\t$branch = $this->request->get['branch'];\n\t\t}\n\t\tnew d_shopunity\\GitHub($user, $repo, str_replace(\"catalog/\", \"\", DIR_APPLICATION), $branch );\n\t}", "public function getUserInfo()\n {\n $CI = &get_instance();\n if (!$this->loggedIn()) {\n return null;\n } else {\n $id = $CI->session->userdata('user_id');\n return $CI->user_model->get($id);\n }\n }", "public function getUserInfo(\\Core\\Auth\\OAuth2\\Token\\Access $token)\n\t{\n\t\t// define the get user information token\n\t\t$url = 'https://apis.live.net/v5.0/me?' . http_build_query(array(\n\t\t\t'access_token' => $token->accessToken,\n\t\t), null, '&');\n\n\t\t// perform network request\n\t\t$user = json_decode(file_get_contents($url));\n\n\t\t// create a response from the request and return it\n\t\treturn array(\n\t\t\t'uid' \t\t\t=> $user->id,\n\t\t\t'name' \t\t\t=> $user->name,\n\t\t\t'emial'\t\t\t=> isset($user->emails->preferred) ? $user->emails->preferred : null,\n\t\t\t'nickname' \t\t=> \\Core\\Inflector::friendlyTitle($user->name, '-', true),\n\t\t\t// 'location' \t=> $user->location,\n\t\t\t// \trequires scope wl.postal_addresses and docs here: http://msdn.microsoft.com/en-us/library/hh243648.aspx#user\n\t\t\t'locale' \t\t=> $user->locale,\n\t\t\t'urls' \t\t\t=> array(\n\t\t\t\t'Windows Live' => $user->link\n\t\t\t),\n\t\t);\n\t}", "public function getUserInfo()\n {\n\n if (empty($this->_user))\n return '';\n\n $userInfo = $this->_user;\n\n if (!empty($this->_password))\n $userInfo .= \":{$this->_password}\";\n\n return $userInfo;\n }", "public function getUserBio();", "function fsf_cms_getUserInfo($fsfcms_user_id)\n {\n global $fsfcms_api_url;\n $fsf_api_file = \"fsf.cms.getUserInfo.php\";\n if(ctype_digit($fsfcms_user_id))\n {\n $fsf_api_options = \"?userId=\" . $fsfcms_user_id;\n } else {\n $fsf_api_options = \"?userSlug=\" . $fsfcms_user_id;\n }\n $fsfcms_cms_get_user_info_json = fsf_preacher_curl($fsfcms_api_url, $fsf_api_file, $fsf_api_options); \n return $fsfcms_cms_get_user_info_json; \n }", "public function getUserProfile();", "function get_currentuserinfo()\n {\n }", "function getUser(Login $login);", "public function getUserInfo() {\n $endpoint = '/users';\n $client = $this->_constructClient($endpoint . '/self');\n try {\n $response = $client->request();\n } catch (Zend_Http_Client_Exception $e) { // timeout or host not accessible\n return;\n }\n\n // error in response\n if ($response->isError()) return;\n\n $result = Zend_Json::decode($response->getBody());\n\n // foursquare returned an error\n if ($result['meta']['code'] != 200) return;\n\n $entry = $result['response']['user'];\n $user = array(\n 'name' => $entry['firstName'] . ' ' . $entry['lastName'],\n 'id' => $entry['id'],\n 'avatar' => $entry['photo']\n );\n return $user;\n }", "public function getUserInfo($access_token);", "function get_pinterest_account_info($pinterest_username) {\n $info = array(\n 'user' => array(),\n 'boards' => array()\n );\n\n $pinterest_account_page = new PinterestAccountPage($pinterest_username);\n while ($output_boards = $pinterest_account_page->getNext()) {\n $info['boards'] = array_merge($info['boards'], $output_boards);\n }\n $info['user'] = $pinterest_account_page->getAccountInfo();\n\n return $info;\n}", "function get_project_github($user, $project) {\n $ch = @curl_init(); //inicia uma nova sessao\n curl_setopt($ch, CURLOPT_URL, \"http://github.com/api/v2/json/repos/show/$user/$project\"); //faz a pesquisa contida no url\n\tcurl_setopt($ch, CURLOPT_USERAGENT, 'Googlebot/2.1'); //utiliza Googlebot 2.1\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\t//define o retorno como string\n $page = curl_exec($ch);\t//executa as opcoes definidas\n curl_close($ch);\t//encerra sessao\n\t$github_json = json_decode($page); //descodifica string JSON\n\tif(isset($github_json->repository->name)){\n\t\t$string_name = $github_json->repository->name;\n\t} else {\n\t\t$string_name = null;\n\t}\n\tif(isset($github_json->repository->description)){\n\t\t$string_title = $github_json->repository->description;\n\t} else {\n\t\t$string_title = \"n/a\";\n\t}\n\tif(isset($github_json->repository->url)){\n\t\t$string_source = $github_json->repository->url;\n\t} else {\n\t\t$string_source = \"n/a\";\n\t}\n\tif(isset($github_json->repository->owner)){\n\t\t$string_owner = array();\n\t\tarray_push($string_owner, $github_json->repository->owner);\n\t} else {\n\t\t$string_owner = array(\"n/a\");\n\t}\n\tif(isset($github_json->repository->language)){\n\t\t$string_lang = array();\n\t\t$string_lang = preg_split('/,/', $github_json->repository->language, -1);\n\t} else {\n\t\t$string_lang = array(\"n/a\");\n\t}\n\t//faz replace da Visual Basic por VB/VBS\n\t$string_lang=str_replace('Visual Basic', 'VB/VBS', $string_lang, $count);\n\tif(isset($github_json->repository->created_at)){\n\t\t$string_date = array();\n\t\tpreg_match(\"/[0-9]*\\\\/[0-9]*\\\\/[0-9]*/\", $github_json->repository->created_at, $match);\n\t\tarray_push($string_date, preg_replace('/\\\\//', '', $match[0], -1));\n\t\tpreg_match(\"/[0-9]*\\\\/[0-9]*\\\\/[0-9]*/\", $github_json->repository->pushed_at, $match2);\n\t\tarray_push($string_date, preg_replace('/\\\\//', '', $match2[0], -1));\n\t} else {\n\t\t$string_date = array(\"n/a\");\n\t}\t\n\treturn array($string_name, $string_title, $string_source, $string_owner, $string_lang, $string_date, \"n/a\");\t\n}", "public function get_user_info()\n {\n try {\n $user_info = self::api(\"me\");\n } catch (Exception $e) {\n // TODO: Handle the error\n // Set the return value to be an empty array\n $user_info = array();\n }\n\n return $this->convert_array_to_object($user_info);\n }", "public function get_user_info(OAuth_Consumer $consumer, OAuth_Token $token)\n\t{\n\t\t$url = 'https://api.linkedin.com/v1/people/~:(id,first-name,last-name,headline,member-url-resources,picture-url,location,public-profile-url)';\n\t\t$request = OAuth_Request::forge('resource', 'GET', $url, array(\n\t\t\t'oauth_consumer_key' => $consumer->key,\n\t\t\t'oauth_token' => $token->access_token,\n\t\t));\n\n\t\t// Sign the request using the consumer and token\n\t\t$request->sign($this->signature, $consumer, $token);\n\n\t\t$user = OAuth_Format::factory($request->execute(), 'xml')->to_array();\n\t\t\n\t\t// Create a response from the request\n\t\treturn array(\n\t\t\t'uid' => $user['id'],\n\t\t\t'name' => $user['first-name'].' '.$user['last-name'],\n\t\t\t'nickname' => end(explode('/', $user['public-profile-url'])),\n\t\t\t'description' => $user['headline'],\n\t\t\t'location' => isset($user['location']['name']) ? $user['location']['name'] : null,\n\t\t\t'urls' => array(\n\t\t\t 'Linked In' => $user['public-profile-url'],\n\t\t\t),\n\t\t);\n\t}", "public function getUserInfo() {\n\n if (empty($this->uriParts['user'])) {\n return '';\n }\n $val = $this->uriParts['user'];\n\n if (!empty($this->uriParts['pass'])) {\n $val .= ':' . $this->uriParts['pass'];\n }\n return $val;\n }", "public function getUser()\n {\n }", "public function getRevisionUser();", "public function getRevisionUser();", "public function getRevisionUser();", "public function getRevisionUser();", "public function getRevisionUser();", "function LoggedIn() {\n\t\treturn $this->Get('UserDetails');\n\t}", "function search($username) {\n $user = $this->user->getByUsername($username);\n\n //if not exists on database, search on api\n if($user === null) {\n $url = 'https://api.github.com/users/' . $username;\n $output = self::makeRequest($url);\n\n return $this->user->create(json_decode($output, true));\n } else {\n //return the user on database using get method\n return $user;\n }\n }", "public function getUser()\n {\n return $this->accessToken->getUser();\n }", "public static function user() {\n // $userInfo = $oauth2->userinfo->get();\n $userInfo = json_decode(json_encode(['email' => '@', 'gender' => null, 'name' => 'test', 'picture' => 'f']));\n return User::fromGoogleUser($userInfo);\n \n }", "public function getUser(){\r\n\t\treturn $this->facebook_obj->getUser();\r\n\t}", "private function getUser()\n {\n return $this->user->getUser();\n }", "public function getMyAccountInfo()\n {\n $ajax_data = array();\n $user_id = $this->user_session->getUserId();\n\n if ($user_id) {\n $user = $this->user_logic->getUserById($user_id);\n if ($user !== false) {\n if (! empty($user) AND is_array($user)) {\n $user = array_pop($user);\n $ajax_data['code'] = 0;\n $ajax_data['data']['user'] = $user;\n $ajax_data['message'] = 'Successfully retrieved user info';\n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'User does not exist'; \n } \n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'Failed to get user info'; \n } \n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'Invalid user id';\n }\n \n $this->ajax_respond($ajax_data);\n }", "public function fetchUser() {\n return $this->QueryAPI(\"current_user\");\n }", "public function getInfoProfile(){\n return $this->get_user_by_id($this->getAccountID());\n }", "function hc_get_the_author($gravatarSize = '', $field = ''){\n\t\tglobal $post;\n\t\t$username = get_user_by('id',$post->post_author);\n\t\t$username = $username->user_login;\n\t\t$args = array('single' => true, 'username' => $username, 'gravatarsize' => $gravatarSize);\n\t\tif($field != '')\n\t\t\t$args['fields'] = $field;\n\t\t$users = hc_get_users($args);\n\t\tif ( is_wp_error($users) ){\n\t\t\t\techo $users->get_error_message();\n\t\t\t\treturn false;\n\t\t}\n\t\treturn $users;\n\t}", "public function getUserInfo()\r\n {\r\n return self::makeCall('getUserInfo', array(), null, false, $this->sessionID);\r\n }", "public function get_user()\n\t{\n\t\t$username = 'root';\n\t\t$password = md5('123');\n\n\t\t//将数据存储到数据中\n\t\t$arr = array(\n\t\t\t'username'\t=>\t$username,\n\t\t\t'psd' \t\t=>\t$password\n\t\t);\n\n\t\t$this->load->model('user_model','user');\n\t\t$data = $this->user->get_user($arr);\n\t\techo $this->_gen_userinfo_json($data);\n\t}", "public function handleProviderCallback()\n {\n \t$user = Socialite::driver('github')->stateless()->user();\n\n \techo \\Session::get('domain');\n \t\n \t\\Session::forget('domain');\n\t\treturn $user->getEmail();\n }", "public static function GetUserInfo()\n\t{\n\t\t$userID = self::GetUserID();\n\t\t// TODO: Use cURL for this, requires server config\n\t\treturn json_decode(file_get_contents(\"http://graph.facebook.com/${userID}\"));\n\t}", "public function getOwnerusername() {}", "public function public_user_data($user_name)\n {\n $url = preg_replace('/set/i', 'user:' . $user_name, $this->public_url);\n return $this->curl($url)->user;\n }", "private static function getAuthorInfo()\n {\n $curTimeStamp = time();\n $author = static::$appId . '-' . $curTimeStamp;\n $authorPwd = md5($curTimeStamp . static::$appSecret);\n\n return $author . ':' . $authorPwd;\n }", "public function getUserInformation()\n {\n return $this->userInformation;\n }", "function getUser()\r\n {\r\n $users = file_get_contents('storage/users.json');\r\n return json_decode($users);\r\n }" ]
[ "0.8057484", "0.71040887", "0.7101486", "0.7065687", "0.6845495", "0.6793592", "0.6758416", "0.67528313", "0.67251027", "0.66836786", "0.658662", "0.6562301", "0.65356356", "0.65356356", "0.65356356", "0.65356356", "0.65356356", "0.65356356", "0.65356356", "0.6456487", "0.64433765", "0.64263105", "0.6402047", "0.63884115", "0.6379974", "0.6366346", "0.6359013", "0.63503057", "0.63359433", "0.63231736", "0.630038", "0.6276831", "0.6256845", "0.6241381", "0.62101525", "0.6208235", "0.6204391", "0.61980784", "0.6194641", "0.6188719", "0.61818445", "0.6161044", "0.61238664", "0.61212164", "0.60858244", "0.6082405", "0.6048621", "0.6047068", "0.60375524", "0.60375524", "0.60375524", "0.6033551", "0.601732", "0.6015245", "0.60145795", "0.5998622", "0.5994312", "0.5978186", "0.5965779", "0.5952418", "0.5930488", "0.5920202", "0.5917996", "0.59148693", "0.5887808", "0.5886289", "0.5875737", "0.5867649", "0.5853732", "0.5848502", "0.58430576", "0.58411103", "0.5840688", "0.58397543", "0.5839615", "0.5835609", "0.58212215", "0.58148915", "0.58148915", "0.58148915", "0.58148915", "0.58148915", "0.5813983", "0.57977897", "0.5789846", "0.5779197", "0.5774932", "0.5767359", "0.57653", "0.5762236", "0.5761346", "0.5758471", "0.57558864", "0.57529426", "0.575121", "0.5748278", "0.5745316", "0.57260865", "0.5723247", "0.5721758", "0.57117003" ]
0.0
-1
Index Page for this controller. Maps to the following URL or or Since this controller is set as the default controller in config/routes.php, it's displayed at So any other public methods not prefixed with an underscore will map to /index.php/welcome/
public function __construct() { parent::__construct(); $this->load->model("M_mahasiswa"); $this->load->library('form_validation'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index () {\n $view = new WelcomeIndex();\n $view->display();\n }", "public function index()\n\t{\n\t\treturn view(\"welcome\");\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome');\n\t}", "public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome';\r\n\t\t$this->template->content = View::factory('index');\r\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function indexAction()\n\t{\n\t\t//echo 'Hello from the index action in the Home controller!';\n\t\t\n\t\t/*View::render('Home' . DS . 'index.php', [\n\t\t\t\"name\" => \"Laura\",\n\t\t\t\"colours\" => [\"red\", \"green\", \"blue\"]\n\t\t]);*/\n\t\t\n\t\t// View::renderTemplate('Home' . DS . 'index.html', [\n\t\t// \t\"name\" => \"Laura\",\n\t\t// \t\"colours\" => [\"red\", \"green\", \"blue\"]\n // ]);\n \n\t\t$this->showRouteParams();\n\t\t// echo \"Hello, World!\";\n }", "public function index()\n\t{\n\t\t//Default view\n\t\t$this->load->view('index.html');\n\t}", "function index() {\n\n // This page cannot be accessed without providing a page\n // the routes.php file will not allow the page to be accessed\n // $route['pages/(:any)'] = 'pages/view/$';\n redirect('/', 'refresh');\n\n }", "public function Index()\n\t{\n\t\t$this->views->SetTitle('Index Controller');\n\t\t$this->views->AddView('index/index.tpl.php', array(),'primary');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('default/index');\n\t}", "public function index() {\n\t\t$this->display('index');\n\t}", "public function index()\n\t{\t\n\n\t\t$this->load->view('welcome_message');\n\t}", "public function indexAction()\n {\n $arr = [\n 'title' => 'Welcome',\n 'data' => [\n 'name' => 'PHP FRAMEWORK',\n ]\n ];\n View::renderTemplate('Welcome/index.html', $arr);\n }", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n }", "public function show_index()\n {\n return view('welcome');\n }", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function Index()\n {\n $this->standardView('Index');\n }", "public function index()\n {\n return view('main.welcome');\n }", "public function index()\n {\n // return view('welcome');\n }", "public function index()\n {\n $this->load->view('index');\n }", "public function index()\n {\n // return view('welcome');\n \n }", "public function index()\n\t{\n\t\t$this->load->view('home');\n\t}", "public function index()\n\t{\n\t\techo \"Nothing !\";\n\t}", "public function index() {\n \n return view('welcome');\n }", "public function index()\n {\n return view('pages.welcome');\n }", "public function Index()\n {\n \treturn view(\"index\");\n\t}", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function index()\n {\n\t\t/*$this->layout->setTitle('Welcome to our Blog');\n\t\t$this->layout->showView('welcome/about.php');*/\n\t\techo 'hello I\\'m using codeigniter';\n }", "public function index() {\n\n\t\tif(!empty($_GET['page'])) {\n\t\t\tif($_GET['page'] == 'home') {\n\t\t\t\t(new HomeController)->home();\n\t\t\t} elseif($_GET['page'] == 'about-me') {\n\t\t\t\t(new HomeController)->aboutMe();\n\t\t\t}\n\t\t} else {\n\t\t\t(new HomeController)->home();\n\t\t}\n\t}", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n\t{\n\t\treturn view('pages/home');\n\t}", "public function index()\n {\n return \"INDEX PAGE\";\n }", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function index()\n {\n SEOMeta::setTitle('Trusted Mortgage & Remortgage Solutions In UK - SmartMortgages UK');\n SEOMeta::setDescription('Home Page Description: For competitive mortgage and remortgage quotes around the UK at affordable rates, speak to one of our expert credit consultants and get a mortgage. For more visit us today.');\n\n return view('welcome');\n }", "function index() {\n \n parent::index();\n\n\t\t$data['user_id'] = $this->tank_auth->get_user_id();\n\t\t$data['username'] = $this->tank_auth->get_username();\n\t\t$data['main_content_view'] = $this->load->view('welcome', $data, true);\n $this->render_template($data);\n\t}", "public function index()\n\t{\n\t\t$this->title = 'My Index Action';\n\n\t\treturn new View('basic/index');\n\t}", "public function index()\n\t{\n\t\t$data['title'] = 'Home | Welcome to AEY';\n\t\t$data ['view_page'] = 'homepage';\n\n\t\t$this->load->view('site', $data);\n\t}", "public function index()\n {\n\n return view('welcome');\n\n }", "public function actionIndex(){ \n $this->view(\"index.php\");\n }", "public function index() {\n $this->registry->template->module = 'welcome';\n \n /*** load the index template ***/\n $this->registry->template->show('index');\n }", "public function actionIndex()\n\t{\n\t $this->pageTitle = 'Get Started';\n\t\t$this->render('index');\n\t}", "public function index()\n {\n return view('front.welcome');\n }", "public function index()\n\t{\n\t\treturn $this->traces();\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\t$this->loadViews(\"index\");\n\t}", "public function index() {\n\t\t$this->title = 'Home';\n\t\t$this->pageData['pages'] = Page::getAll();\n\t\t$this->render('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('home/home');\n\t}", "public function index() \n\t{\n\t\t$this->_render_hod_view('home');\n\t}", "public function index()\r\n\t{\r\n\t\techo \"index\";\r\n\t}", "public function index()\n\t{\n\t\t$this->twig->display('welcome/index.html', []);\n\t}", "public function Index() {\n $this->Display();\n }", "public function index()\r\n {\r\n View::render('home');\r\n }", "public function index()\n {\n $title = 'Welcome Page';\n return view($this->view . '.home', compact('title'));\n }", "public function index()\n\t{\n\t\t//\n\t\techo'index';\n\t}", "public function index() {\n $this->getView('navigation', array('pagename' => 'Welcome'));\n $this->getView('welcome');\n $this->getView('footer');\n }", "public function index()\n {\n return view(\"home\");\n }", "public function home()\n\t{\n\t\t$this->load->view('index_view');\n\t}", "function index() {\n $this->renderView(\"index\");\n }", "function index()\r\n\t{\r\n\t\t$this->view(); \r\n\t}", "public function index()\n\t{\n\t\treturn view('index');\n\t}", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n\n\n\n return view('welcome');\n }", "public function index() {\n\t\t$page = Page::getInstance();\n\t\t$session = Session::getInstance();\n\t\t$page->setPageTitle('Method index notfound');\n\t\t$session->setFlash('Chaque controller doit avoir une m&eacute;thode index', 'error');\n\t}", "public function index()\r\n\t{\r\n\t\t//\r\n\t}", "public function index() {\n\t\t// render the view (/view/main/index.php)\n\t\t$this->view->render(\"main\", \"index\");\n\t}", "public function index()\n {\n return View(\"pages.home\");\n }", "public function index()\n {\n // Nothing to do\n }", "public function index(){\n return view('welcome');\n }", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}" ]
[ "0.7654014", "0.74132985", "0.7394691", "0.731586", "0.72269666", "0.72269666", "0.7189518", "0.7165739", "0.7151943", "0.71448207", "0.7107727", "0.70771956", "0.70734835", "0.70390546", "0.70293397", "0.70293397", "0.70293397", "0.70293397", "0.70293397", "0.6973074", "0.6967954", "0.69457924", "0.69457924", "0.69457924", "0.69457924", "0.69457924", "0.69457924", "0.69457924", "0.69457924", "0.69457924", "0.69457924", "0.69457924", "0.69457924", "0.69457924", "0.6931328", "0.6925398", "0.69116193", "0.6900703", "0.6894199", "0.68748426", "0.68572223", "0.6855815", "0.68385196", "0.6803169", "0.6801062", "0.6801062", "0.6794957", "0.6790282", "0.67669606", "0.67669606", "0.67669606", "0.67669606", "0.67669606", "0.67669606", "0.67669606", "0.67669606", "0.67669606", "0.67669606", "0.67669606", "0.67655253", "0.67642653", "0.6761002", "0.6761002", "0.675031", "0.67501646", "0.6747291", "0.67417115", "0.67379063", "0.6729717", "0.6715565", "0.67127144", "0.6710907", "0.67037076", "0.6700017", "0.66915596", "0.6674429", "0.6662107", "0.6660492", "0.6649288", "0.6630128", "0.6621244", "0.6612582", "0.66043705", "0.6597274", "0.65943825", "0.6593309", "0.6585504", "0.6576178", "0.65758705", "0.65734535", "0.65539104", "0.65466154", "0.6545604", "0.6543696", "0.6543006", "0.6542126", "0.65170395", "0.6516026", "0.6516026", "0.6516026", "0.6516026" ]
0.0
-1
/ Plugin Name: Carousel MobileOneContainers Description: Display a carousel list of containers product Author: Edwin Marte | Ntono Digital Author URI: Version: 1.0 / Adding new metabox Image to post type Meta Boxes
function listing_image_add_metabox () { add_meta_box( 'listingimagediv', __( 'Image Containers Loop', 'text-domain' ), 'listing_image_metabox', 'product', 'side', 'low'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function thmplt_carousel_slide_meta(){\r\n\tadd_meta_box(\"thmplt_carousel_meta_box1\", \"Slide Settings\", \"thmplt_carousel_slide_settings_html\", \"thmplt_carousel\", \"normal\", \"high\");\r\n\tadd_meta_box(\"thmplt_carousel_meta_box2\", \"Slide Images\", \"thmplt_carousel_slide_settings_html2\", \"thmplt_carousel\", \"normal\", \"high\");\r\n}", "function pz_add_custom_meta_box()\n{\n add_meta_box(\n 'custom_meta_box',\n 'Custom Image Metabox',\n 'pz_custom_meta_box_callbacks',\n 'page', // page, post etc.\n 'normal',\n 'high');\n}", "function wr_add_image_portfolio_metaboxes() {\n\tadd_meta_box(\n\t\t'image2',\n\t\t'Image Slide 2',\n\t\t'wr_image2_portfolio',\n\t\t'portfolio',\n\t\t'side',\n\t\t'default'\n\t);\n\tadd_meta_box(\n\t\t'image3',\n\t\t'Image Slide 3',\n\t\t'wr_image3_portfolio',\n\t\t'portfolio',\n\t\t'side',\n\t\t'default'\n\t);\n}", "function sb_slideshow_meta_box_callback() {\n\tglobal $wpdb, $sb_slideshow_interface, $sb_slideshow_slides;\n\n\tsb_slideshow_slides( $sb_slideshow_interface['mysql_select'] ); // push slides\n\n\t// Add custom meta boxes to custom post type\n\tadd_meta_box( 'sb_slides', __( 'Slides', 'startbox' ), 'sb_slideshow_slides_meta', 'slideshow', 'normal', 'low' );\n\tadd_meta_box( 'sb_library', __( 'Media Library', 'startbox' ), 'sb_slideshow_library_meta', 'slideshow', 'normal', 'low' );\n\tadd_meta_box( 'sb_shortcode', __( 'Shortcode', 'startbox' ), 'sb_slideshow_shortcode_meta', 'slideshow', 'side', 'low' );\n\tadd_meta_box( 'sb_slide_options', __( 'Options', 'startbox' ), 'sb_slideshow_options_meta', 'slideshow', 'side', 'low' );\n}", "public function add_meta_boxes(){\r\n \r\n add_meta_box(\r\n 'cyclone-slides-metabox',\r\n __('Slides', 'cyclone-slider-2'),\r\n array( $this, 'render_slides_meta_box' ),\r\n 'cycloneslider' ,\r\n 'normal',\r\n 'high'\r\n );\r\n \r\n add_meta_box(\r\n 'cyclone-slider-preview-metabox',\r\n __('Slider Preview', 'cyclone-slider-2'),\r\n array( $this, 'render_slider_preview_meta_box' ),\r\n 'cycloneslider' ,\r\n 'side',\r\n 'high'\r\n );\r\n \r\n add_meta_box(\r\n 'cyclone-slider-codes',\r\n __('Get Slider Codes', 'cyclone-slider-2'),\r\n array( $this, 'render_slider_codes' ),\r\n 'cycloneslider' ,\r\n 'side',\r\n 'low'\r\n );\r\n \r\n add_meta_box(\r\n 'cyclone-slider-properties-metabox',\r\n __('Basic Settings', 'cyclone-slider-2'),\r\n array( $this, 'render_slider_properties_meta_box' ),\r\n 'cycloneslider' ,\r\n 'side',\r\n 'low'\r\n );\r\n \r\n add_meta_box(\r\n 'cyclone-slider-advanced-settings-metabox',\r\n __('Advanced Settings', 'cyclone-slider-2'),\r\n array( $this, 'render_slider_advanced_settings_meta_box' ),\r\n 'cycloneslider' ,\r\n 'side',\r\n 'low'\r\n );\r\n \r\n add_meta_box(\r\n 'cyclone-slider-templates-metabox',\r\n __('Templates', 'cyclone-slider-2'),\r\n array( $this, 'render_slider_templates_meta_box' ),\r\n 'cycloneslider' ,\r\n 'normal',\r\n 'low'\r\n );\r\n \r\n add_meta_box(\r\n 'cyclone-slider-id',\r\n __('Slideshow ID', 'cyclone-slider-2'),\r\n array( $this, 'render_slider_id' ),\r\n 'cycloneslider' ,\r\n 'normal',\r\n 'low'\r\n );\r\n }", "function add_shortcode_metabox() {\n add_meta_box('acf_slideshow_shortcode', 'Shortcode', 'acfcallback', 'acf_slideshow', 'side', 'default');\n}", "function scalia_slides_register_meta_box($post) {\r\r\n\tremove_meta_box('postimagediv', 'scalia_slide', 'side');\r\r\n\tadd_meta_box('postimagediv', __('Slide Image', 'scalia'), 'post_thumbnail_meta_box', 'scalia_slide', 'normal', 'high');\r\r\n\tadd_meta_box('scalia_slide_settings', __('Slide Settings', 'scalia'), 'scalia_slide_settings_box', 'scalia_slide', 'normal', 'high');\r\r\n}", "function slider_metabox() {\n add_meta_box('slider_detail_metabox', __('Slider Details', 'calibrefx'), 'slider_detail_metabox', 'slider', 'normal', 'high');\n}", "function wpb_carousel_widget() {\n\t register_widget( 'wpb_widget' );\n\t}", "function triumph_hero(){\n global $homepage_metabox;\n $id = 'homepage';\n print '<div id=\"hp-top\">';\n print '<div class=\"hp-top-background-block\"></div>';\n $i = 0;\n while($homepage_metabox->have_fields('sliders')):\n $active = $i==0?' active':'';\n $indicators .= '<li data-target=\"#myCarousel_'.$id.'\" data-slide-to=\"'.$i.'\" class=\"'.$active.'\"></li>';\n $items .= '\n <div class=\"item'.$active.'\">\n <div class=\"image_block_wrapper\">\n <div class=\"image_block\" style=\"background: url('.$homepage_metabox->get_the_value('image').') center top no-repeat #000000;background-size: cover;\">\n <div class=\"quote_block\">\n <div class=\"wrap\">\n <div class=\"quote\">'.apply_filters('the_content',$homepage_metabox->get_the_value('quote')).'</div>\n <div class=\"attribution\">'.$homepage_metabox->get_the_value('attribution').'</div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"wrap\">\n <div class=\"content-sidebar-wrap row\">\n <main itemprop=\"mainContentOfPage\" role=\"main\" class=\"content col-md-8 col-sm-12\">\n <article itemtype=\"http://schema.org/CreativeWork\" itemscope=\"itemscope\" class=\"page entry\">\n <header class=\"entry-header\">\n <h1 itemprop=\"headline\" class=\"entry-title\">'.$homepage_metabox->get_the_value('title').'</h1> \n </header>\n <div itemprop=\"text\" class=\"entry-content\">\n '.apply_filters('the_content',$homepage_metabox->get_the_value('content')).'\n </div>\n </article>\n </main>\n <aside itemtype=\"http://schema.org/WPSideBar\" itemscope=\"itemscope\" role=\"complementary\" class=\"sidebar sidebar-primary widget-area col-md-4 hidden-sm hidden-xs\">\n '.apply_filters('the_content',$homepage_metabox->get_the_value('sidebar')).'\n </aside>\n </div>\n </div>\n </div>';\n $i++;\n endwhile;\n print msd_carousel_wrapper($items,array('id' => $id,'indicators' => $indicators));\n print '</div>';\n}", "function oxy_move_slideshow_meta_box()\n{\n remove_meta_box('postimagediv', 'oxy_slideshow_image', 'side');\n add_meta_box('postimagediv', __('Slideshow Image', 'lambda-admin-td'), 'post_thumbnail_meta_box', 'oxy_slideshow_image', 'advanced', 'low');\n}", "public function htheme_imgcarousel_element(){\r\n\r\n\t\t//SETUP VC MAP\r\n\t\tvc_map(\r\n\t\t\tarray(\r\n\t\t\t\t\"name\" => esc_html__( \"Basic Image Carousel\", \"js_composer\" ),\r\n\t\t\t\t\"base\" => \"htheme_imgcarousel_slug\",\r\n\t\t\t\t\"class\" => \"\",\r\n\t\t\t\t'icon' => 'htheme_imgcarousel_icon',\r\n\t\t\t\t\"category\" => esc_html__( \"WooCommerce\", \"js_composer\"),\r\n\t\t\t\t'description' => esc_html__( \"Add an image carousel to your site.\", \"js_composer\" ),\r\n\t\t\t\t\"params\" => array(\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\"type\" => \"attach_images\",\r\n\t\t\t\t\t\t\"holder\" => \"div\",\r\n\t\t\t\t\t\t\"class\" => \"htheme_element_class\",\r\n\t\t\t\t\t\t\"heading\" => esc_html__( \"Images\", \"js_composer\" ),\r\n\t\t\t\t\t\t\"param_name\" => \"htheme_imgcarousel_images\",\r\n\t\t\t\t\t\t\"value\" => __( \"\", \"js_composer\" ),\r\n\t\t\t\t\t\t\"description\" => esc_html__( \"Add multiple images for you image carousel.\", \"js_composer\" )\r\n\t\t\t\t\t),\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\"type\" => \"dropdown\",\r\n\t\t\t\t\t\t\"holder\" => \"div\",\r\n\t\t\t\t\t\t\"class\" => \"htheme_element_class\",\r\n\t\t\t\t\t\t\"heading\" => esc_html__( \"Image sizing\", \"js_composer\" ),\r\n\t\t\t\t\t\t\"param_name\" => \"htheme_image_carousel_size\",\r\n\t\t\t\t\t\t\"value\" => array(\r\n\t\t\t\t\t\t\t'Contain' => 'contain',\r\n\t\t\t\t\t\t\t'Cover' => 'cover',\r\n\t\t\t\t\t\t\t'Auto' => 'auto'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'std' => '',\r\n\t\t\t\t\t\t\"description\" => esc_html__( \"Choose the image sizing.\", \"js_composer\" ),\r\n\t\t\t\t\t),\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\"type\" => \"dropdown\",\r\n\t\t\t\t\t\t\"holder\" => \"div\",\r\n\t\t\t\t\t\t\"class\" => \"htheme_element_class\",\r\n\t\t\t\t\t\t\"heading\" => esc_html__( \"Layout\", \"js_composer\" ),\r\n\t\t\t\t\t\t\"param_name\" => \"htheme_image_carousel_layout\",\r\n\t\t\t\t\t\t\"value\" => array(\r\n\t\t\t\t\t\t\t'Full row carousel' => 'full_row',\r\n\t\t\t\t\t\t\t'Contained carousel' => 'contained_row'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'std' => '',\r\n\t\t\t\t\t\t\"description\" => esc_html__( \"Choose the layout for your image carousel.\", \"js_composer\" ),\r\n\t\t\t\t\t),\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\"type\" => \"dropdown\",\r\n\t\t\t\t\t\t\"holder\" => \"div\",\r\n\t\t\t\t\t\t\"class\" => \"htheme_element_class\",\r\n\t\t\t\t\t\t\"heading\" => esc_html__( \"Carousel height\", \"js_composer\" ),\r\n\t\t\t\t\t\t\"param_name\" => \"htheme_image_carousel_height\",\r\n\t\t\t\t\t\t\"value\" => array(\r\n\t\t\t\t\t\t\t'100px' => 100,\r\n\t\t\t\t\t\t\t'200px' => 200,\r\n\t\t\t\t\t\t\t'300px' => 300,\r\n\t\t\t\t\t\t\t'400px' => 400,\r\n\t\t\t\t\t\t\t'500px' => 500,\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'std' => '',\r\n\t\t\t\t\t\t\"description\" => esc_html__( \"Set the height for your image carousel.\", \"js_composer\" ),\r\n\t\t\t\t\t),\r\n\t\t\t\t)\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t}", "public function register_carousel_three_options ( $wp_customize ){\n\t $wp_customize->add_section( 'mytheme_options_three',\n\t \tarray(\n\t\t\t'title'=> __('Carousel Three Options', 'Claremont Theme'),\n\t\t\t'priority'=> 37, //Determines what order this appears in\n\t\t\t'capability'=> 'edit_theme_options', //Capability needed to tweak\n\t\t\t'description'=> __('Allows you to customize some example setting for Claremont Theme', 'Claremont Theme'),\n\t\t)\n\t );\n\n\t \t\t \n // =============================\n // = Image =\n // =============================\n\n\t \n\t $wp_customize->add_setting('mytheme_options_three[carousel_image_three]',\n\t\tarray(\n\t\t\t'default'=> get_template_directory_uri() . '/images/header/IMG_0932.JPG',\n\t\t\t'type' => 'option',\n\t\t\t'capability'=> 'edit_theme_options',\n\t\t)\n\t );\n\t \n\t $wp_customize->add_control ( new WP_Customize_Image_Control( $wp_customize,\n\t \t'mytheme_carousel_control_three',//Set a unique ID for the control\n\t\tarray(\n\t\t \n\t\t\t'label'=> __('Carousel image', 'Claremont Theme'),\n\t\t\t'section'=> 'mytheme_options_three',//ID of the section this control renders\n\t\t\t'settings'=>'mytheme_options_three[carousel_image_three]',//ID of the setting\n\t\t\t)\t\t\t\t\t \n\t ));\n \n // =============================\n // = Title =\n // =============================\n\t $wp_customize->add_setting('mytheme_options_three[carousel_title_three]',\n\t\tarray(\n\t\t\t'default'=> 'Default Title',\n\t\t\t'type' => 'option',\n\t\t\t'capability'=> 'edit_theme_options',\n\t\t)\n\t );\n\t\t\t \n\t $wp_customize->add_control ( new WP_Customize_Control( $wp_customize,\n\t \t'mytheme_carousel_title_three',//Set a unique ID for the control\n\t\tarray(\n\t\t \n\t\t\t'label'=> __('Carousel title', 'Claremont Theme'),\n\t\t\t'type'=>'text',\n\t\t\t'section'=> 'mytheme_options_three',//ID of the section this control renders\n\t\t\t'settings'=>'mytheme_options_three[carousel_title_three]',//ID of the setting\n\t\t\t)\t\t\t\t\t \n\t ));\n \n // =============================\n // = TextArea =\n // =============================\n\t $wp_customize->add_setting('mytheme_options_three[carousel_textarea_three]',\n\t\tarray(\n\t\t\t'default'=> 'Place text here.',\n\t\t\t'type' => 'option',\n\t\t\t'capability'=> 'edit_theme_options',\n\t\t)\n\t );\n\t \n\t $wp_customize->add_control ( new Example_Customize_Textarea_Control( $wp_customize,\n\t \t'mytheme_carousel_textarea_three',//Set a unique ID for the control\n\t\tarray(\n\t\t \n\t\t\t'label'=> __('Carousel textarea', 'Claremont Theme'),\n\t\t\t'section'=>'mytheme_options_three',//ID of the section this control renders\n\t\t\t'settings'=>'mytheme_options_three[carousel_textarea_three]',//ID of the setting\n\t\t\t)\t\t\t\t\t \n\t ));\n\t \n\t \n // =============================\n // = Page Dropdown =\n // ============================\n\t $wp_customize->add_setting('mytheme_options_three[carousel_pagelink_three]',\n\t \tarray(\n\t\t\t'capability'=>'edit_theme_options',\n \t\t'type'=>'option',\n\t\t));\n\n\t $wp_customize->add_control('mytheme_carousel_pagelink_three', array(\n \t'label'=> __('Carousel page link', 'Claremont Theme'),\n \t'section'=> 'mytheme_options_three',\n \t'type' => 'dropdown-pages',\n \t'settings' => 'mytheme_options_three[carousel_pagelink_three]',\n\t\t));\n\n\n // =============================\n // = Pagelink Title =\n // =============================\n\t $wp_customize->add_setting('mytheme_options_three[carousel_pagelink_title_three]',\n\t\tarray(\n\t\t\t'default'=> 'Button Three Title',\n\t\t\t'type' => 'option',\n\t\t\t'capability'=> 'edit_theme_options',\n\t\t)\n\t );\n\n\t $wp_customize->add_control ( new WP_Customize_Control( $wp_customize,\n\t \t'mytheme_carousel_pagelinktitle_three',//Set a unique ID for the control\n\t\tarray(\n\t\t \n\t\t\t'label'=> __('Carousel page link title', 'Claremont Theme'),\n\t\t\t'type'=>'text',\n\t\t\t'section'=> 'mytheme_options_three',//ID of the section this control renders \n\t\t\t'settings'=>'mytheme_options_three[carousel_pagelink_title_three]',//ID of the setting\n\t\t\t)\t\t\t\t\t \n\t ));\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}", "public function add_meta_boxes() {\n add_meta_box( 'wc-product-label-gallery', __( 'Label gallery', 'wc-label-gallery' ), array( $this, 'gallery_output' ), 'product', 'side', 'low' );\n }", "function mobile_kiosk_add_post_meta_boxes() {\n\t\n\t// Gallery Options\n\tadd_meta_box(\n\t\t'gallery-options',\n\t\tesc_html__( 'Gallery Options', 'gallery-options' ),\n\t\t'mobile_kiosk_gallery_options_meta_box', \n\t\t'kioskgallery', \n\t\t'normal', \n\t\t'high' \n\t);\n\t\n\t// Gallery Slides\n\tadd_meta_box(\n\t\t'gallery-slides',\n\t\tesc_html__( 'Gallery Slides', 'gallery-slides' ),\n\t\t'mobile_kiosk_gallery_slides_meta_box', \n\t\t'kioskgallery', \n\t\t'normal', \n\t\t'low' \n\t);\n\t\n}", "public function create_meta_box() {\n\t\tadd_meta_box( 'slider_meta', 'Example metabox', array( $this, 'slider_meta_fields_callback' ), [ 'Page', 'post' ] );\n\n\t}", "function portfolioism_add_custom_metabox() {\n add_meta_box(\n 'portfolioism_meta',\n 'Artwork',\n 'portfolioism_meta_callback',\n 'artwork'\n );\n }", "function _sp_custom_box_carousel_shortcode( $post ) {\n\n\t$output = '';\n\n\t$output .= '<div class=\"settings-container\">' . PHP_EOL;\t\n\t$output .= sp_get_slider_shortcode( $post->ID ) . PHP_EOL;\n\t$output .= '<p class=\"howto\">' . __( 'Paste this shortcode on the page you want this carousel slider to show.', 'sp-theme' ) . '</p>' . PHP_EOL;\t\n\t$output .= '</div>' . PHP_EOL;\n\n\techo $output;\n}", "function igv_cmb_metaboxes() {\n\t$prefix = '_igv_';\n\n\t/**\n\t * Metaboxes declarations here\n * Reference: https://github.com/WebDevStudios/CMB2/blob/master/example-functions.php\n\t */\n\n\n\n $show_meta = new_cmb2_box( array(\n 'id' => $prefix . 'show_meta',\n 'title' => esc_html__( 'Show Metadata', 'cmb2' ),\n 'object_types' => array( 'show', ), // Post type\n // 'show_on_cb' => 'yourprefix_show_if_front_page', // function should return a bool value\n // 'context' => 'normal',\n 'priority' => 'high',\n // 'show_names' => true, // Show field names on the left\n // 'cmb_styles' => false, // false to disable the CMB stylesheet\n // 'closed' => true, // true to keep the metabox closed by default\n // 'classes' => 'extra-class', // Extra cmb2-wrap classes\n // 'classes_cb' => 'yourprefix_add_some_classes', // Add classes through a callback.\n ) );\n\n $show_meta->add_field( array(\n 'name' => 'Cover photo',\n 'desc' => 'Upload an image or enter an URL.',\n 'id' => $prefix . 'cover_photo',\n 'type' => 'file',\n // Optional:\n 'options' => array(\n 'url' => false, // Hide the text input for the url\n ),\n 'text' => array(\n 'add_upload_file_text' => 'Add Cover Photo' // Change upload button text. Default: \"Add or Upload File\"\n ),\n ) );\n\n $show_meta->add_field( array(\n 'name' => __( 'Youtube playlist ID', 'cmb2' ),\n 'id' => $prefix . 'playlist_id',\n 'type' => 'text',\n ));\n\n $show_meta->add_field( array(\n 'name' => __( 'Youtube playlist link', 'cmb2' ),\n 'id' => $prefix . 'playlist_link',\n 'type' => 'text',\n ));\n\n $show_meta->add_field( array(\n 'name' => __( 'Tracklist', 'cmb2' ),\n 'id' => $prefix . 'tracklist',\n 'type' => 'wysiwyg',\n ));\n\n $show_meta->add_field( array(\n 'name' => __( 'Episode #', 'cmb2' ),\n 'id' => $prefix . 'episode_number',\n 'type' => 'text',\n 'attributes' => array(\n 'pattern' => '\\d*',\n ),\n ));\n\n}", "function add_images_meta_box($post) {\n $images = get_post_meta($post->ID, 'imagegallery_images', true);\n\t$count = 1;\n\tif (!empty($images) ) {\n\t\tforeach($images as $image) {\n\t\t\toutput_image_add_box($count++, $image);\n\t\t}\n\t}\n\techo '<div id=\"admin-list-end-marker\" style=\"clear: both;\"></div><a rel=\"image\" href=\"#\" id=\"add-admin-list\" name=\"add-admin-list\">Add Images</a>';\n}", "function _carousel_shortcode_info(&$shortcodes) {\n\t$shortcodes['carousel'] = array(\n\t\t'title' => t('Carousel'),\n\t\t'description' => t('Create a Carousel of items with captions'),\n\t\t'process callback' => 'art_shortcode_carousel',\n\t\t'tips callback' => 'art_shortcode_carousel_tip',\n\t);\n\t\n\t$shortcodes['carousel_item'] = array(\n\t\t'title' => t('Carousel Item'),\n\t\t'description' => t('Create a carousel item to go inside a carousel'),\n\t\t'process callback' => 'art_shortcode_carousel_item',\n\t\t'tips callback' => 'art_shortcode_carousel_item_tip',\n\t);\n\t\n\t\n\treturn $shortcodes;\n}", "function coolRahulSoni_meta_box_add()\n{\n add_meta_box( 'my-meta-box-id', 'My First Meta Box', 'cd_meta_box_cb', 'post', 'normal', 'high' );\n}", "function bnk_create_slide_metabox() {\r\n\tglobal $slide_meta;\r\n \r\n\tadd_meta_box($slide_meta['id'], $slide_meta['title'], 'bnk_build_slide_metabox', $slide_meta['page'], $slide_meta['context'], $slide_meta['priority']);\r\n}", "function pg_add_custom_box() {\r\n\tif( function_exists( 'add_meta_box' )) {\r\n\t\tadd_meta_box( 'pg_custom_box_1', __( 'Edit Photocrati Galleries / Albums', 'photocrati' ), 'pg_inner_custom_box_1', 'page', 'normal', 'high' );\r\n\t\tadd_meta_box( 'pg_custom_box_2', __( 'Edit Photocrati Galleries / Albums', 'photocrati' ), 'pg_inner_custom_box_1', 'post', 'normal', 'high' );\r\n\t}\r\n}", "function my_meta_init()\n{\n // http://codex.wordpress.org/Function_Reference/wp_enqueue_script\n // http://codex.wordpress.org/Function_Reference/wp_enqueue_style\n \n //wp_enqueue_script('my_meta_js', MY_THEME_PATH . '/custom/meta.js', array('jquery'));\n wp_enqueue_style('my_meta_css', MY_THEME_PATH . '/custom/shop-meta.css');\n \n // review the function reference for parameter details\n // http://codex.wordpress.org/Function_Reference/add_meta_box\n \n // add a meta box for each of the wordpress page types: posts and pages\n foreach (array('product') as $type) \n {\n add_meta_box('my_all_meta', 'Prezzo e Descrizione Prodotto', 'my_meta_setup', $type, 'normal', 'high');\n }\n \n // add a callback function to save any data a user enters in\n add_action('save_post','my_meta_save');\n}", "function add_meta_box_horse_gallery() {\n\tglobal $meta_box_portfolio_images;\n\tadd_meta_box($meta_box_portfolio_images['id'], $meta_box_portfolio_images['title'], 'meta_box_horse_gallery', $meta_box_portfolio_images['page'], $meta_box_portfolio_images['context'], $meta_box_portfolio_images['priority']);\n}", "function civ_meta_box() {\n\n\tadd_meta_box( 'my box', 'Civ Slider','show_my_meta_box', 'post' );\n\n\tfunction show_my_meta_box( $post ) {\n\t\t//\tThis will count the amount of slides total to insert for the slide order .\n\t\t\n\t\tglobal $wpdb;\n\t\t$table_name = $wpdb->prefix . 'civ_slider';\n\t\t$row_count = $wpdb->get_var( 'select count(*) from $table_name' );\n\t\t$slide_count = $row_count + 1;\n\t\t$post_id_check = $post->ID;\n\n\t\t$box_check = $wpdb->get_row($wpdb->prepare(\"select * from $table_name where post_id=%d\", $post_id_check));\n?>\n\t<form method=\"post\" >\n\t\t<label>Check here to add post to homepage slider: </label>\n\t\t<input type=\"checkbox\" name=\"chkd\" <?php if($box_check != null ){echo \"checked\";} ?> />\n\t\t<input type=\"hidden\" value=\"<?php echo $post->ID; ?>\" name=\"post_id\" />\n\t\t<input type=\"hidden\" value=\"<?php echo $slide_count; ?>\" name=\"slide_order\" />\n\t</form>\n\t\t<?php\n\t}\n}", "function tg_add_product_gallery_metabox() { \n\t// More info about arguments in the WP Codex\n\tadd_meta_box(\n\t\t'product_gallery', // Name of the box\n\t\t'Gallery', // Title of the box\n\t\t'tg_product_gallery_metabox', // The metabox html function \n\t\t'post', // SET TO THE POST TYPE WHERE THE METABOX IS SHOWN\n\t\t'normal', // Specifies where the box is shown\n\t\t'high' // Specifies where the box is shown\n\t); \n}", "function tg_product_gallery_metabox() {\n\tglobal $post;\n\t// Here we get the current images ids of the gallery\n\t$values = get_post_custom($post->ID);\n\tif(isset($values['product_gallery'])) {\n\t\t// The json decode return an array of image ids\n\t\t$ids = json_decode($values['product_gallery'][0]);\n\t}else {\n\t\t$ids = array();\n\t}\n\t//wp_nonce_field('my_meta_box_nonce', 'post_gallery_meta_box_nonce'); // Security\n\techo '<input type=\"hidden\" name=\"post_gallery_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n\t// Implode the array to a comma separated list\n\t$cs_ids = implode(\",\", $ids); \n\t// We display the gallery\n\t$html = do_shortcode('[gallery ids=\"'.$cs_ids.'\"]');\n\t// Here we store the image ids which are used when saving the product\n\t$html .= '<input id=\"product_gallery_ids\" type=\"hidden\" name=\"product_gallery_ids\" value=\"'.$cs_ids. '\" />';\n\t// A button which we will bind to later on in JavaScript\n\t$html .= '<div class=\"clear_div\">';\n\t$html .= '<input id=\"manage_gallery\" title=\"Manage gallery\" type=\"button\" value=\"Manage gallery\" class=\"button-primary button-large\" />';\n\tif(!empty($cs_ids))\t{\n\t\t$html .= '&nbsp;&nbsp;<input id=\"remove_gallery\" title=\"Remove gallery\" type=\"button\" value=\"Remove gallery\" class=\"remove_gallery\" />';\n\t\t$html .= '</div>';\n\t}else{\n\t\t$html .= '&nbsp;&nbsp;<input id=\"remove_gallery\" title=\"Remove gallery\" type=\"button\" value=\"Remove gallery\" \n\t\tclass=\"remove_gallery\" style=\"display:none;\" />';\n\t\t$html .= '</div>';\t\t\n\t}\t\n\techo $html;\n}", "function on_load_page() {\n //ensure, that the needed javascripts been loaded to allow drag/drop, expand/collapse and hide/show of boxes\n wp_enqueue_script('common');\n wp_enqueue_script('wp-lists');\n wp_enqueue_script('postbox');\n // scripts\n wp_enqueue_script(array(\n 'jquery',\n 'jquery-ui-core',\n 'jquery-ui-tabs',\n 'jquery-ui-sortable',\n 'wp-color-picker',\n 'thickbox',\n 'media-upload',\t\n ));\n\n\n // 3.5 media gallery\n if( function_exists('wp_enqueue_media') && !did_action( 'wp_enqueue_media' ))\n {\n wp_enqueue_media();\n }\n // styles\n wp_enqueue_style(array(\n 'thickbox',\n 'wp-color-picker',\n ));\n wp_enqueue_style( 'rt-admin-css', SLIDESHOW_PATH. 'admin/css/slide_admin.css' );\n wp_enqueue_script( 'rt-admin-js', SLIDESHOW_PATH. 'admin/js/slide_admin.js' );\n //add several metaboxes now, all metaboxes registered during load page can be switched off/on at \"Screen Options\" automatically, nothing special to do therefore\n add_meta_box('slideshow_settings', 'Slideshow Settings', array(&$this, 'slideshow_settings'), $this->pagehook, 'normal', 'core');\n }", "function htheme_imgcarousel_shortcode( $atts ) {\r\n\r\n\t\t#SETUP CONTENT CLASS\r\n\t\t$htheme_data = $this->htheme_content->htheme_image_carousel($atts);\r\n\r\n\t\t#RETURN DATA/HTML\r\n\t\treturn $htheme_data;\r\n\r\n\t}", "function cbc_register_meta_boxes( $meta_boxes ) {\n\t/**\n\t * prefix of meta keys (optional)\n\t * Use underscore (_) at the beginning to make keys hidden\n\t * Alt.: You also can make prefix empty to disable it\n\t */\n\t// Better has an underscore as last sign\n\t$prefix = 'cbc_';\n\t\n\t$meta_boxes[] = array(\n\t\t// Meta box id, UNIQUE per meta box. Optional since 4.1.5\n\t\t'id' => 'slider',\n\n\t\t// Meta box title - Will appear at the drag and drop handle bar. Required.\n\t\t'title' => esc_html__( 'Main Slider', 'cbc' ),\n\n\t\t// Post types, accept custom post types as well - DEFAULT is 'post'. Can be array (multiple post types) or string (1 post type). Optional.\n\t\t'post_types' => array( 'page' ),\n\n\t\t// Where the meta box appear: normal (default), advanced, side. Optional.\n\t\t'context' => 'normal',\n\n\t\t// Order of meta box: high (default), low. Optional.\n\t\t'priority' => 'high',\n\n\t\t// Auto save: true, false (default). Optional.\n\t\t'autosave' => true,\n\n\t\t// List of meta fields\n\t\t'fields' => array(\n\t\t\t// IMAGE UPLOAD\n\t\t\tarray(\n\t\t\t\t'id' => \"{$prefix}slider_images\",\n\t\t\t\t'name' => esc_html__( 'Slider Images', 'cbc' ),\n\t\t\t\t'type' => 'image_advanced',\n\t\t\t\t'force_delete' => false,\n\t\t\t\t'max_file_uploads' => 10,\n\t\t\t\t'max_status' => true,\n\t\t\t),\n\t\t\t// TEXTAREA\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Image Captions', 'cbc' ),\n\t\t\t\t'label_description' => esc_html__( 'Should have one caption for each image', 'cbc' ),\n\t\t\t\t'desc' => esc_html__( 'You can add basic HTML tags', 'cbc' ),\n\t\t\t\t'id' => \"{$prefix}slider_captions\",\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'cols' => 20,\n\t\t\t\t'rows' => 3,\n\t\t\t\t'clone' => true,\n\t\t\t),\n\t\t\t// DIVIDER\n\t\t\tarray(\n\t\t\t\t'type' => 'divider',\n\t\t\t),\n\t\t\t// TEXT\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Slider Width', 'cbc' ),\n\t\t\t\t'label_description' => esc_html__( 'Default Max Width is 1600 pixels', 'cbc' ),\n\t\t\t\t'desc' => esc_html__( 'In Pixels', 'cbc' ),\n\t\t\t\t'id' => \"{$prefix}slider_width\",\n\t\t\t\t'type' => 'text',\n\t\t\t),\n\t\t\t// TEXT\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Slider Ratio', 'cbc' ),\n\t\t\t\t'desc' => esc_html__( '(Width in pixels)/(Height in pixels)', 'cbc' ),\n\t\t\t\t'id' => \"{$prefix}slider_ratio\",\n\t\t\t\t'type' => 'text',\n\t\t\t),\n\t\t\t// TEXT\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Slider Auto Play', 'cbc' ),\n\t\t\t\t'desc' => esc_html__( 'Enter \"false\" or time in milliseconds', 'cbc' ),\n\t\t\t\t'id' => \"{$prefix}slider_autoplay\",\n\t\t\t\t'type' => 'text',\n\t\t\t),\n\t\t\t// TEXT\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Slider Transition Speed', 'cbc' ),\n\t\t\t\t'desc' => esc_html__( 'Enter time in milliseconds', 'cbc' ),\n\t\t\t\t'id' => \"{$prefix}slider_transition\",\n\t\t\t\t'type' => 'text',\n\t\t\t),\n\t\t),\n\t);\n\t\n\t$meta_boxes[] = array(\n\t\t// Meta box id, UNIQUE per meta box. Optional since 4.1.5\n\t\t'id' => 'section_main',\n\n\t\t// Meta box title - Will appear at the drag and drop handle bar. Required.\n\t\t'title' => esc_html__( 'Main Section', 'cbc' ),\n\n\t\t// Post types, accept custom post types as well - DEFAULT is 'post'. Can be array (multiple post types) or string (1 post type). Optional.\n\t\t'post_types' => array( 'post', 'page' ),\n\n\t\t// Where the meta box appear: normal (default), advanced, side. Optional.\n\t\t'context' => 'normal',\n\n\t\t// Order of meta box: high (default), low. Optional.\n\t\t'priority' => 'high',\n\n\t\t// Auto save: true, false (default). Optional.\n\t\t'autosave' => true,\n\n\t\t// List of meta fields\n\t\t'fields' => array(\n\t\t\t// HIDDEN\n\t\t\tarray(\n\t\t\t\t'id' => \"{$prefix}section_main_type\",\n\t\t\t\t'type' => 'hidden',\n\t\t\t\t// Hidden field must have predefined value\n\t\t\t\t'std' => 'standard',\n\t\t\t),\n\t\t\t// SELECT BOX\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Select Call To Action Type', 'cbc' ),\n\t\t\t\t'id' => \"{$prefix}section_main_cta_type\",\n\t\t\t\t'type' => 'select',\n\t\t\t\t// Array of 'value' => 'Label' pairs for select box\n\t\t\t\t'options' => array(\n\t\t\t\t\t'none' => esc_html__( 'None', 'cbc' ),\n\t\t\t\t\t'standard' => esc_html__( 'Standard', 'cbc' ),\n\t\t\t\t\t'emphesis' => esc_html__( 'Emphesis', 'cbc' ),\n\t\t\t\t),\n\t\t\t\t// Select multiple values, optional. Default is false.\n\t\t\t\t'multiple' => false,\n\t\t\t\t'std' => 'none',\n\t\t\t\t/*'placeholder' => esc_html__( 'Select an Item', 'cbc' ),*/\n\t\t\t),\n\t\t\t// TEXT\n\t\t\tarray(\n\t\t\t\t// Field name - Will be used as label\n\t\t\t\t'name' => esc_html__( 'Call To Action Text', 'cbc' ),\n\t\t\t\t'id' => \"{$prefix}section_main_cta_text\",\n\t\t\t\t'type' => 'text',\n\t\t\t),\n\t\t\t// URL\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Call To Action URL', 'cbc' ),\n\t\t\t\t'id' => \"{$prefix}section_main_cta_url\",\n\t\t\t\t/*'desc' => esc_html__( 'URL description', 'cbc' ),*/\n\t\t\t\t'type' => 'url',\n\t\t\t\t'std' => 'http://classicalballetconservatory.com',\n\t\t\t),\n\t\t\t// DIVIDER\n\t\t\tarray(\n\t\t\t\t'type' => 'divider',\n\t\t\t),\n\t\t\t// IMAGE UPLOAD\n\t\t\tarray(\n\t\t\t\t'id' => \"{$prefix}section_main_bg\",\n\t\t\t\t'name' => esc_html__( 'Background Image', 'cbc' ),\n\t\t\t\t'type' => 'image_advanced',\n\n\t\t\t\t// Delete image from Media Library when remove it from post meta?\n\t\t\t\t// Note: it might affect other posts if you use same image for multiple posts\n\t\t\t\t'force_delete' => false,\n\n\t\t\t\t// Maximum image uploads\n\t\t\t\t'max_file_uploads' => 1,\n\n\t\t\t\t// Display the \"Uploaded 1/2 files\" status\n\t\t\t\t'max_status' => false,\n\t\t\t),\n\t\t),\n\t);\n\t\n\n\tfor($i = 1; $i <= 5; $i++) {\n\t\t$meta_boxes[] = array(\n\t\t\t// Meta box id, UNIQUE per meta box. Optional since 4.1.5\n\t\t\t'id' => 'section_'.$i,\n\t\n\t\t\t// Meta box title - Will appear at the drag and drop handle bar. Required.\n\t\t\t'title' => esc_html__( 'Section '.$i, 'cbc' ),\n\t\n\t\t\t// Post types, accept custom post types as well - DEFAULT is 'post'. Can be array (multiple post types) or string (1 post type). Optional.\n\t\t\t'post_types' => array( 'page' ),\n\t\n\t\t\t// Where the meta box appear: normal (default), advanced, side. Optional.\n\t\t\t'context' => 'normal',\n\t\n\t\t\t// Order of meta box: high (default), low. Optional.\n\t\t\t'priority' => 'high',\n\t\n\t\t\t// Auto save: true, false (default). Optional.\n\t\t\t'autosave' => true,\n\t\n\t\t\t// List of meta fields\n\t\t\t'fields' => array(\n\t\t\t\t// SELECT BOX\n\t\t\t\tarray(\n\t\t\t\t\t'name' => esc_html__( 'Select', 'cbc' ),\n\t\t\t\t\t'id' => \"{$prefix}section_{$i}_type\",\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t// Array of 'value' => 'Label' pairs for select box\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'hidden' => esc_html__( 'Hide', 'cbc' ),\n\t\t\t\t\t\t'standard' => esc_html__( 'Standard', 'cbc' ),\n\t\t\t\t\t\t'image_left' => esc_html__( 'Image Left', 'cbc' ),\n\t\t\t\t\t\t'image_right' => esc_html__( 'Image Right', 'cbc' ),\n\t\t\t\t\t\t'image_full' => esc_html__( 'Image Full', 'cbc' ),\n\t\t\t\t\t\t'emphesis' => esc_html__( 'Emphesis', 'cbc' ),\n\t\t\t\t\t),\n\t\t\t\t\t// Select multiple values, optional. Default is false.\n\t\t\t\t\t'multiple' => false,\n\t\t\t\t\t'std' => 'hidden',\n\t\t\t\t\t/*'placeholder' => esc_html__( 'Select an Item', 'cbc' ),*/\n\t\t\t\t),\n\t\t\t\t// DIVIDER\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'divider',\n\t\t\t\t),\n\t\t\t\t// TEXT\n\t\t\t\tarray(\n\t\t\t\t\t// Field name - Will be used as label\n\t\t\t\t\t'name' => esc_html__( 'Section Heding', 'cbc' ),\n\t\t\t\t\t'id' => \"{$prefix}section_{$i}_title\",\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t),\n\t\t\t\t// WYSIWYG/RICH TEXT EDITOR\n\t\t\t\tarray(\n\t\t\t\t\t'name' => esc_html__( 'Section Content', 'cbc' ),\n\t\t\t\t\t'id' => \"{$prefix}section_{$i}_content\",\n\t\t\t\t\t'type' => 'wysiwyg',\n\t\t\t\t\t// Set the 'raw' parameter to TRUE to prevent data being passed through wpautop() on save\n\t\t\t\t\t'raw' => false,\n\t\t\t\t\t'std' => esc_html__( '', 'cbc' ),\n\t\n\t\t\t\t\t// Editor settings, see wp_editor() function: look4wp.com/wp_editor\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'textarea_rows' => 4,\n\t\t\t\t\t\t'teeny' => true,\n\t\t\t\t\t\t'media_buttons' => false,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t// DIVIDER\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'divider',\n\t\t\t\t),\n\t\t\t\t// SELECT BOX\n\t\t\t\tarray(\n\t\t\t\t\t'name' => esc_html__( 'Select Call To Action Type', 'cbc' ),\n\t\t\t\t\t'id' => \"{$prefix}section_{$i}_cta_type\",\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t// Array of 'value' => 'Label' pairs for select box\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'none' => esc_html__( 'None', 'cbc' ),\n\t\t\t\t\t\t'standard' => esc_html__( 'Standard', 'cbc' ),\n\t\t\t\t\t\t'emphesis' => esc_html__( 'Emphesis', 'cbc' ),\n\t\t\t\t\t),\n\t\t\t\t\t// Select multiple values, optional. Default is false.\n\t\t\t\t\t'multiple' => false,\n\t\t\t\t\t'std' => 'none',\n\t\t\t\t\t/*'placeholder' => esc_html__( 'Select an Item', 'cbc' ),*/\n\t\t\t\t),\n\t\t\t\t// TEXT\n\t\t\t\tarray(\n\t\t\t\t\t// Field name - Will be used as label\n\t\t\t\t\t'name' => esc_html__( 'Call To Action Text', 'cbc' ),\n\t\t\t\t\t'id' => \"{$prefix}section_{$i}_cta_text\",\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t),\n\t\t\t\t// URL\n\t\t\t\tarray(\n\t\t\t\t\t'name' => esc_html__( 'Call To Action URL', 'cbc' ),\n\t\t\t\t\t'id' => \"{$prefix}section_{$i}_cta_url\",\n\t\t\t\t\t/*'desc' => esc_html__( 'URL description', 'cbc' ),*/\n\t\t\t\t\t'type' => 'url',\n\t\t\t\t\t'std' => 'http://classicalballetconservatory.com',\n\t\t\t\t),\n\t\t\t\t// DIVIDER\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'divider',\n\t\t\t\t),\n\t\t\t\t// IMAGE UPLOAD\n\t\t\t\tarray(\n\t\t\t\t\t'id' => \"{$prefix}section_{$i}_bg\",\n\t\t\t\t\t'name' => esc_html__( 'Background Image', 'cbc' ),\n\t\t\t\t\t'type' => 'image_advanced',\n\t\n\t\t\t\t\t// Delete image from Media Library when remove it from post meta?\n\t\t\t\t\t// Note: it might affect other posts if you use same image for multiple posts\n\t\t\t\t\t'force_delete' => false,\n\t\n\t\t\t\t\t// Maximum image uploads\n\t\t\t\t\t'max_file_uploads' => 1,\n\t\n\t\t\t\t\t// Display the \"Uploaded 1/2 files\" status\n\t\t\t\t\t'max_status' => false,\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t}\n\n\treturn $meta_boxes;\n}", "function rng_METANAME_metabox_init() {\n}", "public function register_carousel_two_options ( $wp_customize ){\n\t $wp_customize->add_section( 'mytheme_options_two',\n\t \tarray(\n\t\t\t'title'=> __('Carousel Two Options', 'Claremont Theme'),\n\t\t\t'priority'=> 36, //Determines what order this appears in\n\t\t\t'capability'=> 'edit_theme_options', //Capability needed to tweak\n\t\t\t'description'=> __('Allows you to customize some example setting for Claremont Theme', 'Claremont Theme'),\n\t\t)\n\t );\n\n\t \t\t \n // =============================\n // = Image =\n // =============================\n\n\t \n\t $wp_customize->add_setting('mytheme_options_two[carousel_image_two]',\n\t\tarray(\n\t\t\t'default'=> get_template_directory_uri() . '/images/header/IMG_0932.JPG',\n\t\t\t'type' => 'option',\n\t\t\t'capability'=> 'edit_theme_options',\n\t\t)\n\t );\n\t \n\t $wp_customize->add_control ( new WP_Customize_Image_Control( $wp_customize,\n\t \t'mytheme_carousel_control_two',//Set a unique ID for the control\n\t\tarray(\n\t\t \n\t\t\t'label'=> __('Carousel image', 'Claremont Theme'),\n\t\t\t'section'=> 'mytheme_options_two',//ID of the section this control renders\n\t\t\t'settings'=>'mytheme_options_two[carousel_image_two]',//ID of the setting\n\t\t\t)\t\t\t\t\t \n\t ));\n \n // =============================\n // = Title =\n // =============================\n\t $wp_customize->add_setting('mytheme_options_two[carousel_title_two]',\n\t\tarray(\n\t\t\t'default'=> 'Default Title',\n\t\t\t'type' => 'option',\n\t\t\t'capability'=> 'edit_theme_options',\n\t\t)\n\t );\n\t\t\t \n\t $wp_customize->add_control ( new WP_Customize_Control( $wp_customize,\n\t \t'mytheme_carousel_title_two',//Set a unique ID for the control\n\t\tarray(\n\t\t \n\t\t\t'label'=> __('Carousel title', 'Claremont Theme'),\n\t\t\t'type'=>'text',\n\t\t\t'section'=> 'mytheme_options_two',//ID of the section this control renders\n\t\t\t'settings'=>'mytheme_options_two[carousel_title_two]',//ID of the setting\n\t\t\t)\t\t\t\t\t \n\t ));\n \n // =============================\n // = TextArea =\n // =============================\n\t $wp_customize->add_setting('mytheme_options_two[carousel_textarea_two]',\n\t\tarray(\n\t\t\t'default'=> 'Place text here.',\n\t\t\t'type' => 'option',\n\t\t\t'capability'=> 'edit_theme_options',\n\t\t)\n\t );\n\t \n\t $wp_customize->add_control ( new Example_Customize_Textarea_Control( $wp_customize,\n\t \t'mytheme_carousel_textarea_two',//Set a unique ID for the control\n\t\tarray(\n\t\t \n\t\t\t'label'=> __('Carousel textarea', 'Claremont Theme'),\n\t\t\t'section'=>'mytheme_options_two',//ID of the section this control renders\n\t\t\t'settings'=>'mytheme_options_two[carousel_textarea_two]',//ID of the setting\n\t\t\t)\t\t\t\t\t \n\t ));\n\t \n\t \n // =============================\n // = Page Dropdown =\n // =============================\n\t $wp_customize->add_setting('mytheme_options_two[carousel_pagelink_two]',\n\t \tarray(\n\t\t\t'capability'=>'edit_theme_options',\n \t\t'type'=>'option',\n\t\t));\n\n\t $wp_customize->add_control('mytheme_carousel_pagelink_two', array(\n \t'label'=> __('Carousel page link', 'Claremont Theme'),\n \t'section'=> 'mytheme_options_two',\n \t'type' => 'dropdown-pages',\n \t'settings' => 'mytheme_options_two[carousel_pagelink_two]',\n\t ));\n\t\n \n // =============================\n // = Pagelink Title =\n // =============================\n\t $wp_customize->add_setting('mytheme_options_two[carousel_pagelink_title_two]',\n\t\tarray(\n\t\t\t'default'=> 'Button Two Title',\n\t\t\t'type' => 'option',\n\t\t\t'capability'=> 'edit_theme_options',\n\t\t)\n\t );\n\n\t $wp_customize->add_control ( new WP_Customize_Control( $wp_customize,\n\t \t'mytheme_carousel_pagelinktitle_two',//Set a unique ID for the control\n\t\tarray(\n\t\t \n\t\t\t'label'=> __('Carousel page link title', 'Claremont Theme'),\n\t\t\t'type'=>'text',\n\t\t\t'section'=> 'mytheme_options_two',//ID of the section this control renders \n\t\t\t'settings'=>'mytheme_options_two[carousel_pagelink_title_two]',//ID of the setting\n\t\t\t)\t\t\t\t\t \n\t ));\n \n }", "function mt_testimonials_custom_meta_boxes() {\r\n \r\n /**\r\n * Create a custom meta boxes array that we pass to \r\n * the OptionTree Meta Box API Class.\r\n */\r\n \r\n $mt_testimonial_meta_box = array(\r\n 'id' => 'mt_testimonial_meta_box',\r\n 'title' => __('Item Customization', 'match'),\r\n 'desc' => '',\r\n 'pages' => array( 'mt_testimonials' ),\r\n 'context' => 'normal',\r\n 'priority' => 'high',\r\n 'fields' => array(\r\n \t array(\r\n 'label' => __('Client Name', 'match'),\r\n 'id' => 'mt_testimonial_client_name',\r\n 'type' => 'text',\r\n 'desc' => __('Add testimonial client name', 'match'),\r\n 'std' => 'John Doe',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => '' \r\n ),\r\n\t \r\n\t array(\r\n 'label' => __('Client Company', 'match'),\r\n 'id' => 'mt_testimonial_client_company',\r\n 'type' => 'text',\r\n 'desc' => __('Add testimonial client company', 'match'),\r\n 'std' => 'Company Name',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => '' \r\n ),\r\n\t \r\n\t array(\r\n 'label' => __('Client Small Image', 'match'),\r\n 'id' => 'mt_testimonial_client_img',\r\n 'type' => 'upload',\r\n 'desc' => __('Add testimonial client small image. Make sure is 70x70px.', 'match'),\r\n 'std' => '',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => '' \r\n )\r\n\t \t \r\n \t)\r\n );\r\n \r\n /**\r\n * Register our meta boxes using the \r\n * ot_register_meta_box() function.\r\n */\r\n ot_register_meta_box( $mt_testimonial_meta_box );\r\n\r\n}", "function article_metabox() {\n\t$prefix = '_article_image_';\n\n\t$cmb_produit = new_cmb2_box ( array (\n\t\t\t'id' => $prefix . 'metabox',\n\t\t\t'title' => __ ( 'Article Informations', 'cmb2' ),\n\t\t\t'object_types' => array (\n\t\t\t\t\t'bienetre'\n\t\t\t)\n\t) );\n\n\t\n\t$cmb_produit->add_field ( array (\n\t\t\t'name' => __ ( 'Image', 'cmb2' ),\n\t\t\t'desc' => __ ( 'Ajouter une image a afficher dans larticle', 'cmb2' ),\n\t\t\t'id' => $prefix . 'image',\n\t\t\t'type' => 'file'\n\t) );\n\n\t}", "function wpcoupon_register_carousel_widget() {\r\n register_widget( 'WPCoupon_Carousel_Widget' );\r\n}", "public function setup_meta_box() {\n\t\t\tadd_meta_box( 'add-shortcode-section', __( 'Shortcode', IFLANG ), array( $this, 'meta_box' ), 'nav-menus', 'side', 'high' );\n\t\t}", "function ilusix_my_custom_meta_box() {\n global $myMetaBoxPostTypes;\n\n foreach($myMetaBoxPostTypes as $postType) {\n add_meta_box(\n 'my_custom_meta_box_identifier' . '-' . $postType,\n 'Meta box title',\n 'ilusix_my_custom_meta_box_callback',\n $postType,\n 'normal',\n 'default'\n );\n }\n}", "function add_custom_fields_meta_box( $posttypes , $custom_field_set , $custom_field_item )\n\t{\n\t\tif( $custom_field_set == 'sliders' ) \n\t\t\t$this->slider_field_item = $custom_field_item != '' ? $custom_field_item : 'base';\n\t\t\t\n\t\t\tadd_action('add_meta_boxes', function() use( $posttypes, $custom_field_set , $custom_field_item ) {\n\t\t\t\t\t\n\t\t\t\t$custom_field_item_info = include( get_template_directory().'/module/'.$custom_field_set.'/'.$custom_field_item.'/config.details.php' );\n\n\t\t\t\tforeach ($posttypes as $key => $posttype_section ) {\n\t\t\t\t\t\n\t\t\t\t\tadd_meta_box('custom_post_type_section_'.$posttype_section . '-' . $custom_field_item , $custom_field_item_info['title'], function() use( $custom_field_set , $custom_field_item ){\n\n\t\t\t\t\t\t\t$custom_fields = $this->get_fields( $custom_field_set , $custom_field_item );\n\t\t\t\t\t\t\t$data['type'] = $custom_field_item;\n\t\t\t\t\t\t\t$data['dir'] = array('module',$custom_field_set , $custom_field_item , 'admin' ,'views');\n\t\t\t\t\t\t\t$data['view'] = $custom_field_item;\n\t\t\t\t\t\t\t$data['customfields'] = $custom_fields;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tload_view( $data );\n\n\t\t\t\t\t}, $posttype_section );\n\n\t\t\t\t}\n\t\t});\n\n\t\t$this->save_post( $custom_field_set , $custom_field_item );\n\t}", "function mobile_kiosk_gallery_slides_meta_box($object, $box) {\n\t// Get all slides related to the object\n\t$args = array(\n\t\t'post_type' => 'kioskslide',\n\t\t'posts_per_page' => -1,\n\t\t'meta_query' => array(\n\t\t\tarray(\n\t\t\t\t'key' => 'gallery_id',\n\t\t\t\t'value' => $object->ID,\n\t\t\t\t'compare' => '='\n\t\t\t)\n\t\t),\n\t\t'orderby' => 'meta_value_num',\n\t\t'meta_key' => 'slide_order',\n\t\t'order' => 'ASC'\n\t);\n\t$slides = new WP_Query($args);\n\t\n\t// Include our template\n\tinclude('metaboxes/gallery_slides.php');\n}", "public function register_meta() {\r\n\t\t\tforeach($this->customFields as $customField){\r\n\t\t\t\tadd_meta_box( 'ecf-'.$customField['name'], __( $customField['title'], 'exlist' ), $customField['callback'], $postTypes , 'advanced', 'high', $type = array($customField['name'], $customField['title'], $customField['type']) );\r\n\t\t\t}\r\n }", "function add_meta_boxes() {\n\t\t$post_types = get_post_types();\n\t\tif($post_types) :\n\t\t\tforeach($post_types as $post_type) :\n\t\t\t\tif(post_type_supports($post_type,'sliders')) :\n\t\t\t\t\t//It's supported!\n\t\t\t\t\tadd_meta_box('tw-sliders-box',__('Sliders','tw-sliders'),array($this,'manage_sliders'),$post_type,'normal','high');\n\t\t\t\tendif;\n\t\t\tendforeach;\n\t\tendif;\n\t}", "function _sp_custom_box_slider_media() {\n\tglobal $post;\n\n\t// bail if not correct post type\n\tif ( get_post_type() != 'sp-slider' )\n\t\treturn;\n\n\twp_nonce_field( '_sp_process_meta_slider_media', '_sp_meta_slider_media_nonce' );\n\n\t$output = '';\n\n\t$output .= '<div class=\"slider-media-container\">' . PHP_EOL;\n\t$output .= '<h3 class=\"header\">' . __( 'Carousel Media', 'sp-theme' ) . ' <small>(' . __( 'You can drag and drop to re-sort the order of each slide. Order goes from left to right. Left being first to display. Click on the image to edit the slide.', 'sp-theme' ) . ')</small></h3>' . PHP_EOL;\n\t$output .= '<div class=\"inner-container postbox\">' . PHP_EOL;\n\t$output .= '<div class=\"preview-box sortable\">' . PHP_EOL;\n\t$output .= sp_display_slide_media( $post->ID );\n\t$output .= '</div><!--close preview-box-->' . PHP_EOL;\n\t$output .= '<a title=\"' . esc_attr__( 'Media Upload', 'sp-theme' ) . '\" class=\"button slider-media-upload\" data-uploader_button_text=\"' . esc_attr__( 'Select File', 'sp-theme' ) . '\" data-uploader_title=\"' . esc_attr__( 'Add Media', 'sp-theme' ) . '\" data-post-id=\"' . esc_attr( $post->ID ) . '\">' . __( 'Add Image Media', 'sp-theme' ) . '</a>' . PHP_EOL;\n\t\n\t$output .= '<a href=\"#\" title=\"' . esc_attr__( 'Add Content Media', 'sp-theme' ) . '\" class=\"button add-slide-content\">' . __( 'Add Content Media', 'sp-theme' ) . '</a>' . PHP_EOL;\n\n\t$output .= '<a href=\"#\" title=\"' . esc_attr__( 'Add Video Link', 'sp-theme' ) . '\" class=\"button add-slide-video-link\">' . __( 'Add External Video Link', 'sp-theme' ) . '</a>' . PHP_EOL;\n\n\t$output .= '<div class=\"content-media-container\">' . PHP_EOL;\n\t$output .= '<span class=\"slide-content-title\">' . __( 'Enter content title:', 'sp-theme' ) . '</span>' . PHP_EOL;\n\t$output .= '<input type=\"text\" name=\"slide_content_title\" value=\"\" class=\"slide-content-title-input\" placeholder=\"' . esc_attr__( 'add a title for your content.', 'sp-theme' ) . '\" />' . PHP_EOL;\n\t$output .= '<button type=\"submit\" class=\"button button-primary submit-slide-content\" data-post-id=\"' . esc_attr( $post->ID ) . '\">' . __( 'Add Slide Content', 'sp-theme' ) . '</button>' . PHP_EOL;\t\n\t$output .= '</div><!--close .content-media-container-->' . PHP_EOL;\t\n\n\t$output .= '<div class=\"video-link-container\">' . PHP_EOL;\n\t$output .= '<span class=\"slide-url-title\">' . __( 'Enter URL:', 'sp-theme' ) . '</span>' . PHP_EOL;\n\t$output .= '<input type=\"text\" name=\"slide_video_link\" value=\"\" class=\"slide-video-link-input\" placeholder=\"' . esc_attr__( 'add the URL of the link here.', 'sp-theme' ) . '\" />' . PHP_EOL;\n\t$output .= '<span class=\"slide-link-title\">' . __( 'Title:', 'sp-theme' ). '</span>' . PHP_EOL;\n\t$output .= '<input type=\"text\" name=\"slide_video_link_title\" value=\"\" class=\"slide-video-link-title-input\" placeholder=\"' . esc_attr__( 'add a title for this link.', 'sp-theme' ) . '\" />' . PHP_EOL;\n\t$output .= '<button type=\"submit\" class=\"button button-primary submit-slide-video-link\" data-post-id=\"' . esc_attr( $post->ID ) . '\">' . __( 'Add Video Link', 'sp-theme' ) . '</button>' . PHP_EOL;\t\n\t$output .= '</div><!--close .video-link-container-->' . PHP_EOL;\n\t$output .= '</div><!--close .inner-container-->' . PHP_EOL;\n\t$output .= '</div><!--close .slider-media-container-->' . PHP_EOL;\n\n\techo $output;\n}", "function kp_certificate_featured_image()\n{\n remove_meta_box( 'postimagediv', 'certificate', 'side' );\n add_meta_box( 'postimagediv', __( 'Certificate Image', 'kappe' ), 'post_thumbnail_meta_box', 'certificate', 'normal', 'high' );\n}", "function vulcan_slideshow_meta_boxes() {\r\r\n $meta_boxes = array(\r\r\n \"slideshow_image\" => array(\r\r\n \"name\" => \"slideshow_image\",\r\r\n \"title\" => \"Slideshow Image\",\r\r\n \"description\" => \"Add image url for your slideshow.\",\r\r\n \"type\" => \"text\"\r\r\n ),\r\r\n \"slideshow_url\" => array(\r\r\n \"name\" => \"slideshow_url\",\r\r\n \"title\" => \"Slideshow Url\",\r\r\n \"description\" => \"Link url for slideshow.\",\r\r\n \"type\" => \"text\"\r\r\n ),\r\r\n \"slideshow_readmore\" => array(\r\r\n \"name\" => \"slideshow_readmore\",\r\r\n \"title\" => \"Slideshow Read More Text\",\r\r\n \"description\" => \"Please enter the read more text for slideshow, eg : Continue Reading, Read More.\",\r\r\n \"type\" => \"text\"\r\r\n ),\r\r\n \"slideshow_style\" => array(\r\r\n \"name\" => \"slideshow_style\",\r\r\n \"title\" => \"Slideshow Stage Style\",\r\r\n \"description\" => \"Please one style of them for each image slideshow.\",\r\r\n \"type\" => \"select\",\r\r\n \"options\" => array(\"full image\",\"with right description\",\"with left description\",\"with bottom description\")\r\r\n ), \r\r\n \"num_excerpt\" => array(\r\r\n \"name\" => \"num_excerpt\",\r\r\n \"title\" => \"Number of Words for Slideshow Excerpt\",\r\r\n \"description\" => \"Add number of words excerpt to display in slideshow description, eg. 20\",\r\r\n \"type\" => \"text\"\r\r\n ) \r\r\n );\r\r\n \r\r\n return $meta_boxes;\r\r\n}", "function mobile_kiosk_gallery_options_meta_box($object, $box) {\n\t\n\t// Try to load the gallery logo\n\t$gallery_logo_id = get_post_meta($object->ID, 'gallery_logo', TRUE);\n\t$thumbnail = (!empty($gallery_logo_id)) ? wp_get_attachment_image_src($gallery_logo_id, 'thumbnail', TRUE)[0] : NULL;\n\t\n\t// Get the available sources\n\t$sources = mobile_kiosk_get_slide_sources();\n\t\n\t// Get the sources for this gallery\n\t$selectedSources = (get_post_meta($object->ID, 'sources', TRUE)) ? get_post_meta($object->ID, 'sources', TRUE) : array();\n\t\n\t// Load our HTML template\n\tinclude('metaboxes/gallery_options.php');\n}", "function gallery_metaboxes( $post ) {\n global $wp_meta_boxes;\n\n remove_meta_box('postimagediv', 'gallery', 'side');\n add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', 'gallery', 'normal', 'high');\n}", "function dfd_post_add_custom_box() {\n\n $screens = array( 'post' );\n\n foreach ( $screens as $screen ) {\n\n add_meta_box(\n 'dfd_post_gallery',\n esc_html__( 'Images gallery', 'dfd' ),\n 'dfd_post_inner_custom_box',\n $screen,\n 'side'\n );\n }\n}", "function druplex_field__field_portfolio_images($variables) {\n\n $output = '<div class=\"flexslider\"><ul class=\"slides\">';\n\n foreach ($variables['items'] as $delta => $item) {\n $output .= '<li>' . drupal_render($item) . '</li>';\n }\n\n $output .= '</ul></div>';\n \n return $output;\n}", "private function initMetaBox(){\n\t\t$path = get_template_directory() . '/sub/customfield/';\n\t\tif(function_exists('of_get_option')){\n\t\t\tif(of_get_option('is-seo',true)){\n\t\t\t\tnew WPO_MetaBox(array(\n\t\t\t\t 'id' => 'wpo_seo',\n\t\t\t\t 'title' => $this->l('SEO Fields'),\n\t\t\t\t 'types' => array('page','portfolio','post','video'),\n\t\t\t\t 'priority' => 'high',\n\t\t\t\t 'template' => $path . 'seo.php',\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_template',\n\t\t 'title' => $this->l('Advanced Configuration'),\n\t\t 'types' => array('page'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'page-advanced.php'\n\t\t));\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_pageconfig',\n\t\t 'title' => $this->l('Page Configuration'),\n\t\t 'types' => array('page'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'page.php',\n\t\t));\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_post',\n\t\t 'title' => $this->l('Embed Options'),\n\t\t 'types' => array('post','video'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'post.php',\n\t\t));\n\t}", "function caviar_add_meta_box() {\n\n\t$screens = array('page' );\n\n\tforeach ( $screens as $screen ) {\n\n\t\tadd_meta_box(\n\t\t\t'caviar_sectionid',\n\t\t\tesc_html__( 'Caviar Metabox Field Example', 'caviar_textdomain' ),\n\t\t\t'caviar_meta_box_callback',\n\t\t\t$screen\n\t\t);\n\n\t\tadd_meta_box(\n\t\t\t'caviar_2',\n\t\t\tesc_html__( 'Caviar Metabox 2', 'caviar_textdomain' ),\n\t\t\t'caviar_meta_box2_callback',\n\t\t\t$screen\n\t\t);\n\t}\n}", "function add_meta_box() {\n\t\t \tadd_meta_box( 'woocommerce-product-addons', __('Product Add-ons', 'wc_product_addons'), array(&$this, 'meta_box'), 'product', 'side', 'default' );\n\t\t }", "public function render($post)\n {\n\n // Add an nonce field to check for it when we save .\n wp_nonce_field(Self::NONCE_ACTION, 'carousel_nonce');\n\n //retrieve an existing value from the database.\n $carousel = get_post_meta($post->ID, '_carousel', true) ?: [];\n\n $count = count($carousel);\n\n // Display the form, using the current value.\n?>\n\n <div class=\"metabox-content\">\n <div class=\"container-fluid\">\n <div class=\"row bg-light border my-2\">\n <div class=\"col-2 py-2 \">\n <div class=\"font-weight-bold\"><?php _e('Your Selection', 'pao') ?></div>\n </div>\n <div class=\" carousel-img-container col-10 d-flex align-items-center\">\n <?php foreach ($carousel as $key => $image) : ?>\n <div class=\" m-2 position-relative\">\n <img class=\"img-thumbnail\" src=\"<?php echo esc_url($image['url']) ?>\" alt=\"\" style=\"width:150px; height:150px ;\" />\n <a href=\"#\" class=\" delete-carousel-img position-absolute btn btn-danger btn-sm \" title=\"<?php _e('Remove', 'pao') ?>\" style=\"top:2px;right:2px;\"> &times;</a>\n <input type=\"hidden\" name=\"carousel[<?= $key ?>][url]\" value=\"<?= esc_url($image['url']) ?>\" />\n <input type=\"hidden\" name=\"carousel[<?= $key ?>][link]\" value=\"<?= esc_url($image['link']) ?>\" />\n </div>\n <?php endforeach ?>\n </div>\n </div>\n <div class=\"row bg-light border my-2\">\n <div class=\"col-2 py-2 \">\n <div class=\"font-weight-bold\"><?php _e('Image', 'pao') ?></div>\n <p><?php _e('Upload carousel image', 'pao') ?></p>\n </div>\n <div class=\"col-10 d-flex flex-column justify-content-center \">\n\n <div class=\"custom-img-container \">\n <!-- uploaded image goes here -->\n </div>\n <input type=\"hidden\" class=\"form-control custom-img-url\" value=\"\" placeholder=\"\" />\n <input type=\"url\" class=\"form-control custom-img-link d-none\" value=\"\" placeholder=\"<?php _e('Enter link for this image', '') ?>\" />\n <p class=\"pt-2\">\n <a class=\"upload-custom-img btn btn-info \" href=\"#\">\n <?php _e('Upload', 'pao') ?>\n </a>\n <a class=\"register-custom-img btn btn-info d-none\" href=\"#\">\n <?php _e('Add', 'pao') ?>\n </a>\n <a class=\"delete-custom-img btn btn-info d-none\" href=\"#\">\n <?php _e('Remove', 'pao') ?>\n </a>\n </p>\n </div>\n </div>\n </div>\n </div>\n\n<?php\n }", "function add_meta_boxes()\n {\n }", "function carrousel_metaboxes(){\n add_meta_box(\"MonCarrousel\", \"lien\", \"carrousel_metabox\");\n}", "function buildCustomPostWidgets()\n {\n // add_meta_box( $id, $title, $callback, $screen, $context, $priority, $callback_args );\n add_meta_box( 'cover_image_meta_box', 'Add an Image', array($this,'selectImageMetaBox'), 'playscripts', 'normal', 'high' );\n add_meta_box( 'cover_sound_meta_box', 'Add a Sound', array($this,'selectSoundMetaBox'), 'playscripts', 'normal', 'high' );\n }", "function add_custom_content_fields_meta_box( $posttypes , $custom_field_set , $custom_field_item )\n\t{\n\t\t\n\t\t/* assign current slider item */\n\t\tif( $custom_field_set == 'sliders' ) \n\t\t\t\n\t\t\t$this->slider_field_item = $custom_field_item != '' ? $custom_field_item : 'base';\n\t\t\n\t\t\n\t\tadd_action('add_meta_boxes', function() use( $posttypes, $custom_field_set , $custom_field_item ) {\n\t\t\t\t\n\t\t\t$custom_field_item_info = include( get_template_directory().'/module/'.$custom_field_set.'/'.$custom_field_item.'/config.details.php' );\n\n\t\t\tforeach ($posttypes as $key => $posttype_section ) {\n\t\t\t\t\n\t\t\t\tadd_meta_box('custom_post_type_section_'.$posttype_section . '-' . $custom_field_item , $custom_field_item_info['title'], function() use( $custom_field_set , $custom_field_item ){\n\n\t\t\t\t\t\t$custom_fields = $this->get_fields( $custom_field_set , $custom_field_item );\n\t\t\t\t\t\t$data['type'] = $custom_field_item;\n\t\t\t\t\t\t$data['dir'] = array('module',$custom_field_set , $custom_field_item , 'admin' ,'views');\n\t\t\t\t\t\t$data['view'] = $custom_field_item;\n\t\t\t\t\t\t$data['customfields'] = $custom_fields;\n\t\t\t\t\t\t\n\t\t\t\t\t\tload_view( $data );\n\n\t\t\t\t}, $posttype_section );\n\n\t\t\t}\n\n\t\t});\n\n\t\t$this->save_post( $custom_field_set , $custom_field_item );\n\t}", "function testimonials_meta_boxes() {\n\tadd_meta_box( 'testimonials_form', 'testimonials', 'normal', 'high' );\n}", "function devvn_gallery_meta_box() {\n\tadd_meta_box(\n\t\t'devvn-gallery-metabox',\n\t\t__( 'Gallery Option', 'devvn' ),\n\t\t'devvn_gallery_meta_box_callback',\n\t\t'gallery',\n\t\t'side',\n\t\t'high'\n\t);\n}", "function cmb2_kalypso_metaboxes() {\n\n $prefix = 'kalypso_';\n $front_page_ID = get_option('page_on_front');\n\n /*\n * Register meatabox - Slider post type\n * */\n $cmb = new_cmb2_box( array(\n 'id' => 'slider_metabox',\n 'title' => __( 'Slider settings', 'cmb2' ),\n 'object_types' => array( 'slide' ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Text under the slide title', 'cmb2' ),\n 'id' => $prefix . 'text_under_slide_title',\n 'type' => 'text'\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Slide button url', 'cmb2' ),\n 'id' => $prefix . 'url_for_slide_button',\n 'type' => 'text_url'\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Slide button name', 'cmb2' ),\n 'id' => $prefix . 'name_for_slide_button',\n 'type' => 'text'\n ) );\n\n /*\n * Homepage metaboxes\n * */\n\n $cmb = new_cmb2_box( array(\n 'id' => 'frontpage_picture_section_metabox',\n 'title' => __( 'Picture Section', 'cmb2' ),\n 'object_types' => array( 'page' ),\n 'show_on'\t => array( 'id' => array( $front_page_ID, ) ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true,\n // 'closed' => true, // Keep the metabox closed by default\n ) );\n\n /*\n * Repeeatable service section\n * */\n\n $group_field_id = $cmb->add_field( array(\n 'id' => $prefix . 'service_section',\n 'type' => 'group',\n 'description' => 'Generates service section items',\n // 'repeatable' => false, // use false if you want non-repeatable group\n 'options' => array(\n 'group_title' => __('Service {#}', 'cmb2'),\n 'add_button' => __('Add Another Service', 'cmb2'),\n 'remove_button' => __('Remove Service', 'cmb2'),\n 'sortable' => true,\n // 'closed' => true,\n ),\n ) );\n\n $cmb->add_group_field( $group_field_id, array(\n 'name' => __('Entry service name', 'cmb2'),\n 'id' => $prefix . 'service_title',\n 'type' => 'text',\n ) );\n\n $cmb->add_group_field( $group_field_id, array(\n 'name' => __('Description', 'cm2'),\n 'description' => 'Write a short description for this service',\n 'id' => $prefix . 'service_description',\n 'type' => 'textarea_small',\n ) );\n\n $cmb->add_group_field( $group_field_id, array(\n 'name' => __('Entry service image', 'cmb2'),\n 'id' => $prefix . 'service_image',\n 'type' => 'file',\n 'query_args' => array( 'type' => 'image' ),\n ) );\n\n $cmb->add_group_field( $group_field_id, array(\n 'name' => __('Service url', 'cmb2'),\n 'id' => $prefix . 'service_url',\n 'type' => 'text_url',\n ) );\n\n\n // Picture section 1\n\n $cmb->add_field( array(\n 'name' => __( 'Header 1 text', 'cmb2' ),\n 'id' => $prefix . 'header_picture_section_1',\n 'type' => 'text',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Content 1 text', 'cmb2' ),\n 'id' => $prefix . 'content_picture_section_1',\n 'type' => 'textarea',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Button 1 name', 'cmb2' ),\n 'id' => $prefix . 'button_name_picture_section_1',\n 'type' => 'text',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Button 1 url', 'cmb2' ),\n 'id' => $prefix . 'button_url_picture_section_1',\n 'type' => 'text_url',\n ) );\n\n $cmb->add_field( array(\n 'name' => 'Image 1',\n 'desc' => 'Recomended image size: 960 x 641px',\n 'id' => $prefix . 'image_picture_section_1',\n 'type' => 'file',\n 'preview_size' => array( 100, 100 ),\n 'query_args' => array( 'type' => 'image' ),\n 'text' => array(\n 'add_upload_files_text' => 'Add or Upload image',\n 'remove_image_text' => 'Remove Image',\n ),\n ) );\n\n\n // Picture section 2\n $cmb->add_field( array(\n 'name' => __( 'Header 2 text', 'cmb2' ),\n 'id' => $prefix . 'header_picture_section_2',\n 'type' => 'text',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Content 2 text', 'cmb2' ),\n 'id' => $prefix . 'content_picture_section_2',\n 'type' => 'textarea',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Button 2 name', 'cmb2' ),\n 'id' => $prefix . 'button_name_picture_section_2',\n 'type' => 'text',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Button 2 url', 'cmb2' ),\n 'id' => $prefix . 'button_url_picture_section_2',\n 'type' => 'text_url',\n ) );\n\n $cmb->add_field( array(\n 'name' => 'Image 2',\n 'desc' => 'Recomended image size: 960 x 641px',\n 'id' => $prefix . 'image_picture_section_2',\n 'type' => 'file',\n 'preview_size' => array( 100, 100 ),\n 'query_args' => array( 'type' => 'image' ),\n 'text' => array(\n 'add_upload_files_text' => 'Add or Upload image',\n 'remove_image_text' => 'Remove Image',\n ),\n ) );\n\n /*\n * Logotypes Carausel\n * */\n\n $cmb = new_cmb2_box( array(\n 'id' => 'logos_home_section_metabox',\n 'title' => __( 'Logotype Section', 'cmb2' ),\n 'object_types' => array( 'page' ),\n 'show_on'\t => array( 'id' => array( $front_page_ID, ) ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true,\n 'closed' => false,\n ) );\n\n $cmb->add_field( array(\n 'name' => 'Logotypes',\n 'desc' => '',\n 'id' => $prefix . 'logotype_home_section',\n 'type' => 'file_list',\n 'preview_size' => array( 160, 100 ),\n 'query_args' => array( 'type' => 'image' ),\n 'text' => array(\n 'add_upload_files_text' => __('Add or Upload Logos', 'cmb2'),\n 'remove_image_text' => __('Remove logo', 'cmb2'),\n 'file_text' => __('File', 'cmb2'),\n 'file_download_text' => __('Download', 'cmb2'),\n 'remove_text' => __('Remove logo', 'cmb2'),\n ),\n ) );\n\n /*\n * ABOUT US\n * */\n\n // Slider Section\n\n $cmb = new_cmb2_box( array(\n 'id' => $prefix . 'slider_section',\n 'title' => 'Slider Section',\n 'object_types' => array( 'page' ),\n 'show_on' => array( 'key' => 'page-template', 'value' => 'about-us.php' ),\n 'context' => 'normal', // 'normal', 'advanced', or 'side'\n 'priority' => 'high', // 'high', 'core', 'default' or 'low'\n 'show_names' => true, // Show field names on the left\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Header', 'cmb2' ),\n 'id' => $prefix . 'header_slider_section',\n 'type' => 'text',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Description', 'cmb2' ),\n 'id' => $prefix . 'description_slider_section',\n 'type' => 'textarea',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => 'Slider images',\n 'desc' => '',\n 'id' => $prefix . 'images_slider_section',\n 'type' => 'file_list',\n 'preview_size' => array( 160, 100 ),\n 'query_args' => array( 'type' => 'image' ),\n 'text' => array(\n 'add_upload_files_text' => __('Add or Upload Images', 'cmb2'),\n 'remove_image_text' => __('Remove image', 'cmb2'),\n 'file_text' => __('File', 'cmb2'),\n 'file_download_text' => __('Download', 'cmb2'),\n 'remove_text' => __('Remove image', 'cmb2'),\n ),\n ) );\n\n\n // Meet Team Section\n\n $cmb = new_cmb2_box( array(\n 'id' => $prefix . 'meet_team_section',\n 'title' => 'Meet Team Section',\n 'object_types' => array( 'page' ),\n 'show_on' => array( 'key' => 'page-template', 'value' => 'about-us.php' ),\n 'context' => 'normal', // 'normal', 'advanced', or 'side'\n 'priority' => 'high', // 'high', 'core', 'default' or 'low'\n 'show_names' => true, // Show field names on the left\n ) );\n\n $meet_team_section_id = $cmb->add_field( array(\n 'id' => 'meet_team_section_repeat_group',\n 'type' => 'group',\n 'options' => array(\n 'group_title' => __( 'Person {#}', 'cmb2' ),\n 'add_button' => __( 'Add Another Person', 'cmb2' ),\n 'remove_button' => __( 'Remove Person', 'cmb2' ),\n 'sortable' => true,\n 'closed' => true, \n ),\n ) );\n\n $cmb->add_group_field( $meet_team_section_id, array(\n 'name' => __('Image', 'cmb2'),\n 'description' => __('Required field', 'cmb2'),\n 'id' => $prefix . 'image_meet_team_person',\n 'type' => 'file',\n 'preview_size' => array( 100, 160 ),\n 'query_args' => array( 'type' => 'image' ),\n 'text' => array(\n 'add_upload_files_text' => 'Add or Upload image',\n 'remove_image_text' => 'Remove Image',\n ),\n ) );\n\n $cmb->add_group_field( $meet_team_section_id, array(\n 'name' => __( 'Name', 'cmb2' ),\n 'description' => __('Required field', 'cmb2'),\n 'id' => $prefix . 'name_meet_team_person',\n 'type' => 'text'\n ) );\n\n $cmb->add_group_field( $meet_team_section_id, array(\n 'name' => __( 'Position', 'cmb2' ),\n 'id' => $prefix . 'position_meet_team_person',\n 'type' => 'text'\n ) );\n\n $cmb->add_group_field( $meet_team_section_id, array(\n 'name' => __( 'Description', 'cmb2' ),\n 'description' => __('Required field', 'cmb2'),\n 'id' => $prefix . 'desc_meet_team_person',\n 'type' => 'text_medium'\n ) );\n\n $cmb->add_group_field( $meet_team_section_id, array(\n 'name' => __( 'Facebook url', 'cmb2' ),\n 'id' => $prefix . 'url_facebook_meet_team_person',\n 'type' => 'text_url'\n ) );\n\n $cmb->add_group_field( $meet_team_section_id, array(\n 'name' => __( 'Linkedin url', 'cmb2' ),\n 'id' => $prefix . 'linkedin_facebook_meet_team_person',\n 'type' => 'text_url'\n ) );\n\n /*\n * Contact Page\n * */\n\n // Map Location\n\n $cmb = new_cmb2_box( array(\n 'id' => $prefix . 'map_section',\n 'title' => 'Map location',\n 'object_types' => array( 'page' ),\n 'show_on' => array( 'key' => 'page-template', 'value' => 'contact.php' ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true,\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Location', 'cmb2' ),\n 'desc' => __('Drag the marker to set the exact location'),\n 'id' => $prefix . 'location',\n 'type' => 'pw_map',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Address', 'cmb2' ),\n 'id' => $prefix . 'address',\n 'type' => 'textarea',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Phone number', 'cmb2' ),\n 'id' => $prefix . 'phone_number',\n 'type' => 'text',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Email address', 'cmb2' ),\n 'id' => $prefix . 'email_address',\n 'type' => 'text_email',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n /*\n * Blog Page\n * */\n $cmb = new_cmb2_box( array(\n 'id' => $prefix . 'header_blog_section',\n 'title' => 'Header blog section',\n 'object_types' => array( 'page' ),\n 'show_on' => array( 'key' => 'id', 'value' => array( get_option( 'page_for_posts' ) ) ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true,\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Header text', 'cmb2' ),\n 'id' => $prefix . 'header_blog_title',\n 'type' => 'text'\n ) );\n\n $cmb->add_field( array(\n 'name' => 'Header image',\n 'desc' => 'Recomended image size: 1920 x 400px',\n 'id' => $prefix . 'image_blog_header',\n 'type' => 'file',\n 'preview_size' => array( 400, 100 ),\n 'query_args' => array( 'type' => 'image' ),\n 'text' => array(\n 'add_upload_files_text' => 'Add or Upload image',\n 'remove_image_text' => 'Remove Image',\n ),\n ) );\n\n /*\n * Category Page\n * */\n $cmb = new_cmb2_box( array(\n 'id' => $prefix . 'header_category_section',\n 'title' => 'Header category section',\n 'object_types' => array( 'term' ),\n 'taxonomies' => array( 'category' )\n ) );\n\n $cmb->add_field( array(\n 'name' => 'Header image',\n 'desc' => 'Recomended image size: 1920 x 250px',\n 'id' => $prefix . 'image_category_header',\n 'type' => 'file',\n 'preview_size' => array( 400, 100 ),\n 'query_args' => array( 'type' => 'image' ),\n 'text' => array(\n 'add_upload_files_text' => 'Add or Upload image',\n 'remove_image_text' => 'Remove Image',\n ),\n ) );\n\n\n}", "function clix_uppe_add_meta_box() {\r\n\tif( function_exists('add_meta_box') ) {\r\n\t\tadd_meta_box( 'clix_uppe_meta_box', 'Clix Category Exclusion', 'clix_uppe_meta_box', post, 'side' );\r\n \t}\r\n}", "public function setMedia()\n {\n parent::setMedia();\n $this->addJqueryPlugin('wpproductcarousels.admin', __PS_BASE_URI__.'modules/wpproductcarousels/views/js/admin/');\n $this->addJqueryPlugin('autocomplete');\n $this->addCSS(__PS_BASE_URI__.'modules/wpproductcarousels/views/css/admin/wpproductcarousels.css');\n }", "function fzproject_meta_box()\n{\n add_meta_box('fzproject_meta_box', 'New portfolio item', 'display_fzproject_meta_box', 'fzproject_post', 'normal', 'high');\n}", "function igv_cmb_metaboxes() {\n\t$prefix = '_igv_';\n\n\t/**\n\t * Metaboxes declarations here\n * Reference: https://github.com/WebDevStudios/CMB2/blob/master/example-functions.php\n\t */\n\n}", "public static function add_meta_box() {\n add_meta_box( \"CBMTheme\", \"CBM Theme Meta Box\", \"CBMAdmin::posts_page\" );\n }", "public static function add_metaboxes(){}", "function Add_Shortcode_metabox() \n{\n add_meta_box('shortcode_metabox_id', 'Shordcode', 'Display_Shortcode_metabox', 'Flipbox');\n}", "public function lazyload_metabox() {\r\n\t\t$this->view(\r\n\t\t\t'lazyload/meta-box',\r\n\t\t\tarray(\r\n\t\t\t\t'settings' => $this->settings->get_setting( WP_SMUSH_PREFIX . 'lazy_load' ),\r\n\t\t\t\t'cpts' => get_post_types( // custom post types.\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'public' => true,\r\n\t\t\t\t\t\t'_builtin' => false,\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'objects',\r\n\t\t\t\t\t'and'\r\n\t\t\t\t),\r\n\t\t\t)\r\n\t\t);\r\n\t}", "function clonemaker_add_meta_box(){\r\n add_meta_box(\r\n 'clonemaker',\r\n 'Clone a Page',\r\n 'add_post_list',\r\n 'page',\r\n 'side'\r\n );\r\n\r\n\r\n}", "function sb_slideshow_meta_box( $box ) {\n\tglobal $sb_slideshow_slides;\n?>\n\t<div class=\"scrollingContainer\">\n\t\t<div class=\"scrollingHotSpotLeft\"></div><div class=\"scrollingHotSpotRight\"></div>\n\t\t<ul class=\"connectedSortable\">\n<?php\n\t\tforeach( $sb_slideshow_slides as $index => $slide ) {\n\t\t\tif ($slide['box'] == $box) sb_slideshow_sortable_item( $index );\n\t\t}\n?>\n\t\t</ul>\n\t</div>\n<?php\n}", "public function add_meta_boxes()\n {\n\n $this->_add_bitly_meta_box();\n\n }", "function gallery_init() {\n $labels = array(\n 'name' => 'Imágenes de la galería',\n 'singular_name' => 'Imagen de la galería',\n 'add_new_item' => 'New Image de la galería',\n 'edit_item' => 'Editar Imagen de la galería',\n 'new_item' => 'Nueva Imagen de la galería',\n 'view_item' => 'Ver Imagen de la galería',\n 'search_items' => 'Buscar Imágenes de la galería',\n 'not_found' => 'Imágenes de la galería noencontradas',\n 'not_found_in_trash' => 'Ninguna Imagen de la galería en la papelera'\n );\n $args = array(\n 'labels' => $labels,\n 'public' => false,\n 'show_ui' => true,\n 'supports' => array('thumbnail')\n );\n\n register_post_type( 'gallery', $args );\n}", "function biodynamics_medical()\n{\n\t/**\n\t * Sample metabox to demonstrate each field type included\n\t */\n\t$biodynamics_campos = new_cmb2_box( array(\n\t\t'id' => 'biodynamics_campos',\n\t\t'title' => esc_html__( 'Campos para imagen y url', 'cmb2' ),\n\t\t'object_types' => array( 'post' ), // Post type\n\t\t// 'show_on_cb' => 'yourprefix_show_if_front_page', // function should return a bool value\n\t\t// 'context' => 'normal',\n\t\t// 'priority' => 'high',\n\t\t// 'show_names' => true, // Show field names on the left\n\t\t// 'cmb_styles' => false, // false to disable the CMB stylesheet\n\t\t// 'closed' => true, // true to keep the metabox closed by default\n\t\t// 'classes' => 'extra-class', // Extra cmb2-wrap classes\n // 'classes_cb' => 'yourprefix_add_some_classes', // Add classes through a callback.\n\t\t) );\n\t\t\n\n $biodynamics_campos->add_field( array(\n 'name' => esc_html__( 'Seleciones las Imagenes', 'cmb2' ),\n 'desc' => esc_html__( 'Upload or add multiple images/attachments.', 'cmb2' ),\n 'id' => 'galeria_biodynamics',\n 'type' => 'file_list',\n 'preview_size' => array( 100, 100 ), // Default: array( 50, 50 )\n\t\t) );\n\t\n\t\n\t\t\n\t\n\n}", "function m_custom_meta() {\r\n add_meta_box( 'sm_meta', __( 'Featured Posts', 'sm-textdomain' ), 'sm_meta_callback', 'post' );\r\n add_meta_box( 'mm_meta', __( 'Main Posts', 'sm-textdomain' ), 'mm_meta_callback', 'post' );\r\n\r\n}", "function druplex_field__field_image($variables) {\n\n $output = '<div class=\"flexslider\"><ul class=\"slides\">';\n\n foreach ($variables['items'] as $delta => $item) {\n $output .= '<li>' . drupal_render($item) . '</li>';\n }\n\n $output .= '</ul></div>';\n \n return $output;\n}", "function _dhz_plugins_list_meta_box() {\n\t\tif (apply_filters('remove_dhz_nag', false)) {\n\t\t\treturn;\n\t\t}\n\t\t$plugins = apply_filters('_dhz_plugins_list', array());\n\t\t\t\n\t\t$id = 'plugins-by-dreihochzwo';\n\t\t$title = '<a style=\"text-decoration: none; font-size: 1em;\" href=\"https://profiles.wordpress.org/tmconnect/#content-plugins\" target=\"_blank\">'.__(\"Plugins by dreihochzwo\", \"acf-collapse-fields\").'</a>';\n\t\t$callback = array($this, 'show_dhz_plugins_list_meta_box');\n\t\t$screens = array();\n\t\tforeach ($plugins as $plugin) {\n\t\t\t$screens = array_merge($screens, $plugin['screens']);\n\t\t}\n\t\t$context = 'side';\n\t\t$priority = 'default';\n\t\tadd_meta_box($id, $title, $callback, $screens, $context, $priority);\n\t\t\n\t\t\n\t}", "function carouF_init(){\n\n $labels = array(\n \"name\" => \"Carrousel\",\n \"singular_name\" => \"Carrousel\",\n \"add_new\" => \"Ajouter un Carrousel\",\n \"add_new_item\" => \"Ajouter un nouveau Slide\",\n \"new_item\" => \"Nouveau Carrousel\",\n \"view_item\" => \"Voir Carrousel\",\n \"search_item\" => \"Rechercher un Carrousel\",\n \"not_found\" => \"aucun Carrousel\",\n \"not_found_in_trash\" => \"aucun Caroussel dans la corbeille\",\n \"parent_item_colon\" => \"\",\n \"menu_name\" => \"Carrousel\"\n\n );\n\n register_post_type(\"slide\", array(\n \"public\" => true,\n \"publicity_queryable\" => false,\n \"labels\" => $labels,\n \"menu_position\" => 8,\n \"capability_type\" => \"post\",\n \"supports\" => array(\"title\", \"thumbnail\")\n ));\n\n add_image_size(\"Caroussel\", 1000, 3000, true);\n}", "function pvplugin_add_meta_box() {\n\t\n\t$screens = array( 'policy' );\n\t\n\tforeach ( $screens as $screen ) {\n\t\n\t\tadd_meta_box(\n\t\t\t'myplugin_sectionid',\n\t\t\t__( 'Custom Meta Box', 'policy_library_plugin' ),\n\t\t\t array( &$this, 'pvplugin_meta_box_callback' ),\n\t\t\t$screen\n\t\t);\n\t\t\n\t\tadd_meta_box(\n\t\t\t'myplugin_side_sectionid',\n\t\t\t__( 'Policy Expire', 'policy_library_plugin' ),\n\t\t\t array( &$this, 'pvplugin_side_meta_box_callback' ),\n\t\t\t$screen,'side','high'\n\t\t);\n\t\t\n\t}\n\t}", "function pa_add_custom_testi() {\r\r\n add_meta_box( 'pa-testimonial-option', __( 'Testimonial Option', 'my_framework' ), 'pa_custom_testi_option', 'testimonial', 'normal', 'high');\r\r\n}", "function cmb2_gallery() {\n $prefix = '_gallery_';\n\n /**\n * Initiate the metabox\n */\n $cmb = new_cmb2_box( array(\n 'id' => 'gallery_metabox',\n 'title' => __( 'Galería de fotos', 'cmb2' ),\n 'object_types' => array( 'page', 'post' ), // post type\n //'object_types' => array( 'gallery'),\n //'show_on' => array( 'key' => 'page-template', 'value' => 'page-gallery.php' ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true, // Show field names on the left\n // 'cmb_styles' => false, // false to disable the CMB stylesheet\n // 'closed' => true, // Keep the metabox closed by default\n ) );\n /*\n // Regular text field\n $cmb->add_field( array(\n 'name' => __( 'Teléfono', 'cmb2' ),\n 'desc' => __( 'agregar un telefono (opcional)', 'cmb2' ),\n 'id' => $prefix . 'phone',\n 'type' => 'text',\n 'repeatable' => true,\n 'show_on_cb' => 'cmb2_hide_if_no_cats', // function should return a bool value\n // 'sanitization_cb' => 'my_custom_sanitization', // custom sanitization callback parameter\n // 'escape_cb' => 'my_custom_escaping', // custom escaping callback parameter\n // 'on_front' => false, // Optionally designate a field to wp-admin only\n // 'repeatable' => true,\n ) );\n */\n\n // Regular text field\n $cmb->add_field( array(\n 'name' => 'Imágenes de la Galería',\n 'desc' => 'Subir y administrar imágenes',\n 'button' => 'Administrar Galería', // Optionally set button label\n 'id' => $prefix . 'images',\n 'type' => 'pw_gallery',\n 'sanitization_cb' => 'pw_gallery_field_sanitise',\n ));\n}", "public function register_metaboxes() {\n\n\t\t\twapu_core()->get_core()->init_module( 'cherry-post-meta', array(\n\t\t\t\t'id' => 'wapu_gallery',\n\t\t\t\t'title' => esc_html__( 'Gallery', 'wapu-core' ),\n\t\t\t\t'page' => array( $this->post_type ),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'callback_args' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\t'_wapu_single_large_thumb' => array(\n\t\t\t\t\t\t'type' => 'media',\n\t\t\t\t\t\t'title' => esc_html__( 'Single Large Image', 'wapu-core' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t) );\n\n\t\t\twapu_core()->get_core()->init_module( 'cherry-post-meta', array(\n\t\t\t\t'id' => 'wapu_clear_caches',\n\t\t\t\t'title' => esc_html__( 'Clear Caches', 'wapu-core' ),\n\t\t\t\t'page' => array( $this->post_type ),\n\t\t\t\t'context' => 'side',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'callback_args' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\t'_wapu_clear_reviews_cache' => array(\n\t\t\t\t\t\t'type' => 'html',\n\t\t\t\t\t\t'title' => esc_html__( 'Clear Reviews Cache', 'wapu-core' ),\n\t\t\t\t\t\t'html' => sprintf(\n\t\t\t\t\t\t\t'<a href=\"%s\" class=\"button\">Clear Reviews Cache</a><br><br>',\n\t\t\t\t\t\t\tadd_query_arg( array( 'clear_meta_cache' => '_rating_cache' ) )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'_wapu_clear_terms_cache' => array(\n\t\t\t\t\t\t'type' => 'html',\n\t\t\t\t\t\t'title' => esc_html__( 'Clear Terms Cache', 'wapu-core' ),\n\t\t\t\t\t\t'html' => sprintf(\n\t\t\t\t\t\t\t'<a href=\"%s\" class=\"button\">Clear Terms Cache</a>',\n\t\t\t\t\t\t\tadd_query_arg( array( 'clear_meta_cache' => '_terms_cache' ) )\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\twapu_core()->get_core()->init_module( 'cherry-post-meta', array(\n\t\t\t\t'id' => 'wapu_misc',\n\t\t\t\t'title' => esc_html__( 'Misc Options', 'wapu-core' ),\n\t\t\t\t'page' => array( $this->post_type ),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'callback_args' => false,\n\t\t\t\t'fields' => apply_filters(\n\t\t\t\t\t'wapu-core/edd/metabxes/misc',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'_wapu_ld_url' => array(\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Live Demo URL', 'wapu-core' ),\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\twapu_core()->get_core()->init_module( 'cherry-term-meta', array(\n\t\t\t\t'tax' => 'download_category',\n\t\t\t\t'priority' => 10,\n\t\t\t\t'fields' => array(\n\t\t\t\t\t'_wapu_category_home' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'label' => 'Home URL for current category (for breadcrumbs)',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t) );\n\n\t\t}", "function sp_add_custom_box() {\n\tif( function_exists( 'add_meta_box' )) {\n\t\tadd_meta_box( 'sp_custom_box_1', __( 'General Property Info', 'sp' ), 'sp_inner_custom_box_1', 'post', 'normal', 'high' );\n\t\tadd_meta_box( 'sp_custom_box_2', __( 'Property Details', 'sp' ), 'sp_inner_custom_box_2', 'post', 'normal', 'high' );\n\t\tadd_meta_box( 'sp_custom_box_3', __( 'Property Photos', 'sp' ), 'sp_inner_custom_box_3', 'post', 'normal', 'high' );\n\t}\n}", "public function apb_add_meta_boxes() {\r\n\t}", "function myplugin_add_custom_box() {\n\t\t add_meta_box( \n\t\t 'myplugin_sectionid',\n\t\t __( 'My Post Section Title', 'myplugin_textdomain' ),\n\t\t 'myplugin_inner_custom_box',\n\t\t 'wpflexslider' \n\t\t );\n\t\t add_meta_box(\n\t\t 'myplugin_sectionid',\n\t\t __( 'My Post Section Title', 'myplugin_textdomain' ), \n\t\t 'myplugin_inner_custom_box',\n\t\t 'page'\n\t\t );\n\t\t add_meta_box('wpt_events_location', 'Event Location', 'wpt_events_location', 'events', 'side', 'default');\n\t\t}", "public function add_meta_boxes() {\n\n global $post;\n\n // Check we're on an Envira Gallery\n if ( 'envira' != $post->post_type ) {\n return;\n }\n\n // Let's remove all of those dumb metaboxes from our post type screen to control the experience.\n $this->remove_all_the_metaboxes();\n \n // Add our metaboxes to Envira CPT.\n\n // Types Metabox\n // Allows the user to upload images or choose an External Gallery Type\n // We don't display this if the Gallery is a Dynamic or Default Gallery, as these settings don't apply\n $type = $this->get_config( 'type', $this->get_config_default( 'type' ) );\n if ( ! in_array( $type, array( 'defaults', 'dynamic' ) ) ) {\n add_meta_box( 'envira-gallery', __( 'Envira Gallery', 'envira-gallery' ), array( $this, 'meta_box_gallery_callback' ), 'envira', 'normal', 'high' );\n }\n\n // Settings Metabox\n add_meta_box( 'envira-gallery-settings', __( 'Envira Gallery Settings', 'envira-gallery' ), array( $this, 'meta_box_callback' ), 'envira', 'normal', 'high' );\n \n // Preview Metabox\n // Displays the images to be displayed when using an External Gallery Type\n // In the future, this could include a 'live' preview of the gallery theme options etc.\n add_meta_box( 'envira-gallery-preview', __( 'Envira Gallery Preview', 'envira-gallery' ), array( $this, 'meta_box_preview_callback' ), 'envira', 'normal', 'high' );\n \n // Display the Gallery Code metabox if we're editing an existing Gallery\n if ( $post->post_status != 'auto-draft' ) {\n add_meta_box( 'envira-gallery-code', __( 'Envira Gallery Code', 'envira-gallery' ), array( $this, 'meta_box_gallery_code_callback' ), 'envira', 'side', 'default' );\n }\n\n // Output 'Select Files from Other Sources' button on the media uploader form\n add_action( 'post-plupload-upload-ui', array( $this, 'append_media_upload_form' ), 1 );\n add_action( 'post-html-upload-ui', array( $this, 'append_media_upload_form' ), 1 );\n \n }", "function etheme_create_slider($args, $title = false, $image_width = 215, $image_height = 215, $crop = false, $enable_slider_from = 4, $last_offset = 3){\n\tglobal $wpdb;\n\n\t$product_per_row = etheme_get_option('prodcuts_per_row');\n\t$box_id = rand(1000,10000);\n\t$multislides = new WP_Query( $args );\n\n\tif ( $multislides->have_posts() ) :\n\t\tif ($title) {\n\t\t\t$title_output = '<h4 class=\"slider-title\">'.$title.'</h4>';\n\t\t}\n\t\techo '<div class=\"home-product-grid slider\">';\n\t\t\techo $title_output;\n\t\t\techo '<div>';\n\n\t\t\t$_i=0;\n\n\t\t\twhile ($multislides->have_posts()) : $multislides->the_post();\n\t\t\t\t\t$_i++;\n\n\t\t\t\t\tif(class_exists('Woocommerce')) {\n\t\t\t\t\t\t\tglobal $product;\n\t\t\t\t\t\t\tif (!$product->is_visible()) continue;\n\t\t\t\t\t\t\twoocommerce_get_template_part( 'content', 'product' );\n\t\t\t\t\t}\n\t\t\tendwhile;\n\n\t\t\techo '</div><!-- carousel -->';\n\n\t\t\tif($_i > $enable_slider_from):\n\t\t\t\techo '<div class=\"prev arrow'.$box_id.'\" style=\"cursor: pointer; \">&nbsp;</div>';\n\t\t\t\techo '<div class=\"next arrow'.$box_id.'\" style=\"cursor: pointer; \">&nbsp;</div>';\n\t\t\tendif;\n\t\techo '</div><!-- product-slider -->';\n\tendif;\n\n\twp_reset_query();\n\n\tif ($_i>$enable_slider_from) {\n\n\t\tif(etheme_get_option('touch_carusels')) {\n\t\t\t\t$desktopClickDrag = 'true';\n\t\t} else {\n\t\t\t\t$desktopClickDrag = 'false';\n\t\t}\n\n\t\techo '\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t\t\t\t\tjQuery(\".arrow'.$box_id.'.prev\").addClass(\"disabled\");\n\t\t\t\t\t\t\t\tjQuery(\".slider-'.$box_id.'\").iosSlider({\n\t\t\t\t\t\t\t\t\t\tdesktopClickDrag: '.$desktopClickDrag.',\n\t\t\t\t\t\t\t\t\t\tsnapToChildren: true,\n\t\t\t\t\t\t\t\t\t\tinfiniteSlider: false,\n\t\t\t\t\t\t\t\t\t\tnavNextSelector: \".arrow'.$box_id.'.next\",\n\t\t\t\t\t\t\t\t\t\tnavPrevSelector: \".arrow'.$box_id.'.prev\",\n\t\t\t\t\t\t\t\t\t\tlastSlideOffset: '.$last_offset.',\n\t\t\t\t\t\t\t\t\t\tonFirstSlideComplete: function(){\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\".arrow'.$box_id.'.prev\").addClass(\"disabled\");\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tonLastSlideComplete: function(){\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\".arrow'.$box_id.'.next\").addClass(\"disabled\");\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tonSlideChange: function(){\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\".arrow'.$box_id.'.next\").removeClass(\"disabled\");\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\".arrow'.$box_id.'.prev\").removeClass(\"disabled\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t';\n\t}\n}", "function igv_cmb_metaboxes() {\n $prefix = '_igv_';\n\n if (isset($_GET['post'])) {\n $post_ID = $_GET['post'];\n } else {\n $post_ID = null;\n }\n\n $parent_args = array(\n 'post_type' => 'project',\n 'post_status' => 'any',\n 'posts_per_page' => -1\n );\n\n $gallery_args = array(\n 'post_type' => 'photograph',\n 'posts_per_page' => -1,\n 'meta_query' => array(\n array(\n 'key' => '_igv_parent',\n 'value' => $post_ID,\n 'type' => 'NUMERIC',\n 'compare' => '='\n )\n )\n );\n\n /**\n * Metaboxes declarations here\n * Reference: https://github.com/WebDevStudios/CMB2/blob/master/example-functions.php\n */\n\n $gallery = new_cmb2_box( array(\n 'id' => $prefix . 'gallery_metabox',\n 'title' => __( 'Gallery', 'cmb2' ),\n 'object_types' => array( 'project', ), // Post type\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true, // Show field names on the left\n ) );\n\n $gallery->add_field( array(\n 'name' => __( 'Gallery', 'cmb2' ),\n 'desc' => __( 'Create the gallery in the right hand column', 'cmb2' ),\n 'id' => $prefix . 'gallery',\n 'type' => 'custom_attached_posts',\n 'options' => array(\n 'query_args' => $gallery_args,\n 'show_thumbnails' => true\n ),\n ) );\n\n $project_meta = new_cmb2_box( array(\n 'id' => $prefix . 'project_metabox',\n 'title' => __( 'Project meta', 'cmb2' ),\n 'object_types' => array( 'project', ), // Post type\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true, // Show field names on the left\n ) );\n\n $project_meta->add_field( array(\n 'name' => __( 'Year', 'cmb2' ),\n 'desc' => __( '...', 'cmb2' ),\n 'id' => $prefix . 'year',\n 'type' => 'text'\n ) );\n\n // PHOTOGRAPH\n\n $photo_meta = new_cmb2_box( array(\n 'id' => $prefix . 'photograph_metabox',\n 'title' => __( 'Photograph meta', 'cmb2' ),\n 'object_types' => array( 'photograph' ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true,\n ) );\n\n $photo_meta->add_field( array(\n 'name' => 'Photograph details',\n 'desc' => 'Set the caption for the photograph as the title of this post. Set the image as the featured image.',\n 'type' => 'title',\n 'id' => $prefix . 'instructions'\n ) );\n\n $photo_meta->add_field( array(\n 'name' => __( 'Parent project', 'cmb2' ),\n 'desc' => __( 'Choose the project which this photograph belongs to', 'cmb2' ),\n 'id' => $prefix . 'parent',\n 'type' => 'select',\n 'show_option_none' => true,\n 'options' => get_post_objects($parent_args),\n ) );\n\n\n // SPREAD\n\n $spread_meta = new_cmb2_box( array(\n 'id' => $prefix . 'spread_metabox',\n 'title' => __( 'Spread images', 'cmb2' ),\n 'object_types' => array( 'spread', ), // Post type\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true, // Show field names on the left\n ) );\n\n $spread_colorpicker = $spread_meta->add_field( array(\n 'name' => 'Spread color',\n 'id' => $prefix . 'spread_color',\n 'type' => 'colorpicker',\n 'default' => '#FDFDFD',\n ) );\n\n $spread_meta_group = $spread_meta->add_field( array(\n 'id' => $prefix . 'spread_images',\n 'type' => 'group',\n 'description' => __( 'Generates reusable form entries', 'cmb' ),\n 'options' => array(\n 'group_title' => __( 'Entry {#}', 'cmb' ), // since version 1.1.4, {#} gets replaced by row number\n 'add_button' => __( 'Add Another Entry', 'cmb' ),\n 'remove_button' => __( 'Remove Entry', 'cmb' ),\n 'sortable' => true, // beta\n ),\n ) );\n\n $spread_meta->add_group_field( $spread_meta_group, array(\n 'name' => 'Image',\n 'description' => 'DO NOT upload a file here! Choose an existing upload that you have already added to a project',\n 'id' => 'image',\n 'type' => 'file',\n ) );\n\n $spread_meta->add_group_field( $spread_meta_group, array(\n 'name' => 'Top',\n 'description' => '% value for css',\n 'id' => 'top',\n 'type' => 'text',\n ) );\n\n $spread_meta->add_group_field( $spread_meta_group, array(\n 'name' => 'Left',\n 'description' => '% value for css',\n 'id' => 'left',\n 'type' => 'text',\n ) );\n\n $spread_meta->add_group_field( $spread_meta_group, array(\n 'name' => 'Right',\n 'description' => '% value for css',\n 'id' => 'right',\n 'type' => 'text',\n ) );\n\n $spread_meta->add_group_field( $spread_meta_group, array(\n 'name' => 'Max-width',\n 'description' => '% value for css',\n 'id' => 'maxwidth',\n 'type' => 'text',\n ) );\n\n/*\n $spread_meta->add_group_field( $spread_meta_group, array(\n 'name' => 'Scale',\n 'description' => '% value for css',\n 'id' => 'scale',\n 'type' => 'text',\n ) );\n*/\n\n $gallery = new_cmb2_box( array(\n 'id' => $prefix . 'page_metabox',\n 'title' => __( 'Page data', 'cmb2' ),\n 'object_types' => array( 'page', ), // Post type\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true, // Show field names on the left\n ) );\n\n $gallery->add_field( array(\n 'name' => __( '2nd column', 'cmb2' ),\n 'desc' => __( 'Text in the second column', 'cmb2' ),\n 'id' => $prefix . 'extra_copy',\n 'type' => 'wysiwyg'\n ) );\n\n}", "function vw_mobile_app_pro_posttype_bn_testimonial_meta_box() {\n\tadd_meta_box( 'vw-mobile-app-pro-posttype-testimonial-meta', __( 'Enter Details', 'vw-mobile-app-pro-posttype' ), 'vw_mobile_app_pro_posttype_bn_testimonial_meta_callback', 'testimonials', 'normal', 'high' );\n}", "function meta_box_horse_gallery() {\n\tglobal $meta_box_portfolio_images, $post;\n \t\n\techo '<p style=\"padding:10px 0 0 0;\">'.__('These settings enable you to manage the images displayed in the portfolio. Upload your images and use \"Manage Images\" to edit, reorder and delete images.', 'my_theme').'</p>';\n\n\techo '<table class=\"form-table my-custom-table\">';\n \n\tforeach ($meta_box_portfolio_images['fields'] as $field) {\n\t\n\t\t// get current post meta data\n\t\tif (isset ($field['id']))\n\t\t\t$meta = get_post_meta($post->ID, $field['id'], true);\n\t\t\t\n\t\tswitch ($field['type']) { \n\t\t\t\n\t\t\t\t//If Attachments\n\t\t\tcase 'attachments':\n\t\t\t\techo '<tr style=\"border-top:1px solid #eeeeee;\">',\n\t\t\t\t'<th style=\"width:25%\"><label><strong>', $field['name'], '</strong><span style=\"display:block; color:#666; margin:5px 0 0 0; line-height: 18px;\">'. $field['desc'].'</span></label></th>',\n\t\t\t\t'<td>';\n\t\t\t\t\n\t\t\t\t$args = array(\n\t\t\t\t\t'post_type' => \t\t'attachment',\n\t\t\t\t\t'post_status' => \t\t'inherit',\n\t\t\t\t\t'post_parent' => \t\t$post->ID,\n\t\t\t\t\t'post_mime_type' => \t'image',\n\t\t\t\t\t'posts_per_page' => \t'-1',\n\t\t\t\t\t'order' => \t\t\t'ASC',\n\t\t\t\t\t'orderby' => \t\t'menu_order',\n\t\t\t\t\t'exclude' => \t\tget_post_thumbnail_id()\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$intro = '<p><a href=\"media-upload.php?post_id=' . $post->ID .'&amp;type=image&amp;TB_iframe=1&amp;width=640&amp;height=715\" id=\"add_images\" class=\"thickbox\" title=\"' . __( 'Upload Images', 'my_theme' ) . '\">' . __( 'Upload Images', 'my_theme' ) . '</a> | <a href=\"media-upload.php?post_id=' . $post->ID .'&amp;type=image&amp;tab=gallery&amp;TB_iframe=1&amp;width=640&amp;height=715\" id=\"manage_images\" class=\"thickbox\" title=\"' . __( 'Manage Images', 'my_theme' ) . '\">' . __( 'Manage Images', 'my_theme' ) . '</a></p>';\n\t\t\t\techo $intro;\n\t\t\t\t\n\t\t\t\t$return = '';\n\t\t\t\t$attachments = get_posts( $args );\n\t\t\t\t\n\t\t\t\t\t$return .= '<div id=\"meta-horse-gallery-attachments\">';\n\t\t\t\t\t\tif( empty( $attachments ) )\n\t\t\t\t\t\t\t$return .= '<p>'. __('No images.','my_theme'). '</p>';\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tforeach( $attachments as $image ):\n\t\t\t\t\t\t\t\t$thumbnail = wp_get_attachment_image_src( $image->ID, 'thumbnail');\n\t\t\t\t\t\t\t\t$return .= '<img style=\"margin-right:5px;\" width=\"100\" height=\"100\" src=\"' . $thumbnail[0] . '\" alt=\"' . apply_filters('the_title', $image->post_title). '\"/>';\n\t\t\t\t\t\t\tendforeach;\n\t\t\t\t\t\t}\n\t\t\t\t\t$return .= '</div>';\n\t\t\t\techo $return;\n\t\t\t\t\n\t\t\t\techo \t'</td>',\n\t\t\t\t'</tr>';\t\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\n\t}\n \n\techo '</table>';\n\t\n\t// create a custom nonce for submit verification later\n\techo '<input type=\"hidden\" name=\"meta_horse_gallery_noncename\" value=\"' . wp_create_nonce(__FILE__) . '\" />';\n}", "function __construct() {\r\n parent::__construct(\r\n 'st_carousel', // Base ID\r\n esc_html__( 'WPCoupon Store Carousel', 'wp-coupon' ), // Name\r\n array(\r\n 'description' => esc_html__( 'Display store width Carousel', 'wp-coupon' ),\r\n 'classname' => 'widget_carousel widget_wpc_carousel'\r\n ), // Args\r\n array(\r\n 'width' => 530\r\n )\r\n );\r\n }", "public function add_meta_boxes() {\n\t\t// Create the Slide Meta Boxes\n\t\tadd_meta_box( 'justart-slider-slide-settings-group', 'Slides', array( $this, 'create_slide_settings_meta_box' ), 'justart-slider', 'normal', 'default' );\n\t\tadd_filter( 'postbox_classes_justart-slider-slide-settings-group', array( $this, 'add_metabox_classes' ) );\n\t\t\n\t\t// Create the Shortcode Meta Box\n\t\tadd_meta_box( 'justart-slider-shortcode-group', 'Shortcode', array( $this, 'create_shortcode_meta_box' ), 'justart-slider', 'side', 'high' );\n\t\t\n\t\t// Create the Global Settings Meta Box\n\t\tadd_meta_box( 'justart-slider-global-settings-group', 'Global settings', array( $this, 'create_global_settings_meta_box' ), 'justart-slider', 'side', 'default' );\n\t}", "function vulcan_portfolio_meta_boxes() {\r\r\n $meta_boxes = array(\r\r\n \"portfolio_thumbnail\" => array(\r\r\n \"name\" => \"portfolio_thumbnail\",\r\r\n \"title\" => \"Image thumbnail\",\r\r\n \"description\" => \"Add thumbnail image url for your portfolio item thumbnail.\",\r\r\n \"type\" => \"text\"\r\r\n ),\r\r\n \"portfolio_link\" => array(\r\r\n \"name\" => \"portfolio_link\",\r\r\n \"title\" => \"portfolio link\",\r\r\n \"description\" => \"please enter image or video url if you want to create video post.<br/>Images : <br />http://localhost/ovum/wp-content/uploads/2010/07/image.jpg<br/> Video : <br />\r\r\n http://www.youtube.com/watch?v=tESK9RcyexU<br />\r\r\n http://vimeo.com/12816548<br />\r\r\n http://localhost/vulcan/wp-content/uploads/2010/07/sample.3gp<br />\r\r\n http://localhost/vulcan/wp-content/uploads/2010/07/sample.mp4<br />\r\r\n http://localhost/vulcan/wp-content/uploads/2010/07/sample.mov<br />\r\r\n http://www.adobe.com/jp/events/cs3_web_edition_tour/swfs/perform.swf?width=680&height=405<br />\r\r\n Note : for swf movie, you need to specify the width and height for movie, as above example\",\r\r\n \"type\" => \"text\"\r\r\n ),\r\r\n \"portfolio_url\" => array(\r\r\n \"name\" => \"portfolio_url\",\r\r\n \"title\" => \"Custom URL\",\r\r\n \"description\" => \"Add link / custom URL for your portfolio items, eg. link to external url.\",\r\r\n \"type\" => \"text\"\r\r\n ), \r\r\n );\r\r\n \r\r\n return $meta_boxes;\r\r\n}", "function experiences_add_custom_box() {\n add_meta_box(\n 'exp_image_link',\n 'Experience Settings',\n 'experiences_meta_box_html',\n ['experiences']\n );\n}", "function careers_metabox() {\n\t\t\tforeach (careers_fields() as $key => $value) {\n\t\t\t\t$id = 'careers_'.$value['slug'];\n\t\t\t\t$title = __( $value['name'], 'careers_textdomain' );\n\t\t\t\tadd_meta_box($id, $title, 'careers_callback', 'Careers', 'normal', 'low',$value);\n\t\t\t}\n\t\t}", "function create_featuredherocarousel_cpt() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Featured Hero Carousel', 'Post Type General Name', 'textdomain' ),\n\t\t'singular_name' => _x( 'Featured Hero Carousel', 'Post Type Singular Name', 'textdomain' ),\n\t\t'menu_name' => _x( 'Featured Hero Carousel', 'Admin Menu text', 'textdomain' ),\n\t\t'name_admin_bar' => _x( 'Featured Hero Carousel', 'Add New on Toolbar', 'textdomain' ),\n\t\t'archives' => __( 'Featured Hero Carousel Archives', 'textdomain' ),\n\t\t'attributes' => __( 'Featured Hero Carousel Attributes', 'textdomain' ),\n\t\t'parent_item_colon' => __( 'Parent Featured Hero Carousel:', 'textdomain' ),\n\t\t'all_items' => __( 'All Featured Hero Carousel', 'textdomain' ),\n\t\t'add_new_item' => __( 'Add New Featured Hero Carousel', 'textdomain' ),\n\t\t'add_new' => __( 'Add New', 'textdomain' ),\n\t\t'new_item' => __( 'New Featured Hero Carousel', 'textdomain' ),\n\t\t'edit_item' => __( 'Edit Featured Hero Carousel', 'textdomain' ),\n\t\t'update_item' => __( 'Update Featured Hero Carousel', 'textdomain' ),\n\t\t'view_item' => __( 'View Featured Hero Carousel', 'textdomain' ),\n\t\t'view_items' => __( 'View Featured Hero Carousel', 'textdomain' ),\n\t\t'search_items' => __( 'Search Featured Hero Carousel', 'textdomain' ),\n\t\t'not_found' => __( 'Not found', 'textdomain' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'textdomain' ),\n\t\t'featured_image' => __( 'Featured Image', 'textdomain' ),\n\t\t'set_featured_image' => __( 'Set featured image', 'textdomain' ),\n\t\t'remove_featured_image' => __( 'Remove featured image', 'textdomain' ),\n\t\t'use_featured_image' => __( 'Use as featured image', 'textdomain' ),\n\t\t'insert_into_item' => __( 'Insert into Featured Hero Carousel', 'textdomain' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this Featured Hero Carousel', 'textdomain' ),\n\t\t'items_list' => __( 'Featured Hero Carousel list', 'textdomain' ),\n\t\t'items_list_navigation' => __( 'Featured Hero Carousel list navigation', 'textdomain' ),\n\t\t'filter_items_list' => __( 'Filter Featured Hero Carousel list', 'textdomain' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'Featured Hero Carousel', 'textdomain' ),\n\t\t'description' => __( 'Front page featured visits. ', 'textdomain' ),\n\t\t'labels' => $labels,\n\t\t'menu_icon' => 'dashicons-format-image',\n\t\t'supports' => array('title', 'excerpt', 'thumbnail', 'custom-fields'),\n\t\t'taxonomies' => array(),\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'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'hierarchical' => false,\n\t\t'exclude_from_search' => false,\n\t\t'show_in_rest' => true,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\tregister_post_type( 'featuredherocarousel', $args );\n\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 create_meta_portfolio_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-portfolio-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' PORTFOLIO ITEM SETTINGS', 'new_meta_portfolio_boxes', PEXETO_PORTFOLIO_POST_TYPE, 'normal', 'high' );\n\t}\n}", "function mob_images() {\n\tupdate_option( 'thumbnail_size_w', 360 );\n\tupdate_option( 'thumbnail_size_h', 220 );\n\tupdate_option( 'thumbnail_crop', 1 );\n\n\tupdate_option( 'medium_size_w', 654 );\n\tupdate_option( 'medium_size_h', 9999 );\n\tupdate_option( 'medium_crop', 0 );\n\n\tupdate_option( 'medium_large_size_w', 0 );\n\tupdate_option( 'medium_large_size_h', 0 );\n\n\tupdate_option( 'large_size_w', 850 );\n\tupdate_option( 'large_size_h', 400 );\n\tupdate_option( 'large_crop', 1 );\n\n\tadd_image_size( 'archive-blog', 360, 170, true );\t\n}" ]
[ "0.7375599", "0.68776506", "0.6871126", "0.6775046", "0.6683653", "0.66329354", "0.65745693", "0.6563255", "0.6533238", "0.6505103", "0.6492187", "0.6485759", "0.6443125", "0.64393926", "0.64239436", "0.64022046", "0.64015126", "0.64001495", "0.63472784", "0.633952", "0.63312805", "0.6329049", "0.6320016", "0.6308016", "0.6306805", "0.6268367", "0.6258679", "0.6256021", "0.6246652", "0.6217439", "0.62051135", "0.6201166", "0.61953914", "0.6191175", "0.61904496", "0.6183666", "0.61827546", "0.61777395", "0.617321", "0.6170225", "0.61652327", "0.6162093", "0.61429524", "0.61399513", "0.6127843", "0.61249095", "0.6122953", "0.6122364", "0.61201096", "0.6119288", "0.6108486", "0.610416", "0.6097448", "0.60968703", "0.60821337", "0.60821307", "0.6079557", "0.6075301", "0.605654", "0.60564303", "0.60552686", "0.604357", "0.6042304", "0.60403895", "0.60390526", "0.60304976", "0.60227376", "0.6021133", "0.6018843", "0.6017234", "0.60096985", "0.5995364", "0.5991281", "0.59909046", "0.597767", "0.59747016", "0.59722114", "0.59627074", "0.5961303", "0.59568155", "0.5954506", "0.5950963", "0.5950381", "0.5942519", "0.5934008", "0.59285754", "0.59281754", "0.59271955", "0.59262204", "0.5919495", "0.59166515", "0.59088033", "0.58921194", "0.58914435", "0.58905804", "0.58841985", "0.5867792", "0.58670616", "0.5865306", "0.5859236" ]
0.7247765
1
/ Add new widget and sidebar Register and load the widget
function wpb_carousel_widget() { register_widget( 'wpb_widget' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_widget_sidebar()\r\n{\r\n register_sidebar(\r\n array(\r\n 'name' => 'Sidebar',\r\n 'id' => 'main-sidebar',\r\n )\r\n );\r\n register_sidebar(\r\n array(\r\n 'name' => 'Sidebar du footer',\r\n 'id' => 'footer-sidebar',\r\n )\r\n );\r\n}", "public function addWidget()\r\n {\r\n }", "function aw_add_load_widget() {\r\n\t\tregister_widget( 'AW_AddFeed' );\r\n\t}", "function widget_registration($name, $id, $description, $beforeWidget, $afterWidget, $beforeTitle, $afterTitle) {\n register_sidebar(\n array(\n 'name' => $name,\n 'id' => $id,\n 'description' => $description,\n 'before_widget' => $beforeWidget,\n 'after_widget' => $afterWidget,\n 'before_title' => $beforeTitle,\n 'after_title' => $afterTitle,\n )\n );\n}", "public static function register()\n {\n register_sidebar( array(\n 'name' => 'Widget Area 1',\n 'id' => 'widget_1',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n }", "function add_widgets() {\n\n register_sidebar( array(\n 'name' => 'Right Sidebar',\n 'id' => 'right_sidebar',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n}", "function bootstrap_side_nav_widget_load_widget() {\n\t\tregister_widget( 'bootstrap_side_nav_widget' );\n\t}", "function register_my_sidebar(){\n \n register_sidebar( array(\n\t\t\"name\" => \"Sidebar widget\",\n \"id\" => \"sidebar1\", \n ));\n\n}", "function widget_init() {\n if ( function_exists('register_sidebar') )\n \n register_sidebar(\n array(\n 'name' => 'Footer',\n 'before_widget' => '<div class = \"footer\">',\n 'after_widget' => '</div>',\n 'before_title' => '',\n 'after_title' => '',\n ));\n\n register_sidebar(\n array(\n 'name' => 'Event Navigation',\n 'before_widget' => '<div class=\"custom-widget top-round card slight-shadow card_container flex-column-reverse\">',\n 'after_widget' => '</div>',\n 'before_title' => '<div class=\"card_title\">',\n 'after_title' => '</div>',\n ));\n\n register_sidebar(\n array(\n 'name' => 'Frontpage News',\n 'before_widget' => '<div class=\"custom-widget card top-round slight-shadow card_container flex-column-reverse\">',\n 'after_widget' => '</div>',\n 'before_title' => '<div class=\"card_title\">',\n 'after_title' => '</div>',\n ));\n\n }", "public function register_widget() {\n register_widget( 'WPP_Widget' );\n }", "function dl_widget_init() {\n\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Página de Contacto',\n\t\t'id'\t\t\t=> 'contact-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Barra Lateral',\n\t\t'id'\t\t\t=> 'sidebar-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Search Menu',\n\t\t'id'\t\t\t=> 'menu-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\n}", "function urbanfitness_widgets()\n{\n //registering widget must write php code to show it\n register_sidebar([\n 'name' => 'Sidebar', //widget name on wordpress panel\n 'id' => 'sidebar', //we are passing this id to dynamic_widget('sidebar') must be unique for wordpress to identify\n 'before_widget' => '<div class=\"widget\">', //html before widget\n 'after_widget' => '</div>', //html after widget\n 'before_title' => '<h3 class=\"text-primary\">', //html before title\n 'after_title' => '</h3>', //html after title\n ]);\n}", "function widgets_init_now() {\n\t\tregister_sidebar( array(\n\t\t\t'name' => 'Текст вверху шапки'\n\t\t\t,'id' => 'header_top'\n\t\t\t,'description' => 'Добавьте сюда виджет \"Текст\" из левой части страницы. Несколько виджетов будут расположены в строчку. Названия виджетов на сайте не отобразятся'\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => 'Блок для виджета рассылки в подвале'\n\t\t\t,'id' => 'footer_mailings'\n\t\t\t,'description' => 'Добавьте сюда виджет \"Текст\" из левой части страницы. Названия виджетов на сайте не отобразятся'\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => 'Блок контактов в подвале'\n\t\t\t,'id' => 'footer_contacts'\n\t\t\t,'description' => 'Добавьте сюда виджет \"Текст\" из левой части страницы. Названия виджетов на сайте не отобразятся'\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => 'Подробнее о системе обучения в Linguamore'\n\t\t\t,'id' => 'homepage_education-feats'\n\t\t\t,'description' => 'Блок, расположенный на странице \"Преимущества\". Добавьте сюда виджет \"Rich Text\" из левой части страницы. Иконки можно добавить кнопкой \"Add Media\". Названия виджетов на сайте не отобразятся'\n\t\t) );\n\t}", "function iiess_widgets(){\n register_sidebar(array(\n 'name' => 'Sidebar Eventos',\n 'id' => 'sidebar',\n 'before_widget' => '<div class=\"widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"text-center texto-primario\">',\n 'after_title' => '</h3>'\n ));\n}", "public function _register_widgets()\n {\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 gymfitness_widgets(){\n register_sidebar( array(\n 'name'=>'Sidebar 1',\n 'id' => 'sidebar_1',\n 'before-widget' => '<div class=\"widget\">', \n 'after-widget' => '</div>', \n 'before_title' => '<h3 class=\"text-center texto-primario\">',\n 'after_title' => '</h3>'\n\n\n ));\n register_sidebar( array(\n 'name'=>'Sidebar 2',\n 'id' => 'sidebar_2',\n 'before-widget' => '<div class=\"widget\">', \n 'after-widget' => '</div>', \n 'before_title' => '<h3 class=\"text-center texto-primario\">',\n 'after_title' => '</h3>'\n\n\n ));\n}", "public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}", "public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}", "function add_widget_Support() {\n register_sidebar( array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n}", "static function add_widget_to_sidebar($sidebar_id, $widget_name, $atts) {\n\n $widget_instances = get_option('widget_' . $widget_name);\n //All demo widgets will have an instance id of 99+\n $widget_instances[self::$last_widget_instance] = $atts;\n\n //add widget instance to DB\n update_option('widget_' . $widget_name, $widget_instances);\n $sidebars_widgets = get_option( 'sidebars_widgets' );\n $sidebars_widgets[ale_demo_base::sidebar_name_to_id($sidebar_id)][self::$last_sidebar_widget_position] = $widget_name . '-' . self::$last_widget_instance;\n update_option('sidebars_widgets', $sidebars_widgets);\n\n\n self::$last_sidebar_widget_position++;\n self::$last_widget_instance++;\n }", "function wpb_load_widget() {\n register_widget( 'lrq_widget' );\n }", "function inxboilerplate_widgets_init() {\n register_sidebar( array(\n \"name\" => __( \"Sidebar\", \"inxboilerplate\" ),\n \"id\" => \"r_sidebar\",\n \"before_widget\" => '<section id=\"%1$s\" class=\"widget %2$s\">',\n \"after_widget\" => \"</section>\",\n \"before_title\" => '<h3 class=\"wigtitle\">',\n \"after_title\" => \"</h3>\",\n ) );\n}", "function phoenix_widget_setup() {\n register_sidebar(array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar-1',\n 'class' => 'custom',\n 'description' => 'Single post of blog sidebar',\n ));\n}", "function wpb_load_widget() {\n\t\tregister_widget( 'dmv_widget' );\n\t}", "function mythemepost_widgets(){ \n register_sidebar( array(\n 'name' => 'Lavel Up New Widget Area',\n 'id' => 'level_up_new_widget_area',\n 'before_widget' => '<aside>',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n \n ));\n}", "function gymfitness_widgets(){\n\n register_sidebar(array(\n 'name' => 'Sidebar 1', \n 'id' => 'sidebar_1',\n 'before_widget' => '<div class=\"\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>'\n ));\n register_sidebar(array(\n 'name' => 'Sidebar 2', \n 'id' => 'sidebar_2',\n 'before_widget' => '<div class=\"\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>'\n ));\n\n}", "function example_load_widgets()\n{\n\tregister_widget('GuildNews_Widget');\n}", "function add_sidebar_area(){\n\t\t\tif(!empty($_POST['qode-add-widget'])){\n\t\t\t\t$this->sidebars = get_option($this->stored);\n\t\t\t\t$name = $this->get_name(sanitize_text_field($_POST['qode-add-widget']));\n\n\t\t\t\tif(empty($this->sidebars)){\n\t\t\t\t\t$this->sidebars = array($name);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->sidebars = array_merge($this->sidebars, array($name));\n\t\t\t\t}\n\n\t\t\t\tupdate_option($this->stored, $this->sidebars);\n\t\t\t\twp_redirect( admin_url('widgets.php') );\n\t\t\t\tdie();\n\t\t\t}\n\t\t}", "function add_some_widgets()\r\n{\r\n register_sidebar( array(\r\n 'name' => __( 'Sidebar', 'sidebar' ),\r\n 'id' => 'sidebar',\r\n 'description' => __( 'This will be displayed followed by the regular sidebar', 'spd' ),\r\n 'before_widget' => '<div id=\"sidebar-%i\" class=\"widget\"><div class=\"widgetcontent\">',\r\n 'after_widget' => '</div></div>',\r\n 'before_title' => '<h5>',\r\n 'after_title' => '</h5>',\r\n ) );\r\n}", "function montheme_register_widget() {\n register_widget(YoutubeWidget::class);\n register_sidebar([\n 'id' => 'homepage',\n 'name' => __('Sidebar Accueil', 'montheme'),\n 'before_widget' => '<div class=\"p-4 %2$s\" id=\"%1$s\"',\n 'after_widget' => '</div>',\n 'before_title' => ' <h4 class=\"fst-italic\">',\n 'after_title' => '</h4>'\n ]);\n}", "function ccac_2020_new_widgets_init() {\n /* Pinegrow generated Register Sidebars Begin */\n\n /* Pinegrow generated Register Sidebars End */\n}", "function arphabet_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => 'Event Widget',\n\t\t'id' => 'event_widget',\n\t)\n \t);\n\tregister_sidebar( array(\n\t\t'name' => 'Landing Photo Widget',\n\t\t'id' => 'landingphoto_widget',\n\t)\n \t);\n\tregister_sidebar( array(\n\t\t'name' => 'Gallery Widget',\n\t\t'id' => 'gallery_widget',\n\t)\n\t );\n\t register_sidebar( array(\n\t\t'name' => 'About Widget',\n\t\t'id' => 'about_widget',\n\t)\n \t);\n}", "function yellow_widgets_init() {\n\n\tregister_sidebar( array(\n\t 'name' => 'Sidebar',\n\t 'id' => 'sidebar',\n\t 'before_widget' => '<div class=\"media-body\">',\n\t 'after_widget' => '</div>',\n\t 'before_title' => '<div class=\"card-header\">',\n\t 'after_title' => '</div>',\n\t));\n\tregister_sidebar( array(\n\t\t'name' => 'Footer',\n\t\t'id' => 'footer',\n\t\t'before_widget' => '',\n\t\t'after_widget' => '',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t ));\n\t\n \n }", "function control_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'control' ),\n\t\t'id' => 'sidebar-1',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t'after_title' => '</h1>',\n\t) );\n}", "function jn_widgets_init() {\n register_sidebar( array(\n 'name' => __('Main Sidebar', 'jn'),\n 'id' => 'sidebar-1',\n 'description' => __('The default sidebar to be used on pages','jn'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n ));\n}", "function ptoys_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'ptoys' ),\n\t\t'id' => 'sidebar-1',\n\t\t'description' => __( 'Add widgets here to appear in your sidebar.', 'ptoys' ),\n\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</section>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n}", "function wpb_load_widget() {\r\n\tregister_widget( 'wpb_widget' );\r\n}", "function add_new_widget(){\n\t\t?>\n\t\t<div id=\"ww-add-new-widget\">\n\t\t\t<h2><?php _e('Add Widget', 'widgetwrangler'); ?></h2>\n\t\t\t<div class=\"ww-inner\">\n\t\t\t\t<select id=\"ww-add-new-widget-widget\">\n\t\t\t\t\t<option value=\"0\">-- <?php _e('Select a Widget', 'widgetwrangler'); ?> --</option>\n\t\t\t\t\t<?php foreach ( $this->all_widgets as $widget ){ ?>\n\t\t\t\t\t\t<option value=\"<?php print esc_attr( $widget->ID ); ?>\"><?php print $widget->post_title; ?></option>\n\t\t\t\t\t<?php } ?>\n\t\t\t\t</select>\n\t\t\t\t<select id=\"ww-add-new-widget-corral\">\n\t\t\t\t\t<option value=\"0\">-- <?php _e('Select a Corral', 'widgetwrangler'); ?> --</option>\n\t\t\t\t\t<?php foreach($this->all_corrals as $corral_slug => $corral_name) { ?>\n\t\t\t\t\t\t<option value=\"<?php print esc_attr( $corral_slug ); ?>\"><?php print $corral_name; ?></option>\n\t\t\t\t\t<?php } ?>\n\t\t\t\t</select>\n\t\t\t\t<span id=\"ww-add-new-widget-button\" class=\"button button-large\"><?php _e('Add Widget to Corral', 'widgetwrangler'); ?></span>\n\t\t\t</div>\n\t\t\t<p class=\"description ww-inner\"><?php _e('Select a widget you would like to add, and the corral where you would like to add it. Click the button Add Widget to Corral.', 'widgetwrangler'); ?></p>\n\n\t\t\t<script type=\"text/html\" id=\"tmpl-add-widget\">\n\t\t\t\t<?php\n\t\t\t\t$tmpl_widget = array(\n\t\t\t\t\t'weight' => '__widget-weight__',\n\t\t\t\t\t'id' => '__widget-ID__',\n\t\t\t\t\t'title' => '__widget-post_title__',\n\t\t\t\t\t'corral' => array(\n\t\t\t\t\t\t'slug' => '__widget-corral_slug__',\n\t\t\t\t\t),\n\t\t\t\t);\n\n\t\t\t\tprint $this->sortable_corral_item( $tmpl_widget, '__ROW-INDEX__' );\n\t\t\t\t?>\n\t\t\t</script>\n\t\t</div>\n\t\t<?php\n\t\t//\n\t}", "function load_widget() {\n\n\t\tregister_widget( 'WordpressConnectWidgetActivityFeed' );\n\t\tregister_widget( 'WordpressConnectWidgetComments' );\n\t\tregister_widget( 'WordpressConnectWidgetFacepile' );\n\t\tregister_widget( 'WordpressConnectWidgetLikeBox' );\n\t\tregister_widget( 'WordpressConnectWidgetLikeButton' );\n\t\tregister_widget( 'WordpressConnectWidgetLiveStream' );\n\t\tregister_widget( 'WordpressConnectWidgetLoginButton' );\n\t\tregister_widget( 'WordpressConnectWidgetRecommendations' );\n\t\tregister_widget( 'WordpressConnectWidgetSendButton' );\n\n\t}", "function gardenia_load_widget() {\n\tregister_widget( 'gardenia_widget' );\n}", "function YWR_2020_widgets_init()\n{\n register_sidebar(array(\n 'name' => __('General Page Sidebar', 'YWR_2020'),\n 'id' => 'sidebar-1',\n 'description' => __('Add widgets here to appear in your sidebar on standard pages.', 'YWR_2020'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget clearfix %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<div class=\"fancy-title title-bottom-border\"><h2>',\n 'after_title' => '</h2></div>',\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 wpb_load_widget()\n{\n register_widget('wpb_widget');\n}", "function register_widget($widget)\n {\n }", "function wpb_load_widget() {\n register_widget( 'recent_post_widget' );\n }", "function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Widget oben rechts',\n 'id' => 'widget_top_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Widget mitte rechts',\n 'id' => 'widget_center_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Widget unten rechts',\n 'id' => 'widget_bottom_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Newsletter Widget',\n 'id' => 'newsletter_widget',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Custom Footer Widget',\n 'id' => 'footer_widget',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n\n}", "function parques_widget_init()\n{\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'progress-bar',\n\t\t\t'name'\t\t\t=> 'Barra de progreso',\n\t\t\t'description'\t=> 'Barra de progreso que indica el avance del proyecto',\n\t\t\t'before_widget' => '<div>',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'widget-footer',\n\t\t\t'name'\t\t\t=> \"footer\",\n\t\t\t'description'\t=> 'footer con la infomacion del contacto en todas las pag',\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"col-sm-4\">',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'widget-social',\n\t\t\t'name'\t\t\t=> \"widget-social\",\n\t\t\t'description'\t=> 'Contenido para las redes sociales',\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget-social\" >',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'widget-gallery',\n\t\t\t'name'\t\t\t=> \"widget-gallery\",\n\t\t\t'description'\t=> 'widget para el plugin de galerias',\n\t\t\t'before_widget' => '<div class=\"widget-gallery\" >',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'widget-banner',\n\t\t\t'name'\t\t\t=> \"widget-banner\",\n\t\t\t'description'\t=> 'Banner para parques del rio.',\n\t\t\t'before_widget' => '<div id=\"widget-banner\" >',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'widget-home',\n\t\t\t'name'\t\t\t=> \"widget-home\",\n\t\t\t'description'\t=> 'Contenido relacionado con articulos del sitio.',\n\t\t\t'before_widget' => '<div id=\"widget-home\" >',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'widget-progreso',\n\t\t\t'name'\t\t\t=> \"widget-progreso\",\n\t\t\t'description'\t=> 'Widget con barra de progreso del proyecto.',\n\t\t\t'before_widget' => '<div id=\"widget-progreso\" class=\"hidden-xs\" >',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'widget-categorias',\n\t\t\t'name'\t\t\t=> \"widget-categorias\",\n\t\t\t'description'\t=> 'Widget con categorías del proyecto.',\n\t\t\t'before_widget' => '<div id=\"widget-categorias\" >',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'sidebar',\n\t\t\t'name'\t\t\t=> \"sidebar\",\n\t\t\t'description'\t=> 'Sidebar',\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget-%1$s\" >',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'nav-menu-narrativa',\n\t\t\t'name'\t\t\t=> \"nav-menu-narrativa\",\n\t\t\t'description'\t=> 'Sidebar',\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget-%1$s\" >',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n}", "function studio_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Sidebar', 'studio' ),\n 'id' => 'sidebar-1',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h1 class=\"widget-title\">',\n 'after_title' => '</h1>',\n ) );\n}", "function gs_widgets_init() {\r\n\tregister_sidebar(\r\n\t array(\r\n\t 'name' => 'Homepage Widgets',\r\n\t 'id' => 'homepage-widgets',\r\n\t 'description' => '',\r\n\t 'before_widget' => '<div id=\"%1$s\" class=\"home-widget %2$s four columns\"><div class=\"widget-container\">',\r\n\t 'after_widget' => '</div></div>',\r\n\t 'before_title' => '<h4>',\r\n\t 'after_title' => '</h4>', \r\n\t ));\r\n\r\n\tregister_sidebar(\r\n\t array(\r\n\t 'name' => 'Page Sidebar',\r\n\t 'id' => 'page-sidebar',\r\n\t 'description' => '',\r\n\t 'before_widget' => '<div id=\"%1$s\" class=\"%2$s side-widget\">',\r\n\t 'after_widget' => '</div>',\r\n\t 'before_title' => '<h4>',\r\n\t 'after_title' => '</h4>', \r\n\t ));\r\n\r\n\tregister_sidebar(\r\n\t array(\r\n\t 'name' => 'Blog Sidebar',\r\n\t 'id' => 'blog-sidebar',\r\n\t 'description' => '',\r\n\t 'before_widget' => '<div id=\"%1$s\" class=\"%2$s side-widget\">',\r\n\t 'after_widget' => '</div>',\r\n\t 'before_title' => '<h4>',\r\n\t 'after_title' => '</h4>', \r\n\t ));\r\n}", "function ourWidgetsInit(){\n\n register_sidebar(array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar1',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"my-special-class\">',\n 'after_title' => '</h4>'\n\n ));\n}", "function widget_load() {\n\t\tregister_widget('ilgelo_wSocial');\n\t\tregister_widget('ilgelo_wTwitter');\n\t\tregister_widget('ilgelo_banner');\n\t}", "function Task_widgets_init() {\n \n // The SideBar\n register_sidebar( array(\n 'name' => esc_html__( 'SideBar', 'Task' ),\n 'id' => 'sidebar-1',\n 'description' => esc_html__( 'Add widgets here.', 'Task' ),\n 'before_widget' => '',\n 'after_widget' => '',\n ) );\n \n // The Banner Above The Navigation Bar In The Header\n register_sidebar( array(\n 'name' => esc_html__( 'Banner Above Navigation Bar', 'Task' ),\n 'id' => 'sidebar-2',\n 'description' => esc_html__( 'Add widgets here.', 'Task' ),\n 'before_widget' => '',\n 'after_widget' => '',\n ) );\n \n // The Square Banner Next To The 3 Main Posts\n register_sidebar( array(\n 'name' => esc_html__( 'The Square Banner Next To The 3 Main Posts', 'Task' ),\n 'id' => 'sidebar-3',\n 'description' => esc_html__( 'Add widgets here.', 'Task' ),\n 'before_widget' => '',\n 'after_widget' => '',\n ) );\n \n // The Side Banner In The Left\n register_sidebar( array(\n 'name' => esc_html__( 'The Side Banner In The Left', 'Task' ),\n 'id' => 'sidebar-4',\n 'description' => esc_html__( 'Add widgets here.', 'Task' ),\n 'before_widget' => '',\n 'after_widget' => '',\n ) );\n \n }", "function pickleplease_sidebars_init() {\n\n // Register the New Footer Sidebar\n register_sidebar(array(\n \n // Title for the Widget Dashboard\n 'name' => 'New Sidebar',\n \n // ID for the XHTML Markup\n 'id' => 'new-sidebar',\n\n // Description for the Widget Dashboard Box\n 'description' => __('This is a right column widget area.', 'thematic'),\n\n // Do not edit these. It keeps Headers and lists consistent for Thematic\n 'before_widget' => thematic_before_widget(),\n 'after_widget' => thematic_after_widget(),\n 'before_title' => thematic_before_title(),\n 'after_title' => thematic_after_title(),\n ));\n\n\n // Unregister and sidebars you donŐt need based on its ID.\n // For a full list of Thematic sidebar IDs, look at /thematc/library/extensions/widgets-extensions.php\n //unregister_sidebar('primary-aside');\n unregister_sidebar('secondary-aside');\n unregister_sidebar('index-top');\n unregister_sidebar('index-insert');\n unregister_sidebar('index-bottom');\n unregister_sidebar('single-top');\n unregister_sidebar('single-insert');\n unregister_sidebar('single-bottom');\n unregister_sidebar('page-top');\n unregister_sidebar('page-bottom');\n }", "function anipics_add_widget_area(){\n register_sidebar(array(\n 'id' => 'projet',\n 'name' => 'Photo gallery',\n 'description' => ' Apparait au centre',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h1>',\n 'after_title' => '</h1>'\n ));\n register_sidebar(array(\n 'id' => 'footer',\n 'name' => 'footer',\n 'description' => ' Apparait bas',\n 'before_widget' => '<div class=\"col s4\" style=\"margin: 0 18em 0 3em \" >',\n 'after_widget' => '</div>',\n 'before_title' => '<h1>',\n 'after_title' => '</h1>'\n ));\n register_sidebar(array(\n 'id' => 'footer2',\n 'name' => 'footer2',\n 'description' => ' Apparait bas',\n 'before_widget' => '<div class=\"col s6\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h1>',\n 'after_title' => '</h1>'\n ));\n}", "function ourWidgetsInit() {\n // register widget location\n register_sidebar( array(\n 'name' => 'Sidebarr',\n 'id' => 'sidebar1',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"a-special-class\">',\n 'after_title' => '</h2>'\n ));\n\n register_sidebar( array(\n 'name' => 'Footer Area 1',\n 'id' => 'footer1',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>'\n ));\n\n register_sidebar( array(\n 'name' => 'Footer Area 2',\n 'id' => 'footer2',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>'\n ));\n\n register_sidebar( array(\n 'name' => 'Footer Area 3',\n 'id' => 'footer3',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>'\n ));\n\n register_sidebar( array(\n 'name' => 'Footer Area 4',\n 'id' => 'footer4',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>'\n ));\n}", "function wpb_load_widget()\n{\n register_widget( 'WC_External_API_Widget' );\n}", "function ourWidgetsInit(){\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Sidebar',\n\t\t\t'id' => 'sidebar1',\n\t\t\t'before_widget' => '<div class=\"widget-item\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h4 class=\"my-special-class\">',\n\t\t\t'after_title' => '</h4>'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 1',\n\t\t\t'id' => 'footer1'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 2',\n\t\t\t'id' => 'footer2'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 3',\n\t\t\t'id' => 'footer3'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 4',\n\t\t\t'id' => 'footer4'\n\t\t));\n\t}", "function wpb_load_widget() {\n register_widget( 'wpb_widget' );\n}", "function wpb_load_widget() {\n register_widget( 'wpb_widget' );\n}", "public function postAddWidgetToSidebar()\n\t{\n\t\t$widgetId = Input::get('widget_id');\n\n\t\t// Check if the widget exists\n\t\tif (is_null($widget = SidebarWidget::find($widgetId)))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Return view with Widget\n\t\treturn View::make('backend.appearance.partials.widget', ['widget' => $widget]);\n\t}", "public function widgets_init() {\n\t\tregister_sidebar(\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Sidebar', 'hellish-simplicity' ),\n\t\t\t\t'id' => 'sidebar',\n\t\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"%2$s\">',\n\t\t\t\t'after_widget' => '</aside>',\n\t\t\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t\t\t'after_title' => '</h1>',\n\t\t\t)\n\t\t);\n\t}", "function arphabet_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Page Sidebar',\n\t\t'id' => 'page-sidebar',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n\n}", "function russianroulette_widgets_init() {\n \tregister_sidebar( array(\n \t\t'name' => __( 'Sidebar', 'russianroulette' ),\n \t\t'id' => 'sidebar-1',\n \t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n \t\t'after_widget' => '</aside>',\n \t\t'before_title' => '<h1 class=\"widget-title\">',\n \t\t'after_title' => '</h1>',\n \t) );\n }", "function hw_load_widget() {\n\tregister_widget( 'hw_cal_widget' );\n\tregister_widget( 'hw_custom_post_list_widget' );\n}", "function abc_load_widget()\n{\n register_widget('awesome_bmi_widget');\n}", "function ac_widgets_init() \n{\n register_sidebar( array(\n 'name' => __( 'Main Sidebar', 'acframework' ),\n 'id' => 'sidebar',\n 'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'acframework' ),\n 'before_widget' => '<div class=\"widget\" id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n register_sidebar( array(\n 'name' => __('Form Container', 'acframework'),\n 'id' => 'ac-form-container',\n 'description' => __('Homepage form widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ) );\n register_sidebar(array(\n 'name' => __('Footer Left', 'acframework'),\n 'id' => 'ac-footer-left',\n 'description' => __('Left footer widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ));\n register_sidebar(array(\n 'name' => __('Footer Left Center', 'acframework'),\n 'id' => 'ac-footer-center-left',\n 'description' => __('Center-left footer widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ));\n register_sidebar(array(\n 'name' => __('Footer Right Center', 'acframework'),\n 'id' => 'ac-footer-center-right',\n 'description' => __('Center-Right footer widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ));\n register_sidebar( array(\n 'name' => __('Footer Right', 'acframework'),\n 'id' => 'ac-footer-right',\n 'description' => __('Right footer widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ) ); \n}", "function nabi_widgets_init() {\n\n\t// Language Selector Widget\n\tregister_sidebar( array(\n\t\t'name' => 'Language Widget',\n\t\t'id' => 'languagewidget',\n\t\t'before_title' => ''\n\t) );\n\n\t// Second nav additionnal content Widget\n\tregister_sidebar( array(\n\t\t'name' => 'Second Nav Widget',\n\t\t'id' => 'secondnavwidget',\n\t\t'before_title' => ''\n\t) );\n\n}", "function pts_widget_init() {\n\n register_sidebar( array(\n\t\t'name' => 'Top Widget',\n\t\t'id' => 'top_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s top-widgs\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Sidebar Widget',\n\t\t'id' => 'sidebar_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s sidebar-widgs\">',\n\t\t'after_widget' => '</div></div>',\n\t\t'before_title' => '<div class=\"widget_title_wrapper\"><h5 class=\"widgets_titles_sidebar\">',\n\t\t'after_title' => '</h5></div><div class=\"wca\">',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Single Post Widget',\n\t\t'id' => 'single_post_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s sidebar-widgs\">',\n\t\t'after_widget' => '</div></div>',\n\t\t'before_title' => '<div class=\"widget_title_wrapper\"><h5 class=\"widgets_titles_sidebar\">',\n\t\t'after_title' => '</h5></div><div class=\"wca\">',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'First Footer Widget',\n\t\t'id' => 'first_footer_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h5 class=\"widgets_titles\">',\n\t\t'after_title' => '</h5>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => 'Second Footer Widget',\n\t\t'id' => 'second_footer_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h5 class=\"widgets_titles\">',\n\t\t'after_title' => '</h5>',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Third Footer Widget',\n\t\t'id' => 'third_footer_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h5 class=\"widgets_titles\">',\n\t\t'after_title' => '</h5>',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Fourth Footer Widget',\n\t\t'id' => 'fourth_footer_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h5 class=\"widgets_titles\">',\n\t\t'after_title' => '</h5>',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Footer Right',\n\t\t'id' => 'footer_right',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n}", "function adelle_widgets_init() {\r\n register_sidebar(array(\r\n 'name' => __( 'Right Widget', 'adelle-theme' ),\r\n 'id' => 'right-widget',\r\n 'description' => 'Right side widget area',\r\n 'before_widget' => '<article id=\"%1$s\" class=\"side-widget %2$s\">',\r\n 'after_widget' => '</article>',\r\n 'before_title' => '<h3>',\r\n 'after_title' => '</h3>',\r\n ));\r\n}", "function bp_widgets_init() {\n // register_sidebar( array(\n // 'name' => __( 'Footer Widget Area', 'holstein' ),\n // 'id' => 'footer-widget',\n // 'description' => __( 'Appears on the bottom of every page.', 'holstein' ),\n // 'before_widget' => '<div class=\"col\">',\n // 'after_widget' => '</div>',\n // 'before_title' => '<h2>',\n // 'after_title' => '</h2>'\n // ) );\n\n register_sidebar( array(\n 'name' => __( 'Right Sidebar Widget Area', 'bp' ),\n 'id' => 'right-sidebar',\n 'description' => __( 'Appears on the right side of the blog index.', 'bp' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>'\n ) );\n\n // register_sidebar( array(\n // 'name' => __( 'Left Sidebar Widget Area', 'holstein' ),\n // 'id' => 'left-sidebar',\n // 'description' => __( 'Appears on the left side of pages', 'holstein' ),\n // 'before_widget' => '<div id=\"%1$s\" class=\"area %2$s\">',\n // 'after_widget' => '</div>',\n // 'before_title' => '<h3>',\n // 'after_title' => '</h3>'\n // ) ); \n}", "function wpwl_load_widget() {\n register_widget( 'wpwl_widget' );\n}", "function duende_load_widget() {\n\tregister_widget( 'duende_widget' );\n}", "function iodd_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => esc_html__( 'Sidebar', 'iodd' ),\n\t\t'id' => 'standard-sidebar',\n\t\t'description' => esc_html__( 'Add widgets here.', 'iodd' ),\n\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</section>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n}", "function MyPenandPantry_WidgetInit()\n{\n\tregister_sidebar(array(\n\t\t'name' => 'Social-icon-bar',\n\t\t'id' => 'sidebar1',\n\t\t'before_widget' => '<div class=\"widget-item\">',\n\t\t'after_widget' => '</div>'\n\t));\n}", "function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Home right sidebar',\n 'id' => 'home_right_1',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"rounded\">',\n 'after_title' => '</h2>',\n ) );\n }", "function arphabet_widgets_init() {\r\n register_sidebar( array(\r\n 'name' => 'Below main content',\r\n 'id' => 'home_right_1',\r\n 'before_widget' => '<div class=\"widget\">',\r\n 'after_widget' => '</div>',\r\n 'before_title' => '<h2 class=\"widget-title\">',\r\n 'after_title' => '</h2>',\r\n ) );\r\n //gallery side bar\r\n register_sidebar( array(\r\n 'name' => 'Gallery Main Page',\r\n 'id' => 'home_right_2',\r\n 'before_widget' => '<div class=\"gallery-widget\">',\r\n 'after_widget' => '</div>',\r\n 'before_title' => '<h2 class=\"gallery-widget-title\">',\r\n 'after_title' => '</h2>',\r\n ) );\r\n}", "public function widgets_init() {\n\t\t// Set widgets_init action function.\n\t\tadd_action( 'widgets_init', array( $this, 'register_sidebars' ) );\n\t\tregister_widget( 'DX\\MOP\\Student_Widget' );\n\t}", "function boiler_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'boiler' ),\n\t\t'id' => 'sidebar-1',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t'after_title' => '</h1>',\n\t) );\n}", "function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Footer sidebar',\n 'id' => 'footer_1',\n 'before_widget' => '<div id=\"blog_subscription-2\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3>',\n 'after_title' => '</h3>',\n ) );\n\n }", "function cm_load_widget_r() {\n\tregister_widget( 'cm_widget_r' );\n}", "function pb18_article_also_widget() {\n register_widget( 'pb18_article_also_widget' );\n}", "function uwmadison_widgets_init() {\n\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'Main Sidebar', 'uw-madison-160' ),\n\t\t\t'id' => 'sidebar-1',\n\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => \"</aside>\",\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\n\t}", "function rs_load_widget()\n{\n\tregister_widget('rs_Widget_Agenda');\n}", "function gp_widgets_init() {\n\n /**\n * Register sidebars.\n */\n\n $sidebar_main = array_merge(\n array( 'name' => __( 'General Sidebar', 'gp' ), 'id' => 'sidebar-main' ),\n gp_get_default_widget_params()\n );\n register_sidebar( $sidebar_main );\n\n // $sidebar_post = array_merge(\n // array( 'name' => __( 'Blog Sidebar', 'gp' ), 'id' => 'sidebar-blog' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $sidebar_post );\n\n\n // $sidebar_post = array_merge(\n // array( 'name' => __( 'Blog Post Sidebar', 'gp' ), 'id' => 'sidebar-post' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $sidebar_post );\n\n\n // $sidebar_portfolio = array_merge(\n // array( 'name' => __( 'Portfolio Sidebar', 'gp' ), 'id' => 'sidebar-portfolio' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $sidebar_portfolio );\n\n\n // $sidebar_portfolio_single = array_merge(\n // array( 'name' => __( 'Portfolio Project Sidebar', 'gp' ), 'id' => 'sidebar-portfolio-single' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $sidebar_portfolio_single );\n\n // $persy_fuer_kmu = array_merge(\n // array( 'name' => __( 'Persy für KMU', 'gp' ), 'id' => 'persy-fuer-kmu' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $persy_fuer_kmu );\n\n // $persy_fuer_pdl = array_merge(\n // array( 'name' => __( 'Persy für PDL', 'gp' ), 'id' => 'persy-fuer-pdl' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $persy_fuer_pdl );\n\n // $persy_support = array_merge(\n // array( 'name' => __( 'Persy Support', 'gp' ), 'id' => 'persy-support' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $persy_support );\n\n $template_with_subnav = array_merge(\n array( 'name' => __( 'Template with subnav', 'gp' ), 'id' => 'sidebar-template-with-subnav' ),\n gp_get_default_widget_params()\n );\n register_sidebar( $template_with_subnav );\n\n\n // Removes the default styles that are packaged with the Recent Comments widget.\n add_filter( 'show_recent_comments_widget_style', '__return_false' );\n\n}", "function register_sidebar_widget($name, $output_callback, $classname = '', ...$params)\n {\n }", "function initiate_widgets() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Footer twitter',\n\t\t'id' => 'footer_twitter',\n\t\t'before_widget' => '<div class=\"c-twitter\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"o-twitter-header\">',\n\t\t'after_title' => '</h4>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => 'Footer facebook',\n\t\t'id' => 'footer_facebook',\n\t\t'before_widget' => '<div class=\"c-twitter\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"o-twitter-header\">',\n\t\t'after_title' => '</h4>',\n\t) );\n\n}", "function wpb_widgets_init()\n{\n\n register_sidebar(array(\n 'name' => 'Custom Header Widget Area',\n 'id' => 'custom-header-widget',\n 'before_widget' => '<div class=\"chw-widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"chw-title\">',\n 'after_title' => '</h2>',\n ));\n}", "function wowaries_widgets_init() {\n /* WowAriesProject generated Register Sidebars Begin */\n\n /* WowAriesProject generated Register Sidebars End */\n}", "function init_custom_widgets() {\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-top',\n\t\t'name' => __('Sidebar top', 'bonestheme'),\n\t\t'description' => __('Top sidebar area, present on all pages (default: Main Menu)', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-projects',\n\t\t'name' => __('Projects sidebar', 'bonestheme'),\n\t\t'description' => __('Active on single project pages only (default: Related People, Grants & Publications)', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-people',\n\t\t'name' => __('People sidebar', 'bonestheme'),\n\t\t'description' => __('Active on single people pages only.', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-homepage',\n\t\t'name' => __('Homepage sidebar', 'bonestheme'),\n\t\t'description' => __('Active on homepage, lower side bar area.', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-homepage-content',\n\t\t'name' => __('Homepage main', 'bonestheme'),\n\t\t'description' => __('Active on homepage, below main content area.', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>'\n\t));\n\t\n\t\n\n\t/* Custom widget's */\n\t\n\tregister_widget( 'All_People_Widget' );\n\tregister_widget( 'Related_People_Widget' );\n\n\tregister_widget( 'All_Projects_Widget' );\n\tregister_widget( 'Related_Projects_Widget' );\n\tregister_widget( 'Related_Grants_Widget' );\n\tregister_widget( 'Related_Publications_Widget' );\n\n}", "function sbc_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Left Column',\n 'id' => 'left-col',\n 'before_widget' => '<div class=\"left-col widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"head widget-head\">',\n 'after_title' => '</h4>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Center Column',\n 'id' => 'center-col',\n 'before_widget' => '<div class=\"center-col widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"head widget-head\">',\n 'after_title' => '</h4>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Right Column',\n 'id' => 'right-col',\n 'before_widget' => '<div class=\"right-col widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"head widget-head\">',\n 'after_title' => '</h4>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Service Sidebar',\n 'id' => 'service-sidebar',\n 'before_widget' => '<div class=\"sidebar service-sidebar\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"head service-widget-head\">',\n 'after_title' => '</h4>',\n ) );\n\n}", "function wpdocs_theme_slug_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Main Sidebar', 'webino' ),\n 'id' => 'sidebar-1',\n 'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'webino' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h2 class=\"widgettitle\">',\n 'after_title' => '</h2>',\n ) );\n}", "function safed_widgets_init() {\n \n register_sidebar( array(\n 'name' => __( 'Widget Banner 1', 'safed' ),\n 'id' => 'banner_area_1',\n 'description' => __( 'Appears with [banner_one]', 'safed' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s safed__dynamic-module\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n \n register_sidebar( array(\n 'name' =>__( 'Widget Banner 2', 'safed'),\n 'id' => 'banner_area_2',\n 'description' => __( 'Appears with [banner_two]', 'safed' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s safed__dynamic-module\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n }", "function register_widget_areas()\n {\n register_sidebar(array(\n 'name' => 'Latest Tweets',\n 'id' => 'latest_tweets',\n 'description' => 'latest tweets',\n 'before_widget' => '<section class=\"widget-area latest-tweets\">',\n 'after_widget' => '</section>',\n 'before_title' => '<h4>',\n 'after_title' => '</h4>',\n ));\n }", "function registerWidgets( ) {\r\n\t\t\twp_register_sidebar_widget( 'iluvwalking-com-widget', __( 'ILuvWalking.com Stats' ), array( &$this, 'widgetOutput' ) );\r\n\t\t\twp_register_widget_control( 'iluvwalking-com-widget', __( 'ILuvWalking.com Stats' ), array( &$this, 'widgetControlOutput' ) );\r\n\t\t}", "function perusecretland_widgets_init() {\n // Top widgets\n $args = array(\n 'name' => 'Top Widgets',\n 'id' => 'top-widgets',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n );\n register_sidebar( $args );\n // Floating sidebar\n $args = array(\n 'name' => 'Floating Sidebar',\n 'id' => 'floating-sidebar',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n );\n register_sidebar( $args );\n}", "function _s_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', '_s' ),\n\t\t'id' => 'sidebar-1',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t'after_title' => '</h1>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Right Sidebar',\n\t\t'id' => 'sidebar-2',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t'after_title' => '</h1>',\n\t) );\n}", "function register()\n {\n // Incluimos el widget en el panel control de Widgets\n wp_register_sidebar_widget( 'widget_ultimosp', 'Últimos post por autor', array( 'Widget_ultimosPostPorAutor', 'widget' ) );\n\n // Formulario para editar las propiedades de nuestro Widget\n wp_register_widget_control('widget_ultimos_autor', 'Últimos post por autor', array( 'Widget_ultimosPostPorAutor', 'control' ) );\n }", "function kcsite_widgets_init() {\t\t\t\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'Left sidebar', 'kcsite' ),\n\t\t\t'id' => 'sidebar-l',\n\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t'after_widget' => '</aside>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t));\t\t\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'Right sidebar', 'kcsite' ),\n\t\t\t'id' => 'sidebar-r',\n\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t'after_widget' => \"</aside>\",\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t));\n/*\n\t\tregister_sidebar( array(\n\t\t\t'name' => __('Banners Before Footer', 'kcsite'),\n\t\t\t'id' => 'sidebar-banners-before-footer',\n\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s help-inline\">',\n\t\t\t'after_widget' => \"</aside>\",\n\t\t\t//'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t//'after_title' => '</h3>',\n\t\t) );*/\n\t}", "function cbc_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Footer bar 1',\n\t\t'id' => 'footer_bar_1',\n\t\t'before_widget' => '<li>',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n\n}", "function thefold_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Main Sidebar', 'thefold' ),\n 'id' => 'sidebar-1',\n 'description' => __( 'Default sidebar that will appear on most pages', 'thefold' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => __( 'Footer', 'thefold' ),\n 'id' => 'footer',\n 'description' => __( 'Global Footer area', 'thefold' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n}" ]
[ "0.7579527", "0.75709325", "0.7525198", "0.7524214", "0.742772", "0.7372288", "0.73440224", "0.7307046", "0.7296743", "0.7290374", "0.7283591", "0.7273084", "0.7257985", "0.7252105", "0.7251498", "0.72389627", "0.72375774", "0.723633", "0.723633", "0.7222218", "0.7218984", "0.72162545", "0.72041106", "0.719116", "0.7173961", "0.7173673", "0.71565574", "0.71562415", "0.7155793", "0.71504354", "0.7143573", "0.71259326", "0.7125075", "0.7124571", "0.71108496", "0.7101923", "0.70941424", "0.70925504", "0.70816857", "0.7072113", "0.70572025", "0.7056492", "0.704652", "0.70415753", "0.7041053", "0.7035622", "0.7028814", "0.70215636", "0.701982", "0.7013314", "0.7011996", "0.70093", "0.70085967", "0.70083785", "0.7003602", "0.7002366", "0.6990103", "0.69882137", "0.69807893", "0.69807893", "0.6977805", "0.6965971", "0.6963672", "0.6960813", "0.6960158", "0.69532937", "0.695313", "0.6950518", "0.6947398", "0.6940403", "0.6939967", "0.69333565", "0.6932777", "0.6932465", "0.6917699", "0.6913455", "0.6912167", "0.6910768", "0.69060093", "0.6900456", "0.68972296", "0.6895639", "0.68931514", "0.68923366", "0.6888364", "0.68800217", "0.68758625", "0.68674976", "0.68590707", "0.68587786", "0.68535453", "0.6851779", "0.6850012", "0.68431836", "0.68414754", "0.6839133", "0.68383706", "0.6831623", "0.68252623", "0.68235314", "0.68220836" ]
0.0
-1
Updating widget replacing old instances with new
public function update( $new_instance, $old_instance ) { $instance = array(); $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : ''; return $instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update($new_instance, $old_instance) {\n\t // The old instance($old_instance) is overwritten by the new instance($new_instance) which values are taken from the widget form\n $instance = $old_instance;\n \n $instance['widget_title'] = strip_tags(stripslashes($new_instance['widget_title']));\n $instance['upcoming_number'] = strip_tags(stripslashes($new_instance['upcoming_number']));\n $instance['upcoming_title'] = strip_tags(stripslashes($new_instance['upcoming_title']));\n $instance['upcoming_tag_slug'] = strip_tags(stripslashes($new_instance['upcoming_tag_slug']));\n $instance['upcoming_post_type'] = strip_tags(stripslashes($new_instance['upcoming_post_type']));\n \n // Include author = checkbox\n $instance['include_author'] = 0;\n if( isset( $new_instance['include_author'] ) ){\n $instance['include_author'] = 1;\n } \n \n // grab_by_tag = checkbox\n $instance['grab_by_tag'] = 0;\n if( isset( $new_instance['grab_by_tag'] ) ){\n $instance['grab_by_tag'] = 1;\n } \n \n \n\t\t$this->flush_widget_cache();\n\n\t\t$alloptions = wp_cache_get( 'alloptions', 'options' );\n\t\tif ( isset($alloptions['widget_upcoming_posts_html5']) ){\n\t\t\tdelete_option('widget_upcoming_posts_html5'); \n\t\t}\n \n return $instance;\n\t}", "function update($new_instance, $old_instance) {\n\t // The old instance($old_instance) is overwritten by the new instance($new_instance) which values are taken from the widget form\n $instance = $old_instance;\n \n // strip_tags() and stripslashes() to ensure that no matter what a user puts in the widget options, \n // they will not break the page the widget appears on.\n $instance['widget_title'] = strip_tags(stripslashes($new_instance['widget_title']));\n $instance['recent_number'] = strip_tags(stripslashes($new_instance['recent_number']));\n $instance['recent_title'] = strip_tags(stripslashes($new_instance['recent_title']));\n \n # Include author = checkbox\n $instance['include_author'] = 0;\n if( isset( $new_instance['include_author'] ) ){\n $instance['include_author'] = 1;\n } \n \n \n\t\t$this->flush_widget_cache();\n\n\t\t$alloptions = wp_cache_get( 'alloptions', 'options' );\n\t\tif ( isset($alloptions['widget_recent_entries']) )\n\t\t\tdelete_option('widget_recent_entries'); \n \n return $instance;\n\t}", "function update($new_instance, $old_instance){\n $instance = array_map('strip_tags', $new_instance);\n\n $this->flush_widget_cache();\n\n $alloptions = wp_cache_get('alloptions', 'options');\n\n if (isset($alloptions['widget_i4web_toolbox'])) {\n delete_option('widget_i4web_toolbox');\n }\n\n return $instance;\t \n\t \n }", "public function update( $new_instance, $old_instance ) {\n \t// processes widget options to be saved\n }", "function miracle_widget_update($instance, $new_instance)\n {\n echo 'update';\n $instance = $this->miracle_update_visibility_fields($instance, $new_instance);\n $instance = $this->miracle_update_style_fields($instance, $new_instance);\n return $instance;\n }", "function update( $new_instance, $old_instance ) {\n\t\t$instance = array_map( 'strip_tags', $new_instance );\n\n\t\t$this->flush_widget_cache();\n\n\t\t$alloptions = wp_cache_get( 'alloptions', 'options' );\n\n\t\tif ( isset( $alloptions['widget_sn_stub'] ) ) {\n\t\t\tdelete_option( 'widget_sn_stub' );\n\t\t} // if()\n\n\t\treturn $instance;\n\t}", "function update( $new_instance, $old_instance ) {\n\t\n#\n# \tWhen widget options are saved this function is called and values \n#\tare transfered to function as array\n#\n\n\t\n\t$instance = $old_instance; // old values\n\t\n\t\n#\n# \tWidget variables\n#\t\n\t$instance['username'] = strip_tags( $new_instance['username']);\n\t$instance['title'] = strip_tags( $new_instance['title'] );\n\t$instance['count'] = strip_tags( $new_instance['count']);\n\t\n\treturn $instance;\n}", "public function update( $new_instance, $old_instance ) {\n\t\t// processes widget options to be saved\n\t}", "public function update( $new_instance, $old_instance ) {\n\t\t// processes widget options to be saved\n\t}", "public function update( $new_instance, $old_instance ) {\n\t\t// processes widget options to be saved\n\t}", "public function update( $new_instance, $old_instance ) {\n\t\t// processes widget options to be saved\n\t}", "public function update( $new_instance, $old_instance ) {\n\t\t// processes widget options to be saved\n\n\t}", "public function wp_ajax_update_widget()\n {\n }", "function update( $new_instance, $old_instance ) {\n $instance = $old_instance;\n\n $instance['widget_title'] = strip_tags( $instance['widget_title'] );\n\n return $instance;\n }", "public function flush_widget_cache()\n {\n }", "function wt_html_widget_update_callback( $instance, $new_instance ) {\n\n\t// Make sure there's a title for this widget.\n\tif ( isset( $new_instance['title'] ) )\n\t\t$instance['title'] = wt_html_sanitize_title( $new_instance['title'] );\n\n\treturn $instance;\n}", "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\t\n\t\t/* Strip tags (if needed) and update the widget settings. */\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\n\t\t$instance['twitterUsername'] = strip_tags( $new_instance['twitterUsername'] );\n\t\t$instance['shownTweets'] = strip_tags( $new_instance['shownTweets'] );\n\t\n\t\treturn $instance;\n\t}", "public function update( $new_instance, $old_instance ) {\n // processes widget options to be saved\n foreach( $new_instance as $key => $value )\n {\n $updated_instance[$key] = sanitize_text_field($value);\n }\n\n return $updated_instance;\n}", "function wp_ajax_update_widget()\n {\n }", "function save_widget($instance, $new_instance, $old_instance, $widget)\n {\n }", "function save_widget($instance, $new_instance, $old_instance, $widget)\n {\n }", "public function update( $new_instance, $old_instance ) {\n\t\t// processes widget options to be saved\n\t\t$instance = $old_instance;\n \n\t $instance['title'] \t\t= strip_tags( $new_instance['title'] );\n\t $instance['videoId'] = strip_tags( $new_instance['videoId']);\n\t $instance['height'] \t= strip_tags( $new_instance['height'] );\n\t $instance['width'] \t\t= strip_tags( $new_instance['width'] );\n\t \n\t \n\t return $instance;\n\t}", "function update($new_instance, $old_instance) {\n $instance = $old_instance;\n $instance['title'] = apply_filters('widget_title', $new_instance['title']);\n $instance['howMany'] = (int)$new_instance['howMany'];\n $instance['maxChars'] = (int)$new_instance['maxChars'];\n $instance['showReviewGrade'] = (int)$new_instance['showReviewGrade'];\n\n return $instance;\n }", "public function update( $new_instance, $old_instance ) {\r\n $instance = array();\r\n\t\t$title= sanitize_text_field( ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : 'Widget Title Here' );\r\n\t\t$TwitterUserName = sanitize_text_field( ( ! empty( $new_instance['TwitterUserName'] ) ) ? strip_tags( $new_instance['TwitterUserName'] ) : '' );\t\t\r\n\t\t$Theme = sanitize_text_field( 'theme', ( ! empty( $new_instance['Theme'] ) ) ? strip_tags( $new_instance['Theme'] ) : 'light' );\t\t\r\n\t\t$Height = sanitize_text_field( ( ! empty( $new_instance['Height'] ) ) ? strip_tags( $new_instance['Height'] ) : '450' );\r\n\t\t$Width = sanitize_text_field( ( ! empty( $new_instance['Width'] ) ) ? strip_tags( $new_instance['Width'] ) : '' );\r\n\t\t$Linkcolor = sanitize_hex_color( ( ! empty( $new_instance['LinkColor'] ) ) ? strip_tags( $new_instance['LinkColor'] ) : '#CC0000' );\r\n\t\t$ExcludeReplies = sanitize_text_field( ( ! empty( $new_instance['ExcludeReplies'] ) ) ? strip_tags( $new_instance['ExcludeReplies'] ) : 'yes' );\r\n\t\t$AutoExpandPhotos = sanitize_text_field( ( ! empty( $new_instance['AutoExpandPhotos'] ) ) ? strip_tags( $new_instance['AutoExpandPhotos'] ) : 'yes' );\r\n\t\t$TwitterWidgetId = sanitize_text_field( ( ! empty( $new_instance['TwitterWidgetId'] ) ) ? strip_tags( $new_instance['TwitterWidgetId'] ) : '' );\r\n\t\t$tw_language = sanitize_text_field( ( ! empty( $new_instance['tw_language'] ) ) ? strip_tags( $new_instance['tw_language'] ) : '' );\r\n\r\n $instance['title'] \t\t\t\t= $title;\r\n $instance['TwitterUserName'] \t= $TwitterUserName;\r\n $instance['Theme'] \t\t\t\t= $Theme;\r\n $instance['Height'] \t\t\t= $Height;\r\n $instance['LinkColor'] \t\t\t= $Linkcolor;\r\n $instance['ExcludeReplies'] \t= $ExcludeReplies;\r\n $instance['AutoExpandPhotos'] \t= $AutoExpandPhotos;\r\n $instance['TwitterWidgetId'] \t= $TwitterWidgetId;\r\n $instance['tw_language'] \t\t= $tw_language;\r\n $instance['Width'] \t \t\t\t= $Width;\r\n return $instance;\r\n\t}", "function edit_widget($widget, $return, $instance)\n {\n }", "function update($new_instance, $old_instance) {\n\t\t$new_instance = (array) $new_instance;\n\t\t$instance = array();\n\t\tforeach ( $instance as $field => $val ) {\n\t\t\tif ( isset($new_instance[$field]) )\n\t\t\t\t$instance[$field] = 1;\n\t\t}\n\t\tforeach($new_instance as $field => $val) {\n\t\t\t$instance[$field] = $val;\n\t\t}\n\t\t$this->flush_widget_cache();\n\n\t\t$alloptions = wp_cache_get( 'alloptions', 'options' );\n\t\tif ( isset($alloptions['it_upcoming_widget']) )\n\t\t\tdelete_option('it_upcoming_widget');\n\n\t\treturn $instance;\n\t}", "public function update() {\n $this->view = $this->template->getView();\n $this->layout = $this->template->getLayout();\n }", "public function update( $new_instance, $old_instance ) {\n\t\t// processes widget options to be saved\n\t\treturn $new_instance;\n\t}", "public function update_callback( $deprecated = 1 ) {\n\t\tglobal $wp_registered_widgets;\n\n\t\t$all_instances = $this->get_settings();\n\n\t\t// We need to update the data\n\t\tif ( $this->updated )\n\t\t\treturn;\n\n\t\tif ( isset($_POST['delete_widget']) && $_POST['delete_widget'] ) {\n\t\t\t// Delete the settings for this instance of the widget\n\t\t\tif ( isset($_POST['the-widget-id']) )\n\t\t\t\t$del_id = $_POST['the-widget-id'];\n\t\t\telse\n\t\t\t\treturn;\n\n\t\t\tif ( isset($wp_registered_widgets[$del_id]['params'][0]['number']) ) {\n\t\t\t\t$number = $wp_registered_widgets[$del_id]['params'][0]['number'];\n\n\t\t\t\tif ( $this->id_base . '-' . $number == $del_id )\n\t\t\t\t\tunset($all_instances[$number]);\n\t\t\t}\n\t\t} else {\n\t\t\tif ( isset($_POST['widget-' . $this->id_base]) && is_array($_POST['widget-' . $this->id_base]) ) {\n\t\t\t\t$settings = $_POST['widget-' . $this->id_base];\n\t\t\t} elseif ( isset($_POST['id_base']) && $_POST['id_base'] == $this->id_base ) {\n\t\t\t\t$num = $_POST['multi_number'] ? (int) $_POST['multi_number'] : (int) $_POST['widget_number'];\n\t\t\t\t$settings = array( $num => array() );\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tforeach ( $settings as $number => $new_instance ) {\n\t\t\t\t$new_instance = stripslashes_deep($new_instance);\n\t\t\t\t$this->_set($number);\n\n\t\t\t\t$old_instance = isset($all_instances[$number]) ? $all_instances[$number] : array();\n\n\t\t\t\t$was_cache_addition_suspended = wp_suspend_cache_addition();\n\t\t\t\tif ( $this->is_preview() && ! $was_cache_addition_suspended ) {\n\t\t\t\t\twp_suspend_cache_addition( true );\n\t\t\t\t}\n\n\t\t\t\t$instance = $this->update( $new_instance, $old_instance );\n\n\t\t\t\tif ( $this->is_preview() ) {\n\t\t\t\t\twp_suspend_cache_addition( $was_cache_addition_suspended );\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Filter a widget's settings before saving.\n\t\t\t\t *\n\t\t\t\t * Returning false will effectively short-circuit the widget's ability\n\t\t\t\t * to update settings.\n\t\t\t\t *\n\t\t\t\t * @since 2.8.0\n\t\t\t\t *\n\t\t\t\t * @param array $instance The current widget instance's settings.\n\t\t\t\t * @param array $new_instance Array of new widget settings.\n\t\t\t\t * @param array $old_instance Array of old widget settings.\n\t\t\t\t * @param WP_Widget $this The current widget instance.\n\t\t\t\t */\n\t\t\t\t$instance = apply_filters( 'widget_update_callback', $instance, $new_instance, $old_instance, $this );\n\t\t\t\tif ( false !== $instance ) {\n\t\t\t\t\t$all_instances[$number] = $instance;\n\t\t\t\t}\n\n\t\t\t\tbreak; // run only once\n\t\t\t}\n\t\t}\n\n\t\t$this->save_settings($all_instances);\n\t\t$this->updated = true;\n\t}", "function quick_flickr_widget_upgrade()\n{\n\n\t$old = get_option( 'widget_quickflickr', false );\n\tif ( ! $old )\n\t\treturn;\n\n\t$new = get_option( 'widget_quick-flickr-widget' );\n\t$new[] = array(\n\t\t'title' => isset( $old['title'] ) ? strip_tags( $old['title'] ) : 'Photostream',\n\t\t'count' => isset( $old['items'] ) ? absint( $old['items'] ) : 10,\n\t\t'tags' => isset( $old['tags'] ) ? strip_tags( $old['tags'] ) : '',\n\t\t'username' => isset( $old['username'] ) ? strip_tags( $old['username'] ) : '',\n\t);\n\tend( $new );\n\t$new_index = key( $new );\n\tupdate_option( 'widget_quick-flickr-widget', $new );\n\n\t$sidebars_widgets = get_option( 'sidebars_widgets' );\n\tforeach ( $sidebars_widgets as $sidebar => $widgets )\n\t\tif ( is_array( $widgets ) )\n\t\t\tforeach ( $widgets as $key => $widget )\n\t\t\t\tif ( $widget == 'quick-flickr' )\n\t\t\t\t\t$sidebars_widgets[$sidebar][$key] = 'quick-flickr-widget-' . $new_index;\n\n\tupdate_option( 'sidebars_widgets', $sidebars_widgets );\n\tdelete_option( 'widget_quickflickr' );\n\n}", "public function update($new_instance, $old_instance){\r\n\t\t$instance = $old_instance;\r\n\t\t$instance[\"title\"] = sanitize_text_field($new_instance[\"title\"]);\r\n\t\t$this->flush_widget_cache();\r\n\r\n\t\t// not entirely sure what this does, but we want to mimic Thrive Themes Widgets as closely \r\n\t\t// as possible. Please reference one of there widgets for more information.\r\n\t\t$all_options = wp_cache_get(\"alloptions\", \"options\");\r\n\t\tif (isset($all_options[\"ns_widget_postselect\"])){\r\n\t\t\tdelete_option(\"ns_widget_postselect\");\r\n\t\t}\r\n\t\treturn $instance;\r\n\t}", "public function update() {\n parent::update();\n }", "public function update($new_instance, $old_instance) {\r\n $instance = $old_instance;\r\n\r\n $widget_fields = $this->widget_fields();\r\n\r\n// Loop through fields\r\n foreach ($widget_fields as $widget_field) {\r\n\r\n extract($widget_field);\r\n\r\n// Use helper function to get updated field values\r\n $instance[$eightstore_lite_widgets_name] = eightstore_lite_widgets_updated_field_value($widget_field, $new_instance[$eightstore_lite_widgets_name]);\r\n }\r\n\r\n return $instance;\r\n}", "public function widget( $args, $instance ){}", "public function update( $new_instance, $old_instance ) \n{\n$instance = $old_instance;\n$instance['title'] = strip_tags( $new_instance['title'] );\nreturn $instance;\n}", "public function flush_widget_cache() {\r\n\t\twp_cache_delete(\"ns_widget_postselect\", \"widget\");\r\n\t}", "function widget( $args, $instance ) {\n\n\t\t\textract( $args );\n\n\t\t\tstatic $counters = array();\n\n\t\t\t$label = $instance['type'].'-'.$instance['rsr-id'];\n\n\n\n\t\t\t/* reset offset counter if rsr-id or type has changed */\n\t\t\tif (!isset($counters[$label])) {\n \t\t\t$counters[$label] = 0;\n \t\t}\n\n\n\n \t\tif(!isset($instance['type-text'])){\n \t\t\t$instance['type-text'] = '';\n \t\t}\n\n \t\t$instance['offset'] = $counters[$label];\n\n \t\t/* get the ajax url for the card widget */\n \t\t$akvo_card_obj = new Akvo_Card;\n \t\t$url = $akvo_card_obj->get_ajax_url('akvo_card', $instance, array('panels_info'));\n\n\n \t\techo \"<div data-behaviour='reload-html' data-url='\".$url.\"'></div>\";\n\n \t\t$counters[$label]++;\n\t\t}", "public function update( $new_instance, $old_instance ) { \n\t\t$instance = $old_instance; \n\t\t$instance['title'] = strip_tags( $new_instance['title'] ); \n\t\t$instance['title_after'] = strip_tags( $new_instance['title_after'] ); \n\t\t$instance['before_widget_content'] = $new_instance['before_widget_content']; \n\t\t$instance['after_widget_content'] = $new_instance['after_widget_content']; \n\t\t$instance['hide_for_logged_in'] = $new_instance['hide_for_logged_in']; \n\n\t\treturn $instance; \n\t}", "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\n\t\t$instance['link'] = strip_tags( $new_instance['link'] );\n\t\t$instance['carousel-option'] = $new_instance['carousel-option'];\n\t\t\n\t\treturn $instance; \n\t}", "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\n\t\t$instance['link'] = strip_tags( $new_instance['link'] );\n\t\t$instance['carousel-option'] = $new_instance['carousel-option'];\n\t\t\n\t\treturn $instance; \n\t}", "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\n\t\t/* Strip tags for title and name to remove HTML (important for text inputs). */\n\t\t$instance['title'] = $new_instance['title'];\n\t\t$instance['titlefirst'] = strip_tags($new_instance['titlefirst']);\n\t\t$instance['titlesecond'] = strip_tags($new_instance['titlesecond']);\n\t\t$instance['titlethird'] = strip_tags($new_instance['titlethird']);\n\t\t$instance['titlefourth'] = strip_tags($new_instance['titlefourth']);\n\t\t$instance['metafirst'] = strip_tags($new_instance['metafirst']);\n\t\t$instance['metasecond'] = strip_tags($new_instance['metasecond']);\n\t\t$instance['metathird'] = strip_tags($new_instance['metathird']);\n\t\t$instance['metafourth'] = strip_tags($new_instance['metafourth']);\n\t\t$instance['datefirst'] = $new_instance['datefirst'];\n\t\t$instance['datesecond'] = $new_instance['datesecond'];\n\t\t$instance['datethird'] = $new_instance['datethird'];\n\t\t$instance['datefourth'] = $new_instance['datefourth'];\t\t\n\n\t\tif (function_exists('icl_register_string')) {\n\t\t\ticl_register_string( 'Enter title for first tab' , 'widget_title_'.$this->id, $new_instance['titlefirst'] );\n\t\t\ticl_register_string( 'Enter title for second tab' , 'widget_title_second'.$this->id, $new_instance['titlesecond'] );\n\t\t\ticl_register_string( 'Enter title for third tab' , 'widget_title_'.$this->id, $new_instance['titlethird'] );\n\t\t\ticl_register_string( 'Enter title for fourth tab' , 'widget_title_second'.$this->id, $new_instance['titlefourth'] );\t\t\t\n\t\t}\t\t\n\n\t\treturn $instance;\n\t}", "function update( $new_instance, $old_instance ) {\r\n\t\t$instance = $old_instance;\r\n\r\n\t\t/* Strip tags for title and name to remove HTML (important for text inputs). */\r\n $instance['title'] = strip_tags( $new_instance['title'] );\r\n\t\r\n\t\t\r\n\r\n\t\t/* No need to strip tags for.. */\r\n\r\n\t\treturn $instance;\r\n\t}", "function update($new_instance, $old_instance)\r\r\n {\r\r\n\r\r\n $instance = $old_instance;\r\r\n\r\r\n /* Strip tags to remove HTML (important for text inputs). */\r\r\n $instance['title'] = strip_tags($new_instance['title']);\r\r\n\r\r\n $instance['show_what_filter'] = isset($new_instance['show_what_filter']) ? strip_tags($new_instance['show_what_filter']) : '';\r\r\n $instance['show_where_filter'] = isset($new_instance['show_where_filter']) ? strip_tags($new_instance['show_where_filter']) : '';\r\r\n $instance['show_when_filter'] = isset($new_instance['show_when_filter']) ? strip_tags($new_instance['show_when_filter']) : '';\r\r\n $instance['show_price_filter'] = isset($new_instance['show_price_filter']) ? strip_tags($new_instance['show_price_filter']) : '';\r\r\n $instance['show_stars_filter'] = isset($new_instance['show_stars_filter']) ? strip_tags($new_instance['show_stars_filter']) : '';\r\r\n $instance['show_rating_filter'] = isset($new_instance['show_rating_filter']) ? strip_tags($new_instance['show_rating_filter']) : '';\r\r\n $instance['show_room_count_filter'] = isset($new_instance['show_room_count_filter']) ? strip_tags($new_instance['show_room_count_filter']) : '';\r\r\n $instance['show_accommodation_type_filter'] = isset($new_instance['show_accommodation_type_filter']) ? strip_tags($new_instance['show_accommodation_type_filter']) : '';\r\r\n $instance['show_cruise_type_filter'] = isset($new_instance['show_cruise_type_filter']) ? strip_tags($new_instance['show_cruise_type_filter']) : '';\r\r\n $instance['show_cabin_count_filter'] = isset($new_instance['show_cabin_count_filter']) ? strip_tags($new_instance['show_cabin_count_filter']) : '';\r\r\n $instance['show_car_type_filter'] = isset($new_instance['show_car_type_filter']) ? strip_tags($new_instance['show_car_type_filter']) : '';\r\r\n $instance['show_tour_type_filter'] = isset($new_instance['show_tour_type_filter']) ? strip_tags($new_instance['show_tour_type_filter']) : '';\r\r\n\r\r\n $instance['what_text'] = isset($new_instance['what_text']) ? strip_tags($new_instance['what_text']) : '';\r\r\n $instance['when_text'] = isset($new_instance['when_text']) ? strip_tags($new_instance['when_text']) : '';\r\r\n $instance['where_text'] = isset($new_instance['where_text']) ? strip_tags($new_instance['where_text']) : '';\r\r\n\r\r\n $instance['accommodation_date_from_label_text'] = isset($new_instance['accommodation_date_from_label_text']) ? strip_tags($new_instance['accommodation_date_from_label_text']) : '';\r\r\n $instance['accommodation_date_to_label_text'] = isset($new_instance['accommodation_date_to_label_text']) ? strip_tags($new_instance['accommodation_date_to_label_text']) : '';\r\r\n $instance['accommodation_location_label_text'] = isset($new_instance['accommodation_location_label_text']) ? strip_tags($new_instance['accommodation_location_label_text']) : '';\r\r\n $instance['rooms_label_text'] = isset($new_instance['rooms_label_text']) ? strip_tags($new_instance['rooms_label_text']) : '';\r\r\n $instance['accommodation_type_label_text'] = isset($new_instance['accommodation_type_label_text']) ? strip_tags($new_instance['accommodation_type_label_text']) : '';\r\r\n $instance['star_rating_label_text'] = isset($new_instance['star_rating_label_text']) ? strip_tags($new_instance['star_rating_label_text']) : '';\r\r\n $instance['user_rating_label_text'] = isset($new_instance['user_rating_label_text']) ? strip_tags($new_instance['user_rating_label_text']) : '';\r\r\n $instance['car_rental_location_label_text'] = isset($new_instance['car_rental_location_label_text']) ? strip_tags($new_instance['car_rental_location_label_text']) : '';\r\r\n $instance['car_rental_date_from_label_text'] = isset($new_instance['car_rental_date_from_label_text']) ? strip_tags($new_instance['car_rental_date_from_label_text']) : '';\r\r\n $instance['car_rental_date_to_label_text'] = isset($new_instance['car_rental_date_to_label_text']) ? strip_tags($new_instance['car_rental_date_to_label_text']) : '';\r\r\n $instance['car_type_label_text'] = isset($new_instance['car_type_label_text']) ? strip_tags($new_instance['car_type_label_text']) : '';\r\r\n\r\r\n $instance['tour_type_label_text'] = isset($new_instance['tour_type_label_text']) ? strip_tags($new_instance['tour_type_label_text']) : '';\r\r\n\r\r\n $instance['tour_location_label_text'] = isset($new_instance['tour_location_label_text']) ? strip_tags($new_instance['tour_location_label_text']) : '';\r\r\n $instance['tour_date_from_label_text'] = isset($new_instance['tour_date_from_label_text']) ? strip_tags($new_instance['tour_date_from_label_text']) : '';\r\r\n $instance['cruise_type_label_text'] = isset($new_instance['cruise_type_label_text']) ? strip_tags($new_instance['cruise_type_label_text']) : '';\r\r\n $instance['cruise_date_from_label_text'] = isset($new_instance['cruise_date_from_label_text']) ? strip_tags($new_instance['cruise_date_from_label_text']) : '';\r\r\n $instance['cabins_label_text'] = isset($new_instance['cabins_label_text']) ? strip_tags($new_instance['cabins_label_text']) : '';\r\r\n $instance['price_per_person_label_text'] = isset($new_instance['price_per_person_label_text']) ? strip_tags($new_instance['price_per_person_label_text']) : '';\r\r\n $instance['price_per_night_label_text'] = isset($new_instance['price_per_night_label_text']) ? strip_tags($new_instance['price_per_night_label_text']) : '';\r\r\n $instance['price_per_day_label_text'] = isset($new_instance['price_per_day_label_text']) ? strip_tags($new_instance['price_per_day_label_text']) : '';\r\r\n $instance['submit_button_text'] = isset($new_instance['submit_button_text']) ? strip_tags($new_instance['submit_button_text']) : '';\r\r\n\r\r\n $instance['location_select_label_text'] = isset($new_instance['location_select_label_text']) ? strip_tags($new_instance['location_select_label_text']) : '';\r\r\n\r\r\n $instance['make_accommodations_searchable'] = isset($new_instance['make_accommodations_searchable']) ? strip_tags($new_instance['make_accommodations_searchable']) : '';\r\r\n $instance['make_tours_searchable'] = isset($new_instance['make_tours_searchable']) ? strip_tags($new_instance['make_tours_searchable']) : '';\r\r\n $instance['make_cruises_searchable'] = isset($new_instance['make_cruises_searchable']) ? strip_tags($new_instance['make_cruises_searchable']) : '';\r\r\n $instance['make_car_rentals_searchable'] = isset($new_instance['make_car_rentals_searchable']) ? strip_tags($new_instance['make_car_rentals_searchable']) : '';\r\r\n\r\r\n return $instance;\r\r\n }", "public function get_selective_refreshable_widgets()\n {\n }", "public function update( $new_instance, $old_instance ) {\r\n // processes widget options to be saved\r\n\r\n $instance = array();\r\n\r\n $instance['title'] = (! empty($new_instance['title'])) ? esc_html__($new_instance['title']) : '';\r\n $instance['description'] = (! empty($new_instance['description'])) ? esc_html__($new_instance['description']) : '';\r\n\r\n return $instance;\r\n }", "public function update( $new_instance, $old_instance ) {\n\t\t// processes widget options to be saved\n\t\t\n\t\t$instance = array();\n\t\t$instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';\n\t\t\n\t\treturn $instance;\n\t}", "function flush_widget_cache() {\n\t\twp_cache_delete( 'widget_sn_stub', 'widget' );\n\t}", "public function update( $new_instance, $old_instance ) {\n\t\t// processes widget options to be saved\n \n $instance['title'] = strip_tags( $new_instance[ 'title' ] );\n \n if (empty($new_instance['usernames'])) {\n $instance['error'] = \"You must enter at least one Twitter account.\";\n }\n else{\n $instance['usernames'] = strip_tags( $new_instance[ 'usernames' ] );\n }\n \n return $instance;\n\t}", "function widget_manager_update_widget($event, $object_type, $object) {\n\tif (($object instanceof ElggWidget) && in_array($event, array(\"create\", \"update\", \"delete\"))) {\n\t\tif (stristr($_SERVER[\"HTTP_REFERER\"], \"/admin/appearance/default_widgets\")) {\n\t\t\t// on create set a parent guid\n\t\t\tif ($event == \"create\") {\n\t\t\t\t$object->fixed_parent_guid = $object->guid;\n\t\t\t}\n\t\t\t\n\t\t\t// update time stamp\n\t\t\t$context = $object->context;\n\t\t\tif (empty($context)) {\n\t\t\t\t// only situation is on create probably, as context is metadata and saved after creation of the object, this is the fallback\n\t\t\t\t$context = get_input(\"context\", false);\n\t\t\t}\n\t\t\t\n\t\t\tif ($context) {\n\t\t\t\telgg_set_plugin_setting($context . \"_fixed_ts\", time(), \"widget_manager\");\n\t\t\t}\n\t\t}\n\t}\n}", "function update( $new_instance, $old_instance )\n\t\t\t{\n\t\t\n\t\t\t\t$instance = $old_instance;\n\t\t\n\t\t \t$instance['title'] \t\t\t= \t$new_instance['title'];\n\t\t \t$instance['num_to_show'] \t= \t$new_instance['num_to_show'];\n\t\t \n\t\t\t\treturn $instance;\n\t\t\n\t\t\t}", "function update( $new_instance, $old_instance )\n\t\t\t{\n\t\t\n\t\t\t\t$instance = $old_instance;\n\t\t\n\t\t \t$instance['title'] \t\t\t= \t$new_instance['title'];\n\t\t \t$instance['num_to_show'] \t= \t$new_instance['num_to_show'];\n\t\t \n\t\t\t\treturn $instance;\n\t\t\n\t\t\t}", "function update( $new_instance, $old_instance )\n {\n }", "function update( $new_instance, $old_instance ) {\r\n\t\t$instance = $old_instance;\t\r\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\r\n\t\treturn $instance;\r\n\t}", "public function update( $new_instance, $old_instance ) {\n\t\t// processes widget options to be saved\n \n $instance=array(\n \n 'widgettitle'=>(!empty($new_instance['widgettitle'])) ? strip_tags($new_instance['widgettitle']) : '',\n 'uniquelist'=>(!empty($new_instance['uniquelist'])) ? strip_tags($new_instance['uniquelist']) : '',\n 'widgetbgcolor'=>(!empty($new_instance['widgetbgcolor'])) ? strip_tags($new_instance['widgetbgcolor']) : '' ,\n 'widgetfontcolor'=>(!empty($new_instance['widgetfontcolor'])) ? strip_tags($new_instance['widgetfontcolor']) : '' ,\n 'widgetbtncolor'=>(!empty($new_instance['widgetbtncolor'])) ? strip_tags($new_instance['widgetbtncolor']) : '',\n 'thankyoupage'=>(!empty($new_instance['thankyoupage'])) ? strip_tags($new_instance['thankyoupage']) : '' \n \n \n \n );\n \n \n return $instance;\n \n\t}", "function miracle_update_visibility_fields($instance, $new_instance)\n {\n if ('advanced_text' == get_class($widget))\n return;\n\n $instance['action'] = $new_instance['action'];\n $instance['show'] = $new_instance['show'];\n $instance['slug'] = $new_instance['slug'];\n $instance['suppress_title'] = $new_instance['suppress_title'];\n\n return $instance;\n }", "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\t\t\n\t\t$instance['title'] \t= strip_tags($new_instance['title']);\n\t\t$instance['width'] \t= strip_tags($new_instance['width']);\n\t\t$instance['height'] = strip_tags($new_instance['height']);\n\t\t$instance['zoom'] \t= strip_tags($new_instance['zoom']);\n\t\t\n\t\treturn $instance;\n\t}", "function update( $new_instance, $old_instance ) {\r\n $instance = $old_instance;\r\n /* Strip tags for title and name to remove HTML (important for text inputs). */\r\n $instance['title'] = strip_tags( $new_instance['title'] );\r\n $instance['type'] = strip_tags( $new_instance['type'] );\r\n $instance['style'] = strip_tags( $new_instance['style'] );\r\n $instance['limit'] = strip_tags( $new_instance['limit'] );\r\n return $instance;\r\n }", "function update( $new_instance, $old_instance ) \r\n {\r\n $instance = $old_instance;\r\n $instance['title'] = strip_tags( $new_instance['title'] );\r\n $instance['skin'] = strip_tags( $new_instance['skin'] );\r\n $instance['split-test'] = strip_tags( $new_instance['split-test'] );\r\n $instance['skin-b'] = strip_tags( $new_instance['skin-b'] );\r\n return $instance;\r\n }", "function widget($args, $instance) {\n\t\tdo_utcw(array_merge($instance, $args));\n\t}", "function update( $new_instance, $old_instance ) {\n\t\t$instance['title'] = strip_tags( stripslashes( $new_instance['title'] ) );\n\t\t$instance['hide_if_empty'] = empty( $new_instance['hide_if_empty'] ) ? 0 : 1;\n\t\t$instance['hide_title'] = empty( $new_instance['hide_title'] ) ? 0 : 1;\n\t\t$instance['basket_icon'] = strip_tags( stripslashes( $new_instance['basket_icon'] ) );\n\t\treturn $instance;\n\t}", "function widget($args, $instance){\r\n\t//on déclare $wpdb en globale pour exécuter le SQL qui retourne un objet PHP \r\n\tglobal $wpdb;\r\n\r\n\t//si les tables users et jets n'existent pas, on les crée\r\n\t$create_tableUsers_query = \"\r\n\t CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}widgetDice_users` (\r\n\t `id` INTEGER unsigned NOT NULL default '0',\r\n\t `name` VARCHAR(255) NOT NULL,\r\n\t `pwd` VARCHAR(255) NOT NULL\r\n\t ) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r\n\t \";\r\n\t$create_tableJets_query = \"\r\n\t CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}widgetDice_jets` (\r\n\t `id` INTEGER unsigned NOT NULL default '0',\r\n\t `idUser` INTEGER unsigned NOT NULL default '0',\r\n\t `DateJet` DATETIME NOT NULL,\r\n\t `StringJet` VARCHAR(255) NOT NULL\r\n\t ) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r\n\t \";\r\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\r\n dbDelta( $create_tableUsers_query );\r\n dbDelta( $create_tableJets_query );\r\n\r\n\t$myrows = $wpdb->get_results( \"SELECT * FROM {$wpdb->prefix}widgetDice_users WHERE name = 'moi' AND pwd = 'moi'\", OBJECT );\r\n\t$user_count = $wpdb->get_var( \"SELECT COUNT(*) FROM $wpdb->users\" );\r\n\t//on récupère l'historique des 500 derniers lancers dans la base\r\n\t$monhistorique = $wpdb->get_results( \"SELECT * FROM {$wpdb->prefix}widgetDice_jets LEFT JOIN {$wpdb->prefix}widgetDice_users ON {$wpdb->prefix}widgetDice_jets.`idUser` = {$wpdb->prefix}widgetDice_users.`id` ORDER BY DateJet DESC LIMIT 500\", OBJECT );\r\n\r\n\t//on récupère les variables\r\n\textract($args);\r\n\t//on récupère ce qu'on doit afficher avant le widget\r\n\techo $before_widget;\r\n\t//on met le contenu du widget\r\n\t//un titre avec les var after et before pour que wp mette autoatiquement les balises et qu'on n'ait rien à règler\r\n\t//comme ça on s'adapte au thème et le widget s'affiche correctement\r\n\t//on récupère dynamiquement le titre tapé par l'utilisateur avec $instance[\"titre\"]\r\n\techo $before_title.$instance[\"titre\"].$after_title;\r\n\t?>\r\n\t\t<!-- on récupère le nom du form -->\r\n\t\t<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\" integrity=\"sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm\" crossorigin=\"anonymous\">\r\n\t\t<script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js\" integrity=\"sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl\" crossorigin=\"anonymous\"></script>\r\n\t\t<!-- <p> <strong><?php echo $instance[\"nom\"]; ?></strong> </p> -->\r\n\t\t<!-- <p> <strong>Ajouter des dés</strong> </p> -->\r\n\t\t<!-- <div class=\"alert alert-info\" role=\"alert\">\r\n\r\n\t\t<?php\r\n\t\tif(isset($_POST['loginUser'])){\r\n\t\t\t//var_dump($_POST['loginUser']);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//echo \"Vous devez vous loguer pour lancer les dés\".PHP_EOL.PHP_EOL;\r\n\t\t}\r\n\t\t//if (!isset($_GET['loginUser'])){\r\n\t\t\t//echo \" - Utilisateur non logué\";\r\n\t\t\techo \" Version sans blocage du login activé.\";\r\n\t\t\t//le post retourné par le form est vide : je n'ai pas pu faire la requête pour vérifier le login en base\r\n\t\t\t//le select est prêt dans la variable $myrows\r\n\t\t\t?>\r\n\t\t\t<!-- Login Form -->\r\n\t\t <form method=\"POST\" action=\"\" name=\"formLogin\">\r\n\t\t <!-- <form action=\"<?php echo esc_url( admin_url('admin-post.php') ); ?>\" method=\"post\"> -->\r\n\t\t \t<div class=\"container\">\r\n\t\t \t\t<div class=\"row\">\r\n\t\t\t\t <input type=\"text\" id=\"loginUser\" class=\"fadeIn second\" name=\"login\" placeholder=\"login\">\r\n\t\t\t\t </div>\r\n\t\t\t\t <div class=\"row\">\r\n\t\t\t\t <input type=\"text\" id=\"password\" class=\"fadeIn third\" name=\"login\" placeholder=\"password\">\r\n\t\t\t\t </div>\r\n\t\t\t\t <div class=\"row\">\r\n\t\t\t\t <input type=\"submit\" class=\"fadeIn fourth\" value=\"Log In\">\r\n\t\t\t\t </div>\r\n\t\t\t\t <div class=\"row\">\r\n\t\t\t\t <input type=\"hidden\" name=\"action\" value=\"contact_form\">\r\n\t\t\t\t </div>\r\n\t\t\t\t</div>\r\n\t\t </form>\r\n\t\t <?php\r\n\t\t//}\r\n\t\t//else{\r\n\t\t\t//echo \"Utilisateur logué\";\r\n\t\t//$this->check_password( \"\", \"\" );\r\n\t\t?>\r\n\t\r\n\t\t<form method=\"post\" action=\"\" name=\"form1\">\r\n\t\t\t<div class=\"container\"> \r\n\t <h4 class=\"ZoneDes\" id=\"ZoneDes\" margin=\"0\">Sélectionnez les dés :</h4>\r\n\t <div class=\"row\">\r\n\t\t <div class=\"col-6\">\r\n\t\t <h4>D2</h4>\r\n\t\t <input type=\"text\" id=\"d2\" value=\"1\" size=\"3\" maxlength=\"3\">\r\n\t\t </div>\r\n\t\t <div class=\"col-6\">\r\n\t\t <h4>D4</h4>\r\n\t\t <input type=\"text\" id=\"d4\" value=\"1\" size=\"3\" maxlength=\"3\">\r\n\t \t</div>\r\n\t \t</div>\r\n\t \t<div class=\"row\">\r\n\t\t <div class=\"col-6\">\r\n\t\t <h4>D6</h4>\r\n\t\t <input type=\"text\" id=\"d6\" value=\"1\" size=\"3\" maxlength=\"3\">\r\n\t\t </div>\r\n\t\t <div class=\"col-6\">\r\n\t\t <h4>D8</h4>\r\n\t\t <input type=\"text\" id=\"d8\" value=\"1\" size=\"3\" maxlength=\"3\">\r\n\t \t</div>\r\n\t \t</div>\r\n\t \t <div class=\"row\">\r\n\t\t <div class=\"col-6\">\r\n\t\t <h4>D10</h4>\r\n\t\t <input type=\"text\" id=\"d10\" value=\"1\" size=\"3\" maxlength=\"3\">\r\n\t\t </div>\r\n\t\t <div class=\"col-6\">\r\n\t\t <h4>D12</h4>\r\n\t\t <input type=\"text\" id=\"d12\" value=\"1\" size=\"3\" maxlength=\"3\">\r\n\t \t</div>\r\n\t \t</div>\r\n\t \t <div class=\"row\">\r\n\t\t <div class=\"col-6\">\r\n\t\t <h4>D20</h4>\r\n\t\t <input type=\"text\" id=\"d20\" value=\"1\" size=\"3\" maxlength=\"3\">\r\n\t\t </div>\r\n\t\t <div class=\"col-6\">\r\n\t\t <h4>D100</h4>\r\n\t\t <input type=\"text\" id=\"d100\" value=\"1\" size=\"3\" maxlength=\"3\">\r\n\t \t</div>\r\n\t \t</div>\r\n\t \t <div class=\"row\">\r\n\t\t <div class=\"col-6\">\r\n\t\t <h4>Modifier</h4>\r\n\t\t <input type=\"text\" id=\"dmodifier\" value=\"1\" size=\"3\" maxlength=\"3\">\r\n\t\t </div>\r\n\t \t</div>\r\n\t \t<br /><br />\r\n\t \t<a href=\"javascript:void(null)\" onclick=\"getResult()\"><img src=\"https://www.wizards.com/dnd/dice/images/roll1.jpg\" alt=\"Roll dices\" name=\"rd\" border=\"0\"></a><br /><br />\r\n\t \t<textarea name=\"runningtotal\" cols=\"25\" rows=\"10\"></textarea>\r\n \t\t</div>\r\n\t\t</form>\r\n <script>\r\n function getResult() {\r\n\r\n\t var jetDesArr = [];\r\n\t d2rolls = parseInt(document.form1.d2.value); //Nombre de dés de 2 entré exemple 2\r\n\t d4rolls = parseInt(document.form1.d4.value); //Nombre de dés de 4 entré exemple 2\r\n\t d6rolls = parseInt(document.form1.d6.value); //Nombre de dés de 6 entré exemple 2\r\n\t d8rolls = parseInt(document.form1.d8.value); //Nombre de dés de 8 entré exemple 2\r\n\t d10rolls = parseInt(document.form1.d10.value); //Nombre de dés de 10 entré exemple 2\r\n\t d12rolls = parseInt(document.form1.d12.value); //Nombre de dés de 12 entré exemple 2\r\n\t d20rolls = parseInt(document.form1.d20.value); //Nombre de dés de 20 entré exemple 2\r\n\t d100rolls = parseInt(document.form1.d100.value); //Nombre de dés de 100 entré exemple 2\r\n\t dmodifier = parseInt(document.form1.dmodifier.value); //Nombre de dés de 100 entré exemple 2\r\n\r\n\t dtotal = \"\";\r\n\t d2res = 0;\r\n\t d4res = 0;\r\n\t d6res = 0;\r\n\t d8res = 0;\r\n\t d10res = 0;\r\n\t d12res = 0;\r\n\t d20res = 0;\r\n\t d100res = 0;\r\n\t rtotal = document.form1.runningtotal.value; \r\n \r\n \t \t //Nombre de dés de 4 entré exemple 2\r\n\t\tdtotal = dtotal + \"Roll(\" + d2rolls.toString() + \"d2\" + \")\" + \": \"; \r\n\t\tfor (r=0; r<d2rolls; r++) {\r\n\t\t //on génère autant de dés que demandé\r\n\t var d2 = Math.floor((Math.random() * 2) + 1);\t\r\n\t d2res = d2res + d2;\t\r\n\t dtotal = dtotal + d2.toString() + (r == (d2rolls - 1) ? \"\" : \",\");\r\n\t\t //=> on prépare l'affichage dans l'historique\r\n\t \t}\r\n\t \tdtotal = dtotal + \"\\n\"; \r\n\t\tdtotal = dtotal + \"Roll(\" + d4rolls.toString() + \"d4\" + \")\" + \": \"; \r\n\t\tfor (r=0; r<d4rolls; r++) {\r\n\t\t //on génère autant de dés que demandé\r\n\t var d4 = Math.floor((Math.random() * 4) + 1);\t\r\n\t d4res = d4res + d4;\t\r\n\t\t dtotal = dtotal + d4.toString() + (r == (d4rolls - 1) ? \"\" : \",\");\t\r\n\t \t}\r\n\t \tdtotal = dtotal + \"\\n\"; \r\n\t \tdtotal = dtotal + \"Roll(\" + d6rolls.toString() + \"d62\" + \")\" + \": \"; \r\n\t \tfor (r=0; r<d6rolls; r++) {\r\n\t\t //on génère autant de dés que demandé\r\n\t var d6 = Math.floor((Math.random() * 6) + 1);\t\r\n\t d6res = d6res + d6;\t\r\n\t\t dtotal = dtotal + d6.toString() + (r == (d6rolls - 1) ? \"\" : \",\");\t\r\n\t \t}\r\n\t \tdtotal = dtotal + \"\\n\"; \r\n\t \tdtotal = dtotal + \"Roll(\" + d8rolls.toString() + \"d8\" + \")\" + \": \"; \r\n\t \tfor (r=0; r<d8rolls; r++) {\r\n\t\t //on génère autant de dés que demandé\r\n\t var d8 = Math.floor((Math.random() * 8) + 1);\t\r\n\t d8res = d8res + d8;\t\r\n\t\t dtotal = dtotal + d8.toString() + (r == (d8rolls - 1) ? \"\" : \",\");\t\r\n\t \t}\r\n\t \tdtotal = dtotal + \"\\n\"; \r\n\t \tdtotal = dtotal + \"Roll(\" + d10rolls.toString() + \"d10\" + \")\" + \": \"; \r\n\t \tfor (r=0; r<d10rolls; r++) {\r\n\t\t //on génère autant de dés que demandé\r\n\t var d10 = Math.floor((Math.random() * 10) + 1);\t\r\n\t d10res = d10res + d10;\t\r\n\t\t dtotal = dtotal + d10.toString() + (r == (d10rolls - 1) ? \"\" : \",\");\t\r\n\t \t}\r\n\t \tdtotal = dtotal + \"\\n\"; \r\n\t \tdtotal = dtotal + \"Roll(\" + d12rolls.toString() + \"d12\" + \")\" + \": \"; \r\n\t \tfor (r=0; r<d12rolls; r++) {\r\n\t\t //on génère autant de dés que demandé\r\n\t var d12 = Math.floor((Math.random() * 12) + 1);\t\r\n\t d12res = d12res + d12;\t\r\n\t\t dtotal = dtotal + d12.toString() + (r == (d12rolls - 1) ? \"\" : \",\");\t\r\n\t \t}\r\n\t \tdtotal = dtotal + \"\\n\"; \r\n\t \tdtotal = dtotal + \"Roll(\" + d20rolls.toString() + \"d20\" + \")\" + \": \"; \r\n\t \tfor (r=0; r<d20rolls; r++) {\r\n\t\t //on génère autant de dés que demandé\r\n\t var d20 = Math.floor((Math.random() * 20) + 1);\t\r\n\t d20res = d20res + d20;\t\r\n\t\t dtotal = dtotal + d20.toString() + (r == (d20rolls - 1) ? \"\" : \",\");\t\r\n\t \t}\r\n\t \tdtotal = dtotal + \"\\n\"; \r\n\t \tdtotal = dtotal + \"Roll(\" + d100rolls.toString() + \"d100\" + \")\" + \": \"; \r\n\t \tfor (r=0; r<d100rolls; r++) {\r\n\t\t //on génère autant de dés que demandé\r\n\t var d100 = Math.floor((Math.random() * 100) + 1);\t\r\n\t d100res = d100res + d100;\t\r\n\t\t dtotal = dtotal + d100.toString() + (r == (d100rolls - 1) ? \"\" : \",\");\t\r\n\t \t}\r\n\t \t//on ajoute le modificateur\r\n\t \tdtotal = dtotal + \"\\n\" + \"Modifier : \" + dmodifier.toString();\r\n\t \tvar dtotalres = d2res + d4res + d6res + d8res + d10res + d12res + d20res + d100res + dmodifier;\r\n\t\tdtotal = dtotal + \"\\n\" + \"Total:\" + dtotalres;\t\r\n\t rtotal = dtotal + \"\\n\\n\" + rtotal; \r\n\t document.form1.runningtotal.value = rtotal;\t\r\n\t}\r\n\t</script> \r\n\r\n\t<?php\r\n\t//} //fin else le user est logué - fonctionnalité désactivée\r\n\t?>\r\n\t<br /><br />\r\n\t<!-- HISTORIQUE récupéré dans la base de données : il reste à faire l'enregistrement-->\r\n\t<div class=\"container\"> \r\n <h4 class=\"arrayHistoClass\" id=\"arrayHisto\" margin=\"0\">Historique dés :</h4>\r\n <div class=\"row\"> \r\n\t\t\t<div class=\"col-6\">User</div>\r\n\t\t\t<div class=\"col-6\">Jet</div>\r\n </div>\r\n \t<div class=\"row\"> \r\n\t<?php\r\n\t foreach ($monhistorique as $details) {\r\n\t?><div class=\"col-6\"><?php\r\n\t echo $details->name;\r\n\t?></div><div class=\"col-6\"><?php\r\n\t echo $details->StringJet;\r\n\t?></div><?php\r\n\t} \r\n\t?>\r\n\t</div>\r\n\t</div>\r\n\t<br /><br /><br />\r\n\t<?php\r\n\t//on récupère ce qu'on doit afficher après le widget\r\n\techo $after_widget;\r\n\t\t\r\n\t}", "public function update( $new_instance, $old_instance ) {\r\n\t\t// processes widget options to be saved\r\n\r\n\t\t$instance = array();\r\n\r\n\t\t$instance['title'] = (! empty($new_instance['title'])) ? esc_html__($new_instance['title']) : '';\r\n\t\t$instance['tot'] = (! empty($new_instance['tot'])) ? absint(esc_html($new_instance['tot'])) : 0;\r\n\r\n\t\treturn $instance;\r\n\t}", "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\t\t$instance['title'] = strip_tags( stripslashes( $new_instance['title'] ) );\n\t\t$instance['div'] = strip_tags( stripslashes( $new_instance['div'] ) );\n\t\t$instance['widgetprecontent'] = stripslashes( $new_instance['widgetprecontent'] );\n\t\t$instance['widgetpostcontent'] = stripslashes( $new_instance['widgetpostcontent'] );\n\t\t$instance['size'] = intval( stripslashes( $new_instance['size'] ) );\n\t\t$instance['hidebutton'] = strip_tags( stripslashes( $new_instance['hidebutton'] ) );\n\t\t$instance['postto'] = stripslashes( $new_instance['postto'] );\n\t\t$instance['js'] = stripslashes( $new_instance['js'] );\n\t\t$instance['noantispam'] = stripslashes( $new_instance['noantispam'] );\n\t\t$instance['nowrap'] = stripslashes( $new_instance['nowrap'] );\n\n\t\treturn $instance;\n\t}", "private function fillWidgetList()\n {\n $this->list = array(\n 'humor' => array(\n 'class' => 'w-scuba-humor',\n 'name' => 'Scuba Humor',\n 'content' => '1'\n ),\n 'community' => array(\n 'class' => 'w-community',\n 'name' => 'Community',\n 'content' => '1'\n ),\n 'dive-news' => array(\n 'class' => 'w-dive-news',\n 'name' => 'Dive News',\n 'content' => array('frontend/news', Config::NUMPAGE_WIDGET_NEWS),\n 'file' => 'dive_news'\n ),\n 'travel-forums' => array(\n 'class' => 'w-travel-forums',\n 'name' => 'Travel Forums',\n 'content' => '1',\n 'file' => 'travel_forums'\n ),\n 'travel-blogs' => array(\n 'class' => 'w-travel-blogs',\n 'name' => 'Travel Blogs',\n 'content' => '1',\n 'file' => 'travel_blogs'\n ),\n 'advertisement' => array(\n 'class' => 'w-advertisement',\n 'name' => 'Advertisement',\n 'content' => '1'\n ),\n 'video' => array(\n 'class' => 'w-video',\n 'name' => 'Video',\n 'content' => '1'\n ),\n 'newsletter' => array(\n 'class' => 'w-sdtn-e-newsletter',\n 'name' => 'SDTN E-Newsletter',\n 'content' => '1'\n ),\n 'facebook' => array(\n 'class' => 'w-find-us-on-facebook',\n 'name' => '',\n 'content' => true\n ),\n 'blog' => array(\n 'class' => 'w-sdtn-blog',\n 'name' => 'SDTN Blog',\n 'content' => array('frontend/blog', Config::NUMPAGE_WIDGET_BLOG)\n ),\n 'google' => array(\n 'class' => 'w-google-ads',\n 'name' => 'Google Ads',\n 'content' => true\n )\n );\n }", "public function update( $new_instance, $old_instance ) {\t}", "public function update( $new_instance, $old_instance ) { \n\t\t$instance = $old_instance; \n\t\t$instance['title'] = strip_tags( $new_instance['title'] ); \n\t\t$instance['target_url'] = strip_tags( $new_instance['target_url'] ); \n\t\t$instance['target_url_custom'] = strip_tags( $new_instance['target_url_custom'] ); \n\t\t$instance['before_widget_content'] = $new_instance['before_widget_content']; \n\t\t$instance['after_widget_content'] = $new_instance['after_widget_content']; \n\t\t$instance['hide_for_logged_in'] = $new_instance['hide_for_logged_in']; \n\n\t\treturn $instance; \n\t}", "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\t\t/* Strip tags for title and name to remove HTML (important for text inputs). */\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\n\t\t$instance['categories'] = strip_tags( $new_instance['categories'] );\n $instance['tags'] = strip_tags( $new_instance['tags'] );\n\t\treturn $instance;\n\t}", "function update( $new_instance, $old_instance ) {\n\n\t\t$instance = $old_instance;\n\n\n\n\t\t/* Strip tags for title and name to remove HTML (important for text inputs). */\n\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\n\n\t\t$instance['categories'] = $new_instance['categories'];\n\n\t\t$instance['number'] = strip_tags( $new_instance['number'] );\n\n\n\n\n\n\t\treturn $instance;\n\n\t}", "public function update( $new_instance, $old_instance ) {\n\t\t// processes widget options to be saved\n\t\t$instance = array();\n\t\t$instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';\n\n\t\treturn $instance;\n\t}", "protected function after_update($new_instance, $old_instance){\n\t}", "abstract public function refresh();", "public function update( $new_instance, $old_instance ) { \n\t\t$instance = $old_instance; \n\t\t$instance['title'] = strip_tags( $new_instance['title'] ); \n\t\t$instance['show_counts'] = $new_instance['show_counts'];\n\t\t$instance['total_shares'] = $new_instance['total_shares']; \n\t\t$instance['target_url'] = $new_instance['target_url'];\n\t\t$instance['target_url_custom'] = $new_instance['target_url_custom']; \n\t\t$instance['before_widget_content'] = $new_instance['before_widget_content']; \n\t\t$instance['after_widget_content'] = $new_instance['after_widget_content']; \n\t\t$instance['hide_for_logged_in'] = $new_instance['hide_for_logged_in']; \n\n\t\treturn $instance; \n\t}", "function update( $new_instance, $old_instance ) {\r\n\t\t$instance = $old_instance;\r\n\t\t/* Strip tags for title and name to remove HTML (important for text inputs). */\r\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\r\n $instance['category']= $new_instance['category'];\r\n\t\treturn $instance;\r\n\t}", "function update($new_instance, $old_instance)\n {\n $instance = $old_instance;\n /* Strip tags for title and name to remove HTML (important for text inputs). */\n $instance['categories'] = $new_instance['categories'];\n return $instance;\n }", "function update() {\n\n\t\t\t}", "function update( $new_instance, $old_instance ) {\n\t\n\t$instance = $old_instance;\n\n\t$instance['title'] = strip_tags( $new_instance['title'] );\n\t$instance['image1'] = strip_tags( $new_instance['image1'] );\n\t$instance['image2'] = strip_tags( $new_instance['image2'] );\n\t$instance['image3'] = strip_tags( $new_instance['image3'] );\n\t$instance['image4'] = strip_tags( $new_instance['image4'] );\n\t$instance['image5'] = strip_tags( $new_instance['image5'] );\n\t\n\t$instance['link1'] = strip_tags( $new_instance['link1'] );\n\t$instance['link2'] = strip_tags( $new_instance['link2'] );\n\t$instance['link3'] = strip_tags( $new_instance['link3'] );\n\t$instance['link4'] = strip_tags( $new_instance['link4'] );\n\t$instance['link5'] = strip_tags( $new_instance['link5'] );\n\t\n\t$instance['client1'] = strip_tags( $new_instance['client1'] );\n\t$instance['client2'] = strip_tags( $new_instance['client2'] );\n\t$instance['client3'] = strip_tags( $new_instance['client3'] );\n\t$instance['client4'] = strip_tags( $new_instance['client4'] );\n\t$instance['client5'] = strip_tags( $new_instance['client5'] );\n\n\treturn $instance;\n}", "function reinitWidgetCache( $instance ) {\n\t\t$posts_per_page = 0;\n\t\tif ( isset( $instance[ self::NUMBER ] ) && $instance[ self::NUMBER ] > 0 ) {\n\t\t\t$posts_per_page = $instance[ self::NUMBER ];\n\t\t}\n\t\t$args = array(\n\t\t\t'orderby'\t\t\t\t=> 'comment_count',\n\t\t\t'posts_per_page'\t\t=> $posts_per_page + 1,\n\t\t\t'ignore_sticky_posts'\t=> 1,\n\t\t);\n\t\t$popular_query = new WP_Query( $args );\n\n\t\tif ( isset( $popular_query->posts ) && count( $popular_query->posts ) ) {\n\t\t\tset_site_transient( $this->getTransientId(), $popular_query, $this->getExparationTime() );\n\t\t}\n\t}", "private function Reload(){\t\t\t\t\r\n\t $this->valueLatestPeriod();\t \r\n\t $this->prepareGridData(); //ADDING TO OUTPUT\t\t\r\n\t}", "function update($new_instance, $old_instance)\r\n\t{\r\n\t\t$instance = $old_instance;\r\n\t\t$instance['html_text'] = $new_instance['html_text'];\r\n\t\treturn $instance;\r\n\t}", "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\n\t\t/* Strip tags for title and name to remove HTML (important for text inputs). */\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\n\t\t$instance['number'] = strip_tags( $new_instance['number'] );\n\n\n\t\treturn $instance;\n\t}", "public function update($newInstance, $oldInstance)\n\t{\n $instance = $oldInstance;\n\n // get widget config fields\n $fields = $this->_configuration->getFieldsByType('widget');\n\n // iterate over config-fields\n foreach ($fields as $fieldName => $fieldWidgetConfig) {\n \t// assume we use the field 1:1 as we received it\n \t$instance[$fieldName] = $newInstance[$fieldName];\n\n \t// if not html flag or flag set to false strip tags from field\n \t\tif (!isset($fieldWidgetConfig['html']) || $fieldWidgetConfig['html'] === false) {\n \t\t\t$instance[$fieldName] = strip_tags($instance[$fieldName]);\n \t\t}\n\n \t\t// if a separator is set we need to prepare (split/merge) the data in a special way\n \t\tif (isset($fieldWidgetConfig['separator'])) {\n \t\t\t$list = explode($fieldWidgetConfig['separator'], $instance[$fieldName]);\n\n \t\t\t$instance[$fieldName] = array();\n\n \t\tforeach ($list as $listItem) {\n \t\t\t$listItem = trim($listItem);\n \t\t\tif (strlen($listItem)) {\n \t\t\t\t$instance[$fieldName][] = $listItem;\n \t\t\t}\n \t\t}\n \t\t}\n \t}\n\n // return the prepared data\n return $instance;\n\t}", "public function update($new_instance, $old_instance){\n $instance = [];\n $instance['title'] = (isset($new_instance['title']) && !empty($new_instance['title'])) ? apply_filters('widget_title',$new_instance['title']) : __('LP Widget Title','lp_weather');\n $instance['unit'] = (isset($new_instance['unit']) && !empty($new_instance['unit'])) ? $new_instance['unit'] : 'celsius' ;\n return $instance;\n }", "function update( $new_instance, $old_instance ) {\n\t\t\t$instance = $old_instance;\n\n\t\t\t// strip tag on text field\n\t\t\t$instance['title1'] = strip_tags( $new_instance['title1'] );\n\t\t\t$instance['description'] = strip_tags( $new_instance['description'] );\n\t\t\t// int or array\n\t\t\tif ( array_key_exists('category', $new_instance) ){\n\t\t\t\tif ( is_array($new_instance['category']) ){\n\t\t\t\t\t$instance['category'] = $new_instance['category'] ;\n\t\t\t\t} else {\n\t\t\t\t\t$instance['category'] = strip_tags( $new_instance['category'] );\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\tif ( array_key_exists('numberposts', $new_instance) ){\n\t\t\t\t$instance['numberposts'] = intval( $new_instance['numberposts'] );\n\t\t\t}\n\t\t\tif ( array_key_exists('orderby', $new_instance) ){\n\t\t\t\t$instance['orderby'] = strip_tags( $new_instance['orderby'] );\n\t\t\t}\n\t\t\tif ( array_key_exists('columns', $new_instance) ){\n\t\t\t\t$instance['columns'] = intval( $new_instance['columns'] );\n\t\t\t}\n\t\t\tif ( array_key_exists('interval', $new_instance) ){\n\t\t\t\t$instance['interval'] = intval( $new_instance['interval'] );\n\t\t\t}\n\t\t\tif ( array_key_exists('start', $new_instance) ){\n\t\t\t\t$instance['start'] = intval( $new_instance['start'] );\n\t\t\t}\n\t\t\tif ( array_key_exists('scroll', $new_instance) ){\n\t\t\t\t$instance['scroll'] = intval( $new_instance['scroll'] );\n\t\t\t}\t\n\t\t\tif ( array_key_exists('autoplay', $new_instance) ){\n\t\t\t\t$instance['autoplay'] = strip_tags( $new_instance['autoplay'] );\n\t\t\t}\n\t\t\t$instance['widget_template'] = strip_tags( $new_instance['widget_template'] );\n\t\t\t\n\t\t\t\t\t\t\n\t\t\t\n\t\t\treturn $instance;\n\t\t}", "function deregister_widgets()\n { foreach ( $this->get_widgets() as $widget )\n {\n unregister_widget( $widget );\n }\n\n }", "public function setWidget($widget);", "function update( $new_instance, $old_instance ) {\n\t$instance = $old_instance;\n\n\t// Strip tags to remove HTML (important for text inputs)\n\t$instance['title'] = strip_tags( $new_instance['title'] );\n\n\t// No need to strip tags\n\t$instance['ad'] = $new_instance['ad'];\n\t$instance['link'] = $new_instance['link'];\n\n\treturn $instance;\n}", "function update($new_instance, $old_instance) {\n $instance['title'] = strip_tags($new_instance['title']);\n $instance['exclude_cat_num'] = $new_instance['exclude_cat_num'];\n $instance['show_count'] = $new_instance['show_count'];\n return $instance;\n }", "public function updateDefaultsFromObject() {\n parent::updateDefaultsFromObject();\n // Tags\n if(isset($this->widgetSchema['tags'])) {\n $tags = $this->getObject()->getTags();\n if($this->getUser()->getAttribute('enable_keyboard', false)) {\n $tags = implode(', ', $tags);\n }\n $this->widgetSchema['tags']->setDefault($tags);\n }\n // Elements\n if(isset($this->widgetSchema['elements_list'])) {\n $this->widgetSchema['elements_list']->setDefault($this->getObject()->getElements());\n }\n if($this->getUser()->getAttribute('enable_keyboard', false) && isset($this->widgetSchema['demandeur_id']) && !$this->isNew())\n {\n $this->setDefault('demandeur_id', $this->getObject()->getDemandeur()->getName());\n }\n }", "function getWidget() {\n // just override the template being used.\n $bHasErrors = false; \n if (count($this->aErrors) != 0) { $bHasErrors = true; }\n\n // at this last moment we pick the template to use \n $total = count($this->aVocab);\n if ($this->bUseSimple === true) {\n $this->sTemplate = 'ktcore/forms/widgets/simple_selection'; \n } else if ($this->bUseSimple === false) {\n $this->sTemplate = 'ktcore/forms/widgets/selection'; \n } else if (is_null($this->bUseSimple) && ($total <= $this->USE_SIMPLE)) {\n $this->sTemplate = 'ktcore/forms/widgets/simple_selection';\n } else {\n $this->sTemplate = 'ktcore/forms/widgets/selection';\n }\n \n $oTemplating =& KTTemplating::getSingleton(); \n $oTemplate = $oTemplating->loadTemplate($this->sTemplate);\n\n // have to do this here, and not in \"configure\" since it breaks \n // entity-select.\n $unselected = KTUtil::arrayGet($this->aOptions, 'unselected_label');\n if (!empty($unselected)) {\n // NBM: we get really, really nasty interactions if we try merge\n // NBM: items with numeric (but important) key values and other\n // NBM: numerically / null keyed items\n $vocab = array();\n $vocab[] = $unselected;\n foreach ($this->aVocab as $k => $v) {\n $vocab[$k] = $v;\n }\n \n $this->aVocab = $vocab;\n\n // make sure its the selected one if there's no value specified.\n if (empty($this->value)) {\n $this->value = 0;\n }\n }\n\n // performance optimisation for large selected sets.\n if ($this->bMulti) {\n $this->_valuesearch = array();\n $value = (array) $this->value;\n foreach ($value as $v) {\n $this->_valuesearch[$v] = true;\n }\n }\n \n $aTemplateData = array(\n \"context\" => $this,\n \"name\" => $this->sName,\n \"has_id\" => ($this->sId !== null),\n \"id\" => $this->sId,\n \"has_value\" => ($this->value !== null),\n \"value\" => $this->value,\n \"options\" => $this->aOptions,\n 'vocab' => $this->aVocab,\n );\n return $oTemplate->render($aTemplateData);\n }", "function update( $new_instance, $old_instance ) \n {\n $instance = $old_instance;\n $instance['title'] = strip_tags( $new_instance['title'] );\n return $instance;\n }", "public function update( $new_instance, $old_instance ) { \n\t\t$instance = $old_instance; \n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\n\t\t$instance['size'] = intval( $new_instance['size'] );\n\t\t$instance['icon_shape'] = $new_instance['icon_shape'];\n\t\t$instance['facebook'] = $new_instance['facebook'];\n\t\t$instance['twitter'] = $new_instance['twitter'];\n\t\t$instance['parler'] = $new_instance['parler'];\n\t\t$instance['instagram'] = $new_instance['instagram'];\n\t\t$instance['pinterest'] = $new_instance['pinterest'];\n\t\t$instance['behance'] = $new_instance['behance'];\n\t\t$instance['flickr'] = $new_instance['flickr'];\n\t\t$instance['foursquare'] = $new_instance['foursquare'];\n\t\t$instance['github'] = $new_instance['github'];\n\t\t$instance['linkedin'] = $new_instance['linkedin'];\n\t\t$instance['linkedin_company'] = $new_instance['linkedin_company'];\n\t\t$instance['medium'] = $new_instance['medium'];\n\t\t$instance['mewe'] = $new_instance['mewe'];\n\t\t$instance['odnoklassniki'] = $new_instance['odnoklassniki'];\n\t\t$instance['snapchat'] = $new_instance['snapchat'];\n\t\t$instance['telegram'] = $new_instance['telegram'];\n\t\t$instance['tumblr'] = $new_instance['tumblr'];\n\t\t$instance['vimeo'] = $new_instance['vimeo'];\n\t\t$instance['vkontakte'] = $new_instance['vkontakte'];\n\t\t$instance['xing'] = $new_instance['xing'];\n\t\t$instance['youtube'] = $new_instance['youtube'];\n\t\t$instance['youtube_channel'] = $new_instance['youtube_channel'];\n\t\t$instance['rss_feed'] = $new_instance['rss_feed'];\n\t\t$instance['before_widget_content'] = $new_instance['before_widget_content']; \n\t\t$instance['after_widget_content'] = $new_instance['after_widget_content'];\n\n\t\treturn $instance; \n\t}", "function update( $new_instance, $old_instance ) {\r\n\t\t$instance = $old_instance;\r\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\r\n\r\n\t\treturn $instance;\r\n\t}", "function update( $new_instance, $old_instance ) {\r\n\t\t$instance = $old_instance;\r\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\r\n\r\n\t\treturn $instance;\r\n\t}", "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\n\t\t$instance['total'] = $new_instance['total'];\n\t\treturn $instance;\n\t}", "function update($new_instance, $old_instance) {\n\t\t$instance = $old_instance;\n\t\t$instance['sidebar_menu'] = $new_instance['sidebar_menu'];\n\t\treturn $instance;\n\t}", "public function addWidget()\r\n {\r\n }", "function bigbluebuttonbn_update_instance($data, $mform) {\n global $DB, $CFG;\n\n $data->id = $data->instance;\n $draftitemid = isset($data->presentation)? $data->presentation: null;\n $context = bigbluebuttonbn_get_context_module($data->coursemodule);\n\n bigbluebuttonbn_process_pre_save($data);\n\n unset($data->presentation);\n $DB->update_record(\"bigbluebuttonbn\", $data);\n\n bigbluebuttonbn_update_media_file($data->id, $context, $draftitemid);\n\n bigbluebuttonbn_process_post_save($data);\n\n return true;\n}", "function update( $new_instance, $old_instance ) {\r\n\t\t$instance = $old_instance;\r\n\t\t$instance['title'] = strip_tags($new_instance['title']);\r\n\r\n\t\treturn $instance;\r\n\t}", "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\n\t\t/* Strip tags for title and name to remove HTML (important for text inputs). */\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\n\t\t$instance['image_link'] = strip_tags( $new_instance['image_link'] );\n\t\t$instance['heading'] = strip_tags( $new_instance['heading'] );\n\t\t$instance['image_url'] = strip_tags( $new_instance['image_url'] );\n\t\t$instance['height'] = strip_tags( $new_instance['height'] );\n\t\t$instance['margin'] = strip_tags( $new_instance['margin'] );\n\t\t$instance['newtab'] = strip_tags( $new_instance['newtab'] );\n\t\t\n\n\t\treturn $instance;\n\t}", "function update( $new_instance, $old_instance ) {\n \t\t$instance = $old_instance;\n\n\t\t\t/* Strip tags for title and name to remove HTML (important for text inputs). */\n \t\t$instance['type'] = $new_instance['type'];\n \t\t$instance['rsr-id'] = $new_instance['rsr-id'];\n \t\t$instance['type-text'] = $new_instance['type-text'];\n\n\t\t\treturn $instance;\n \t\t}", "public function update($new_instance, $old_instance) \r\n {\r\n $instance = array();\r\n \r\n $instance['title'] = !empty($new_instance['title']) ? sanitize_text_field($new_instance['title']) : '';\r\n $instance['api_url'] = !empty($new_instance['api_url']) ? sanitize_text_field($new_instance['api_url']) : '';\r\n $instance['public_key'] = !empty($new_instance['public_key']) ? sanitize_text_field($new_instance['public_key']) : '';\r\n $instance['private_key'] = !empty($new_instance['private_key']) ? sanitize_text_field($new_instance['private_key']) : '';\r\n $instance['list_uid'] = !empty($new_instance['list_uid']) ? sanitize_text_field($new_instance['list_uid']) : '';\r\n $instance['uid'] = !isset($old_instance['uid']) ? uniqid() : $old_instance['uid'];\r\n \r\n $instance['selected_fields'] = !empty($new_instance['selected_fields']) && is_array($new_instance['selected_fields']) ? array_map('sanitize_text_field', $new_instance['selected_fields']) : array();\r\n \r\n update_option('mwznb_widget_instance_' . $instance['uid'], array(\r\n 'api_url' => $instance['api_url'],\r\n 'public_key' => $instance['public_key'],\r\n 'private_key' => $instance['private_key'],\r\n 'list_uid' => $instance['list_uid']\r\n ));\r\n \r\n if (!empty($new_instance['generate_new_form'])) {\r\n $instance['generated_form'] = $this->generateForm($instance); \r\n } else {\r\n $instance['generated_form'] = !empty($new_instance['generated_form']) ? $new_instance['generated_form'] : '';\r\n }\r\n \r\n return $instance;\r\n }" ]
[ "0.6643358", "0.6617959", "0.66152173", "0.6563204", "0.6393471", "0.63617164", "0.6361357", "0.63406396", "0.63406396", "0.63406396", "0.63406396", "0.63161373", "0.62564623", "0.625466", "0.61360186", "0.60991", "0.60351616", "0.59230876", "0.59126264", "0.58962494", "0.58962494", "0.58116454", "0.57815766", "0.5766915", "0.5766842", "0.5745055", "0.57373744", "0.5720464", "0.5713426", "0.5699464", "0.56990296", "0.562949", "0.56185323", "0.56090844", "0.5607501", "0.55983025", "0.55465394", "0.55459225", "0.5541365", "0.5541365", "0.5495074", "0.54760516", "0.5453997", "0.54534024", "0.5450227", "0.54453886", "0.5433994", "0.5431031", "0.5429858", "0.54269993", "0.54269993", "0.54030347", "0.54029506", "0.5397602", "0.5396097", "0.53928345", "0.5387938", "0.5385475", "0.53787917", "0.5347558", "0.5342365", "0.53294766", "0.53211135", "0.5319813", "0.53130907", "0.5312593", "0.5309367", "0.5305935", "0.5300948", "0.52945995", "0.5290213", "0.52881247", "0.5286163", "0.5284868", "0.5275675", "0.52752936", "0.52682596", "0.5259476", "0.52504677", "0.5248825", "0.5246635", "0.5236212", "0.52302736", "0.5226381", "0.52220035", "0.5221402", "0.52068585", "0.52066576", "0.5201184", "0.5199787", "0.51988393", "0.51970387", "0.51970387", "0.51923305", "0.51818883", "0.5170273", "0.5166897", "0.51613665", "0.51585937", "0.51574916", "0.5155241" ]
0.0
-1
Create a new location.
public function handle(array $data) { return $this->repository->create($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createAction()\n {\n $entity = new Location();\n $request = $this->getRequest();\n $form = $this->createForm(new LocationType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('admin_location_show', array('id' => $entity->getId())));\n \n }\n\n return $this->render('ACInst3LocationBundle:Location:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function run()\n {\n $location = Location::create([\n 'name' => '1 - V1 Visita 1',\n 'description' => ''\n ]);\n }", "public function create()\n {\n return view('admin.location.add');\n }", "public function create(StoreLocationRequest $request)\r\n {\r\n $opening_hours = $this->formatOpeningHours($request);\r\n $disabled_dates = $this->formatDisabledDates($request);\r\n\r\n $location = $this->location->create([\r\n 'name' => $request->get('name'),\r\n 'disabled_weekdays' => $request->get('disabled_weekdays'),\r\n 'disabled_dates' => $disabled_dates,\r\n 'opening_hours' => $opening_hours,\r\n 'order' => (int)$request->get('order'),\r\n 'max_weight' => (int)$request->get('max_weight'),\r\n 'interval' => (int)$request->get('interval'),\r\n 'json' => array()\r\n ]);\r\n\r\n $location->refresh();\r\n\r\n if (is_array($request->get('services'))) {\r\n $location->services()->attach($request->get('services')); \r\n }\r\n\r\n return $location;\r\n }", "public function testAddLocation(): void\n {\n $session = $this->getMinkSession();\n $this->login('dkatz', 'pr1test');\n $session->visit($this->getUrl('/Publisher/manage_location?id=4612')); // A Bruccoli Clark Layman Book\n $page = $session->getPage();\n $this->clickCss($page, '.add-location-link');\n $this->checkFor500Error();\n }", "public function create()\n\t{\n\t\treturn View::make('locations.create');\n\t}", "public function create()\n {\n return view('exports.locations.create');\n }", "public function testLocationCreationRequiredParameters()\n {\n $user = User::all()->random();\n\n $this->actingAs($user, 'api')\n ->post(\"api/location\", [\n 'branch' => 'Twofold Asperger-Academy',\n 'room' => '431',\n ]);\n $this->seeStatusCode(200);\n }", "public function testLocationCreationValidParameters()\n {\n $user = User::all()->random();\n\n $this->actingAs($user, 'api')\n ->post(\"api/location\", [\n 'branch' => 'Twofold Asperger-Academy',\n 'room' => '431',\n 'shelf' => '3',\n 'compartment' => '4',\n 'description' => 'This is a description where the location is.'\n ]);\n $this->seeStatusCode(200);\n }", "public function getCreateLocation()\n {\n return view('admin.world_expansion.create_edit_location', [\n 'location' => new Location,\n 'types' => LocationType::all()->pluck('name','id')->toArray(),\n 'locations' => Location::all()->pluck('name','id')->toArray(),\n 'ch_enabled' => Settings::get('WE_character_locations'),\n 'user_enabled' => Settings::get('WE_user_locations')\n ]);\n }", "public function addLocation(string $location);", "public function create()\n {\n //\n return view('location.create');\n }", "public function create()\n {\n return view('admin.locations.create');\n }", "public function create()\n {\n return view('locations.create');\n }", "public function create()\n {\n return view('locations.create');\n }", "public function create()\n {\n return view('locations.create');\n }", "public function testLocationCreationWithoutLogin()\n {\n $this->post(\"api/location\", [\n 'branch' => 'Twofold Asperger-Academy',\n 'room' => '431',\n ]);\n $this->seeStatusCode(401);\n }", "public function create()\n {\n \\App::setLocale(\\Session::get('lang'));\n return view('location.create');\n }", "public function createLocation($locations, $flat, $flong, $tlat, $tlong){\n\t\t$user = $this->getUser();\n\t\tif(!isset($user[\"id\"])\n\t\t\t||$user[\"status\"]!=DBConfig::$userStatus[\"admin\"])\n\t\t\treturn false;\n\t\t$this->log(\"@\".$user[\"id\"].\" (\".$user[\"username\"].\") creates location '$locations' at $flat | $flong - $tlat | $tlong\");\n\t\t$query = Queries::createlocation($locations, $flat, $flong, $tlat, $tlong);\n\t\treturn $this->query($query);\n\t}", "public function createLocation(CreateLocationRequest $body): ApiResponse\n {\n $_reqBuilder = $this->requestBuilder(RequestMethod::POST, '/v2/locations')\n ->auth('global')\n ->parameters(HeaderParam::init('Content-Type', 'application/json'), BodyParam::init($body));\n\n $_resHandler = $this->responseHandler()->type(CreateLocationResponse::class)->returnApiResponse();\n\n return $this->execute($_reqBuilder, $_resHandler);\n }", "public function create($location): void\n {\n $sql = \"INSERT INTO {$this->table} (description) \";\n $sql .= \"VALUES (:description);\";\n\n DBConnection::getInstance()\n ->prepare($sql)\n ->execute([\n \"description\" => $location->getDescription()\n ]);\n\n $location->setId($this->getInsertedId());\n }", "public function create()\n {\n return view('admin.locations.add');\n }", "public function create()\n {\n $locations = Location::where('parent', 0)->get();\n return view('locations.create', compact('locations'));\n }", "public function create()\n {\n return view('admin.experiences.locations.create');\n }", "public function create_location($location_name)\n {\n $location=array('location_id'=>NULL,\n 'name'=>$location_name);\n\n if( !$this->db->insert('Location',$location))\n {\n return FALSE;\n }\n\n return $this->db->insert_id();\n }", "public function newAction()\n {\n $entity = new Location();\n $form = $this->createForm(new LocationType(), $entity);\n\n return $this->render('ACInst3LocationBundle:Location:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function createLocation($data)\n {\n \n $locationVo = $this->buildLocationVo($data); \n $transmitterVo = $this->buildTransmitterVo($data);\n $imageVo = $this->buildImageVo($data, CImageBoProcess::TYPE_LOCATION);\n \n // Set the validation.\n $this->responseVo->setValidation($locationVo->getValidation());\n \n /**\n * Next check that the data is valid and try to insert new records.\n */\n if ($locationVo->isValid())\n {\n // Next write the data to the databse\n $daoResultLocation = MLocationDao::insertLocation($locationVo, $imageVo->getImageId());\n $daoResultTransmitter = MLocationDao::insertTransmitter($transmitterVo, $daoResultLocation->getData()[0]['LocationId']);\n \n if ($daoResultLocation->getStatus() === FDatabaseVoResult::SUCCESS && $daoResultTransmitter->getStatus() === FDatabaseVoResult::SUCCESS)\n {\n // Set the response message\n $this->responseVo->setData($daoResultLocation->getData());\n $this->responseVo->appendData($daoResultTransmitter->getData());\n $this->responseVo->setMessage('Location created.', FWebVoResponse::SUCCESS);\n }\n else\n {\n // Set the response message\n $this->responseVo->setMessage($daoResultLocation->getMessage(), FWebVoResponse::ERROR);\n }\n }\n else\n {\n $this->responseVo->setMessage('Location data failed validation.', FWebVoResponse::ERROR);\n }\n \n return $this->responseVo;\n }", "public function create() {\n return GeolocationsModel::create($this->creationDate,$this->userAgent,$this->sellerId,$this->saleId ? $this->saleId: null,$this->latitude,$this->longitude);\n }", "public function actionCreate()\n {\n $model = new Location();\n if(isset($_GET['x'])){\n echo $_GET['x'].','.$_GET['y'];\n $model->x=$_GET['x'];\n $model->y=$_GET['y'];\n \n $model->address= $this->getaddress($model->x, $model->y);\n \n $model->time=$_GET['time'];\n $model->date=Yii::$app->formatter->asDatetime($_GET['date'], \"php:Y-m-d\");\n $model->session=$_GET['session'];\n $model->idorder=$_GET['idorder'];\n $model->save();\n \n }\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create(array $input)\n {\n if (Location::create($input)) {\n return true;\n }\n throw new GeneralException(trans('exceptions.backend.locations.create_error'));\n }", "public function create(SalesLocationsCreateOrUpdateEvent $event)\n {\n $saleLocation = new SalesLocationsModel();\n\n $saleLocation\n ->setDispatcher($event->getDispatcher())\n\n ->setCompany($event->getCompany())\n ->setFirstname($event->getFirstname())\n ->setLastname($event->getLastname())\n ->setAddress1($event->getAddress1())\n ->setAddress2($event->getAddress2())\n ->setAddress3($event->getAddress3())\n ->setZipcode($event->getZipcode())\n ->setCity($event->getCity())\n ->setCountryId($event->getCountry())\n ->setPhone($event->getPhone())\n ->setCellphone($event->getCellphone())\n ->setVisible($event->getVisible())\n\n ->save()\n ;\n\n $event->setSaleLocation($saleLocation);\n }", "public function addNewLocation($request)\n {\n $this->deliveryLocation->name = $request->name;\n $this->deliveryLocation->description = $request->description;\n $this->deliveryLocation->price = $request->price;\n if ($this->deliveryLocation->save()) {\n return \"saved\";\n }\n return 'can\\'t be saved';\n }", "public function __construct($location, $name, $type);", "public function createNewLocation($withName, $withLatitude, $withLongitude, $withAdminUID) {\n\t\t\t$newUID = substr(sha1(time()), 0, 16);\n\t\t\t\n\t\t\t$insertNewLocationQuery = \"\n\t\t\t\tINSERT INTO `\" . DB_NAME . \"`.`TekBox-Clusters` (`Name`, `UUID`, `Latitude`, `Longitude`, `Admin1-UUID`)\n\t\t\t\tVALUES ('$withName', '$newUID', '$withLatitude', '$withLongitude', '$withAdminUID');\n\t\t\t\";\n\t\t\t\n\t\t\t// do the query\n\t\t\tif ($insertResult = mysqli_query($this->mysqli, $insertNewLocationQuery)) {\n\t\t\t\t// successful query\n\t\t\t\treturn $newUID;\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "function create($name,$location){\r\n lako::get('ljson')->save($location.\"/{$name}\",array(\r\n 'table' => $name,\r\n 'name' => $name,\r\n 'pkey' => 'id',\r\n 'fields'=> array(\r\n 'id' => array(\r\n 'datatype' => ''\r\n )\r\n ),\r\n 'relations' => array(\r\n 'data' => array(\r\n 'type' => '1-M',\r\n 'path' => ['id','field_id'],\r\n 'object' => 'wp_bp_xprofile_data'\r\n )\r\n )\r\n )\r\n );\r\n \r\n }", "function addLocation($data) {\r\n\r\n\r\n\t\t$this->query('INSERT INTO locations (`id`, `created`, `modified`, `name`) \r\n\t\t\t\t\t\t\t VALUES (NULL, CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP(), \"'. $data['name'] .'\");');\r\n\r\n\t}", "public function create($location, $filename, $extension)\n {\n }", "public function create()\n\t{\n\t\treturn view('admin.place.create');\n\t}", "public function setNewLocation($value)\n {\n return $this->set('NewLocation', $value);\n }", "public function store()\n\t{\n\t\t$validator = Validator::make(Input::all(), Location::$rules);\n \n \t\tif ($validator->passes()) {\n \t\t$location = new Location;\n \t\t\t$location->name = Input::get('name');\n \t\t\t$location->save();\n \n \t\t\treturn Redirect::to('app/locations')->with('message', 'Succesfully added');\n \t\t} \n \t\telse {\n \t\treturn Redirect::to('app/locations/create')->with('message', 'The following errors occurred')->withErrors($validator)->withInput(); \n \t\t}\n\t}", "public function store(StoreLocationRequest $request)\n {\n\n $location = Location::create($request->all());\n\n $location->save();\n\n return new LocationResource($location);\n }", "public function create()\n {\n //\n $organizations = Organization::pluck('name', 'id');\n return view('manage.location.locations_create', compact('organizations'));\n }", "public static function create($name, $locationParent) {\n\t\t\t$db = Db::getInstance();\n\n\t\t\t$location = CategoryManager::getNewLocation($locationParent);\n\t\t\t$description = $name;\n\t\t\t$owner = $_SESSION['username'];\n\t\t\t$date = date('Y-m-d H:i:s');\n\n\t\t\t$createQuery = $db->prepare('INSERT INTO categories (location, description, owner, datetime)\n\t\t\t\t\t\t\t\t\t\t\t VALUES (:location, :description, :owner, :date)\n\t\t\t\t\t\t\t\t\t\t');\n\t\t\t\t$createQuery->execute(array('location' => $location, 'description' => $description,\n\t\t\t\t\t\t\t\t\t\t\t'owner' => $owner, 'date' => $date));\n\t\t}", "protected static function newFactory()\n {\n return new LocationFactory();\n }", "public function testLocationClass()\n {\n $olapic_id = \"X5000GXB\";\n $olapic_latitude = \"-31.4256195\";\n $olapic_longitude = \"-64.1876011\";\n $olapic_name = \"Olapic Argentina S.A\";\n $olapic_address = \"Santiago Derqui 33, Córdoba, Argentina\";\n $olapic_map = \"http://maps.googleapis.com/maps/api/staticmap?center=-31.4256195%20-64.1876011&zoom=15&scale=false&size=640x480&maptype=roadmap&format=png&visual_refresh=true&markers=size:mid%7Ccolor:0xff3900%7Clabel:A%7C-31.4256195%20-64.1876011\";\n\n $olapic_location = new location(null, $olapic_latitude, $olapic_longitude, $olapic_name, $olapic_address, $olapic_map);\n $olapic_location->__set(\"id\", $olapic_id);\n\n $this->assertEquals($olapic_id, $olapic_location->__get(\"id\"));\n $this->assertEquals($olapic_latitude, $olapic_location->__get(\"latitude\"));\n $this->assertEquals($olapic_longitude, $olapic_location->__get(\"longitude\"));\n $this->assertEquals($olapic_name, $olapic_location->__get(\"name\"));\n $this->assertEquals($olapic_address, $olapic_location->__get(\"address\"));\n $this->assertEquals($olapic_map, $olapic_location->__get(\"image\"));\n }", "function AssignLocation($location = array())\n\t{\treturn new AdminLocation($location);\n\t}", "protected function setLocation($location) {\r\n // TODO: Don't really know what this is?\r\n $this->location = $this->create($location);\r\n }", "public function store(Request $request)\n {\n $location = new location();\n $location->name_location = $request->name_location;\n $location->lat = $request->lat;\n $location->lng=$request->lng;\n $location->save();\n return redirect('location');\n }", "public function store(Request $request): Location\n {\n $data = $request->validate([\n \"name\" => \"required|string\",\n \"team_id\" => \"required|string\",\n ]);\n\n /* We get the user from the request */\n $user = $request->user();\n\n /* We fetch the foreign keys from the request */\n $team = Team::findOrFail($request['team_id']);\n\n /* We check that the user can create a new location in that team */\n if (!$user->hasTeamPermission($team, 'location:write') ||\n !$user->tokenCan('location:write')\n ) {\n throw new AuthorizationException();\n }\n\n return Location::create([\n \"name\" => $data['name'],\n \"team_id\" => $team->id,\n ]);\n }", "public function createLocation($locationInfo) {\n\t\t$params = array(\n\t\t\t$locationInfo['RoomName'],\n\t\t\t$locationInfo['RoomAbbr'],\n\t\t\t$locationInfo['RoomDesc'],\n\t\t\t$locationInfo['IsApproved'],\n\t\t\t$locationInfo['BuildingName']\n\t\t);\n\t\t$this->db->query(\"\n\t\t\tINSERT INTO Room \n\t\t\t\t(RoomName, RoomAbbr, RoomDesc, IsApproved, BuildingID)\n\t\t\tVALUES \n\t\t\t\t(?, ?, ?, ?, (SELECT BuildingID FROM Building WHERE BuildingName = ?));\n\t\t\tSELECT LAST_INSERT_ID();\", $params);\n\t\t$newID = $this->db->query('SELECT LAST_INSERT_ID() AS id')->row()->id;\n\t\treturn $newID;\n\t}", "public function store(Request $request)\n {\n $loc = new Location();\n\n $loc->name = request('name');\n\n $loc->save();\n\n return redirect(\"/locations\")->with('success','State created successfully!');\n }", "public function run()\n {\n IpLocation::factory(3)->create();\n }", "public function testInsertInvalidLocation() {\n\t\t// create a Location with a non null location id and watch it fail\n\t\t$location = new Location(RootsTableTest::INVALID_KEY, $this->profile->getProfileId(), $this->payAttention, $this->sinCity, $this->granjalada, $this->stateOfMind, $this->warZone, $this->aptTwo, $this->whatHood);\n\t\t$location->insert($this->getPDO());\n\t}", "public function create()\n {\n return view('admin.street.create');\n }", "public function actionCreate()\n {\n $model = new Position();\n $model->loadDefaultValues();\n if (strpos(Yii::$app->request->referrer, 'structure') !== false) {\n $referrer = Yii::$app->request->referrer;\n } else {\n $referrer = null;\n }\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n if (!empty(Yii::$app->request->post('referrer'))) {\n $referrer = explode('?',Yii::$app->request->post('referrer'));\n return $this->redirect([$referrer[0].'?id=position-'.$model->id]);\n }\n\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'referrer' => $referrer,\n ]);\n }\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'code' => 'required|unique:locations,code',\n ]);\n\n $geometry = explode(',', rtrim(substr($request->input('geometry'),1),')'));\n // dd(floatval($geometry[0]));\n $location = new Location();\n $location->name = $request->input('name');\n $location->code = $request->input('code');\n $location->place_id = $request->input('place_id');\n $location->lat = floatval($geometry[1]);\n $location->lng = floatval($geometry[0]);\n if($request->input('parent') == NULL){\n $location->parent = 0;\n }else\n {\n $location->parent = $request->input('parent');\n }\n $location->save();\n\n\n return redirect()->route('locations.index')\n ->with('success','Location created successfully');\n }", "public function createOrUpdate(StoreLocationRequest $request)\r\n {\r\n if ($request->has('id') && $request->has('update')) {\r\n return $this->update($request);\r\n }\r\n\r\n return $this->create($request);\r\n }", "function addLocation($location_details){\n\t if ($this->db->insert('pofloc',$location_details))\n\t\t\t{ \n\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\treturn FALSE;\n\t\t\t}\n }", "public function create()\n {\n $users = User::all();\n\n return view('locations.create', compact('users'));\n }", "public function create()\n {\n if(Auth::user()) {\n return redirect('/');\n }\n\n $locations = Location::all(); //busca todos os países na base de dados locations\n return view('users.create', compact('locations', $locations));\n }", "public function store(Request $request)\n {\n //\n $this->validate($request, [\n 'name' => 'required|unique:organizations,name',\n 'organization' => 'required|numeric',\n 'description' => 'required',\n ]);\n\n $location = Location::create([\n 'name' => $request->input('name'),\n 'organization_id' => $request->input('organization'),\n 'description' => $request->input('description'),\n ]);\n\n return redirect()->route('locations.index')->with('success', \"The Location <strong>$location->name</strong> has successfully been created.\");\n \n }", "public function __construct($location, $name, $type)\n {\n }", "public function __construct($location, $name, $type)\n {\n }", "public function __construct($location, $name, $type)\n {\n }", "public function __construct($location, $name, $type)\n {\n }", "public function create()\n {\n //\n return view('admin.maps.create');\n }", "function createPlace($workflowId, $placeDatas);", "function setLocation($location);", "public function store()\n\t{\n\t\t/*$districtName = Input::get('district_name');\n\t\t$locationName = Input::get('location_name');*/\n\n\t\t$rules = array('district_name' => 'required',\n\t\t\t\t\t 'location_name' => 'required');\n\t\t$validator = Validator::make(Input::all(),$rules);\n\t\tif($validator->fails()){\n\t\t\treturn Redirect::to('admin/location')->withErrors($validator)->withInput(Input::all());\n\t\t}else{\n\t\t\t$this->location->add(Input::all(),$rules);\n\t\t\tSession::flash('message','Location Created Successfuly');\n\t\t\treturn Redirect::to('admin/location/');\n\t\t}\n\t}", "public function testInsertValidLocation() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"location\");\n\n\t\t// create a new Location and insert to into mySQL\n\t\t$location = new Location(null, $this->profile->getProfileId(), $this->payAttention, $this->sinCity, $this->granjalada, $this->stateOfMind, $this->warZone, $this->aptTwo, $this->whatHood);\n\t\t$location->insert($this->getPDO());\n\n// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoLocation = Location::getLocationByLocationId($this->getPDO(), $location->getLocationId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"location\"));\n\t\t$this->assertEquals($pdoLocation->getLocationProfileId(), $this->profile->getProfileId());\n\t\t$this->assertEquals($pdoLocation->getLocationAttention(), $this->payAttention);\n\t\t$this->assertEquals($pdoLocation->getLocationCity(), $this->sinCity);\n\t\t$this->assertEquals($pdoLocation->getLocationName(), $this->granjalada);\n\t\t$this->assertEquals($pdoLocation->getLocationState(), $this->stateOfMind);\n\t\t$this->assertEquals($pdoLocation->getLocationStreetOne(), $this->warZone);\n\t\t$this->assertEquals($pdoLocation->getLocationStreetTwo(), $this->aptTwo);\n\t\t$this->assertEquals($pdoLocation->getLocationZipCode(), $this->whatHood);\n\t}", "public function createAction()\n {\n if(!parent::isValidRequest(new UrlValidation())) {\n return parent::redirect('url/new');\n }\n \n try {\n $address = trim($this->request->get('address'));\n\n $existingUrl = Url::findFirst(array(\n 'conditions' => 'address = ?0',\n 'bind' => array($address)\n )\n );\n \n if($existingUrl) {\n $this->flash->notice('Url address allready exists.');\n return parent::redirect('url/new');\n \n } else {\n $url = new Url;\n $url->address = $address;\n $url->save();\n\n $this->flash->success('Url created succesfully.');\n }\n \n } catch (Exception $ex) {\n $this->flash->error('An error occured when trying to create the new url.'); \n }\n\n return parent::redirect('url');\n \n #$this->view->disable();\n }", "public function testLocationCreationMissingRoom()\n {\n $user = User::all()->random();\n\n $this->actingAs($user, 'api')\n ->post(\"api/location\", [\n 'branch' => 'Twofold Asperger-Academy',\n ]);\n $this->seeStatusCode(422);\n }", "public function create()\n {\n $user_id = auth()->user()->id;\n $locations = Location::where('user_id', '=', $user_id)->get();\n //send locations to the view, so we can display them in the dropdown\n return view('halls.create')->with('locations', $locations);\n\n }", "public function create()\n {\n return view('admin.location.createcountry');\n }", "public function create()\n {\n //\n return view(\"places.create\");\n }", "public function create()\n {\n $data['places'] = Place::lists('name', 'id');\n\n return $this->makeResponse(null, 'admin.mapRoutes.create', $data);\n }", "public function store(RequestsProductLocation $request)\n {\n $location = $request->all();\n $pro_no = $this->productLocation->createLocation($location);\n return redirect('export/locations/search?pro_no=' . $pro_no)->with('message', 'Created location');\n }", "public function store(CreatePositionRequest $request)\n {\n $this->position->create($request->all());\n\n return redirect()->route('admin.hr.position.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('hr::positions.title.positions')]));\n }", "private function _sendLocationCreateEmail ($location, $data)\n {\n $subject = \"Location #\" . $location->id . ' ( ' . $data['name'] . ' ) was added from API';\n $msg = <<<TEXT\n<div>\n Location {$location->id} was just added/modified on the\n MDM using the API with the following info:\n</div>\n<ul>\n <li>Location Name: {$data['name']}</li> \n <li>Address : {$data['address1']}</li> \n <li>City : {$data['city']}</li> \n <li>Country : {$data['country']}</li>\n <li>ZipCode : {$data['zipcode']}</li>\n</ul>\nTEXT;\n EmailQueueComponent::queueEmail('[email protected]', 'Info', '[email protected]', 'AM', $subject, $msg);\n }", "public function store(Request $request)\n {\n $request->validate([\n 'name'=>'required' \n ]);\n\n $location = new Location([\n 'name' => $request->get('name') \n ]);\n $location->save();\n return redirect('/locations')->with('success', 'Location saved!');\n }", "public function creating(ProgramLocation $model)\n {\n # Set Current User as Creator\n $model->setAttribute('creator', $model->getAttribute('creator') ?: $this->getUserId() );\n # set Initial Status\n $model->setAttribute('progression_status_id', $model->getAttribute('progression_status_id') ?: $this->initialState );\n # check if there are any other addresses in owner and if so, current is not primary\n $this->setPrimaryFlag($model, $model->program->programLocations()->get()->isEmpty() );\n # Set the FB Max per person\n $this->setFbMax($model);\n # Replicate Contact information into Model\n $this->populateContactInformation($model);\n }", "public function store(CreateRoadPointRequest $request)\n\t{\n\n $data = $request->all();\n unset($data['translations']);\n\t\t$roadpoint = RoadPoint::create($data);\n\n $this->createRoadPointTranslations($request, $roadpoint);\n\n\t\treturn redirect()->route(config('quickadmin.route').'.roadpoint.index');\n\t}", "public function testPointCreateRouteAuth()\n {\n $response = $this\n ->actingAs($this->user)\n ->get('/city/' . $this->city->id . '/point/create');\n $response\n ->assertStatus(200)\n ->assertViewHas('city');\n }", "public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required|string|max:100',\n 'province' => 'required|string|max:100',\n 'city' => 'required|string|max:100',\n 'address' => 'required|string',\n ]);\n $locations = Locations::create([\n 'name' => $request['name'],\n 'province' => $request['province'],\n 'city' => $request['city'],\n 'address' => $request['address'],\n ]);\n\n return redirect('admin/locations');\n }", "public function create()\n {\n return view('createplace');\n }", "public function create()\n {\n $g_languages = Language::where('is_public', 1)->get();\n\n return view('admin.locations.create', compact(\n 'g_languages'\n ));\n }", "public function store(Request $request)\n {\n $lat = $request->input('lat');\n $lon = $request->input('lon');\n $address = $request->input('address');\n $name = $request->input('name');\n $description = $request->input('description');\n $udid = $request->input('udid');\n\n $location = new Location();\n $location->lat = $lat;\n $location->lon = $lon;\n $location->name = $name;\n $location->address = $address;\n $location->description = $description;\n $location->udid = $udid;\n $location->save();\n\n if ($request->hasFile('image')) {\n $path = public_path() . DIRECTORY_SEPARATOR . 'location_images' . DIRECTORY_SEPARATOR . $location->id;\n if (!file_exists($path)) {\n mkdir($path);\n }\n $request->file('image')->move($path, 'image.jpg');\n }\n\n }", "public function create()\n {\n $locations =DB::table('locations')->get();\n return view('users.create',compact('locations'));\n }", "public function store(Request $request)\n {\n\n $validator = Validator::make($request->all(), [\n 'name' => 'required|max:50',\n 'description' => 'required|max:2000',\n 'address' => 'required',\n 'working_hours' => 'required'\n ]);\n\n if ($validator->fails()) {\n return back()->withErrors($validator)->withInput();\n }\n\n $location = Location::create($request->except(['_token','_method']));\n\n return redirect()->route('locations.show',['location' => $location]);\n }", "public function setLocation(string $location): void;", "public function createDefault($id = 0) {\n\t $x =UserLocation::model()->findByAttributes(array('user_id'=>$id));\n if ($x === null) {\n $ul = new UserLocation();\n $ul->neighborhood_id = 0; // default\n $ul->user_id = $id;\n $ul->gps = new CDbExpression(\"GeomFromText('Point(0 0)')\"); // default\n $ul->address ='';\n $ul->address_ext =''; \n $ul->save();\n } \n }", "public function store(CreaterouteRequest $request)\n {\n $input = $request->all();\n\n $route = $this->routeRepository->create($input);\n\n Flash::success('Route saved successfully.');\n\n return redirect(route('routes.index'));\n }", "public function create()\n {\n\n //create a new, empty site\n\n $newSiteID = $this->sitemodel->createNew();\n\n redirect('sites/' . $newSiteID);\n }", "public function create(){\nreturn view('location.create');\n\n }", "public function testLocationCreationMissingBranch()\n {\n $user = User::all()->random();\n\n $this->actingAs($user, 'api')\n ->post(\"api/location\", [\n 'room' => '431',\n ]);\n $this->seeStatusCode(422);\n }", "public function saveLocationAction()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t$user = Application_Model_User::getAuth();\r\n\r\n\t\t\tif ($user == null)\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('You are not authorized to access this action');\r\n\t\t\t}\r\n\r\n\t\t\t$id = $this->_request->getParam('id');\r\n\r\n\t\t\tif (!v::intVal()->validate($id))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('Incorrect post ID value: ' .\r\n\t\t\t\t\tvar_export($id, true));\r\n\t\t\t}\r\n\r\n\t\t\tif (!Application_Model_News::checkId($id, $post, ['join'=>false]))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('Incorrect post ID: ' .\r\n\t\t\t\t\tvar_export($id, true));\r\n\t\t\t}\r\n\r\n\t\t\tif (!Application_Model_News::canEdit($post, $user))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('You are not authorized to access this action');\r\n\t\t\t}\r\n\r\n\t\t\t$addressForm = new Application_Form_Address;\r\n\r\n\t\t\tif (!$addressForm->isValid($this->_request->getPost()))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException(My_Form::outputErrors($addressForm));\r\n\t\t\t}\r\n\r\n\t\t\t$data = $addressForm->getValues();\r\n\t\t\t$db = Zend_Db_Table::getDefaultAdapter();\r\n\t\t\t$db->update('address', $data, 'id=' . $post['address_id']);\r\n\r\n\t\t\t$response = [\r\n\t\t\t\t'status' => 1,\r\n\t\t\t\t'address' => Application_Model_Address::format($data)\r\n\t\t\t];\r\n\t\t}\r\n\t\tcatch (Exception $e)\r\n\t\t{\r\n\t\t\tMy_Log::exception($e);\r\n\t\t\t$response = [\r\n\t\t\t\t'status' => 0,\r\n\t\t\t\t'message' => $e instanceof RuntimeException ? $e->getMessage() :\r\n\t\t\t\t\t'Internal Server Error'\r\n\t\t\t];\r\n\t\t}\r\n\r\n\t\t$this->_helper->json($response);\r\n\t}", "public function store(Request $request)\n {\n $location = $this->sLocation->store($request->all());\n if ($location) {\n return $this->respondData('Location created', $location);\n }\n return $this->respondWithErrors(500, 'Error creating the location');\n }", "public function store(Request $request, Location $location)\n {\n $owner_id = auth()->user()->id;\n $company_id = CarCompany::where('owner_id', '=', $owner_id)->first()->id;\n\n $validatedData = $request->validate([\n 'location' => 'required|string',\n ]);\n\n $values = [\n 'location' => $request->input('location'),\n 'company_id' => $company_id\n ];\n $location->insert($values);\n\n return redirect()->back()->with('alert', 'Added successfully');\n }", "public function create()\n {\n $title = \"Office Address\";\n $data = compact('title');\n return view('admin_panel.address_create', $data);\n }", "public function getCreateLocationType()\n {\n return view('admin.world_expansion.create_edit_location_type', [\n 'type' => new LocationType\n ]);\n }", "public function test_create_position()\n {\n $salario = 950000;\n $impuesto = 0.08;\n $salud = 0.08;\n $pension= 0.08;\n $valor_primas = 0.02;\n $cargo = \"Desarrollador\";\n\n $this->visit(route('position.create'))\n ->type($salario, 'salario')\n ->type($impuesto, 'impuesto')\n ->type($salud, 'salud')\n ->type($pension, 'pension')\n ->type($valor_primas, 'valor_primas')\n ->type($cargo, 'cargo')\n ->press('Crear');\n\n $this->seeInDatabase('employees_salaries',[\n 'salario' => $salario,\n 'impuesto' => $impuesto,\n 'salud' => $salud,\n 'pension'=> $pension,\n 'valor_primas' => $valor_primas,\n 'cargo' => $cargo\n ]);\n }" ]
[ "0.7225131", "0.68196535", "0.6803153", "0.66719896", "0.6594091", "0.6589314", "0.65539926", "0.65479827", "0.6530749", "0.65188015", "0.65174556", "0.6502356", "0.6485227", "0.6358239", "0.6358239", "0.6358239", "0.6349178", "0.63370407", "0.633408", "0.6273726", "0.62636036", "0.6260299", "0.6258306", "0.6255923", "0.6235939", "0.62113196", "0.6193004", "0.6180359", "0.6159425", "0.6154477", "0.6151004", "0.60952854", "0.6046313", "0.6038671", "0.60380626", "0.6019734", "0.6017322", "0.5990207", "0.5954098", "0.5922799", "0.5912014", "0.59021646", "0.58983856", "0.58872277", "0.5874288", "0.5873521", "0.5868657", "0.5867275", "0.585915", "0.58507496", "0.58204395", "0.5802811", "0.5791193", "0.5790644", "0.5781197", "0.57681495", "0.5759208", "0.5757573", "0.57459694", "0.5726362", "0.5725529", "0.57229865", "0.5720959", "0.5720959", "0.57199776", "0.57194793", "0.5717803", "0.57136935", "0.57125455", "0.5711821", "0.5708792", "0.56895685", "0.568902", "0.56872535", "0.5666724", "0.5650597", "0.56419224", "0.56032234", "0.5594336", "0.5594033", "0.55843127", "0.5581504", "0.55771416", "0.5573639", "0.5573466", "0.55657893", "0.5558196", "0.5552228", "0.5546105", "0.55454725", "0.552288", "0.5522178", "0.55212957", "0.55143994", "0.5508841", "0.5508316", "0.5506288", "0.5500099", "0.5489106", "0.5486674", "0.5472259" ]
0.0
-1
Create a new message instance.
public function __construct(Customers $customer) { $this->customer = $customer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createMessage()\n {\n $message = new Message(new Swift_Message);\n\n\n // If a global from address has been specified we will set it on every message\n // instances so the developer does not have to repeat themselves every time\n // they create a new message. We will just go ahead and push the address.\n if (isset($this->from['address'])) {\n $message->from($this->from['address'], $this->from['name']);\n }\n\n return $message;\n }", "protected function createMessage() {\n $config = $this->messageConfig;\n if (!array_key_exists('class', $config)) {\n $config['class'] = $this->messageClass;\n }\n $config['smser'] = $this;\n return Yii::createObject($config);\n }", "protected static function newMessage()\n {\n self::$message = \\Swift_Message::newInstance();\n }", "public function create()\n {\n //\n $this->message->sendMessage();\n }", "private function newMessage()\n {\n /* @var $config ModuleOptions */\n $config = $this->serviceLocator->get('EscoMail\\Options');\n\n $this->message = new Message();\n $this->message->setFrom($config->getMailSendFrom(), $config->getMailSendFromName());\n\n return $this->message;\n }", "protected function createMessage()\n\t{\n\t\t$config = $this->messageConfig;\n\t\tif (!array_key_exists('class', $config)) {\n\t\t\t$config['class'] = $this->messageClass;\n\t\t}\n\t\t$config['mailer'] = $this;\n\n\t\treturn Yii::createObject($config);\n\t}", "public function createMessage(): MessageInterface;", "public function create(string $message = ''): BusMessageInterface;", "public function createInstance()\n {\n $mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)\n ->getMessage();\n\n return $mock->new();\n }", "public static function createInstance()\n {\n return new MailMessage('[email protected]');\n }", "public static function init( $_id )\n {\n $message = new Message();\n $message->get( $_id );\n return $message;\n }", "public function createMessage(string $typeName): MessageInterface;", "public function createMailMessage();", "static public function factory($messageType = 3) {\n\t\treturn new self($messageType);\n\t}", "public function createMessage(array $parameters = []);", "public function user_message_create() {\n\t\t$this->onDebug ( __METHOD__, 1 );\n\t\tif ($this->valide_userid () == false) {\n\t\t\treturn $this;\n\t\t}\n\t\t$message_created = $this->getObjetO365Wsclient ()\n\t\t\t->jsonPostMethod ( '/users/' . $this->getUserId () . '/messages', $this->getEmailContent () );\n\t\t$this->onDebug ( $message_created, 2 );\n\t\tif (isset ( $message_created->id ) && ! empty ( $message_created->id )) {\n\t\t\treturn $this->setO356MessageRef ( $message_created )\n\t\t\t\t->setMessageId ( $message_created->id );\n\t\t}\n\t\treturn $this->onError ( 'Pas d\\'ID durant la creation du message de O365', $message_created, 1 );\n\t}", "private function newMessage(array $data)\n {\n\n $message = Message::create([\n 'channel_id' => $data['channel_id'],\n 'user_id' => Auth::guard()->user()->id,\n 'message' => $data['message']\n ]);\n if ($message) {\n $this->notifyChannelUsers($data['channel_id']);\n }\n return $message;\n }", "public function initMessage() {}", "public function __construct(Message $message)\n {\n $this->message = $message;\n }", "public function __construct(Message $message)\n {\n $this->message = $message;\n }", "public function __construct(Message $message)\n {\n $this->message = $message;\n }", "public function __construct(Message $message)\n {\n $this->message = $message;\n }", "public function __construct(Message $message)\n {\n $this->message = $message;\n }", "private function createMessageObject(string $type, string $message): Notification\n {\n $msg = new Notification();\n\n $msg->setType($type);\n $msg->setMessage($message);\n\n $this->handler->add($msg);\n\n return $msg;\n }", "protected static function newFactory()\n {\n return MessageFactory::new();\n }", "public function message(mixed $data = null)\n {\n $message = new Message((string) $data);\n\n return $message;\n }", "public static function createFromString($raw)\n {\n $message = new self(array('raw' => $raw));\n return $message;\n }", "public static function create(string $text = null): GoogleChatMessage\n {\n $message = new static;\n\n if ($text) {\n $message->text($text);\n }\n\n return $message;\n }", "public function create() {\n\t\t$user = $this->current_user();\n\t\t$message = $this->discussion->create_message($this->message_data() + ['creator' => ['id' => $user->_id, 'name' => $user->name]]);\n\n\t\tif ($this->discussion->push_message($message)) {\n\t\t\treturn $this->redirect(['Discussions::show', 'id' => $this->discussion->_id, 'project_id' => $this->discussion->project_id]);\n\t\t}\n\n\t\treturn compact('message');\n\t}", "public static function createFromArray($fields) \n\t{\n\t\t$message = new Message();\n\t\tself::populate($message,$fields);\n\t\treturn $message;\n\t}", "public function addMessage()\n {\n if(null === $this->obj_message) {\n $this->obj_message = new Message();\n }\n return $this->obj_message;\n }", "public function createMimeMessage();", "public function testCreateMethodReturnsNewInstance(): void\n {\n $message = DiscordMessage::create();\n $this->assertInstanceOf(DiscordMessage::class, $message);\n }", "function createMessage($email) {\n $message = new Google_Service_Gmail_Message();\n $message->setRaw(base64_encode($email));\n return $message;\n}", "protected function createMessage(Swift_Message $message)\n {\n $mimeEntity = new Swift_Message('', $message->getBody(), $message->getContentType(), $message->getCharset());\n $mimeEntity->setChildren($message->getChildren());\n\n $messageHeaders = $mimeEntity->getHeaders();\n $messageHeaders->remove('Message-ID');\n $messageHeaders->remove('Date');\n $messageHeaders->remove('Subject');\n $messageHeaders->remove('MIME-Version');\n $messageHeaders->remove('To');\n $messageHeaders->remove('From');\n\n return $mimeEntity;\n }", "public function __construct($message)\n {\n // $this->message = $message;\n }", "function createMessage($object) {\n\tglobal $USER;\n\t\n\t$message = new \\core\\message\\message();\n\t$message->component = 'local_littlehelpers';\n\t$message->name = 'paragraph52notification';\n\t$message->userfrom = $USER;\n\t\n\t// Get user\n\t$message->userto = core_user::get_user($object->useridto);\n\t\n\t// force email sending\n\t$message->userto->emailstop = 0;\n\t\n\t$message->subject = $object->subject;\n\t$message->fullmessage = $object->fullmessage;\n\t$message->fullmessageformat = FORMAT_MARKDOWN;\n\t$message->fullmessagehtml = $object->fullmessagehtml;\n\t$message->smallmessage = $object->smallmessage;\n\t$message->notification = '0';\n\t\n\t$message->contexturl = 'https://moodle.tu-darmstadt.de/local/littlehelpers/paragraph52';\n\t$message->contexturlname = 'Paragraph52';\n\t$message->replyto = \"[email protected]\";\n\n\treturn $message;\n}", "public function __construct($message)\r\n {\r\n $this->message = $message;\r\n\r\n }", "public function createMessage($content, $options = array('content_type' => 'application/json', 'delivery_mode' => 2))\n {\n if (!empty($options['content_type']) && $options['content_type'] == 'application/json')\n $content = json_encode($content);\n return new AMQPMessage($content, $options);\n }", "public function __construct($message) {\n $this->message= $message;\n }", "public function __construct($msg)\n {\n $this->message = $msg;\n }", "public function __construct(Message $message)\n {\n parent::__construct($message);\n }", "public function __construct($messageDefinition)\n {\n $this->messageDefintion = $messageDefinition;\n }", "public function testCreateMessage()\n {\n $config = new Configuration();\n// $config->setHost(\"http://127.0.0.1:8080\");\n $apiInstance = new DaDaPushMessageApi(\n // If you want use custom http client, pass your client which implements `GuzzleHttp\\ClientInterface`.\n // This is optional, `GuzzleHttp\\Client` will be used as default.\n new \\GuzzleHttp\\Client(),\n $config\n );\n\n $actions = [\n new Action($data = array(\"name\" => \"view\", \"url\" => \"https://www.dadapush.com/\", \"type\" => \"link\"))\n ];\n\n $body = new MessagePushRequest($data = array(\"title\" => \"Good News!\",\n \"content\" => \"Good News! DaDaPush releasing new version\",\n \"need_push\" => true,\n \"actions\" => $actions\n ));\n\n $channel_token = 'ctb3lwO6AeiZOwqZgp8BE8980FdNgp0cp6MCf';\n\n $result = $apiInstance->createMessage($body, $channel_token);\n print_r($result);\n self::assertTrue($result->getCode()==0);\n }", "public static function create( $msg, $code = null, array $data = null ) {\n\t\tif ( $msg instanceof IApiMessage ) {\n\t\t\treturn $msg;\n\t\t} elseif ( $msg instanceof RawMessage ) {\n\t\t\treturn new ApiRawMessage( $msg, $code, $data );\n\t\t} else {\n\t\t\treturn new ApiMessage( $msg, $code, $data );\n\t\t}\n\t}", "public static function create($message, $type = '', $title = '', $icon = '')\n {\n return new self($message, $type, $title, $icon);\n }", "public function newEntity(array $attributes = [])\n {\n return new MessageContent($attributes);\n }", "public function create()\n {\n return view('materialadmin::message.create');\n }", "public static function factory($raw_message = null, $class_name = null) {}", "public function __construct($message = null) {}", "public function __construct($message)\n {\n $this->message = $message;\n }", "public function __construct($message)\n {\n $this->message = $message;\n }", "public function __construct($message)\n {\n $this->message = $message;\n }", "public function __construct($message)\n {\n $this->message = $message;\n }", "public function __construct($message)\n {\n $this->message = $message;\n }", "public function __construct($message)\n {\n $this->message = $message;\n }", "public static function createFromFile($filename)\n {\n $message = new self(array('file' => $filename));\n\n return $message;\n }", "public function create()\n\t{\n\t\treturn View::make('messages.create');\n\t}", "public function actionCreate()\n {\n $model = new Message();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "private function createMessage(InputInterface $input)\n {\n $message = new \\Swift_Message(\n $input->getOption('subject'),\n $input->getOption('body'),\n $input->getOption('content-type'),\n $input->getOption('charset')\n );\n $message->setFrom($input->getOption('from'));\n $message->setTo($input->getOption('to'));\n\n return $message;\n }", "public function test_message_can_be_created() {\n\n $this->assertInstanceOf(Message::class, $this->message);\n $this->assertDatabaseHasMessageWithPublicId($this->message->getPublicId());\n\n }", "protected function getMessage()\n {\n //return new \\Swift_Message('Test subject', 'Test body.');\n }", "public function testConstructorAndGetters() \r\n \t{\r\n \t\t// create a message with complete constructor args\r\n \t\t$message = new Message( Message::NORMAL, \r\n \t\t\t\t\t\t\t\t(object)array( 'testProp' => 'testval' ),\r\n \t\t\t\t\t\t\t\tsimplexml_load_string('<testMessage testAtt=\"Hello\" testAtt2=\"world\"/>'),\r\n \t\t\t\t\t\t\t\tMessage::PRIORITY_HIGH);\r\n \t\t\r\n \t\t// test assertions\r\n \t\t$this->assertTrue( $message instanceof Message, \"Expecting \\$message is Message\" );\r\n \t\t$this->assertTrue( $message->getType() == Message::NORMAL, \"Expecting \\$message->getType() == Message::NORMAL\" );\r\n \t\t$this->assertTrue( $message->getHeader()->testProp == 'testval', \"Expecting \\$message->getHeader()->testProp == 'testval'\" );\r\n \t\t$this->assertTrue( $message->getBody()->attributes()->testAtt == 'Hello', \"Expecting \\$message->getBody()->attributes()->testAtt == 'Hello'\" );\r\n \t\t$this->assertTrue( $message->getPriority() == Message::PRIORITY_HIGH, \"Expecting \\$message->getPriority() == Message::PRIORITY_HIGH\" );\r\n \t\t\r\n \t}", "public function __construct($data)\n {\n $this->message = $data;\n }", "public function __construct($data)\n {\n $this->message = $data;\n }", "public static function getInstance($messageClass = '\\PEIP\\Message\\GenericMessage')\n {\n return new self($messageClass);\n }", "public function __construct(NewMessageEvent $event)\n {\n $this->event = $event;\n }", "public static function createFromFile(string $path) : CommitMessage\n {\n if (!file_exists($path)) {\n throw new \\RuntimeException('Commit message file not found');\n }\n return new CommitMessage(file_get_contents($path));\n }", "public function testCreateWithoutId()\n {\n $faker = Factory::create();\n $messageAttributes = [\n 'body' => $faker->sentence(15),\n 'subject' => $faker->sentence(5),\n 'name' => $faker->name(),\n 'email' => $faker->email(),\n 'custom_info' => $faker->sentence(3)\n\n ];\n $response = $this->client->messages()->create($messageAttributes);\n $this->assertEquals($messageAttributes['body'], $response['message']['body']);\n $this->assertEquals($messageAttributes['subject'], $response['message']['subject']);\n\n return $response;\n }", "public function create(Message $message): void\n {\n $this->items[$message->getEventName()][$message->getId()] = $message;\n }", "public function __construct($message, $type)\n\t{\n\t\t$this->message = $message;\n\t\t$this->type = $type;\n\t}", "public function __construct(MimeMessage $message = null) {\n $this->htmlBody = new MimePart();\n $this->htmlBody->type = Mime::TYPE_HTML;\n $this->htmlBody->charset = 'utf-8';\n $this->htmlBody->encoding = Mime::ENCODING_QUOTEDPRINTABLE;\n\n $this->textBody = new MimePart();\n $this->textBody->type = Mime::TYPE_TEXT;\n $this->textBody->charset = 'utf-8';\n $this->textBody->encoding = Mime::ENCODING_QUOTEDPRINTABLE;\n }", "public function create(){}", "public function actionCreate() {\n if (isset($_POST['Message'])) {\n $resp = array(\n 'color' => '#FF6600',\n 'background_color' => '#FFFFCC',\n 'position' => 'top',\n 'removebutton' => 0,\n 'translation' => $_POST['Message']['translation']\n );\n $model = new Message();\n $model->setAttributes($_POST['Message']);\n if ($model->save()) {\n $resp['message'] = Yii::t('translate', 'Message successfully saved');\n $resp['id'] = $model->id;\n } else {\n $errors = $this->errors($model);\n $resp['message'] = Yii::t('translate', '<p>Unable to save the message. Something went wrong!<p/>' . implode('<br/>', $errors));\n }\n echo $this->je($resp);\n Yii::app()->end();\n }\n $id = (int)Yii::app()->request->getParam('id');\n $lang = Yii::app()->request->getParam('lang');\n if ($id && $lang) {\n $model = MessageSource::model()->findByPk($id);\n if ($model) {\n $message = $model->loadMessage();\n $message->id = $model->id;\n $message->language = $lang;\n $this->renderPartial('form', array(\n 'model' => $message\n ));\n } else throw new CHttpException(400);\n } else throw new CHttpException(404, 'The requested page does not exist.');\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "protected static function newFactory(): Factory\n {\n return MessageFactory::new();\n }", "public function __construct(string $message)\n {\n $this->message = $message;\n }", "public function create()\n {\n return view('message');\n }", "public function newAction()\n {\n $entity = new Message();\n $form = $this->createForm(new MessageType(), $entity);\n\n return $this->render('CoreMarketingBundle:Message:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "protected function createDocument(\\TYPO3\\Jobqueue\\Common\\Queue\\Message $message) {\n\t\t$properties = ObjectAccess::getGettableProperties($message);\n\t\t$messageDocument = new Message($message->getPayload(), $message->getIdentifier());\n\n\t\tforeach ($properties as $propertyName => $propertyValue) {\n\t\t\tObjectAccess::setProperty($messageDocument, $propertyName, $propertyValue);\n\t\t}\n\n\t\treturn $messageDocument;\n\t}", "public function __construct($message = '', $type = 'info') {\n $this->message = $message;\n }", "protected function render(): Message\n {\n $headers = '';\n foreach ($this->buildHeaders() as $header => $value) {\n $headers .= \"{$header}: {$value}\" . self::CRLF;\n }\n $message = implode(self::CRLF, $this->buildMessage());\n\n return new Message($headers, $message);\n }", "public function create()\n\t{\n\t\t$form = \\View::make('message.form');\n\t\t$form->project_id = \\Session::get('active_project');\n\t\t$form->action = array('action' => 'Toomdrix\\Pm\\MessageController@store', 'class'=>'form-signup');\n\t\treturn $form;\n\t}", "public static function getInstance($context=null) {\n return new Messages($context);\n }", "public function create_post() {\n\t\t$data['uid'] = $this->input->get('uid');\n\t\t$data['to'] = $this->input->get('to');\n\t\t$data['text'] = $this->input->get('text');\n\t\t$data['ts'] = now();\n\n\t\t$this->Messages_model->create($data);\n\t}", "public function getGeneratedMessage()\n {\n # Force the template to render\n (string) $this->prepareTemplate();\n\n $m = $this->template->__message;\n\n if (!$m->getFrom()) {\n trigger_error(\"You should add 'from' information.\", E_USER_WARNING);\n }\n\n if (!$m->getSubject()) {\n trigger_error(\"You should add 'subject'.\", E_USER_WARNING);\n }\n\n if (!$m->getHeader('To')) {\n trigger_error(\"You should add recipients.\", E_USER_WARNING);\n }\n\n foreach ($this->attachments as $attachment) {\n list($filename, $content, $type) = $attachment;\n $m->addAttachment($filename, $content, $type);\n }\n\n return $m;\n }", "public function __construct($message='1111222333',$type='2222')\n {\n $this->type = $type;\n $this->message = $message;\n }", "public static function new()\n {\n if ( ! empty($_REQUEST['mgb_rating_message']) ) Database::insert([\n 'message' => $_REQUEST['mgb_rating_message'],\n 'author' => self::author(),\n 'state' => (!json_decode($_REQUEST['mgb_rating_moderation'])) ? true : false\n ]);\n }", "public function create() {}", "public function compose() {\n return $this->createMessage();\n }", "public function create()\n {\n // die('here');\n return view('message.create');\n }", "public function create()\n {\n return view('messages.create');\n }", "public function create()\n {\n return view('messages.create');\n }", "public function actionCreate()\n {\n $model = new Message();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save())\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model\n ]);\n }\n }", "public static function getInstanceFromMessage(\\PEIP\\INF\\Message\\Message $message)\n {\n return new self(get_class($message));\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'body' => 'required|max:5000',\n 'user_id' => ['required', new NotSelfId(), 'exists:users,id'],\n ]);\n\n $message = Auth::user()->messages()->create([\n 'data' => [\n 'text' => request('body'),\n ],\n ]);\n\n Auth::user()->conversations()->attach($message, [\n 'contact_id' => $request->user_id,\n ]);\n\n if (!$this->isAuthUserBlockedToContact($request->user_id, Auth::user()->id)) {\n User::find($request->user_id)->conversations()->attach($message, [\n 'contact_id' => Auth::id(),\n ]);\n\n // broadcast the message to the other person\n event(new MessageCreated($message, $request->user_id, Auth::user()->id));\n }\n\n $message->owner = Auth::user();\n\n return new MessageResource($message);\n }", "public function create()\n {\n return view('admin.messages.create');\n }", "public function __construct($message) {\r\n parent::__construct($message);\r\n }", "public function __construct($messageData)\n {\n $this->messageData = $messageData;\n }" ]
[ "0.81376195", "0.7959614", "0.77619994", "0.7713793", "0.76559645", "0.7553059", "0.7458076", "0.71510184", "0.6852663", "0.68347865", "0.67154217", "0.6689976", "0.6683088", "0.6644564", "0.6628052", "0.6549025", "0.6514292", "0.6501647", "0.645071", "0.645071", "0.645071", "0.645071", "0.645071", "0.64457685", "0.63510966", "0.6340597", "0.633213", "0.6326836", "0.6310014", "0.6258695", "0.6234698", "0.62195796", "0.62077796", "0.620518", "0.6204953", "0.6198459", "0.6177945", "0.61717975", "0.617064", "0.6150332", "0.61301666", "0.6109668", "0.61057645", "0.60924155", "0.6081678", "0.60787344", "0.60670817", "0.6049224", "0.60457045", "0.60438704", "0.6036989", "0.6036989", "0.6036989", "0.6036989", "0.6036989", "0.6036989", "0.6026595", "0.6025895", "0.6022185", "0.6005734", "0.6002389", "0.6000802", "0.59941816", "0.59808266", "0.59808266", "0.59678143", "0.5966462", "0.59593695", "0.594777", "0.5938714", "0.5910345", "0.5893692", "0.5880708", "0.5878038", "0.58748907", "0.58748907", "0.58748907", "0.5873998", "0.5869665", "0.5864223", "0.5860705", "0.5858159", "0.5854505", "0.5845474", "0.5842933", "0.58327615", "0.58256036", "0.58199257", "0.58134514", "0.57909477", "0.5787155", "0.57835746", "0.5783115", "0.57801926", "0.57801926", "0.5779767", "0.57784975", "0.57596684", "0.5748547", "0.5746673", "0.57461363" ]
0.0
-1
Add all used primitevs to the scene
protected function preparePrimitives() { /* Primitive collections */ $this->aframeDomObj->appendEntities($this->childrens); /* Primitives which only one can be present */ (! $this->sky) ?: $this->aframeDomObj->appendEntity($this->sky); (! $this->videosphere) ?: $this->aframeDomObj->appendEntity($this->videosphere); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initAllPlugins()\n {\n $this->collAllPlugins = new ObjectCollection();\n $this->collAllPluginsPartial = true;\n\n $this->collAllPlugins->setModel('\\Plugins');\n }", "public function loadResources(): void {\n\t\t$sql = \"SELECT * FROM `npc_resource` WHERE `id_npc` = ?\";\n\t\t$this->db->query($sql, [$this->get('id')]);\n\t\t$resources = [];\n\t\twhile ($res = $this->db->next()) {\n\t\t\t$npc_resource = new NPCResource();\n\t\t\t$npc_resource->update($res);\n\t\t\t$npc_resource->loadResource($this->get('margin'));\n\n\t\t\tarray_push($resources, $npc_resource);\n\t\t}\n\t\t$this->setResources($resources);\n\t}", "function OnLoad()\n\t\t{\n\t\t\tfor ($j = 0; $j < $this->grid_h; $j++)\n\t\t\t{\n\t\t\t\tfor ($i = 0; $i < $this->grid_w; $i++)\n\t\t\t\t{\n\t\t\t\t\t$btn = new TButton();\n\t\t\t\t\t//$btn->Theme = $this->Theme;\n\t\t\t\t\t$btn->Name = 'btn_'.$i.'_'.$j;\n\t\t\t\t\t$btn->Left = 128 + $i * 32;\n\t\t\t\t\t$btn->Top = 16 + $j * 32;\n\t\t\t\t\t$btn->Width = 32;\n\t\t\t\t\t$btn->Height = 32;\n\t\t\t\t\t$btn->OnClick = 'MineButtonClick';\n\t\t\t\t\t$btn->Parent = $this;\n\t\t\t\t\t\n\t\t\t\t\t$shp = new TShape();\n\t\t\t\t\t$shp->Name = 'shp_'.$i.'_'.$j;\n\t\t\t\t\t$shp->Left = 128 + $i * 32;\n\t\t\t\t\t$shp->Top = 16 + $j * 32;\n\t\t\t\t\t$shp->Width = 32;\n\t\t\t\t\t$shp->Height = 32;\n\t\t\t\t\t$shp->BrushColor = 'silver';\n\t\t\t\t\t$shp->PenColor = 'gray';\n\t\t\t\t\t$shp->Shape = 'stRoundRect';\n\t\t\t\t\t$shp->Parent = $this;\n\t\t\t\t\t$shp->Style = 'font-weight: bold; font-size: 16px; padding-top: 8px; max-height: 24px;';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$this->Controls[$shp->Name] = $shp;\n\t\t\t\t\t$this->Controls[$btn->Name] = $btn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->NewGame();\n\t\t}", "public function addMetaboxes() {}", "public function AddToMemory()\n {\n // Progenitors are already in memory from previous run(s)\n for ($i=\\EP\\GA_PROGENITORS_SIZE; $i<count($this->population); $i++)\n {\n if ($this->IsInMemory($this->population[$i])) {\n if($this->output) print \"NOT adding to memory individual $i because it's already there.\\n\";\n continue;\n }\n $item = array(\"name\" => $this->names[$i], \"genome\" => $this->population[$i], \"fitness\" => $this->fitness[$i]);\n $this->memory[] = $item;\n }\n }", "function _prepareVertexTypes() {\n\t\t//Load Model of Relations\n\t\t$this->loadModel('VertexType');\n\t\t$this->VertexType = new VertexType();\n\t\t\n\t\t$this->VertexType->contain();\n\t\t$vertexTypes = $this->VertexType->find('list', array('conditions' => array('VertexType.deleted' => '0'), 'order' => 'VertexType.title'));\n\t\t$this->set(compact('vertexTypes',$vertexTypes));\n\t}", "public function initNarrationPlugins()\n {\n $this->collNarrationPlugins = new ObjectCollection();\n $this->collNarrationPluginsPartial = true;\n\n $this->collNarrationPlugins->setModel('\\Plugins');\n }", "function loadedChildren()\r\n {\r\n //Calls childrens loaded recursively\r\n reset($this->components->items);\r\n while (list($k,$v)=each($this->components->items))\r\n {\r\n $v->loaded();\r\n }\r\n }", "public function addParallaxBlock()\n {\n // We only add if it is not the VC Frontend\n if (isset($_GET['vc_action']) && 'vc_inline' == $_GET['vc_action']) {\n return;\n }\n // Include our SCSS Compiler class\n $this->render('parallax-block');\n }", "function add_core_data()\n {\n $pncore = array();\n $pncore['version_num'] = _PN_VERSION_NUM;\n $pncore['version_id'] = _PN_VERSION_ID;\n $pncore['version_sub'] = _PN_VERSION_SUB;\n $pncore['logged_in'] = pnUserLoggedIn();\n $pncore['language'] = pnUserGetLang();\n $pncore['themeinfo'] = pnThemeInfo(pnUserGetTheme());\n\n \tpnThemeLoad($pncore['themeinfo']['name']);\n\t\t$colors = array();\n $colors['bgcolor1'] = pnThemeGetVar('bgcolor1');\n $colors['bgcolor2'] = pnThemeGetVar('bgcolor2');\n $colors['bgcolor3'] = pnThemeGetVar('bgcolor3');\n $colors['bgcolor4'] = pnThemeGetVar('bgcolor4');\n $colors['bgcolor5'] = pnThemeGetVar('bgcolor5');\n $colors['sepcolor'] = pnThemeGetVar('sepcolor');\n $colors['textcolor1'] = pnThemeGetVar('textcolor1');\n $colors['textcolor2'] = pnThemeGetVar('textcolor2');\n\n // add userdata\n $pncore['user'] = pnUserGetVars(pnSessionGetVar('uid'));\n\n // add modvars of current module\n $pncore[$this->module] = pnModGetVar($this->module);\n\n // add mod vars of all modules supplied as parameter\n \tforeach (func_get_args() as $modulename) {\n\t // if the modulename is empty do nothing\n\t if(!empty($modulename) && !is_array($modulename) && ($modulename<>$this->module)) {\n // check if user wants to have /PNConfig\n if($modulename==_PN_CONFIG_MODULE) {\n $pnconfig = pnModGetVar(_PN_CONFIG_MODULE);\n foreach($pnconfig as $key => $value) {\n // unserialize all config vars\n \t\t $pncore['pnconfig'][$key] = @unserialize($value);\n }\n } else {\n $pncore[$modulename] = pnModGetVar($modulename);\n }\n }\n }\n\n $this->assign('pncore', $pncore);\n\t\t$this->assign($colors);\n return true;\n }", "public function start() {\n $active = $this->getActiveModules();\n foreach ($this->modules as $module) {\n if (in_array($module->id, $active)) {\n array_push($this->activeModuleObjects, $module);\n $module->start();\n }\n }\n }", "function beforeFilter() {\n parent::beforeFilter();\n \n $plugins = $this->loadAvailablePlugins('vetter');\n \n // Bind the models so Cake can magically pull associated data. Note this\n // will create associations with *all* vetter plugins, not just the one that\n // is actually associated with this VettingStep. Given that most\n // installations will only have a handful of vetters, that seems OK (vs\n // parsing the request data to figure out which type of Plugin we should\n // bind).\n \n foreach(array_values($plugins) as $plugin) {\n $this->VettingStep->bindModel(array('hasOne'\n => array($plugin\n => array('dependent' => true))),\n false);\n \n $this->edit_contains[] = $plugin;\n $this->view_contains[] = $plugin;\n }\n \n $this->set('plugins', $plugins);\n }", "public function loadPlugins()\n {\n try {\n $pluginModel = Plugin::model(); \n $records = $pluginModel->findAllByAttributes(array('active'=>1));\n \n foreach ($records as $record) {\n $this->loadPlugin($record->name, $record->id);\n }\n } catch (Exception $exc) {\n // Something went wrong, maybe no database was present so we load no plugins\n }\n\n $this->dispatchEvent(new PluginEvent('afterPluginLoad', $this)); // Alow plugins to do stuff after all plugins are loaded\n }", "public function use()\n\t{\n\t\tglUseProgram($this->id);\n\t}", "public function addAssets() {}", "public function addAssets() {}", "public function plugins_loaded() {\n\t\t/**\n\t\t * create metabox for make NPEN\n\t\t */\n\t\tadd_action( 'add_meta_boxes', array( $this, 'wc_order_NP_meta_box_add' ) );\n\t}", "public function run(){\n\t\t$professional = Professional::find(8);\n\n\t\t$platformsArr = array(1, 2, 3, 4);\n\t\t$creativeFieldsArr = array(3);\n\t\t$clientFocusesArr = array(1, 2, 3);\n\t\t$specializationsArr = array(1, 2, 6, 8, 12, 14);\n\n\t\t$professional -> platforms() -> attach($platformsArr);\n\t\t$professional -> creativeFields() -> attach($creativeFieldsArr);\n\t\t$professional -> clientFocuses() -> attach($clientFocusesArr);\n\t\t$professional -> specializations() -> attach($specializationsArr);\n\t}", "public function run()\n {\n Provincia::create([\n 'nombre' => 'Misiones'\n ]);\n\n Provincia::create([\n 'nombre' => 'Corrientes'\n ]);\n\n Provincia::create([\n 'nombre' => 'Entre Rios'\n ]);\n }", "public function load_products() {\n\t\t$this->get_products_posts();\n\t\tif ( $this->posts !== null ) {\n\t\t\tforeach ( $this->posts as $ps_post ) {\n\t\t\t\t$this->add( new ShowcaseProduct( $ps_post ) );\n\t\t\t}\n\t\t}\n\t}", "public function run()\n {\n InterviewStage::truncate();\n\n InterviewStage::create([\n 'title' => 'Telephonic',\n 'i_order' => 1\n ]);\n\n InterviewStage::create([\n 'title' => 'Technical',\n 'i_order' => 2,\n ]);\n\n InterviewStage::create([\n 'title' => 'HR',\n 'i_order' => 3\n ]);\n }", "function add() {\n\t\tforeach ($this->_meta_box['pages'] as $page) {\n\t\t\tadd_meta_box($this->_meta_box['id'], $this->_meta_box['title'], array(&$this, 'show'), $page, $this->_meta_box['context'], $this->_meta_box['priority']);\n\t\t}\n\t}", "public function addAllPointers();", "function add() {\n foreach ($this->_meta_box['pages'] as $page) {\n add_meta_box($this->_meta_box['id'], $this->_meta_box['title'], array(&$this, 'show'), $page, $this->_meta_box['context'], $this->_meta_box['priority']);\n }\n }", "function add() {\n foreach ($this->_meta_box['pages'] as $page) {\n add_meta_box($this->_meta_box['id'], $this->_meta_box['title'], array(&$this, 'show'), $page, $this->_meta_box['context'], $this->_meta_box['priority']);\n }\n }", "public function initSinglePlugins()\n {\n $this->collSinglePlugins = new ObjectCollection();\n $this->collSinglePluginsPartial = true;\n\n $this->collSinglePlugins->setModel('\\Plugins');\n }", "protected function reloadPids() : void\n {\n $this->pids = [];\n $this->loadPids();\n }", "function drawSelectedProducts(){\n \n }", "function getScenes() {\n return $this->scenes;\n}", "public function run()\n {\n Post::find(1)->tags()->attach([3,4]);\n Post::find(2)->tags()->attach([1,2]);\n Post::find(3)->tags()->attach(1);\n Post::find(4)->tags()->attach(2);\n Post::find(5)->tags()->attach(1);\n }", "public function run() {\n View3d::factory()\n ->count(3)\n ->create();\n }", "function preinit()\r\n {\r\n //Calls children's init recursively\r\n reset($this->components->items);\r\n while (list($k,$v)=each($this->components->items))\r\n {\r\n $v->preinit();\r\n }\r\n }", "public function initRtfPlugins()\n {\n $this->collRtfPlugins = new ObjectCollection();\n $this->collRtfPluginsPartial = true;\n\n $this->collRtfPlugins->setModel('\\Plugins');\n }", "public function run()\n {\n Picker::insert([\n [\n 'pid' => '1',\n 'ppass' => '111',\n 'pname' => 'いしがみ', \n ],\n [\n 'pid' => '2',\n 'ppass' => '222',\n 'pname' => 'にしだ', \n ],\n [\n 'pid' => '3',\n 'ppass' => '333',\n 'pname' => 'みおり', \n ],\n [\n 'pid' => '4',\n 'ppass' => '444',\n 'pname' => 'しむら', \n ]\n ]);\n }", "public function add_resources()\n\t{\n\t\t\n\t}", "function loadPlugins() {\r\n\t\tforeach ($this->modx->ms2Plugins->plugins as $plugin) {\r\n\t\t\tif (!empty($plugin['manager']['msProductData'])) {\r\n\t\t\t\t$this->addJavascript($plugin['manager']['msProductData']);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private function initializePlugins() {\r\n if (isset($this->settings[\"loadJsPlugins\"])) {\r\n if (count($this->settings[\"loadJsPlugins\"])) {\r\n foreach ($this->settings[\"loadJsPlugins\"] as $pluginName) {\r\n $this->addPlugin($pluginName);\r\n }\r\n }\r\n }\r\n unset($this->settings[\"loadJsPlugins\"]);\r\n }", "public function include_active_plugins() {\n\t\tforeach ( $this->get_active_plugins_option() as $plugin ) {\n\t\t\twpcom_vip_load_plugin( $plugin );\n\t\t}\n\t}", "public function run() {\n // создать связи между постами и тегами\n foreach(Post::all() as $post) {\n foreach(Tag::all() as $tag) {\n if (rand(1, 20) == 10) {\n $post->tags()->attach($tag->id);\n }\n }\n }\n }", "public function run()\n {\n //Many to Many relacija\n factory(App\\Projekti::class, 6)->create()->each(function ($u) {\n $u->tags()->save(factory(App\\Tag::class)->make());\n });\n }", "function loadPlugins() {\n // @todo make this more efficient\n $plugin_dirs = $this->listDir(MWG_BASE . '/plugins/');\n foreach($plugin_dirs as $ptypes) {\n $this->loadPluginGroup($ptypes);\n } \n }", "public function run()\n {\nfor ($i=0; $i <3 ; $i++) { \n$add=new Landingpage;\n \n$add->mainimg=\"wp-content/uploads/2017/05/l2.png\";\n$add->subimg=\"wp-content/uploads/2017/05/l2sub.png\";\n$add->tit=\"Components\";\n$add->sub_tit=\"Egypt\";\n$add->titlin2=\"Service\";\n$add->link=\"main\"; \n \n$add->save();\n}\n }", "private function instantiateAll() {\n $this->Corporations = new Corporations($this);\n $this->MemberTracking = new MemberTracking($this);\n $this->Characters = new Characters($this);\n $this->Stations = new Stations($this);\n $this->Facilities = new Facilities($this);\n $this->Industry = new Industry($this);\n $this->Markets = new Markets($this);\n $this->Universe = new Universe($this);\n $this->Contracts = new Contracts($this);\n $this->Wallet = new Wallet($this);\n $this->Assets = new Assets($this);\n $this->Killmails = new Killmails($this);\n $this->Status = new Status($this);\n $this->Usage = new Usage($this);\n }", "public function loadPlugins()\n\t{\n\t\t$this->pluginsToLoad = array_unique($this->pluginsToLoad);\n\n\t\t$pluginsToLoad = $this->pluginsToLoad;\n\n\t\tif($this->doLoadAlwaysActivatedPlugins)\n\t\t{\n\t\t\t$pluginsToLoad = array_merge($this->pluginsToLoad, $this->pluginToAlwaysEnable);\n\t\t}\n\n\t\tforeach($pluginsToLoad as $pluginName)\n\t\t{\n\t\t\t$newPlugin = $this->loadPlugin($pluginName);\n\n\t\t\t// if we have to load the plugins\n\t\t\t// and if this plugin is activated\n\t\t\tif($this->doLoadPlugins\n\t\t\t\t&& $this->isPluginEnabled($pluginName))\n\t\t\t{\n\t\t\t\t$newPlugin->registerTranslation( $this->languageToLoad );\n\t\t\t\t$this->addPluginObservers( $newPlugin );\n\t\t\t\t$this->addLoadedPlugin( $pluginName, $newPlugin);\n\n\t\t\t\t$newPlugin->postLoad();\n\t\t\t}\n\t\t}\n\t}", "private function registerPlugins()\n\t{\n\t\t$assetDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;\n\t\t$assetUrl = Yii::app()->assetManager->publish($assetDir);\n\n\n\t\t$cs = Yii::app()->getClientScript();\n\n\t\tforeach ($this->plugins as $p)\n\t\t{\n\n\t\t\tif ($p['flag'])\n\t\t\t{\n\t\t\t\tforeach ($p['js'] as $js)\n\t\t\t\t\t$cs->registerScriptFile($assetUrl . \"/\" . $js, CClientScript::POS_END);\n\t\t\t}\n\t\t}\n\t}", "protected function loadPids() : void\n {\n foreach ($this->poolsConfig as $pool => $poolConfig) {\n $pidFiles = glob($this->runPath . '/' . $pool . '/*.pid');\n foreach ($pidFiles as $pidFile) {\n $workerId = basename($pidFile, '.pid');\n $pid = file_get_contents($pidFile);\n if ($this->pidIsValid($pid, $workerId)) {\n $this->pids[$pool][$workerId] = $pid;\n } else {\n $this->removePidFile($pidFile);\n }\n }\n }\n }", "public function onAssetsInitialized(): void\n {\n $isProduction = $this->config->get(\"plugins.$this->name.isProduction\", true);\n $minified = $isProduction ? '.min' : '';\n\n /** @var Assets */\n $assets = $this->grav['assets'];\n\n $assets->addCss(\"plugin://{$this->name}/css/style$minified.css\");\n $assets->addJs(\n \"plugin://{$this->name}/js/taxonomy-filter$minified.js\",\n ['group' => 'head', 'position' => 'after', 'loading' => 'defer']\n );\n $assets->addInlineJs(\n \"const taxonomyFilters = \" . json_encode($this->routes),\n ['group' => 'head', 'position' => 'after']\n );\n }", "function init()\r\n {\r\n //Copy components to comps, so you can alter components properties\r\n //on init() methods\r\n $comps=$this->components->items;\r\n //Calls children's init recursively\r\n reset($comps);\r\n while (list($k,$v)=each($comps))\r\n {\r\n $v->init();\r\n }\r\n }", "public function run()\n {\n $segments = [\n [\n 'name' => \"Exatas\"\n ],\n [\n 'name' => \"Humanas\"\n ],\n [\n 'name' => \"Saúde\"\n ],\n [\n 'name' => \"Tecnologia\"\n ],\n ];\n\n Segment::insert($segments);\n }", "public function InitAll ();", "protected function loadObjects() {\n if (!isset($this->objects)) {\n $this->obj_builder->toggleAutoload('on');\n $this->objects = $this->obj_builder->buildObjects();\n $this->obj_builder->toggleAutoload('off');\n }\n }", "public function run()\n {\n Region::insert([\n [\n \"name\" => \"OUEST\",\n \"slug\" => \"OU\"\n ],\n [\n \"name\" => \"NORD-OUEST\",\n \"slug\" => \"NO\"\n ],\n [\n \"name\" => \"SUD-OUEST\",\n \"slug\" => \"SO\"\n ],\n [\n \"name\" => \"NORD\",\n \"slug\" => \"ND\"\n ],\n [\n \"name\" => \"EXTREME-NORD\",\n \"slug\" => \"EN\"\n ],\n [\n \"name\" => \"SUD\",\n \"slug\" => \"SD\"\n ],\n [\n \"name\" => \"EST\",\n \"slug\" => \"ES\"\n ],\n [\n \"name\" => \"LITTORAL\",\n \"slug\" => \"LT\"\n ],\n [\n \"name\" => \"CENTRE\",\n \"slug\" => \"CE\"\n ],\n ]);\n }", "public function addRessources()\n {\n // $this->context->controller->addCss(($this->_path . '/views/css/tab.css'), 'all');\n // $this->context->controller->addJquery();\n // $this->context->controller->addJS(($this->_path . '/views/js/script.js'));\n // $this->context->controller->addJS(($this->_path . '/views/js/configuration.js'));\n }", "public function enablePlaques()\n\t{\n\t\t$this->_plaques = true;\n\t}", "protected function initProcessTrait()\n {\n $this->instances = new Collection;\n $this->setLaneSets(new Collection);\n }", "private static function runAll () {\n\t\tif(empty(self::$registered)) return;\n\n\t\tforeach(self::$registered as $plugin) {\n\t\t\t$plugin->run();\n\t\t}\n\t}", "public function onPluginsInitialized()\n\t{\n\t\tif ( $this->isAdmin() ) {\n\t\t\t$this->active = false;\n\t\t\treturn;\n\t\t}\n\n\t\t$this->enable([\n//\t\t\t'onTwigSiteVariables' => ['onTwigSiteVariables', 0]\n\t\t\t'onTwigPageVariables' => ['onTwigSiteVariables', 0]\n\t\t]);\n\t}", "function loadPlugins() {\n\n\t\t// load and parse the plugins file ...\n\t\tif ($plugins = $this->xml_parser->parseXml('plugins.xml')) {\n\n\t\t\t// take each plugin tag ...\n\t\t\tforeach ($plugins['ASECO_PLUGINS']['PLUGIN'] as $plugin) {\n\n\t\t\t\t// showup message\n\t\t\t\t$this->console_text('[Aseco] Load plugin [' . $plugin . ']');\n\n\t\t\t\t// and include the value between ...\n\t\t\t\trequire_once('plugins/' . $plugin);\n\t\t\t}\n\t\t}\n\t}", "public function onPluginsInitialized()\n {\n if ($this->isAdmin()) {\n $this->active = false;\n return;\n }\n\n /** @var Uri $uri */\n $uri = $this->grav['uri'];\n $route = $this->config->get('plugins.random.route');\n\n if ($route && $route == $uri->path()) {\n $this->enable([\n 'onPageInitialized' => ['onPageInitialized', 0]\n ]);\n }\n }", "public function initXmlPlugins()\n {\n $this->collXmlPlugins = new ObjectCollection();\n $this->collXmlPluginsPartial = true;\n\n $this->collXmlPlugins->setModel('\\Plugins');\n }", "public function addAction(){\n\t\t$this->assign('roots', $this->roots);\n\t\t$this->assign('parents', $this->parents);\n\t}", "function startEngine() {\n }", "function ventures() {\n\n\t\t$labels = array(\n\t\t\t'name' => 'Ventures',\n\t\t\t'singular_name' => 'Venture',\n\t\t\t'menu_name' => 'Ventures',\n\t\t\t'name_admin_bar' => 'Venture',\n\t\t);\n\t\t$args = array(\n\t\t\t'label' => 'Venture',\n\t\t\t'description' => 'Polymath ventures',\n\t\t\t'labels' => $labels,\n\t\t\t'supports' => array( 'title', 'thumbnail', ),\n\t\t\t'taxonomies' => array(),\n\t\t\t'hierarchical' => false,\n\t\t\t'public' => true,\n\t\t\t'menu_position' => 5,\n\t\t\t'capability_type' => 'post',\n\t\t);\n\t\tregister_post_type( 'ventures', $args );\n\n\t}", "public function load_additional_assets() {\n\n // Grab current screen\n $screen = get_current_screen();\n\n // Make sure we're on the correct screen\n if ( ! in_array( $screen->id, $this->screens ) ) {\n return;\n }\n\n do_action( 'cv_builder_inline_assets' );\n\n // Render template options callback for modal\n $this->render_template_options_template();\n\n // Render module options for modal\n $this->render_available_modules_template();\n\n }", "protected function loadRegisteredSprites() {}", "public function initUserExperiences()\n\t{\n\t\t$this->collUserExperiences = array();\n\t}", "private function plugins(){\n $all_plugins = explode(',', json_decode(file_get_contents($this->pluginsJson))->all->names);\n debug($all_plugins);\n die;\n }", "public function onSlotsAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function explore(){\n //includes scripts to get experiences\n \t$this->set('jsIncludes',array('get_experiences','logo_fly','jvector','jquery-jvectormap.min','jquery-jvectormap-world-mill-en','jquery.dropdown','cookies'));\n //includes styles for map and filters\n $this->set('cssIncludes',array('jvectormap','map'));\n \n //sets motives, schools and departments by alphbetical order\n $this->__set_motives_schools_and_departments();\n }", "public function run()\n {\n\n $weapons = ['pistol', 'walther-ppk', 'p90', 'ar15', 'm249', 're45', 'sa80', 'ump', 'diamond-pickaxe','m24', 'xm109'];\n $armours = ['lvl1', 'lvl2', 'lvl3'];\n\n foreach ($weapons as $k => $weapon) {\n \\App\\Item::create([\n 'name' => $weapon,\n 'type' => \\App\\Enums\\ItemType::WEAPON,\n 'stat' => random_int(5,100),\n 'distance' => random_int(1,5),\n ]);\n }\n\n foreach ($armours as $k => $armour) {\n \\App\\Item::create([\n 'name' => $armour,\n 'type' => \\App\\Enums\\ItemType::ARMOR,\n 'stat' => random_int(5,100),\n 'distance' => random_int(1,5),\n ]);\n }\n\n $games = \\App\\Game::all();\n//\n//\n foreach ($games as $game) {\n\n $items = 100;\n\n for ($i = 0; $i<$items; $i++) {\n\n $terrain = \\App\\Terrain::where('type','!=', \\App\\Enums\\TerrainType::WATER)->get()->random(1)->first();\n $item = \\App\\Item::all()->random(1)->first();\n $game->items()->attach([['item_id' => $item->id, 'x' => $terrain->x, 'y' => $terrain->y]]);\n $terrain->save();\n\n }\n }\n\n // Make item generation work for multi game.\n\n }", "public function run()\n {\n $albany = Group::firstOrCreate(['name'=>'Albany League']);\n $la = Group::firstOrCreate(['name'=>'LA']);\n //get id\n $albany_players = Player::whereIn('name', ['Kevin Nguyen', 'Kristie Taguma', 'Angie', 'Roshal', 'Ramail', 'Alex', 'Rishi', 'Chris Mayer', 'Sabiha', 'Libby'])->get()->pluck('id');\n $la_players = Player::whereIn('name', ['Kevin Nguyen', 'Kristie Taguma', 'Jon Hao', 'Cynthia', 'Arun', 'Sab', 'Sean', 'Larry', 'Kameron Matsunami ', 'Allyson'])->get()->pluck('id');\n\n $albany->players()->attach($albany_players);\n $la->players()->attach($la_players);\n }", "public function loadAssets() {\r\n\t\t$this->app->document->addScript('elements:relateditems/relateditems.js');\r\n\t}", "function loadPlugins() {\n\n\t\t// load and parse the plugins file\n\t\tif ($plugins = $this->xml_parser->parseXml('plugins.xml')) {\n\t\t\tif (!empty($plugins['XASECO2_PLUGINS']['PLUGIN'])) {\n\t\t\t\t// take each plugin tag\n\t\t\t\tforeach ($plugins['XASECO2_PLUGINS']['PLUGIN'] as $plugin) {\n\t\t\t\t\t// log plugin message\n\t\t\t\t\t$this->console_text('[XAseco2] Load plugin [' . $plugin . ']');\n\t\t\t\t\t// include the plugin\n\t\t\t\t\trequire_once('plugins/' . $plugin);\n\t\t\t\t\t$this->plugins[] = $plugin;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\ttrigger_error('Could not read/parse plugins list plugins.xml !', E_USER_ERROR);\n\t\t}\n\t}", "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 }", "function pnFormInitializeIncludes()\n {\n $this->pnFormIncludes = array();\n }", "public function run()\n {\n pareigos::create([\n 'name' => 'Administratorius',\n ]);\n\n pareigos::create([\n 'name' => 'Instruktorius',\n ]);\n\n pareigos::create([\n 'name' => 'Darbuotojas',\n ]);\n }", "private function preloadTags(){\n if(Tag::all()->count()==0){\n //if no tag in db, load into db from infusionsoft\n\n $infusionsoftHelper = new InfusionsoftHelper();\n $allTags = $infusionsoftHelper->getAllTags()->all();\n $tagsArray = [];\n\n foreach ($allTags as $tag)\n $tagsArray[] = [\n 'tag_id'=>$tag->id,\n 'name'=>$tag->name,\n 'slug'=>str_slug($tag->name) //give each tag a slug for easily finding it later\n ];\n\n Tag::insert($tagsArray);\n }\n }", "private function startEngine(){\n $this->start();\n }", "public function startNewGame() {\n\t \t//Set all queued used to playing\n\t \t//Build new map scaled on number of playing users\n\t \t//place users on map\n\t \t//start game\n\t \t//send out alert that game has started\n\t }", "public function gismo_page_elements() {\n\t\t\n\t\t\t$screens = array( 'page', 'post' );\n\t\t\n\t\t\tforeach ( $screens as $screen ) {\n\t\t\n\t\t\t\tadd_meta_box(\n\t\t\n\t\t\t\t\t'page_elements_id',\n\t\t\n\t\t\t\t\t__( 'Page Elements', 'page_elements_textdomain' ),\n\t\t\n\t\t\t\t\tarray($this,'gismo_page_elements_callback'),\n\t\t\n\t\t\t\t\t$screen\n\t\t\n\t\t\t\t);\n\t\t\n\t\t\t}\n\t\t\n\t\t}", "public function run()\n {\n foreach (Workspace::get() as $workspace) {\n foreach (GoodCategory::get() as $category) {\n $category->workspaces()->attach($workspace);\n }\n\n foreach (Good::get() as $good) {\n $good->workspaces()->attach($workspace);\n }\n }\n }", "public static function customCollection()\n\t{\n // recupera as features encontradas\n $features = Arr::flatten(parent::$collection);\n // limpa a collection\n parent::$collection = [];\n // realimenta a collection\n foreach ($features as $feature) {\n parent::$collection[$feature] = true;\n }\n\t}", "public function load() {\r\n\t\t$this->includes();\r\n\t\t$this->inits();\r\n\t}", "public function run()\n {\n Partner::create([\n \t'name'=>\"LyuboINC\"\n \t]);\n Partner::create([\n \t'name'=>'Classic2000'\n \t]);\n }", "public function startup() {\n parent::startup(); \n self::renderShow(); \n }", "function __construct() {\n $this->pflanzen = array();\n }", "public static function productLists()\n {\n array_push(self::$products, \n [\n CART::ID => self::$id,\n CART::NAME => self::$name,\n CART::PRICE => self::$price,\n CART::QUANTITY => self::$quantity\n ]);\n }", "protected function _preload() {\n }", "public function run()\n {\n \\App\\Processing::insert([\n [\n 'name' => 'چرمی',\n ],\n [\n 'name' => 'تیشه ای',\n ],\n [\n 'name' => 'اپوکسی',\n ],\n [\n 'name' => 'ساب خورده',\n ],\n [\n 'name' => 'بدون ساب',\n ],\n [\n 'name' => 'رزین',\n ],\n ]);\n }", "function startProcessing(){\n\t\t$aPuntos = array();\n\t\t//lower left\n\t\t$punto = array($this->convertXFromShpToMapWare($this->shp_data[\"xmin\"]), $this->convertYFromShpToMapWare($this->shp_data[\"ymax\"]) );\n\t\tarray_push($aPuntos, $punto);\n\t\t//lower right\n\t\t$punto = array($this->convertXFromShpToMapWare($this->shp_data[\"xmax\"]), $this->convertYFromShpToMapWare($this->shp_data[\"ymax\"]) );\n\t\tarray_push($aPuntos, $punto);\n\t\t//upper right\n\t\t$punto = array($this->convertXFromShpToMapWare($this->shp_data[\"xmax\"]), $this->convertYFromShpToMapWare($this->shp_data[\"ymin\"]) );\n\t\tarray_push($aPuntos, $punto);\n\t\t//upper left\n\t\t$punto = array($this->convertXFromShpToMapWare($this->shp_data[\"xmin\"]), $this->convertYFromShpToMapWare($this->shp_data[\"ymin\"]) );\n\t\tarray_push($aPuntos, $punto);\n\t\t\n\t\t//cargar laimagen\n\t\t$imagePath = SATELITE_RESOURCES.$this->resources[\"folder\"].\"/\".$this->resources[\"imagename\"].\".jpg\";\n\t\t$image_original = imagecreatefromjpeg($imagePath) or die(\"no image defined\");\n\t\t//definir los niveles en los cuales se va a generar esta imagen de satelite\n\t\t$nivelInicial = ($this->resources[\"hd\"] == 1) ? 7 : 1;\n\t\t$nivelFinal = ($this->resources[\"hd\"] == 1) ? 14 : 9;\n\t\t//loop sobre los niveles\n\t\tfor($nivel=$nivelInicial; $nivel<=$nivelFinal; $nivel++){\n\t\t\t//actualizar datos globales por nivel\n\t\t\t$this->actualizarEscalaPorNivel($nivel);\n\t\t\t//\n\t\t\t$upperLeft = $this->getCuadroFromPoint($aPuntos[0][0], $aPuntos[0][1]);\n\t\t\t$lowerRight = $this->getCuadroFromPoint($aPuntos[2][0], $aPuntos[2][1]);\n\t\t\t//\n\t\t\t//info imagen sat\n\t\t\t$info = getimagesize($imagePath);\n\t\t\t//width en latitud y longitud de la imagen de satelite\n\t\t\t$satWidth = $aPuntos[1][0] - $aPuntos[0][0];\n\t\t\t$satHeight = $aPuntos[2][1] - $aPuntos[1][1];\n\t\t\t//width y height que debe tener la imagen de satelite en pixeles\n\t\t\t$pixelWidthSat = $satWidth / $this->escala;\n\t\t\t$pixelHeightSat = $satHeight / $this->escala;\n\t\t\t//escala correspondiente entre el pixelaje que debe tener y el real de la imagen de satelite\n\t\t\t$escalaImagenSatelite = $info[0] / $pixelWidthSat;\n\t\t\t//copio la imagen al tamaño que le corresponde en este nivel para evitar desfaces\n\t\t\t$image = imagecreatetruecolor(round($info[0]/$escalaImagenSatelite), round($info[1]/$escalaImagenSatelite)) or die(\"no se pudo crear la imagen para empezar\");\n\t\t\timagecopyresampled($image, $image_original, 0, 0, 0, 0, round($info[0]/$escalaImagenSatelite), round($info[1]/$escalaImagenSatelite), $info[0], $info[1]) or die(\"no se pudo generar copia a nivel\");\n\t\t\t//\n\t\t\techo \"************************Nivel\".$nivel.\"<br />\";\n\t\t\t//Si la imagen es de hd entonces se crea un padding (bufferSize) alrededor con imagen de satelite de bajar resolucion\n\t\t\t$bufferSize = ($this->resources[\"hd\"] == 1 && $nivel >= 10) ? 4 : 0;\n\t\t\t//creamos y guardamos las imagenes en la base de datos\n\t\t\t$this->crearGuardarImagenes($upperLeft, $lowerRight, $nivel, $this->resources[\"clave\"], \"satelite_originales\", $bufferSize, \"satelite\");\n\t\t\t//para todos los cuadros que toca la imagen de satelite\n\t\t\tfor($i=$upperLeft[0] - $bufferSize; $i<=$lowerRight[0] + $bufferSize; $i++){\n\t\t\t\tfor($j=$upperLeft[1] - $bufferSize; $j<=$lowerRight[1] + $bufferSize; $j++){\n\t\t\t\t\t//cuadro\n\t\t\t\t\t$square = array($i, $j);\n\t\t\t\t\t//ver si ya existe una imagen en estas coordenadas\n\t\t\t\t\t$query = \"select * from imagenes\n\t\t\t\t\twhere satelite_exists != '0' and i = '$i' and j = '$j' and nivel = '$nivel'\";\n\t\t\t\t\t$exists = mysql_query($query) or die($query);\n\t\t\t\t\t//crear nueva imagen\n\t\t\t\t\tif( mysql_num_rows($exists) != 0 ){\n\t\t\t\t\t\t//en caso de que ya existiera antes una imagen de satelite asociada\n\t\t\t\t\t\t$newImage = imagecreatefromjpeg(IMAGE_MAPWARE_URL.\"?clave=\".$i.\"_\".$j.\"_\".$nivel);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newImage = imagecreatetruecolor(200, 200);\n\t\t\t\t\t\t//de ser hd copiar sobre una imagen de lowDef ampliada\n\t\t\t\t\t\tif($this->resources[\"hd\"] == 1){\n\t\t\t\t\t\t\t// copiamos la imagen de sat de baja resolucion en esta imagen para que forme parte del buffer\n\t\t\t\t\t\t\t// puede que sea cubierta por la imagen de hd en donde esta se encuentre\n\t\t\t\t\t\t\t$lowDef_i = ceil( ($i+1)/pow(2, $nivel-8) ) - 1;\n\t\t\t\t\t\t\t$lowDef_j = ceil( ($j+1)/pow(2, $nivel-8) ) - 1;\n\t\t\t\t\t\t\t$query = \"select \n\t\t\t\t\t\t\tX(POINTN( EXTERIORRING( ENVELOPE( mysql_puntos ) ) , 1 ) ) as xmin, \n\t\t\t\t\t\t\tY(POINTN( EXTERIORRING( ENVELOPE( mysql_puntos ) ) , 1 ) ) as ymin \n\t\t\t\t\t\t\tfrom imagenes where i = $lowDef_i and j = $lowDef_j and nivel = 8\";\n\t\t\t\t\t\t\t$lowDef = mysql_fetch_array(mysql_query($query)) or die($query);\n\t\t\t\t\t\t\t//que tantas veces es mas grande la newImage que la de baja resolucion que se va a sacar\n\t\t\t\t\t\t\t$escala_ld = pow(2, $nivel-8);\t\n\t\t\t\t\t\t\t//sacar la imagen que se va a usar\n\t\t\t\t\t\t\t$image_ld = imagecreatefromjpeg(IMAGE_MAPWARE_URL.\"?clave=\".$lowDef_i.\"_\".$lowDef_j.\"_8\");\n\t\t\t\t\t\t\tif($image_ld != false){\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t$destX_ld = ($lowDef[\"xmin\"] - $this->xmin - $square[0]*$this->squareSize*$this->escala) / $this->escala;\n\t\t\t\t\t\t\t\t$destY_ld = ($lowDef[\"ymin\"] - $this->ymin - $square[1]*$this->squareSize*$this->escala) / $this->escala;\n\t\t\t\t\t\t\t\t//\t\t\t\n\t\t\t\t\t\t\t\t$sourceX_ld = -1*$destX_ld;\n\t\t\t\t\t\t\t\t$sourceY_ld = -1*$destY_ld;\n\t\t\t\t\t\t\t\timagecopyresampled($newImage, $image_ld, 0, 0, round($sourceX_ld/$escala_ld), round($sourceY_ld/$escala_ld), 200, 200, round(200/$escala_ld), round(200/$escala_ld)) or die(\"no copy resampled\");\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\t//\n\t\t\t\t\t//\n\t\t\t\t\t//lugar que representa la esquina superior izqierda de la imagen de satelite dentro del cuadro, igual que en generar imagenes simplemente referenciamos una coordenada de latitud, longitud a la imagen de 200 px a dibujar\n\t\t\t\t\t$destX = $aPuntos[0][0] - ($this->xmin + $square[0]*$this->squareSize*$this->escala);\n\t\t\t\t\t$destX = round($destX/$this->escala);\n\t\t\t\t\t$destY = $aPuntos[0][1] - ($this->ymin + $square[1]*$this->squareSize*$this->escala);\n\t\t\t\t\t$destY = round($destY/$this->escala);\n\t\t\t\t\t//\n\t\t\t\t\t//sourceX y sourceY representan la esquina superior izquierda correspondiente a la imagen a \n\t\t\t\t\t//dibujar dentro de la imagen de satelite completa\n\t\t\t\t\t$sourceX = round(-1*$destX);\n\t\t\t\t\t$sourceY = round(-1*$destY);\n\t\t\t\t\tif($destX > 0){\n\t\t\t\t\t\t//ver cuanto hay que copiar, solo lo suficiente para llenar la imagen newImage\n\t\t\t\t\t\t//como sourceX es negativo ya que destX positivo\n\t\t\t\t\t\t$Width = min(round(210 + $sourceX), round($info[0]/$escalaImagenSatelite));\n\t\t\t\t\t\t//\n\t\t\t\t\t\tif($destY > 0){\n\t\t\t\t\t\t\t$Height = min(round(210 + $sourceY), round($info[1]/$escalaImagenSatelite));\n\t\t\t\t\t\t\t//copiar el pedazo de imagen correspondiente\n\t\t\t\t\t\t\timagecopy($newImage, $image, $destX, $destY, 0, 0, $Width, $Height) or die(\"no image copy\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$Height= min(210, round($info[1]/$escalaImagenSatelite- $sourceY));\n\t\t\t\t\t\t\t//copiar el pedazo de imagen correspondiente\n\t\t\t\t\t\t\timagecopy($newImage, $image, $destX, 0, 0, $sourceY, $Width, $Height) or die(\"no image copy\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//ver cuanto hay que coipar, solo lo suficiente para llenar la imagen newImage no mas\n\t\t\t\t\t\t$Width = min(210, round($info[0]/$escalaImagenSatelite - $sourceX));\n\t\t\t\t\t\t//\n\t\t\t\t\t\tif($destY > 0){\n\t\t\t\t\t\t\t$Height = min(round(210 + $sourceY), round($info[1]/$escalaImagenSatelite));\n\t\t\t\t\t\t\t//copiar el pedazo correspondiente\n\t\t\t\t\t\t\timagecopy($newImage, $image, 0, $destY, $sourceX, 0, $Width, $Height) or die(\"no image copy\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$Height= min(210, round($info[1]/$escalaImagenSatelite- $sourceY));\n\t\t\t\t\t\t\t//copiar el pedazo correspondiente\n\t\t\t\t\t\t\timagecopy($newImage, $image, 0, 0, $sourceX, $sourceY, $Width, $Height) or die(\"no image copy\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//set compression level = 3\n\t\t\t\t\t$archivo = \"temporales/satelite_temporal.jpg\";\n\t\t\t\t\timagejpeg($newImage, $archivo, 90);\n\t\t\t\t\tchmod($archivo, 0777);\n\t\t\t\t\t//tomar la informacion del archivo e ingresarla a la base de datos\n\t\t\t\t\t$file = mysql_real_escape_string(file_get_contents($archivo));\n\t\t\t\t\t//guardar en base de datos que la imagen ya fue dibujada\n\t\t\t\t\t$query = \"UPDATE `imagenes`\n\t\t\t\t\tSET `satelite` = '$file', `satelite_exists` = '1'\n\t\t\t\t\tWHERE `i` = '\".$i.\"' and `j` = '\".$j.\"' \n\t\t\t\t\tand `nivel` = '\".$nivel.\"'\";\n\t\t\t\t\tmysql_query($query) or die($query);\n\t\t\t\t}\n\t\t\t}\n\t\t}//cierre del for de niveles\n\t\t//\n\t\t//actualizar el campo de generado para no volver a usar esta imagen\n\t\t$query = \"update satelite_originales set generada = 1 where clave = '\".$this->resources[\"clave\"].\"'\";\n\t\tmysql_query($query) or die($query);\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 run()\n {\n $allergens = App\\Allergen::get();\n $products = App\\Product::get();\n foreach($products as $product){\n $product->allergens()\n ->attach($allergens->random());\n }\n }", "public function init()\n {\n $this->_createBoard();\n $this->_createSlots();\n }", "public function init() {\n\n\t\t// Run an action so we can hook in beforehand\n\t\t$this->before( 'ubc_press_before_create_all_cpts' );\n\n\t\t// Determine which CPTs to create\n\t\t$this->determine();\n\n\t\t// Create the CPTs\n\t\t$this->create();\n\n\t\t// Run an action so we can hook in afterwards\n\t\t$this->after( 'ubc_press_after_create_all_cpts' );\n\n\t}", "protected function setUp(){\n $this->poneys = new Poneys;\n $this->poneys->setCount(8);\n }", "public function initializePopulation() : void;", "public function addAssets()\n {\n $this->addJs('../../graphreport/assets/d3.js');\n $this->addJs('../../graphreport/assets/c3.js');\n $this->addCss('../../graphreport/assets/c3.css'); \n }", "public function collect() {\n // register installed projects\n foreach ($this->drush->getExtensions() as $extension) {\n if ($extension->type == 'theme') {\n continue;\n }\n\n $projectName = $this->projectFactory->getProjectName($extension);\n if ($this->projectRegistry->hasProject($projectName)) {\n $project = $this->projectRegistry->getProject($projectName);\n }\n else {\n $project = $this->projectFactory->createProjectFromExtension($extension);\n $this->projectRegistry->addProject($project);\n }\n\n $module = $this->projectFactory->createModuleFromExtension($extension);\n $module->setProject($project);\n $project->addModule($module);\n\n $this->projectRegistry->addModule($module);\n }\n\n // populate module dependencies\n foreach ($this->drush->getExtensions() as $extension) {\n if ($extension->type == 'theme') {\n continue;\n }\n\n $module = $this->projectRegistry->getModule($extension->name);\n foreach (array_keys($extension->requires) as $name) {\n if ($this->projectRegistry->hasModule($name)) {\n $module->addDependency($this->projectRegistry->getModule($name));\n }\n }\n foreach (array_keys($extension->required_by) as $name) {\n if ($this->projectRegistry->hasModule($name)) {\n $module->addRequiredByModule($this->projectRegistry->getModule($name));\n }\n }\n }\n }", "public function eXpOnInit()\n {\n $this->addDependency(\n new \\ManiaLive\\PluginHandler\\Dependency(\"\\\\ManiaLivePlugins\\\\eXpansion\\\\Database\\\\Database\")\n );\n }", "public function onLoad() {\n \n }" ]
[ "0.5366149", "0.50816774", "0.50437003", "0.50370157", "0.50001884", "0.49473038", "0.49350184", "0.4897696", "0.48515388", "0.48363018", "0.48046112", "0.48024294", "0.47856084", "0.47807813", "0.47373492", "0.47373492", "0.47104174", "0.4696254", "0.46825588", "0.4673061", "0.46229926", "0.45847315", "0.4582601", "0.45760116", "0.45760116", "0.45751828", "0.45713967", "0.45709983", "0.45684886", "0.45655015", "0.45559728", "0.45410645", "0.4532621", "0.45242253", "0.45149046", "0.4509787", "0.45076534", "0.4501893", "0.44818324", "0.44783244", "0.44772878", "0.4476871", "0.44718802", "0.44572622", "0.44516546", "0.44446495", "0.44405752", "0.4439753", "0.4439389", "0.4436257", "0.44312295", "0.44270554", "0.44256157", "0.4421571", "0.44207656", "0.44172972", "0.44166166", "0.4415012", "0.44145557", "0.44128266", "0.44036743", "0.43990734", "0.43987325", "0.43984616", "0.43978825", "0.4395903", "0.43912134", "0.43769288", "0.43761855", "0.43746886", "0.43743983", "0.4360399", "0.4355079", "0.4354792", "0.4352416", "0.43500456", "0.43445033", "0.43440393", "0.43414736", "0.4339013", "0.43362707", "0.43354824", "0.4331287", "0.43276855", "0.4323408", "0.43225023", "0.43212333", "0.4309241", "0.43050927", "0.43010372", "0.4300142", "0.42996708", "0.42965585", "0.42958125", "0.4295191", "0.42935133", "0.42889848", "0.42882392", "0.4288212", "0.4288164" ]
0.501349
4
Handle an incoming request.
public function handle($request, Closure $next) { if(Auth::user()->permission_id==1||Auth::user()->permission_id==2){ return $next($request); } return view('welcome')->with('status','ban khong co quyen'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function handle_request();", "public function handleRequest();", "public function handleRequest();", "public function handleRequest();", "protected abstract function handleRequest();", "abstract public function handleRequest($request);", "abstract public function handleRequest(Request $request);", "public function handle($request);", "public function handleRequest() {}", "function handleRequest() ;", "public function handle(Request $request);", "protected function handle(Request $request) {}", "public function handle(array $request);", "public function process_request() {\n if(!empty($this->POST)) {\n return $this->handlePOST();\n } else {\n return $this->handleGET();\n }\n }", "public function handleRequest() {\n // Make sure the action parameter exists\n $this->requireParam('action');\n\n // Call the correct handler based on the action\n switch($this->requestBody['action']) {\n\n case 'checkoutLocker':\n $this->handleCheckoutLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'remindLocker':\n $this->handleRemindLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'returnLocker':\n $this->handleReturnLocker();\n\t\t\t\tbreak;\n\n default:\n $this->respond(new Response(Response::BAD_REQUEST, 'Invalid action on Locker resource'));\n }\n }", "abstract protected function process(Request $request);", "public function handleRequest($request)\n {\n list ($route, $params) = $request->resolve();\n $this->requestedRoute = $route;\n $result = $this->runAction($route, $params);\n\n if ($result instanceof Response) {\n return $result;\n } elseif ($result instanceof Looper){\n $result->loop();\n\n $response = $this->getResponse();\n $response->exitStatus = 0;\n\n return $response;\n } else {\n $response = $this->getResponse();\n $response->exitStatus = $result;\n\n return $response;\n }\n }", "abstract function handle(Request $request, $parameters);", "protected function handle_request() {\r\n global $wp;\r\n $film_query = $wp->query_vars['films'];\r\n \r\n if (!$film_query) { // send all films\r\n $raw_data = $this->get_all_films();\r\n }\r\n else if ($film_query == \"featured\") { // send featured films\r\n $raw_data = $this->get_featured_films();\r\n }\r\n else if (is_numeric($film_query)) { // send film of id\r\n $raw_data = $this->get_film_by_id($film_query);\r\n }\r\n else { // input error\r\n $this->send_response('Bad Input');\r\n }\r\n\r\n $all_data = $this->get_acf_data($raw_data);\r\n $this->send_response('200 OK', $all_data);\r\n }", "public function handle(ServerRequestInterface $request);", "public function handleRequest()\n {\n $route = $this->router->match();\n\n if ($route) {\n $controllerName = $route['target']['controllerName'];\n $methodName = $route['target']['methodName'];\n\n $controller = new $controllerName();\n\n $controller->$methodName($route['params']);\n } else {\n header(\"HTTP:1.0 404 not Found\");\n echo json_encode([\n \"error_code\" => 404,\n \"reason\" => \"page not found\"\n ]);\n }\n }", "function handle(Request $request = null, Response $response = null);", "public function processRequest();", "public abstract function processRequest();", "public function handleRequest(Request $request, Response $response);", "abstract public function processRequest();", "public function handle(array $request = []);", "public function handleRequest()\n {\n $router = new Router();\n $controllerClass = $router->resolve()->getController();\n $controllerAction = $router->getAction();\n\n \n\n if(!class_exists($controllerClass)\n || !method_exists($controllerClass,$controllerAction)\n ){\n header('Not found', true, 404);\n exit;\n }\n\n $controller = new $controllerClass();\n call_user_func([$controller, $controllerAction]);\n\n }", "public function handle(Request $request)\n {\n if ($request->header('X-GitHub-Event') === 'push') {\n return $this->handlePush($request->input());\n }\n\n if ($request->header('X-GitHub-Event') === 'pull_request') {\n return $this->handlePullRequest($request->input());\n }\n\n if ($request->header('X-GitHub-Event') === 'ping') {\n return $this->handlePing();\n }\n\n return $this->handleOther();\n }", "protected function _handle()\n {\n return $this\n ->_addData('post', $_POST)\n ->_addData('get', $_GET)\n ->_addData('server', $_SERVER)\n ->_handleRequestRoute();\n }", "public function processRequest() {\n $action = \"\";\n //retrieve action from client.\n if (filter_has_var(INPUT_GET, 'action')) {\n $action = filter_input(INPUT_GET, 'action');\n }\n\n switch ($action) {\n case 'login':\n $this->login(); \n break;\n case 'register':\n $this->register(); //list all articles\n break;\n case 'search':\n $this->search(); //show a form for an article\n break;\n case 'searchList':\n $this->searchList();\n break;\n case 'remove':\n $this->removeArticle();\n break;\n case 'modify':\n $this->modifyArticle();\n break;\n case 'listCategoryForm':\n $this->listCategoryForm();\n break;\n case 'listCategory':\n $this->listCategory();\n break;\n default :\n break;\n }\n }", "public static function handleRequest($request)\r\n {\r\n // Load controller for requested resource\r\n $controllerName = ucfirst($request->getRessourcePath()) . 'Controller';\r\n\r\n if (class_exists($controllerName))\r\n {\r\n $controller = new $controllerName();\r\n\r\n // Get requested action within controller\r\n $actionName = strtolower($request->getHTTPVerb()) . 'Action';\r\n\r\n if (method_exists($controller, $actionName))\r\n {\r\n // Do the action!\r\n $result = $controller->$actionName($request);\r\n\r\n // Send REST response to client\r\n $outputHandlerName = ucfirst($request->getFormat()) . 'OutputHandler';\r\n\r\n if (class_exists($outputHandlerName))\r\n {\r\n $outputHandler = new $outputHandlerName();\r\n $outputHandler->render($result);\r\n }\r\n }\r\n }\r\n }", "public function process(Request $request, Response $response, RequestHandlerInterface $handler);", "public function handle(Request $request)\n {\n $handler = $this->router->match($request);\n if (!$handler) {\n echo \"Could not find your resource!\\n\";\n return;\n }\n\n return $handler();\n }", "public function handleRequest() {\n\t\t\n\t\tif (is_null($this->itemObj)) {\n\t\t\t$this->itemObj = MovieServices::getVcdByID($this->getParam('vcd_id'));\n\t\t}\n\t\t\n\t\t$action = $this->getParam('action');\n\t\t\n\t\tswitch ($action) {\n\t\t\tcase 'upload':\n\t\t\t\t$this->uploadImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'fetch':\n\t\t\t\t$this->fetchImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\n\t\t\tdefault:\n\t\t\t\tredirect();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function handle(Request $request): Response;", "public static function process_http_request()\n {\n }", "public function processRequest() {\r\n switch($this->requestMethod) {\r\n case 'GET':\r\n if($this->id) {\r\n $response = $this->get($this->id);\r\n }\r\n else {\r\n $response = $this->getAll();\r\n }\r\n break;\r\n case 'POST':\r\n $response = $this->create();\r\n break;\r\n case 'PUT':\r\n $response = $this->update($this->id);\r\n break;\r\n case 'DELETE':\r\n $response = $this->delete($this->id);\r\n break;\r\n case 'OPTIONS':\r\n break;\r\n default:\r\n $response = $this->notFoundResponse();\r\n break;\r\n }\r\n\r\n header($response['status_code_header']);\r\n\r\n // If there is a body then echo it\r\n if($response['body']) {\r\n echo $response['body'];\r\n }\r\n }", "abstract public function handle(ServerRequestInterface $request): ResponseInterface;", "public function processRequest()\n\t\t{\n\t\t\t$request_method = strtolower($_SERVER['REQUEST_METHOD']);\n\t\t\tswitch ($request_method)\n\t\t\t{\n\t\t\t\tcase 'get':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$request_parts = explode('/', $data);\n\t\t\t$controller = $request_parts[0];\n\t\t\tswitch ($controller)\n\t\t\t{\n\t\t\t\tcase 'ad':\n\t\t\t\t\tprocessAdRequest(substr($data, strlen('ad')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'category':\n\t\t\t\t\tprocessCategoryRequest(substr($data, strlen('category')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'user':\n\t\t\t\t\tprocessUserRequest(substr($data, strlen('user')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\techo \"Invalid Request!\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}", "function handleRequest (&$request, &$context) {\n\n\t\t/* cycle through our process callback queue. using each() vs.\n\t\t * foreach, etc. so we may add elements to the callback array\n\t\t * later. probably primarily used for conditional callbacks. */\n\t\treset ($this->_processCallbacks);\n\t\twhile ($c = each ($this->_processCallbacks)) {\n\n\t\t\t// test for a successful view dispatch\n\t\t\tif ($this->_processProcess ($this->_processCallbacks[$c['key']],\n\t\t\t $request,\n\t\t\t $context))\n\t\t\t\treturn;\n\t\t}\n\n\t\t// if no view has been found yet attempt our default\n\t\tif ($this->defaultViewExists ())\n\t\t\t$this->renderDefaultView ($request, $context);\n\t}", "public function handle($request, $next);", "public function handle(): void\n {\n $globals = $_SERVER;\n //$SlimPsrRequest = ServerRequestFactory::createFromGlobals();\n //it doesnt matters if the Request is of different class - no need to create Guzaba\\Http\\Request\n $PsrRequest = ServerRequestFactory::createFromGlobals();\n //the only thing that needs to be fixed is the update the parsedBody if it is NOT POST & form-fata or url-encoded\n\n\n //$GuzabaPsrRequest =\n\n //TODO - this may be reworked to reroute to a new route (provided in the constructor) instead of providing the actual response in the constructor\n $DefaultResponse = $this->DefaultResponse;\n //TODO - fix the below\n// if ($PsrRequest->getContentType() === ContentType::TYPE_JSON) {\n// $DefaultResponse->getBody()->rewind();\n// $structure = ['message' => $DefaultResponse->getBody()->getContents()];\n// $json_string = json_encode($structure, JSON_UNESCAPED_SLASHES);\n// $StreamBody = new Stream(null, $json_string);\n// $DefaultResponse = $DefaultResponse->\n// withBody($StreamBody)->\n// withHeader('Content-Type', ContentType::TYPES_MAP[ContentType::TYPE_JSON]['mime'])->\n// withHeader('Content-Length', (string) strlen($json_string));\n// }\n\n $FallbackHandler = new RequestHandler($DefaultResponse);//this will produce 404\n $QueueRequestHandler = new QueueRequestHandler($FallbackHandler);//the default response prototype is a 404 message\n foreach ($this->middlewares as $Middleware) {\n $QueueRequestHandler->add_middleware($Middleware);\n }\n $PsrResponse = $QueueRequestHandler->handle($PsrRequest);\n $this->emit($PsrResponse);\n\n }", "public function HandleRequest(Request $request)\r\n {\r\n $command = $this->_commandResolver->GetCommand($request);\t// Create command object for Request\r\n $response = $command->Execute($request);\t\t\t\t\t// Execute the command to get response\r\n $view = ApplicationController::GetView($response);\t\t\t\t\t// Send response to the appropriate view for display\r\n $view->Render();\t\t\t\t\t\t\t\t\t\t\t// Display the view\r\n }", "public function process($path, Request $request);", "public function handle(string $query, ServerRequestInterface $request);", "public function handleRequest()\n\t{\n\t\t$fp = $this->fromRequest();\n\t\treturn $fp->render();\n\t}", "private function _processRequest()\n\t{\n\t\t// prevent unauthenticated access to API\n\t\t$this->_secureBackend();\n\n\t\t// get the request\n\t\tif (!empty($_REQUEST)) {\n\t\t\t// convert to object for consistency\n\t\t\t$this->request = json_decode(json_encode($_REQUEST));\n\t\t} else {\n\t\t\t// already object\n\t\t\t$this->request = json_decode(file_get_contents('php://input'));\n\t\t}\n\n\t\t//check if an action is sent through\n\t\tif(!isset($this->request->action)){\n\t\t\t//if no action is provided then reply with a 400 error with message\n\t\t\t$this->reply(\"No Action Provided\", 400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n\n\t\t//check if method for the action exists\n\t\tif(!method_exists($this, $this->request->action)){\n\t\t\t//if method doesn't exist, send 400 code and message with reply'\n\t\t\t$this->reply(\"Action method not found\",400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n \n\t\tswitch($this->request->action){\n\t\t\tcase \"hello\":\n\t\t\t\t$this->hello($this->request->data);\n\t\t\t\tbreak;\n\t\t\tcase \"submit_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->submit_video($this->request, $_FILES);\n\t\t\t\tbreak;\n\t\t\tcase \"remove_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->remove_video($this->request);\n\t\t\t\tbreak;\n\t\t\tcase \"isSubmitted\":\n\t\t\t\t$this->isSubmitted($this->request);\n\t\t\tdefault:\n\t\t\t\t$this->reply(\"action switch failed\",400);\n\t\t\tbreak;\n\t\t}\n\n\n\n\t}", "public function handleRequest ()\n\t{\n\t\t$this->version = '1.0';\n\t\t$this->id = NULL;\n\n\t\tif ($this->getProperty(self::PROPERTY_ENABLE_EXTRA_METHODS))\n\t\t\t$this->publishExtraMethods();\n\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t{\n\n\t\t\t$json = file_get_contents('php://input');\n\t\t\t$request = \\json_decode($json);\n\n\t\t\tif (is_array($request))\n\t\t\t{\n\t\t\t\t// Multicall\n\t\t\t\t$this->version = '2.0';\n\n\t\t\t\t$response = array();\n\t\t\t\tforeach ($request as $singleRequest)\n\t\t\t\t{\n\t\t\t\t\t$singleResponse = $this->handleSingleRequest($singleRequest, TRUE);\n\t\t\t\t\tif ($singleResponse !== FALSE)\n\t\t\t\t\t\t$response[] = $singleResponse;\n\t\t\t\t}\n\n\t\t\t\t// If all methods in a multicall are notifications, we must not return an empty array\n\t\t\t\tif (count($response) == 0)\n\t\t\t\t\t$response = FALSE;\n\t\t\t}\n\t\t\telse if (is_object($request))\n\t\t\t{\n\t\t\t\t$this->version = $this->getRpcVersion($request);\n\t\t\t\t$response = $this->handleSingleRequest($request);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$response = $this->formatError(self::ERROR_INVALID_REQUEST);\n\t\t}\n\t\telse if ($_SERVER['PATH_INFO'] != '')\n\t\t{\n\t\t\t$this->version = '1.1';\n\t\t\t$this->id = NULL;\n\n\t\t\t$method = substr($_SERVER['PATH_INFO'], 1);\n\t\t\t$params = $this->convertFromRpcEncoding($_GET);\n\n\t\t\tif (!$this->hasMethod($method))\n\t\t\t\t$response = $this->formatError(self::ERROR_METHOD_NOT_FOUND);\n\t\t\telse\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tRpcResponse::setWriter(new JsonRpcResponseWriter($this->version, $this->id));\n\t\t\t\t\t$res = $this->invoke($method, $params);\n\t\t\t\t\tif ($res instanceof JsonRpcResponseWriter)\n\t\t\t\t\t{\n\t\t\t\t\t\t$res->finalize();\n\t\t\t\t\t\t$resposne = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$response = $this->formatResult($res);\n\t\t\t\t}\n\t\t\t\tcatch (\\Exception $exception)\n\t\t\t\t{\n\t\t\t\t\t$response = $this->formatException($exception);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$response = $this->formatError(self::ERROR_PARSE_ERROR);\n\t\t}\n\n\t\tif (!headers_sent())\n\t\t{\n\t\t\theader('Content-Type: application/json', TRUE);\n\t\t\theader('Cache-Control: nocache', TRUE);\n\t\t\theader('Pragma: no-cache', TRUE);\n\t\t}\n\n\t\tif ($response !== FALSE)\n\t\t{\n\t\t\t$result = \\json_encode($this->convertToRpcEncoding($response));\n\n\t\t\tif ($result === FALSE)\n\t\t\t\terror_log(var_export($response, TRUE));\n\t\t\telse\n\t\t\t\techo($result);\n\t\t}\n\t}", "public function handle($request)\n {\n $this->setRouter($this->app->compose('Cygnite\\Base\\Router\\Router', $request), $request);\n\n try {\n $response = $this->sendRequestThroughRouter($request);\n /*\n * Check whether return value is a instance of Response,\n * otherwise we will try to fetch the response form container,\n * create a response and return to the browser.\n *\n */\n if (!$response instanceof ResponseInterface && !is_array($response)) {\n $r = $this->app->has('response') ? $this->app->get('response') : '';\n $response = Response::make($r);\n }\n } catch (\\Exception $e) {\n $this->handleException($e);\n } catch (Throwable $e) {\n $this->handleException($e);\n }\n\n return $response;\n }", "public function handleRequest()\n\t{\n $response = array();\n switch ($this->get_server_var('REQUEST_METHOD')) \n {\n case 'OPTIONS':\n case 'HEAD':\n $response = $this->head();\n break;\n case 'GET':\n $response = $this->get();\n break;\n case 'PATCH':\n case 'PUT':\n case 'POST':\n $response = $this->post();\n break;\n case 'DELETE':\n $response = $this->delete();\n break;\n default:\n $this->header('HTTP/1.1 405 Method Not Allowed');\n }\n\t\treturn $response;\n }", "public function handleRequest(Zend_Controller_Request_Http $request)\n {\n \n }", "final public function handle(Request $request)\n {\n $response = $this->process($request);\n if (($response === null) && ($this->successor !== null)) {\n $response = $this->successor->handle($request);\n }\n\n return $response;\n }", "public function process(Aloi_Serphlet_Application_HttpRequest $request, Aloi_Serphlet_Application_HttpResponse $response) {\r\n\r\n\t\ttry {\r\n\t\t\t// Identify the path component we will use to select a mapping\r\n\t\t\t$path = $this->processPath($request, $response);\r\n\t\t\tif (is_null($path)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (self::$log->isDebugEnabled()) {\r\n\t\t\t\tself::$log->debug('Processing a \"' . $request->getMethod() . '\" for path \"' . $path . '\"');\r\n\t\t\t}\r\n\r\n\t\t\t// Select a Locale for the current user if requested\r\n\t\t\t$this->processLocale($request, $response);\r\n\r\n\t\t\t// Set the content type and no-caching headers if requested\r\n\t\t\t$this->processContent($request, $response);\r\n\t\t\t$this->processNoCache($request, $response);\r\n\r\n\t\t\t// General purpose preprocessing hook\r\n\t\t\tif (!$this->processPreprocess($request, $response)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t//Identify the mapping for this request\r\n\t\t\t$mapping = $this->processMapping($request, $response, $path);\r\n\t\t\tif (is_null($mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Check for any role required to perform this action\r\n\t\t\tif (!$this->processRoles($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process any ActionForm bean related to this request\r\n\t\t\t$form = $this->processActionForm($request, $response, $mapping);\r\n\t\t\t$this->processPopulate($request, $response, $form, $mapping);\r\n\t\t\tif (!$this->processValidate($request, $response, $form, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process a forward or include specified by this mapping\r\n\t\t\tif (!$this->processForward($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (!$this->processInclude($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Create or acquire the Action instance to process this request\r\n\t\t\t$action = $this->processActionCreate($request, $response, $mapping);\r\n\t\t\tif (is_null($action)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Call the Action instance itself\r\n\t\t\t$forward = $this->processActionPerform($request, $response, $action, $form, $mapping);\r\n\r\n\t\t\t// Process the returned ActionForward instance\r\n\t\t\t$this->processForwardConfig($request, $response, $forward);\r\n\t\t} catch (ServletException $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t}", "function handleRequest() {\n // I. On récupère l'action demandée par l'utilisateur, avec retrocompatibilité\n // Controller et Entité\n $entityName = (isset($_GET['controller']) ? $_GET['controller'] : \"article\");\n // on retravaille le nom pour obtenir un nom de la forme \"Article\"\n $entityName = ucfirst(strtolower($entityName));\n\n // Action\n $actionName = (isset($_GET['action']) ? $_GET['action'] : \"index\");\n $actionName = strtolower($actionName);\n\n // II à IV sont maintenant dans loadDep\n $controller = $this->loadDependencies($entityName);\n\n // V. On regarde si l'action de controller existe, puis on la charge\n // on retravaille la var obtenue pour obtenir un nom de la forme \"indexAction\"\n $action = $actionName . \"Action\";\n\n // si la méthode demandée n'existe pas, remettre \"index\"\n if (!method_exists($controller, $action)) {\n $actionName = \"index\";\n $action = \"indexAction\";\n }\n\n // on stock le titre sous la forme \"Article - Index\"\n $this->title = $entityName . \" - \" . $actionName;\n\n // on appelle dynamiquement la méthode de controller\n $this->content = $controller->$action();\n }", "public function handle(RequestInterface $request): ResponseInterface;", "public function handleRequest() {\n $this->loadErrorHandler();\n\n $this->sanitizeRequest();\n $this->modx->invokeEvent('OnHandleRequest');\n if (!$this->modx->checkSiteStatus()) {\n header('HTTP/1.1 503 Service Unavailable');\n if (!$this->modx->getOption('site_unavailable_page',null,1)) {\n $this->modx->resource = $this->modx->newObject('modDocument');\n $this->modx->resource->template = 0;\n $this->modx->resource->content = $this->modx->getOption('site_unavailable_message');\n } else {\n $this->modx->resourceMethod = \"id\";\n $this->modx->resourceIdentifier = $this->modx->getOption('site_unavailable_page',null,1);\n }\n } else {\n $this->checkPublishStatus();\n $this->modx->resourceMethod = $this->getResourceMethod();\n $this->modx->resourceIdentifier = $this->getResourceIdentifier($this->modx->resourceMethod);\n if ($this->modx->resourceMethod == 'id' && $this->modx->getOption('friendly_urls', null, false) && !$this->modx->getOption('request_method_strict', null, false)) {\n $uri = $this->modx->context->getResourceURI($this->modx->resourceIdentifier);\n if (!empty($uri)) {\n if ((integer) $this->modx->resourceIdentifier === (integer) $this->modx->getOption('site_start', null, 1)) {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL);\n } else {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL) . $uri;\n }\n $this->modx->sendRedirect($url, array('responseCode' => 'HTTP/1.1 301 Moved Permanently'));\n }\n }\n }\n if (empty ($this->modx->resourceMethod)) {\n $this->modx->resourceMethod = \"id\";\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $this->modx->resourceIdentifier = $this->_cleanResourceIdentifier($this->modx->resourceIdentifier);\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $found = $this->findResource($this->modx->resourceIdentifier);\n if ($found) {\n $this->modx->resourceIdentifier = $found;\n $this->modx->resourceMethod = 'id';\n } else {\n $this->modx->sendErrorPage();\n }\n }\n $this->modx->beforeRequest();\n $this->modx->invokeEvent(\"OnWebPageInit\");\n\n if (!is_object($this->modx->resource)) {\n if (!$this->modx->resource = $this->getResource($this->modx->resourceMethod, $this->modx->resourceIdentifier)) {\n $this->modx->sendErrorPage();\n return true;\n }\n }\n\n return $this->prepareResponse();\n }", "public function process(\n ServerRequestInterface $request,\n RequestHandlerInterface $handler\n );", "protected function handleRequest() {\n\t\t// TODO: remove conditional when we have a dedicated error render\n\t\t// page and move addModule to Mustache#getResources\n\t\tif ( $this->adapter->getFormClass() === 'Gateway_Form_Mustache' ) {\n\t\t\t$modules = $this->adapter->getConfig( 'ui_modules' );\n\t\t\tif ( !empty( $modules['scripts'] ) ) {\n\t\t\t\t$this->getOutput()->addModules( $modules['scripts'] );\n\t\t\t}\n\t\t\tif ( $this->adapter->getGlobal( 'LogClientErrors' ) ) {\n\t\t\t\t$this->getOutput()->addModules( 'ext.donationInterface.errorLog' );\n\t\t\t}\n\t\t\tif ( !empty( $modules['styles'] ) ) {\n\t\t\t\t$this->getOutput()->addModuleStyles( $modules['styles'] );\n\t\t\t}\n\t\t}\n\t\t$this->handleDonationRequest();\n\t}", "public function handleHttpRequest($requestParams)\n\t{\n\t\t$action = strtolower(@$requestParams[self::REQ_PARAM_ACTION]);\t\t\n\t\t$methodName = $this->actionToMethod($action);\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$this->$methodName($requestParams);\n\t\t} catch(Exception $e)\n\t\t{\n\t\t\techo \"Error: \".$e->getMessage();\n\t\t}\n\t}", "public static function handleRequest()\n\t{\n\t\t// Load language strings\n\t\tself::loadLanguage();\n\n\t\t// Load the controller and let it run the show\n\t\trequire_once dirname(__FILE__).'/classes/controller.php';\n\t\t$controller = new LiveUpdateController();\n\t\t$controller->execute(JRequest::getCmd('task','overview'));\n\t\t$controller->redirect();\n\t}", "public function handle() {\n $this->initDb(((!isset(self::$_config['db']['type'])) ? 'mysql' : self::$_config['db']['type']));\n $request = new corelib_request(self::$_config['routing'], self::$_config['reg_routing']);\n $path = parse_url($_SERVER['REQUEST_URI']);\n\n if (self::$_config['home'] == \"/\" || self::$_config['home'] == \"\") {\n $uri = ltrim($path['path'], '/');\n } else {\n $uri = str_replace(self::$_config['home'], '', $path['path']);\n }\n\n if (\"\" == $uri || \"/\" == $uri) {\n $uri = self::$_config['routing']['default']['controller'] . '/' . self::$_config['routing']['default']['action'];\n }\n self::$isAjax = $request->isAjax();\n self::$request = $request->route($uri);\n self::$request['uri'] = $uri;\n\n if (self::$request['action'] == \"\")\n self::$request['action'] = self::$_config['routing']['default']['action'];\n\n $this->_run( self::$request['params'] );\n }", "public function processRequest() {\n $this->server->service($GLOBALS['HTTP_RAW_POST_DATA']);\n }", "public function request_handler(){\r\n\t\t$route = new Router;\r\n\t\t$session = new Session;\r\n\t\t$segments = $route->urlRoute();\r\n\t\t#check if controller/action exist\r\n\t\t#if not use default_controller / default_action\r\n\t\tif( count($segments) == 0 || count($segments) == 1 ){\r\n\t\t\tinclude_class_method( default_controller , default_action );\r\n\t\t}else{\r\n\t\t#if controller/action exist in the url\r\n\t\t#then check the controller if it's existed in the file\r\n\t\t\tif( file_exists( CONTROLLER_DIR . $segments[0] . CONT_EXT ) )\r\n\t\t\t{\r\n\t\t\t\t#check for segments[1] = actions\r\n\t\t\t\t#if segments[1] exist, logically segments[0] which is the controller is also exist!!\r\n\t\t\t\t//if( isset($segments[1]) ){\r\n\t\t\t\t\tinclude_class_method( $segments[0], $segments[1] . 'Action' );\r\n\t\t\t\t//}\r\n\t\t\t}else{\r\n\t\t\t\terrorHandler(CONTROLLER_DIR . $segments[0] . CONT_EXT);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function handle() {\n if(method_exists($this->class, $this->function)) {\n echo $this->class->{$this->function}($this->request);\n }else {\n echo Response::response(['error' => 'function does not exist on ' . get_class($this->class)], 500);\n }\n }", "public function handle(ClientInterface $client, RequestInterface $request, HttpRequest $httpRequest);", "public function handleRequest() {\n $questions=$this->contactsService->getAllQuestions(\"date\");\n //load all the users\n $userList = User::loadUsers();\n //load all the topics\n \t\t$topics = $this->contactsService2->getAllTopics(\"name\");\n \t\t\n\t\t\t\trequire_once '../view/home.tpl';\n\t}", "public function serve_request()\n {\n }", "public static function process($request){\r\n\t\tcall_user_func($request -> action, $request -> params);\r\n\t}", "function process($request) {\n\t//$logFusion =& LoggerManager::getLogger('fusion');\n//PBXFusion begin\n\t$request=$this->mapRequestVars($request);\n $mode = $request->get('callstatus');\n\t//$logFusion->debug(\"PBX CONTROLLER PROCESS mode=\".$mode);\n//PBXFusion end\n switch ($mode) {\n\t//PBXFusion begin\n \t case \"CallStart\" :\n $this->processCallStart($request);\n break;\n\t//PBXFusion end\n case \"StartApp\" :\n $this->processStartupCallFusion($request);\n break;\n case \"DialAnswer\" :\n $this->processDialCallFusion($request);\n break;\n case \"Record\" :\n $this->processRecording($request);\n break;\n case \"EndCall\" :\n $this->processEndCallFusion($request);\n break;\n case \"Hangup\" :\n $callCause = $request->get('causetxt');\n if ($callCause == \"null\") {\n break;\n }\n $this->processHangupCall($request);\n break;\n }\n }", "public function handle() {\n\t\n\t\t$task = $this->request->getTask();\n\t\t$handler = $this->resolveHandler($task);\n\t\t$action = $this->request->getAction();\n\t\t$method = empty($action) ? $this->defaultActionMethod : $action.$this->actionMethodSuffix;\n\t\t\n\t\tif (! method_exists($handler, $method)) {\n\t\t\tthrow new Task\\NotHandledException(\"'{$method}' method not found on handler.\");\n\t\t}\n\t\t\n\t\t$handler->setRequest($this->request);\n\t\t$handler->setIo($this->io);\n\t\t\n\t\treturn $this->invokeHandler($handler, $method);\n\t}", "private function handleCall() { //$this->request\n $err = FALSE;\n // route call to method\n $this->logToFile($this->request['action']);\n switch($this->request['action']) {\n // Edit form submitted\n case \"edit\":\n // TODO: improve error handling\n try {\n $this->logToFile(\"case: edit\");\n $this->edit($this->request['filename']);\n //$this->save();\n } catch (Exception $e) {\n $err = \"Something went wrong: \";\n $err .= $e.getMessage();\n }\n break;\n }\n // TODO: set error var in response in case of exception / error\n // send JSON response\n if($err !== FALSE) {\n $this->request['error_msg'] = $err;\n }\n $this->giveJSONResponse($this->request);\n }", "function handle()\n {\n $this->verifyPost();\n\n $postTarget = $this->determinePostTarget();\n\n $this->filterPostData();\n\n switch ($postTarget) {\n case 'upload_media':\n $this->handleMediaFileUpload();\n break;\n case 'feed':\n $this->handleFeed();\n break;\n case 'feed_media':\n $this->handleFeedMedia();\n break;\n case 'feed_users':\n $this->handleFeedUsers();\n break;\n case 'delete_media':\n $this->handleDeleteMedia();\n break;\n }\n }", "public function run() {\n\t\t// If this particular request is not a hook, something is wrong.\n\t\tif (!isset($this->server[self::MERGADO_HOOK_AUTH_HEADER])) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s is to be used only for handling hooks sent from Mergado.\n\t\t\t\tMergado-Apps-Hook-Auth is missing.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t}\n\n\t\tif (!$decoded = json_decode($this->rawRequest, true)) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s cannot handle request, because the data to be handled is empty.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t} elseif (!isset($decoded['action'])) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s cannot handle the hook, because the hook action is undefined.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t};\n\n\t\t$this->handle($decoded['action'], $decoded);\n\n\t}", "public function handleRequest()\n {\n $version = $this->versionEngine->getVersion();\n $queryConfiguration = $version->parseRequest($this->columnConfigurations);\n $this->provider->prepareForProcessing($queryConfiguration, $this->columnConfigurations);\n $data = $this->provider->process();\n return $version->createResponse($data, $queryConfiguration, $this->columnConfigurations);\n }", "public function process()\n\t{\n\t\t$action = $this->getAction();\n\t\tswitch (strtolower($action))\n\t\t{\n\t\t\tcase 'get':\n\t\t\tcase 'put':\n\t\t\tcase 'post':\n\t\t\tcase 'delete':\n\t\t}\t\n\t}", "public function run(){\n // server response object \n $requestMethod = $this->requestBuilder->getRequestMethod();\n $this->response = new Response($requestMethod);\n\n try{\n $route = $this->router->validateRequestedRoute($this->requestBuilder);\n\n // serve request object\n $this->requestBuilder->setQuery();\n $this->requestBuilder->setBody();\n $requestParams = $this->requestBuilder->getParam();\n $requestQuery = $this->requestBuilder->getQuery();\n $requestBody = $this->requestBuilder->getBody(); \n $this->request = new Request($requestParams, $requestQuery, $requestBody);\n\n $callback = $route->getCallback();\n $callback($this->request, $this->response);\n }catch(RouteNotImplementedException $e){\n $this->response->statusCode(404)->json($e->getMessage()); \n }\n \n }", "final public function handle()\n {\n \n $this->_preHandle();\n \n if ($this->_request->getActionName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the action name.');\n }\n\n if ($this->_request->getProviderName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the provider name.');\n }\n \n ob_start();\n \n try {\n $dispatcher = new ZendL_Tool_Rpc_Endpoint_Dispatcher();\n $dispatcher->setRequest($this->_request)\n ->setResponse($this->_response)\n ->dispatch();\n \n } catch (Exception $e) {\n //@todo implement some sanity here\n die($e->getMessage());\n //$this->_response->setContent($e->getMessage());\n return;\n }\n \n if (($content = ob_get_clean()) != '') {\n $this->_response->setContent($content);\n }\n \n $this->_postHandle();\n }", "public function RouteRequest ();", "public function handle(ServerRequestInterface $request, $handler, array $vars): ?ResponseInterface;", "public function DispatchRequest ();", "protected function handleRequest() {\n\t\t// FIXME: is this necessary?\n\t\t$this->getOutput()->allowClickjacking();\n\t\tparent::handleRequest();\n\t}", "public function listen() {\n\t\t// Checks the user agents match\n\t\tif ( $this->user_agent == $this->request_user_agent ) {\n\t\t\t// Determine if a key request has been made\n\t\t\tif ( isset( $_GET['key'] ) ) {\n\t\t\t\t$this->download_update();\n\t\t\t} else {\n\t\t\t\t// Determine the action requested\n\t\t\t\t$action = filter_input( INPUT_POST, 'action', FILTER_SANITIZE_STRING );\n\n\t\t\t\t// If that method exists, call it\n\t\t\t\tif ( method_exists( $this, $action ) )\n\t\t\t\t\t$this->{$action}();\n\t\t\t}\n\t\t}\n\t}", "abstract public function request();", "public function run() {\r\n $this->routeRequest(new Request());\r\n }", "public function processAction(Request $request)\n {\n // Get the request Vars\n $this->requestQuery = $request->query;\n\n // init the hybridAuth instance\n $provider = trim(strip_tags($this->requestQuery->get('hauth_start')));\n $cookieName = $this->get('azine_hybrid_auth_service')->getCookieName($provider);\n $this->hybridAuth = $this->get('azine_hybrid_auth_service')->getInstance($request->cookies->get($cookieName), $provider);\n\n // If openid_policy requested, we return our policy document\n if ($this->requestQuery->has('get') && 'openid_policy' == $this->requestQuery->get('get')) {\n return $this->processOpenidPolicy();\n }\n\n // If openid_xrds requested, we return our XRDS document\n if ($this->requestQuery->has('get') && 'openid_xrds' == $this->requestQuery->get('get')) {\n return $this->processOpenidXRDS();\n }\n\n // If we get a hauth.start\n if ($this->requestQuery->has('hauth_start') && $this->requestQuery->get('hauth_start')) {\n return $this->processAuthStart();\n }\n // Else if hauth.done\n elseif ($this->requestQuery->has('hauth_done') && $this->requestQuery->get('hauth_done')) {\n return $this->processAuthDone($request);\n }\n // Else we advertise our XRDS document, something supposed to be done from the Realm URL page\n\n return $this->processOpenidRealm();\n }", "public function run() {\n $base = $this->request->getNextRoute();\n if ($base !== BASE) {\n $this->response->notFound();\n }\n $start = $this->request->getNextRoute();\n if ($rs = $this->getRs($start)) {\n if ($this->request->isOptions()) {\n $this->response->okEmpty();\n return;\n }\n try {\n $this->response->ok($rs->handleRequest());\n\n } catch (UnauthorizedException $e) {\n $this->response->unauthorized();\n\n } catch (MethodNotAllowedException $e) {\n $this->response->methodNotAllowed();\n\n } catch (BadRequestExceptionInterface $e) {\n $this->response->badRequest($e->getMessage());\n\n } catch (UnavailableExceptionInterface $e) {\n $this->response->unavailable($e->getMessage());\n\n } catch (Exception $e) {\n $this->response->unavailable($e->getMessage());\n }\n } else {\n $this->response->badRequest();\n }\n }", "public function handle(Request $request, Response|JsonResponse|BinaryFileResponse|StreamedResponse $response, int $length);", "public function handle(Request $request, Closure $next);", "public function handleGetRequest($id);", "abstract function doExecute($request);", "public function parseCurrentRequest()\n {\n // If 'action' is post, data will only be read from 'post'\n if ($action = $this->request->post('action')) {\n die('\"post\" method action handling not implemented');\n }\n \n $action = $this->request->get('action') ?: 'home';\n \n if ($response = $this->actionHandler->trigger($action, $this)) {\n $this->getResponder()->send($response);\n } else {\n die('404 not implemented');\n }\n }", "abstract public function mapRequest($request);", "public function handle(ServerRequestInterface $request)\n {\n $router = $this->app->get(RouterInterface::class);\n $response = $router->route($request);\n\n if (! headers_sent()) {\n\n // Status\n header(sprintf(\n 'HTTP/%s %s %s',\n $response->getProtocolVersion(),\n $response->getStatusCode(),\n $response->getReasonPhrase()\n ));\n\n // Headers\n foreach ($response->getHeaders() as $name => $values) {\n foreach ($values as $value) {\n header(sprintf('%s: %s', $name, $value), false);\n }\n }\n }\n\n echo $response->getBody()->getContents();\n }", "abstract public function processRequest(PriceWaiter_NYPWidget_Controller_Endpoint_Request $request);", "private function handleRequest()\n {\n // we check the inputs validity\n $validator = Validator::make($this->request->only('rowsNumber', 'search', 'sortBy', 'sortDir'), [\n 'rowsNumber' => 'required|numeric',\n 'search' => 'nullable|string',\n 'sortBy' => 'nullable|string|in:' . $this->columns->implode('attribute', ','),\n 'sortDir' => 'nullable|string|in:asc,desc',\n ]);\n // if errors are found\n if ($validator->fails()) {\n // we log the errors\n Log::error($validator->errors());\n // we set back the default values\n $this->request->merge([\n 'rowsNumber' => $this->rowsNumber ? $this->rowsNumber : config('tablelist.default.rows_number'),\n 'search' => null,\n 'sortBy' => $this->sortBy,\n 'sortDir' => $this->sortDir,\n ]);\n } else {\n // we save the request values\n $this->setAttribute('rowsNumber', $this->request->rowsNumber);\n $this->setAttribute('search', $this->request->search);\n }\n }", "public function handle() {\n\t\t\n\t\t\n\t\t\n\t\theader('ApiVersion: 1.0');\n\t\tif (!isset($_COOKIE['lg_app_guid'])) {\n\t\t\t//error_log(\"NO COOKIE\");\n\t\t\t//setcookie(\"lg_app_guid\", uniqid(rand(),true),time()+(10*365*24*60*60));\n\t\t} else {\n\t\t\t//error_log(\"cookie: \".$_COOKIE['lg_app_guid']);\n\t\t\t\n\t\t}\n\t\t// checks if a JSON-RCP request has been received\n\t\t\n\t\tif (($_SERVER['REQUEST_METHOD'] != 'POST' && (empty($_SERVER['CONTENT_TYPE']) || strpos($_SERVER['CONTENT_TYPE'],'application/json')===false)) && !isset($_GET['d'])) {\n\t\t\t\techo \"INVALID REQUEST\";\n\t\t\t// This is not a JSON-RPC request\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\t// reads the input data\n\t\tif (isset($_GET['d'])) {\n\t\t\tdefine(\"WEB_REQUEST\",true);\n\t\t\t$request=urldecode($_GET['d']);\n\t\t\t$request = stripslashes($request);\n\t\t\t$request = json_decode($request, true);\n\t\t\t\n\t\t} else {\n\t\t\tdefine(\"WEB_REQUEST\",false);\n\t\t\t//error_log(file_get_contents('php://input'));\n\t\t\t$request = json_decode(file_get_contents('php://input'),true);\n\t\t\t//error_log(print_r(apache_request_headers(),true));\n\t\t}\n\t\t\n\t\terror_log(\"Method: \".$request['method']);\n\t\tif (!isset($this->exemptedMethods[$request['method']])) {\n\t\t\ttry {\n\t\t\t\t$this->authenticate();\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$this->authenticated = false;\n\t\t\t\t$this->handleError($e);\n\t\t\t}\n\t\t} else {\n\t\t\t//error_log('exempted');\n\t\t}\n\t\ttrack_call($request);\n\t\t//error_log(\"RPC Method Called: \".$request['method']);\n\t\t\n\t\t//include the document containing the function being called\n\t\tif (!function_exists($request['method'])) {\n\t\t\t$path_to_file = \"./../include/methods/\".$request['method'].\".php\";\n\t\t\tif (file_exists($path_to_file)) {\n\t\t\t\tinclude $path_to_file;\n\t\t\t} else {\n\t\t\t\t$e = new Exception('Unknown method. ('.$request['method'].')', 404, null);\n \t$this->handleError($e);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t// executes the task on local object\n\t\ttry {\n\t\t\t\n\t\t\t$result = @call_user_func($request['method'],$request['params']);\n\t\t\t\n\t\t\tif (!is_array($result) || !isset($result['result']) || $result['result']) {\n\t\t\t\t\n\t\t\t\tif (is_array($result) && isset($result['result'])) unset($result['result']);\n\t\t\t\t\n\t\t\t\t$response = array (\n\t\t\t\t\t\t\t\t\t'jsonrpc' => '2.0',\n\t\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t\t'result' => $result,\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\t} else {\n\t\t\t\tunset($result['result']);\n\t\t\t\t\n\t\t\t\t$response = array (\n\t\t\t\t\t\t\t\t\t'jsonrpc' => '2.0',\n\t\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t\t'error' => $result\n\t\t\t\t\t\t\t\t );\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t\n\t\t\t$response = array (\n\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t'result' => NULL,\n\t\t\t\t\t\t\t\t'error' => $e->getMessage()\n\t\t\t\t\t\t\t\t);\n\t\t\t\n\t\t}\n\t\t// output the response\n\t\tif (!empty($request['id'])) { // notifications don't want response\n\t\t\theader('content-type: text/javascript');\n\t\t\t//error_log(@print_r($response));\n\t\t\tif (isset($_GET['d'])) $str_response = $_GET['jsoncallback'].\"(\".str_replace('\\/','/',json_encode($response)).\")\";\n\t\t\telse $str_response = str_replace('\\/','/',json_encode($response));\n\t\t\t\n\t\t\tif ($_SERVER['SERVER_ADDR']=='192.168.1.6') {\n\t\t\t\t//error_log($str_response);\n\t\t\t}\n\t\t\techo $str_response;\n\t\t}\n\t\t\n\t\t\n\t\t// finish\n\t\treturn true;\n\t}", "protected function handle(Request $request)\n {\n return 1;\n }", "public function __invoke(Request $request, RequestHandler $handler) {\n R::setup('mysql:host=127.0.0.1;dbname=cellar','root','');\n \n $response = $handler->handle($request);\n R::close();\n return $response;\n }", "public function handle($req)\n {\n $params = $req->post ?: [];\n\n $files = $this->transformFiles($req->files);\n\n $cookies = $req->cookie ?: [];\n\n $server = $this->transformHeadersToServerVars(array_merge($req->header, [\n 'PATH_INFO' => array_get($req->server, 'path_info'),\n ]));\n $server['X_REQUEST_ID'] = Str::uuid()->toString();\n\n $requestUri = $req->server['request_uri'];\n if (isset($req->server['query_string']) && $req->server['query_string']) {\n $requestUri .= \"?\" . $req->server['query_string'];\n }\n\n $resp = $this->call(\n strtolower($req->server['request_method']),\n $requestUri, $params, $cookies, $files,\n $server, $req->rawContent()\n );\n\n return [\n 'status' => $resp->getStatusCode(),\n 'headers' => $resp->headers,\n 'body' => $resp->getContent(),\n ];\n }", "public function handle(Request $request)\n {\n $route_params = $this->_router->match($request->getUri());\n $route = $route_params['route'];\n $params = $route_params['params'];\n\n $func = reset($route) . self::CONTROLLER_METHOD_SUFIX;\n $class_name = key($route);\n $controller = new $class_name($request);\n\n $response = call_user_func_array(\n [\n $controller,\n $func,\n ],\n [$params]\n );\n\n if ($response instanceof Response) {\n return $response;\n } else {\n throw new InvalidHttpResponseException();\n }\n }" ]
[ "0.8299201", "0.8147294", "0.8147294", "0.8147294", "0.8127764", "0.7993589", "0.7927201", "0.7912899", "0.7899075", "0.76317674", "0.75089735", "0.7485808", "0.74074036", "0.7377414", "0.736802", "0.7294553", "0.72389543", "0.7230166", "0.72108", "0.71808434", "0.7170364", "0.71463037", "0.7126907", "0.7122795", "0.71225274", "0.7116879", "0.70607233", "0.6981947", "0.6966695", "0.69393975", "0.6912079", "0.68985975", "0.6887614", "0.68774897", "0.6806274", "0.67969805", "0.67778915", "0.6762979", "0.67565143", "0.67533374", "0.67192745", "0.6683243", "0.66487724", "0.66395754", "0.6634629", "0.66283566", "0.6617558", "0.6610097", "0.6610011", "0.6544976", "0.653806", "0.6512757", "0.64682734", "0.64381886", "0.6416964", "0.63373476", "0.63359964", "0.6334543", "0.63308066", "0.6321675", "0.63176167", "0.631661", "0.6310991", "0.63108873", "0.6295945", "0.6279438", "0.62778515", "0.62508965", "0.62422955", "0.62321424", "0.62237644", "0.6203428", "0.61954546", "0.6191255", "0.61774665", "0.61682004", "0.6151806", "0.61271876", "0.61257905", "0.6116093", "0.61126447", "0.6112368", "0.6101652", "0.60893977", "0.60871464", "0.60862815", "0.60734737", "0.60535145", "0.6028341", "0.60250086", "0.60224646", "0.6011745", "0.6011483", "0.60106593", "0.5998867", "0.5997086", "0.5991233", "0.59844923", "0.59668386", "0.5961315", "0.5954762" ]
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
Tries to determine ID of the current user's language by using cookies or browser language
public static function run() { // We are looking for language in the user's cookie if (isset($_COOKIE['x-language-id'])) { $isset = LangHelper::getLanguageByParam('id', $_COOKIE['x-language-id']); if ($isset !== null) { return $isset['id']; } } // Let's look at the language of the browser if (getenv('HTTP_ACCEPT_LANGUAGE')) { $arr = explode(';', getenv('HTTP_ACCEPT_LANGUAGE')); foreach ($arr as $val) { $val = preg_replace("/^q=[\d\.]+,?/", '', $val); $isset = LangHelper::getLanguageByParam('locale', substr($val, 0, 2)); if ($isset !== null) { return $isset['id']; } } } // Default language $lang_id = LangHelper::getLanguage('id'); if ($lang_id !== null) { return $lang_id; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getLanguageId()\n {\n $languageId = \"\";\n if (isset($_SESSION['Shopware'][\"Auth\"]->localeID) && $_SESSION['Shopware'][\"Auth\"]->localeID != \"\") {\n $languageId = $_SESSION['Shopware'][\"Auth\"]->localeID;\n }\n return $languageId;\n }", "function common_current_language(){\r\n\tif($_SESSION['lang'] == 'id'){\r\n\t\treturn 'Bahasa Indonesia';\r\n\t}\r\n\telse if($_SESSION['lang'] == 'en'){\r\n\t\treturn 'English';\r\n\t}\r\n}", "private static function getLanguage()\n {\n if (isset($_COOKIE[\"language\"]))\n {\n return $_COOKIE[\"language\"];\n }\n else\n {\n // Default is Czech\n return \"cs\";\n }\n }", "protected function getLanguage()\n {\n $lang = 1;\n try {\n $lang = Registry::get('lang');\n } catch (\\Exception $e) {\n if (!empty($_SESSION['lang'])) {\n $lang = $_SESSION['lang'];\n }\n\n if (!empty($this->user->languageId)) {\n $lang = $this->user->languageId;\n }\n\n $this->setLanguage($lang);\n }\n\n return $lang;\n }", "private function get_language ()\n {\n $lang = filter_input ( INPUT_COOKIE, 'lang', FILTER_CALLBACK, [ 'options' => [ $this, 'filter_lang' ] ] );\n\t$new_lang = filter_input ( INPUT_GET, 'lang', FILTER_CALLBACK, [ 'options' => [ $this, 'filter_lang' ] ] );\n\tif ( $new_lang ) {\n\t\t$lang = $new_lang;\n\t\tsetcookie( \"lang\", substr ( $lang, 0, 2 ), time() + 3600 * 24 * 365, '/' );\n\t}\n\t\n\treturn $lang ?? 'uk';\n }", "function getSessionLanguage()\n {\n\n // define all the global variables\n global $user;\n\n // check if its a user or guest session\n if ($this->logged_in()) { // user session\n\n // grab the users preferred language\n $language = $user->getPreferredLanguage();\n\n } else { // guest session\n\n // check if any cookies were to be found for a custom language\n if (isset($_COOKIE['language'])) {\n $language = $_COOKIE['language'];\n } else {\n $language = \"\";\n }\n }\n\n // check if $language has been initialized or not\n if (is_string($language) && $language != \"\") {\n return $language; // if no errors then return the language string\n } else {\n return false; // if no language, then just return false\n }\n }", "function getLang() {\n\tif (request()->cookie(config('translate.su_cookie_name'))) {\n\t\t$cookie = request()->cookie(config('translate.su_cookie_name'));\n\t} else {\n\t\tif (request()->cookie(config('translate.cookie_name'))) {\n\t\t\t$cookie = request()->cookie(config('translate.cookie_name'));\n\t\t} else {\n\t\t\tif (substr(request()->server('HTTP_ACCEPT_LANGUAGE'), 0, 2)) {\n\t\t\t\t$cookie = substr(request()->server('HTTP_ACCEPT_LANGUAGE'), 0, 2);\n\t\t\t} else {\n\t\t\t\t$cookie = config('translate.default_locale');\n\t\t\t}\n\t\t}\n\t}\n\treturn $cookie;\n}", "public function getLanguageIdentifier();", "public function get_language()\n\t{\n\t\tif ($this->userdata['language'] != '')\n\t\t{\n\t\t\treturn $this->userdata['language'];\n\t\t}\n\t\tif (ee()->input->cookie('language'))\n\t\t{\n\t\t\treturn ee()->input->cookie('language');\n\t\t}\n\t\telse if (ee()->config->item('deft_lang') != '')\n\t\t{\n\t\t\treturn ee()->config->item('deft_lang');\n\t\t}\n\n\t\treturn 'english';\n\t}", "public function getCookieLanguage()\n {\n return isset($_COOKIE['lang']) ? $_COOKIE['lang'] : null;\n }", "protected function _extractLanguage() {\n // Default lanuage is always Lao\n $lang = 'lo';\n\n // Set the cookie name\n //$this->Cookie->name = '_osm_la';\n //echo $this->response->cookie(\"_osm_la\");\n \n // First check if the language parameter is set in the URL. The URL\n // parameter has first priority.\n $paramLang = $this->request->query(\"lang\");\n if (isset($paramLang)) {\n // Check if the URL parameter is a valid language identifier\n if (array_key_exists($paramLang, $this->_languages)) {\n // Set the language to the URL parameter\n $lang = $paramLang;\n }\n } else if ($this->Cookie->read($this->_languageCookie) != null) {\n // Check if a cookie is set and set its value as language. A Cookie\n // has second priority\n $cookieValue = $this->Cookie->read($this->_languageCookie);\n // Check if the URL parameter is a valid language identifier\n if (array_key_exists($cookieValue, $this->_languages)) {\n // Set the language to the Cookie value\n $lang = $cookieValue;\n }\n }\n\n // If neither the lang parameter nor a cookie is set, set and return\n // Lao as language.\n //$this->log(var_dump($this));\n //$this->response->cookie($this->_languageCookie => $lang ]);\n return $lang;\n }", "public function get_current_lang() {\n return \\Drupal::languageManager()->getCurrentLanguage()->getId();\n }", "function pnUserGetLang()\r\n{\r\n $lang = pnSessionGetVar('lang');\r\n if (!empty($lang)) {\r\n return $lang;\r\n } else {\r\n return pnConfigGetVar('language');\r\n }\r\n}", "function get_current_language() {\n $ci = & get_instance();\n if ($ci->session->userdata('lang')) {\n return $ci->session->userdata('lang');\n } else {\n return DEF_LANGUAGE;\n }\n}", "function findLanguage() {\n\t\tif ((LANGUAGE == 'NULL') || (LANGUAGE === NULL)) {\n\t\t\treturn null;\n\t\t}\n\t\t/*\n\t\t\t\tif (isset ($this->Session)) {\n\t\t\t\t\t$code= $this->Session->read('Lang.Code');\n\t\t\t\t\tif (isset ($code) && !empty ($code)) {\n\t\t\t\t\t\treturn $code;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t*/\n\t\tif (LANGUAGE == 'VHOST') {\n\t\t\t$l= $this->getVhostLang();\n\t\t\tif (empty ($l)) {\n\t\t\t\t$l= $this->getBrowserLang();\n\t\t\t}\n\t\t\treturn $l;\n\t\t}\n\t\tif (LANGUAGE == 'BROWSER') {\n\t\t\treturn $this->getBrowserLang();\n\t\t}\n\t\treturn LANGUAGE;\n\t}", "public static function getLanguage()\r\n {\r\n return session()->get(self::$sessLanguageKey);\r\n }", "function get_lang ()\r\n {\r\n return $_SESSION[\"lang\"];\r\n }", "public static function getLang(){\n\t\tif(!isset(self::$_config['lang'])) return null;\n\t\telse return $_COOKIE['lang'];\n\t}", "function getCurrentLanguage() {\n if(strtolower($_SERVER['HTTP_HOST'][0].$_SERVER['HTTP_HOST'][1]) == \"en\") {\n return \"en\";\n }\n return \"cs\";\n}", "public static function getUserLocale()\n {\n $lang_id = Auth::user()->lang_id;\n $locale = ($lang_id == 1) ? 'en' : 'ar';\n Session::put('locale', $locale);\n return $locale;\n }", "private function _makeSureThereIsALanguageID()\n {\n if (empty(Session::get('languageID'))) {\n if (strstr(URL::getDomainExtension(), 'localhost')\n || strstr(URL::getDomainExtension(), 'nl')\n ) {\n Session::save('languageID', 1);\n } elseif (strstr(URL::getDomainExtension(), 'com')) {\n Session::save('languageID', 2);\n }\n }\n }", "public function getLanguageId()\n {\n return $this->language_id;\n }", "public function getLangId()\n {\n return $this->lang_id;\n }", "private function _getUserLanguage(): string\n {\n /** @var WebApplication|ConsoleApplication $this */\n // If the user is logged in *and* has a primary language set, use that\n if ($this instanceof WebApplication) {\n // Don't actually try to fetch the user, as plugins haven't been loaded yet.\n $session = $this->getSession();\n $id = $session->getHasSessionId() || $session->getIsActive() ? $session->get($this->getUser()->idParam) : null;\n if ($id && ($language = $this->getUsers()->getUserPreference($id, 'language')) !== null) {\n return $language;\n }\n }\n\n // Fall back on the default CP language, if there is one, otherwise the browser language\n return Craft::$app->getConfig()->getGeneral()->defaultCpLanguage ?? $this->_getFallbackLanguage();\n }", "public function getCurrentLanguage() {\n return $this->ci->session->userdata(\"language\");\n }", "public static function getLanguage() {\n\t\tglobal $current_user, $default_language;\n\t\tif (!empty($current_user) && !empty($current_user->column_fields['language'])) {\n\t\t\treturn $current_user->column_fields['language'];\n\t\t}\n\t\t// Fallback : Read the Accept-Language header of the request (really useful for login screen)\n\t\tif (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\n\t\t\t//Getting all languages in an array\n\t\t\t$languages = Vtiger_LanguageExport::getAll();\n\t\t\t//Extracting locales strings from header\n\t\t\tpreg_match_all(\"/([a-z-]+)[,;]/i\", $_SERVER['HTTP_ACCEPT_LANGUAGE'], $locales);\n\t\t\t//Looping in found locales and test match against languages\n\t\t\tforeach ($locales[1] as $locale) {\n\t\t\t\tforeach ($languages as $code => $lang) {\n\t\t\t\t\t//First case insensitive comparison\n\t\t\t\t\tif (strcasecmp($code, $locale) === 0) {\n\t\t\t\t\t\treturn $code;\n\t\t\t\t\t}\n\t\t\t\t\t//Second case with replacing '-' by '_'\n\t\t\t\t\tif (strcasecmp($code, str_replace('-', '_', $locale)) === 0) {\n\t\t\t\t\t\treturn $code;\n\t\t\t\t\t}\n\t\t\t\t\t//Finally, try with short 2 letters country code\n\t\t\t\t\tif (strcasecmp(substr($code, 0, 2), $locale) === 0) {\n\t\t\t\t\t\treturn $code;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Last fallback : global configuration\n\t\treturn $default_language;\n\t}", "public function getLanguageId()\n\t{\n\t\tif( isset( $this->values[$this->prefix . 'languageid'] ) ) {\n\t\t\treturn (string) $this->values[$this->prefix . 'languageid'];\n\t\t}\n\n\t\treturn null;\n\t}", "public function getLanguageID()\n {\n return $this->languageID;\n }", "public function getLanguageID()\n {\n return $this->languageID;\n }", "public function getLanguageId()\n {\n return $this->getValue('nb_language_id');\n }", "function getlang() {\n $cooklang = $_COOKIE['cooklang'];\n $accept = $_SERVER['HTTP_ACCEPT_LANGUAGE'];\n $lang = $_GET['lang'];\n $dirlang = getdirlang();\n\n if (!isset ($lang)) {\n /* no language selection in http request */\n\n \n if (isset($dirlang)) {\n /* Language taken from path e.g., /fr/index.php -> fr */\n $lang = $dirlang;\n } else if (isset($cooklang)) {\n /* Language taken from cookie */\n $lang = $cooklang;\n } else {\n /* not even a cookie. Choose from http_accept_language --REWRITE this part!-- */\n/* while (\n empty($lang) &&\n preg_match('([a-z][a-z](-[A-Z][A-Z])?)', $accept, $res)\n ) {\n $lang = $res[1];\n $accept = ereg_replace(\"$lang\", '', $accept);\n } */\n }\n }\n\n if (!isset($lang) || !file_exists(BASEDIR . $lang . '/index.php')) {\n /* Use English as default */\n $lang = 'en';\n }\n\n /* Set the cookie only for the default path / but not e.g., /fr/ */\n if (!isset($dirlang))\n setcookie('cooklang', $lang, time() + 31536000);\n\n return $lang;\n}", "public static function getLanguageName(){\n if(Cache::isStored('website_lang')) return Cache::get('website_lang'); \n $row = getDatabase()->queryFirstRow(\"SELECT `value` FROM `settings` WHERE `setting` = 'website_lang'\");\n Cache::store('website_lang', $row['value']);\n return $row['value'];\n }", "public function getLangid()\n {\n return $this->langid;\n }", "function setLanguage() {\n\t\tif(isset($_GET['lang'])) {\n\t\t\t$language = $this->getLanguageFileName($_GET['lang']);\n\t\t} elseif(isset($_COOKIE['lang'])) {\n\t\t\t$language = $this->getLanguageFileName($_COOKIE['lang']);\n\t\t} else {\n\t\t\t$language = $this->getLanguageFileName('en-us');\n\t\t}\n\n\t\t//Sets the language cookie for 30 days\n\t\tsetcookie('lang', $language['meta'], time() + 60 * 60 * 24 * 30, '/');\n\n\t\treturn $language;\n\t}", "protected function _set_current_language()\n\t{\n\t\t$folder = NULL;\n\n\n\t\t// If the use of COOKIES is enabled, we check the cookie\n\t\tif ($cookie = $this->CI->input->cookie($this->cookie, TRUE))\n\t\t{\n\t\t\t$folder = $cookie;\n\t\t\tunset($cookie);\n\t\t}\n\n\t\t// In case we use SESSION instead of COOKIE\n\t\telseif ($this->session !== NULL)\n\t\t{\n\t\t\t$folder = $this->CI->session->{$this->session};\n\t\t\t$folder OR $folder = $this->client['folder'];\n\t\t}\n\n\t\t// If neither COOKIE nor SESSION are used, we use\n\t\t// default language\n\t\telse\n\t\t{\n\t\t\t$folder = $this->client['folder'];\n\t\t}\n\n\t\t// We prepare our default language\n\t\t$current = $this->default;\n\n\t\t// We make sure the language is available\n\t\tif ($lang = $this->find_by('folder', $folder))\n\t\t{\n\t\t\t$current = $lang;\n\t\t\tunset($lang);\n\t\t}\n\n\t\t// We set COOKIE if enabled\n\t\tif ($this->cookie !== NULL)\n\t\t{\n\t\t\t$this->CI->input->set_cookie($this->cookie, $current['folder'], 2678400);\n\t\t}\n\n\t\t// If no cookie but session is ON\n\t\telseif ($this->session !== NULL)\n\t\t{\n\t\t\t$_SESSION[$this->session] = $current['folder'];\n\t\t}\n\n\t\treturn $current;\n\t}", "protected function getLanguageUid() {\n\t\treturn $GLOBALS['TSFE']->tmpl->setup['config.']['sys_language_uid'] ?\n\t\t\t$GLOBALS['TSFE']->tmpl->setup['config.']['sys_language_uid'] : 0;\n\t}", "public function getLanguageId()\n {\n if ($this->getXml()->getElementsByTagName('PlayerLanguageID')->length) {\n return $this->getXml()->getElementsByTagName('PlayerLanguageID')->item(0)->nodeValue;\n }\n return null;\n }", "private function _detectLanguage() {\n if (isset($_GET['language']) && is_file('lang/'. $_GET['language'] .'.lang.php'))\n return $_GET['language'];\n\n $session = PHPSession::getInstance();\n\n if (isset($session['language']))\n return $session['language'];\n\n return $this->_getWebBrowserLanguage();\n }", "function getLanguageId($text) {\n\tglobal $languagesToDrupalTaxonomyIds;\n\t$text = trim($text);\n\t$text = strtolower($text);\n\t$result = $languagesToDrupalTaxonomyIds[$text];\n\tif (!$result) {\n\t\t$result = $languagesToDrupalTaxonomyIds['english'];\n\t}\n\treturn $result;\n}", "abstract public function get_app_language();", "public function getLanguage() {}", "function getLanguageID() \n {\n return (int) $this->getValueByFieldName( 'language_id' );\n }", "protected function _getCurrentLanguage()\n {\n $availableLanguages = $this->_translate->getOptions('availableLanguage');\n if (sizeof($availableLanguages)) {\n $lang = $this->_request->getParam('lang');\n if (!is_null($lang) && in_array($lang, $availableLanguages)) {\n return $lang;\n }\n }\n\n if (isset($this->_session->lang)) {\n return $this->_session->lang;\n }\n\n return $this->_translate->getLocale();\n }", "static private function DetectLanguage() {\n\t\tself::$language = substr(basename($_SERVER['REQUEST_URI']), 0, 2);\n\t\tif (self::$language != 'de' && self::$language != 'us') {\n\t\t\tself::$language = 'us';\n\t\t}\n\t}", "function _getLanguage() {\n global $basePath, $arrLanguages;\n\n $language = $this->defaultLanguage;\n\n if (isset($_SESSION['installer']['langId'])) {\n $language = $arrLanguages[$_SESSION['installer']['langId']]['lang'];\n } elseif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\n $browserLanguage = substr(strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']),0,2);\n\n foreach ($arrLanguages as $arrLang) {\n if ($browserLanguage == $arrLang['lang']) {\n $language;\n break;\n }\n }\n }\n\n if ($this->_checkLanguageExistence($language)) {\n return $language;\n } else {\n return $this->defaultLanguage;\n }\n }", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage()\n\t{\n\t\t$language = isset($this->session->data['language']) ? $this->session->data['language'] : $this->config->get('config_language');\n\n\t\t$language_code = substr($language, 0, 2);\n\n\t\t$this->bootstrap();\n\n\t\t$is_available = @constant('\\Genesis\\API\\Constants\\i18n::' . strtoupper($language_code));\n\n\t\tif ($is_available) {\n\t\t\treturn strtolower($language_code);\n\t\t} else {\n\t\t\treturn 'en';\n\t\t}\n\t}", "public function getFromLanguage(): string;", "public function getPrimaryLanguage();", "private function getIdByHAL(){\n\t\tif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))\n\t\t{\n\t\t\t$FirstHAL = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);\n\t\t\t$iso = $FirstHAL[0];\n\t\t\tif ($iso != \"en-us\")\n\t\t\t\tforeach ($this->xml_file as $lang)\n\t\t\t\t\tforeach ($lang->isos->iso as $anIso)\n\t\t\t\t\t\tif ($anIso == $iso)\n\t\t\t\t\t\t\treturn $lang['id'];\n\t\t}\n\t\telse\n\t\t\treturn 0;\n\t}", "function getLanguageName() {\n global $CONF, $member;\n\n if ($member && $member->isLoggedIn() ) {\n // try to use members language\n $memlang = $member->getLanguage();\n\n if (($memlang != '') && (checkLanguage($memlang) ) ) {\n return $memlang;\n }\n }\n\n // use default language\n if (checkLanguage($CONF['Language']) ) {\n return $CONF['Language'];\n } else {\n return 'english';\n }\n}", "public function detectLanguage($context = \"default\")\n {\n self::$context = $context;\n\n // Let's go\n\n // 6. English\n $language = \"en\";\n\n // 5. the first one from the supported list\n foreach (self::$supported_languages as $lng) {\n $language = $lng;\n break;\n }\n\n // 4. browser default language\n if (isset($_SERVER[\"HTTP_ACCEPT_LANGUAGE\"]) && trim($_SERVER[\"HTTP_ACCEPT_LANGUAGE\"]) != \"\") {\n $accepted = explode(',', $_SERVER[\"HTTP_ACCEPT_LANGUAGE\"]);\n\n foreach ($accepted as $key => $name) {\n $code = explode(';', $name);\n // handle the cases like en-ca => en\n $code = explode(\"-\", $code[0]);\n\n if (!empty(self::$supported_languages[$code[0]])) {\n $language = $code[0];\n break;\n }\n }\n }\n\n // 3. last language in the cookie\n $tmp = get_cookie(self::$context . \"_language\");\n if (!empty($tmp) && !empty(self::$supported_languages[$tmp])) {\n $language = $tmp;\n }\n\n // 2. header 'Content-Language'.\n $header = get_header(\"Content-Language\");\n if (!empty($header) && !empty(self::$supported_languages[$header])) {\n $language = $header;\n }\n\n // 1. explicitly set by request parameter language\n if (!empty($_REQUEST[\"language\"]) && !empty(self::$supported_languages[$_REQUEST[\"language\"]])) {\n $language = $_REQUEST[\"language\"];\n }\n\n $this->setCurrentLanguage($language);\n }", "public function getLanguage()\n\t{\n\t\treturn $this->languageId;\n\t}", "protected function _getDefaultLanguage()\n {\n \t$config = $this->getOptions();\n $languageList = array_keys($config['languages']);\n\n\n \t$defaultLanguage= '';\n \tif (array_key_exists('language', $_COOKIE)) {\n \t\t$defaultLanguage = $_COOKIE['language'];\n \t} else {\n \t$zl = new Zend_Locale();\n \t$defaultLanguage = $zl->getLanguage();\n \t}\n\n $defaultLanguage = in_array($defaultLanguage, $languageList)? $defaultLanguage: 'en';\n\n return $defaultLanguage;\n }", "function lixlpixel_detect_lang()\n{\n lixlpixel_get_env_var('HTTP_ACCEPT_LANGUAGE');\n lixlpixel_get_env_var('HTTP_USER_AGENT');\n\n $_AL=strtolower($GLOBALS['HTTP_ACCEPT_LANGUAGE']);\n $_UA=strtolower($GLOBALS['HTTP_USER_AGENT']);\n\n // Try to detect Primary language if several languages are accepted.\n foreach($GLOBALS['_LANG'] as $K)\n {\n if(strpos($_AL, $K)===0)\n return $K;\n }\n \n // Try to detect any language if not yet detected.\n foreach($GLOBALS['_LANG'] as $K)\n {\n if(strpos($_AL, $K)!==false)\n return $K;\n }\n foreach($GLOBALS['_LANG'] as $K)\n {\n if(preg_match(\"//[\\[\\( ]{$K}[;,_\\-\\)]//\",$_UA))\n return $K;\n }\n\n // Return default language if language is not yet detected.\n return $GLOBALS['_DLANG'];\n}", "public function getLanguage()\n\t{\n\t\treturn $this->language ? $this->language->getLid() : null;\n\t}", "public function getTranslationID($lang = false)\n {\n }", "function default_lang()\n {\n $browser_lang = !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? strtok(strip_tags($_SERVER['HTTP_ACCEPT_LANGUAGE']), ',') : '';\n $browser_lang = substr($browser_lang, 0,2);\n if(array_key_exists($browser_lang, $this->languages))\n return $browser_lang;\n else{\n reset($this->languages);\n return key($this->languages);\n }\n }", "public static function en(){\n setcookie('language', 'en', time()+60);\n }", "protected function _set_client_language()\n\t{\n\t\t$code = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);\n\t\t$lang = $this->find_by('code', $code);\n\t\t$lang OR $lang = $this->default;\n\t\treturn $lang;\n\t}", "public static function find_default()\n\t{\n\t\t// All supported languages\n\t\t$langs = (array) Kohana::$config->load('lang');\n\n\t\t// Look for language cookie first\n\t\tif ($lang = Cookie::get(Lang::$cookie))\n\t\t{\n\t\t\t// Valid language found in cookie\n\t\t\tif (isset($langs[$lang]))\n\t\t\t\treturn $lang;\n\n\t\t\t// Delete cookie with invalid language\n\t\t\tCookie::delete(Lang::$cookie);\n\t\t}\n\n\t\t// Parse HTTP Accept-Language headers\n\t\tforeach (Request::accept_lang() as $lang => $quality)\n\t\t{\n\t\t\t// Return the first language found (the language with the highest quality)\n\t\t\tif (isset($langs[$lang]))\n\t\t\t\treturn $lang;\n\t\t}\n\n\t\t// Return the hard-coded default language as final fallback\n\t\treturn Lang::$default;\n\t}", "public function getLanguageId() : int\n {\n return $this->getValue('nb_language_id');\n }", "public function getLang();", "function lang()\n {\n global $CFG; \n $language = $CFG->item('language');\n \n $lang = array_search($language, $this->languages);\n if ($lang)\n {\n return $lang;\n }\n \n return NULL; // this should not happen\n }", "function JAPANIZE_languageToLangId($language) {\n $retval = '';\n \n $lang_mappings = array(\n 'afrikaans' => 'af',\n 'bosnian' => 'bs',\n 'bulgarian' => 'bg',\n 'catalan' => 'ca',\n 'chinese_simplified' => 'zh-cn',\n 'chinese_traditional' => 'zh',\n 'croatian' => 'hr',\n 'czech' => 'cs',\n 'danish' => 'da',\n 'dutch' => 'nl',\n 'english' => 'en',\n 'estonian' => 'et',\n 'farsi' => 'fa',\n 'finnish' => 'fi',\n 'french_canada' => 'fr-ca',\n 'french_france' => 'fr',\n 'german' => 'de',\n 'german_formal' => 'de',\n 'hebrew' => 'he',\n 'hellenic' => 'el',\n 'indonesian' => '',\n 'italian' => 'it',\n 'japanese' => 'ja',\n 'korean' => 'ko',\n 'norwegian' => 'no',\n 'polish' => 'pl',\n 'portuguese' => 'pt',\n 'portuguese_brazil' => 'pt-br',\n 'romanian' => 'ro',\n 'russian' => 'ru',\n 'slovak' => 'sk',\n 'slovenian' => 'sl',\n 'spanish' => 'es',\n 'spanish_argentina' => 'es',\n 'swedish' => 'sv',\n 'turkish' => 'tr',\n 'ukrainian' => 'uk',\n );\n\n if (isset($language)) {\n $lang = str_replace('_utf-8', '', $language);\n \n if (isset($lang_mappings[$lang])) {\n $retval = $lang_mappings[$lang];\n }\n }\n\n return $retval;\n}", "public static function ja(){\n setcookie('language', 'ja', time()+60);\n }", "public static function get_lang() {\n\t\t$language = \\Config::get ( 'language' );\n\t\tempty ( $language ) and $language = static::$fallback [0];\n\t\treturn $language;\n\t}", "public function getLanguageId() : LanguageId\n\t{\n\t\treturn $this->languageId;\n\t}", "public function getCookieLocale()\n {\n return $this->request->cookie('locale');\n }", "public static function ru(){\n setcookie('language', 'ru', time()+60);\n }", "public static function lv(){\n setcookie('language', 'lv', time()+60);\n }", "function lixgetlang() {\n $lang = 'rus';\n \n if ($_GET[lang] != 'rus' && $_GET[lang] != 'eng' && $_GET[lang] != 'deu') {\n if (lixlpixel_detect_lang() != 'ru') { $lang = 'eng'; }\n else { $lang = 'rus'; }\n } else {\n $lang = $_GET[lang];\n }\n \n return $lang;\n}", "function get_user_locale($user = 0)\n {\n }", "static function getLanguage (){\n return self::$language;\n }", "private function detectLanguage()\n {\n $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);\n\n switch (mb_strtolower($lang)) {\n case 'ru':\n return 'russian';\n\n default:\n return 'english';\n }\n }", "public function getSiteDefaultLanguage();", "public function get_language() {\n if (defined('WPLANG')) {\n $language = WPLANG;\n }\n\n if (empty($language)) {\n $language = get_option('WPLANG');\n }\n\n if (!empty($language)) {\n $languageParts = explode('_', $language);\n return $languageParts[0];\n }\n\n return 'en';\n }", "function language_url($url) {\n\n if(isset($_COOKIE['language'])) {\n return '/' . $_COOKIE['language'] . $url;\n } else {\n return $url;\n }\n }", "public function getcurrentwithlang()\n {\n $lang = $this->default_lang;\n if (array_key_exists('tls_lang', $_COOKIE)) {\n if (in_array($_COOKIE['tls_lang'], $this->all_lang, true)) {\n $lang = $_COOKIE['tls_lang'];\n }\n }\n $raw_url = Request::getResourceURI();\n $page_url = Path::tidy($raw_url);\n \n $site_url = Config::getSiteURL();\n $newurl = $site_url . \"/\" . $lang . $page_url;\n \n header('Location: ' . $newurl);\n exit;\n }", "protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }", "protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }", "protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }", "function check_language () {\n \n global $CONF;\n $supported_languages \t\t\t= array ('de', 'en');\n $lang_array \t\t\t\t\t\t= preg_split ('/(\\s*,\\s*)/', $_SERVER['HTTP_ACCEPT_LANGUAGE']);\n \n if (is_array ($lang_array)) {\n \n $lang_first \t\t\t\t\t= strtolower ((trim (strval ($lang_array[0]))));\n $lang_first \t\t\t\t\t= substr ($lang_first, 0, 2);\n \n if (in_array ($lang_first, $supported_languages)) {\n \n $lang \t\t\t\t\t\t= $lang_first;\n \n } else {\n \n $lang \t\t\t\t\t\t= $CONF['default_language'];\n \n }\n } else {\n \n $lang\t\t\t\t\t\t\t = $CONF['default_language'];\n \n }\n \n return $lang;\n}", "function _getLocaleInfo() {\n $array = $this->_readLocaleInfo();\n if($array == false ||\n !isset($array[\"id\"])) {\n return 'en'; //Earlier versions of Openbiblio only supported English\n }\n else {\n $this->localekey = $array[\"code\"];\n $this->_isdefaultlocale = ($array[\"default_flg\"] == \"Y\");\n $this->_isdefaultlocale = ($array[\"default_flg\"] == \"Y\");\n\t\t$this->_localeDescr = $array[\"description\"];\n return $array[\"id\"]; \n }\n }", "public function language();", "public function language();", "protected function getLocaleKey()\n {\n return ($this->localeKey ?: 'language_id');\n }", "static function getCurrent() {\n if (self::$current_lang === NULL) {\n self::setCurrentByLocal(Yii::$app->language);\n }\n return self::$current_lang;\n }", "public static function locale() : string\n {\n // Compute the locale just one time\n if (self::$locale) {\n return self::$locale;\n }\n\n // Lang in cookies\n $locale = self::langToLocale($_COOKIE['NameYourGoat_User_Locale'] ?? '');\n\n // Lang in User repository\n if (! $locale && self::isAuth()) {\n $locale = self::langToLocale(self::$fullUser->lang);\n }\n\n // Lang in the request headers\n if (! $locale) {\n $acceptLang = explode(',', getallheaders()['Accept-Language'] ?? '');\n\n foreach ($acceptLang as $lang) {\n if ($locale = self::langToLocale(trim(strtok($lang, '-;')))) {\n break;\n }\n }\n }\n\n return self::$locale = $locale ?: self::$defaultLocale;\n }", "public function getFieldLanguageID()\n\t{\n\t\treturn $this->GetDAL()->GetField(DotCoreContactMemberDAL::CONTACT_MEMBER_LANGUAGE_ID);\n\t}", "function lang()\n\t{\n\t\t$lang = (empty($_COOKIE['lang'])) ? 'italiano' : $_COOKIE['lang'];\n\t\t$this->lang=$lang;\n\t\t$this->lang_frequency=$lang.$this->lang_frequency_suffix;\n\t\t\n\t\t\n\n\t\t$n=\"\";\n\t\t$i=1;\n\t\twhile (isset($_COOKIE['lang'.$n]))\n\t\t{\n\t\t\t$i++;\n\t\t\t\t\n\t\t\t$this->lang_a[$i][0]=$_COOKIE['lang'.$n];\n\t\t\t$this->lang_a[$i][1]=$_COOKIE['lang'.$n].\"_frequency\"; //Non sò a cosa serva però...\n\t\t\t$n=$i;\n\t\t}\n\n\t\n\t\n\t\n\t}", "function getDbLangId($connect, $lang)\n\t{\n\t\t$lang_id = \"\";\n\t\t$sql = \"SELECT ID FROM language WHERE Short_Name = '$lang'\";\n\t\t$result = mysqli_query($connect, $sql);\n\t\twhile ($row = mysqli_fetch_array($result)) {\n\t\t\t$lang_id = $row['ID'];\n\t\t}\n\n\t\treturn $lang_id;\n\t}", "public function get_language()\n {\n }", "function frame_language()\n{\n // Polylang\n if (function_exists('pll_current_language'))\n return pll_current_language('slug');\n\n // WPML\n if (defined('ICL_LANGUAGE_CODE'))\n return ICL_LANGUAGE_CODE;\n\n // WordPress default\n $lang = explode('-', get_bloginfo('language'));\n return (isset($lang[0])) ? $lang[0] : 'en';\n}", "protected function getLanguageParameter() {}" ]
[ "0.8108536", "0.7595774", "0.7449701", "0.7379859", "0.73620707", "0.7302966", "0.72833157", "0.7271093", "0.7148458", "0.70471257", "0.70351607", "0.70329005", "0.70298284", "0.7029382", "0.6996994", "0.69765896", "0.6961427", "0.69582677", "0.69292504", "0.6906385", "0.68760127", "0.6860402", "0.68175673", "0.68118143", "0.6786108", "0.6764345", "0.67444533", "0.6729629", "0.6729629", "0.6718495", "0.6705511", "0.670108", "0.66956604", "0.66944975", "0.6673557", "0.66639787", "0.6657081", "0.66497433", "0.66402733", "0.66166025", "0.65846", "0.6584575", "0.657459", "0.654788", "0.65303916", "0.652591", "0.652591", "0.652591", "0.652591", "0.652591", "0.652591", "0.6523899", "0.6517779", "0.6514947", "0.6497089", "0.64847225", "0.64753175", "0.64662206", "0.64456314", "0.64382815", "0.64373636", "0.6432583", "0.6426222", "0.64204127", "0.64181423", "0.6405497", "0.6393117", "0.6381472", "0.6369549", "0.63629776", "0.63596106", "0.6355346", "0.6345622", "0.6337193", "0.6334814", "0.6327323", "0.63248104", "0.6322818", "0.6297306", "0.628128", "0.62778884", "0.6270461", "0.6261906", "0.6260669", "0.6251019", "0.6251019", "0.6251019", "0.6248528", "0.6233758", "0.62192744", "0.62192744", "0.62153655", "0.620089", "0.61946416", "0.61927646", "0.6192554", "0.6188456", "0.6179073", "0.6176105", "0.6171466" ]
0.7636853
1
Specify data which should be serialized to JSON. Includes all public properties by default plus data from properties array.
public function jsonSerialize() { $publicProperties = get_object_vars($this); unset($publicProperties['properties']); return array_merge($publicProperties, $this->getPropertiesField()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function jsonSerialize()\n {\n $json = array();\n $json['persons'] = $this->persons;\n $json['companies'] = $this->companies;\n\n return array_merge($json, $this->additionalProperties);\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['Name'] = $this->name;\n $json['MvaNumber'] = $this->mvaNumber;\n $json['CompanyPhone'] = $this->companyPhone;\n $json['CompanyEmail'] = $this->companyEmail;\n $json['Id'] = $this->id;\n $json['CustomerNumber'] = $this->customerNumber;\n $json['Resources'] = $this->resources;\n $json['CompanyUrl'] = $this->companyUrl;\n $json['Contact'] = $this->contact;\n $json['Address'] = $this->address;\n $json['Dealer'] = $this->dealer;\n $json['Settings'] = $this->settings;\n $json['Country'] = $this->country;\n\n return array_merge($json, $this->additionalProperties);\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['beslutningField'] = $this->beslutningField;\n $json['arsaksDataField'] = $this->arsaksDataField;\n $json['scoreField'] = $this->scoreField;\n $json['grenseAvslagField'] = $this->grenseAvslagField;\n $json['grenseGodkjentField'] = $this->grenseGodkjentField;\n\n return array_merge($json, $this->additionalProperties);\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['totalRecords'] = $this->totalRecords;\n $json['totalPages'] = $this->totalPages;\n $json['pageNumber'] = $this->pageNumber;\n $json['numberOfRecordsPerPage'] = $this->numberOfRecordsPerPage;\n $json['applications'] = $this->applications;\n\n return array_merge($json, $this->additionalProperties);\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['MvaNumber'] = $this->mvaNumber;\n $json['Prokura'] = $this->prokura;\n $json['Signature'] = $this->signature;\n $json['Report'] = $this->report;\n\n return array_merge($json, $this->additionalProperties);\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['id'] = $this->id;\n $json['amount'] = $this->amount;\n $json['postedDate'] = $this->postedDate;\n $json['description'] = $this->description;\n $json['memo'] = $this->memo;\n $json['normalizedPayee'] = $this->normalizedPayee;\n $json['institutionTransactionId'] = $this->institutionTransactionId;\n $json['category'] = $this->category;\n $json['type'] = $this->type;\n\n return array_merge($json, $this->additionalProperties);\n }", "public function jsonSerialize() {\r\n\t\treturn $this->props;\r\n\t}", "public function serialize(PropertyHolder $data);", "public function jsonSerialize()\n {\n $json = array();\n $json['dialogs'] = $this->dialogs;\n $json['language'] = $this->language;\n $json['styling'] = $this->styling;\n\n return array_merge($json, $this->additionalProperties);\n }", "function jsonSerialize()\n {\n $data = $this->data;\n foreach ($this->config as $name => $c) {\n if (is_callable($c['serializer'])) {\n $data[$name] = call_user_func($c['serializer'], $data['name']);\n }\n }\n return $data;\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['id'] = $this->id;\n $json['number'] = $this->number;\n $json['name'] = $this->name;\n $json['balance'] = $this->balance;\n $json['type'] = $this->type;\n $json['aggregationStatusCode'] = $this->aggregationStatusCode;\n $json['status'] = $this->status;\n $json['customerId'] = $this->customerId;\n $json['institutionId'] = $this->institutionId;\n $json['balanceDate'] = $this->balanceDate;\n $json['aggregationSuccessDate'] = $this->aggregationSuccessDate;\n $json['aggregationAttemptDate'] = $this->aggregationAttemptDate;\n $json['createdDate'] = $this->createdDate;\n $json['currency'] = $this->currency;\n $json['lastTransactionDate'] = $this->lastTransactionDate;\n $json['institutionLoginId'] = $this->institutionLoginId;\n $json['displayPosition'] = $this->displayPosition;\n\n return array_merge($json, $this->additionalProperties);\n }", "public function serializar() {\n\t return json_encode(get_object_vars($this), JSON_FORCE_OBJECT);\n\t\t}", "public function serializar() {\n\t return json_encode(get_object_vars($this), JSON_FORCE_OBJECT);\n\t\t}", "public function jsonSerialize(){\n if( ! $this->isPersisted() ){\n $properties = (object) get_object_vars($this);\n unset($properties->id);\n return $properties;\n }\n $properties = (object) get_object_vars($this);\n $properties->startUTC = $properties->startUTC->format('c');\n $properties->endUTC = $properties->endUTC->format('c');\n $properties->repeatEndUTC = !is_null($properties->repeatEndUTC) ? $properties->repeatEndUTC->format('c') : null;\n $properties->weeklyDays = is_null($properties->weeklyDays) ? array() :\n // All this does is cast the exploded values from strings to integers\n array_map(function($day){ return (int)$day; }, explode(',',$properties->weeklyDays));\n return $properties;\n }", "public function jsonSerialize()\n {\n return array_merge([\n 'settings' => $this->settings(),\n 'actions' => $this->actions(),\n 'columns' => $this->columns(),\n 'filters' => $this->filters(),\n 'cacheKey' => $this->generateCacheKey()\n ], parent::jsonSerialize());\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['id'] = $this->id;\n $json['name'] = $this->name;\n $json['voa'] = $this->voa;\n $json['voi'] = $this->voi;\n $json['stateAgg'] = $this->stateAgg;\n $json['ach'] = $this->ach;\n $json['transAgg'] = $this->transAgg;\n $json['aha'] = $this->aha;\n $json['accountTypeDescription'] = $this->accountTypeDescription;\n $json['phone'] = $this->phone;\n $json['urlHomeApp'] = $this->urlHomeApp;\n $json['urlLogonApp'] = $this->urlLogonApp;\n $json['oauthEnabled'] = $this->oauth_Enabled;\n $json['urlForgotPassword'] = $this->urlForgotPassword;\n $json['urlOnlineRegistration'] = $this->urlOnlineRegistration;\n $json['class'] = $this->mclass;\n $json['specialText'] = $this->specialText;\n $json['specialInstructions'] = $this->specialInstructions;\n $json['address'] = $this->address;\n $json['currency'] = $this->currency;\n $json['email'] = $this->email;\n $json['status'] = $this->status;\n $json['newInstitutionId'] = $this->newInstitutionId;\n $json['branding'] = $this->branding;\n $json['oauthInstitutionId'] = $this->oauth_InstitutionId;\n\n return array_merge($json, $this->additionalProperties);\n }", "function jsonSerialize()\n\t{\n\t\treturn [\n\t\t\t'id' => $this->getId(),\n\t\t\t'metadata' => $this->getMetadata()\n\t\t];\n\t}", "public function jsonSerialize()\n {\n $json = array();\n $json['payFrequency'] = $this->payFrequency;\n\n return array_merge($json, $this->additionalProperties);\n }", "function jsonSerialize()\n {\n return Helper::serialize(get_object_vars($this));\n }", "public function toJSON() {\n return json_encode($this->data);\n }", "function jsonSerialize() {\n $data = array();\n if ($this->getStreet()) {\n $data[self::FIELDNAME_STREET] = $this->getStreet();\n }\n if ($this->getZip()) {\n $data[self::FIELDNAME_ZIP] = $this->getZip();\n }\n if ($this->getCity()) {\n $data[self::FIELDNAME_CITY] = $this->getCity();\n }\n if ($this->getCountry()) {\n $data[self::FIELDNAME_COUNTRY] = $this->getCountry();\n }\n if ($this->getCoordinate()) {\n $data[self::FIELDNAME_COORDINATE] = $this->getCoordinate();\n }\n return $data;\n }", "public function jsonSerialize() {\n\n return ['id' => $this->id,\n 'name' => $this->name,\n 'author' => $this->author,\n 'description' => $this->description];\n \n \n }", "public function jsonSerialize()\n {\n $json = array();\n $json['type'] = $this->type;\n $json['currentBalance'] = $this->currentBalance;\n $json['twoMonthAverage'] = $this->twoMonthAverage;\n $json['sixMonthAverage'] = $this->sixMonthAverage;\n $json['beginningBalance'] = $this->beginningBalance;\n\n return array_merge($json, $this->additionalProperties);\n }", "public function jsonSerialize()\n {\n }", "public function jsonSerialize()\n {\n }", "public function serialize()\n\t{\n\t\treturn json_encode(array(\n\t\t\t'data' => $this->data,\n\t\t\t'this' => $this->getArrayCopy(),\n\t\t\t'name' => $this->name,\n\t\t\t'merged' => $this->merged,\n\t\t));\n\t}", "public function jsonSerialize()\n {\n $json = array();\n $json['id'] = $this->id;\n $json['consumerId'] = $this->consumerId;\n $json['consumerSsn'] = $this->consumerSsn;\n $json['requesterName'] = $this->requesterName;\n $json['requestId'] = $this->requestId;\n $json['constraints'] = $this->constraints;\n $json['type'] = $this->type;\n $json['status'] = $this->status;\n $json['createdDate'] = $this->createdDate;\n\n return array_merge($json, $this->additionalProperties);\n }", "public function jsonSerialize()\n {\n $this->present();\n\n return $this->data;\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['id'] = $this->id;\n $json['abbrvName'] = $this->abbrvName;\n $json['logoUrl'] = $this->logoUrl;\n $json['decryptionKeyActivated'] = $this->decryptionKeyActivated;\n $json['createdDate'] = $this->createdDate;\n $json['lastModifiedDate'] = $this->lastModifiedDate;\n $json['status'] = $this->status;\n\n return array_merge($json, $this->additionalProperties);\n }", "public function jsonSerialize()\n {\n return [\n 'emp_no' => $this->emp_no,\n 'birth_date' => $this->getCustomData('birth_date'),\n 'first_name' => $this->first_name,\n 'last_name' => $this->last_name,\n 'complet_name' => $this->first_name . ' ' . $this->last_name,\n 'gender' => $this->getGender(),\n 'hire_date' => $this->getCustomData('hire_date'),\n 'salary' => ($this->salary->salary) ?? 0,\n 'titles' => ($this->title->title) ?? '',\n 'departments' => (new DepartmentRepo())->getNames($this->departments)\n ];\n }", "function jsonSerialize()\n {\n return [\n 'meta' => [\n 'offset' => $this->page->getOffset(),\n 'limit' => $this->page->getLimit(),\n 'total' => $this->total,\n ],\n 'data' => $this->results,\n ];\n }", "public function jsonSerialize() {\n\t\t$fields = get_object_vars($this);\n\t\t//format the data so that the front end can consume it\n\t\t$fields[\"voteDateTime\"] = round(floatval($this->voteDateTime->format(\"U.u\")) * 1000);\n\t\treturn ($fields);\n\t}", "public function jsonSerialize()\n {\n $json = array();\n $json['signatureMethodUniqueId'] = $this->signatureMethodUniqueId;\n $json['firstName'] = $this->firstName;\n $json['middleName'] = $this->middleName;\n $json['lastName'] = $this->lastName;\n $json['fullName'] = $this->fullName;\n $json['dateOfBirth'] = $this->dateOfBirth;\n $json['signatureMethod'] = $this->signatureMethod;\n $json['signedTime'] = isset($this->signedTime) ?\n DateTimeHelper::toRfc3339DateTime($this->signedTime) : null;\n\n return array_merge($json, $this->additionalProperties);\n }", "public function jsonSerialize()\n\t{\n\n\t\treturn get_object_vars($this);\n\n\t}", "private function serializeData($data)\n {\n //$normalizer = ;\n //$normalizer->setIgnoredAttributes(['__initializer__','__cloner__','__isInitialized__']);\n\n $encoders = [new JsonEncoder()];\n $normalizers = [new ObjectNormalizer()];\n\n $serializer = new Serializer($normalizers, $encoders);\n return $serializer->serialize(\n $data,\n 'json',\n [AbstractNormalizer::IGNORED_ATTRIBUTES => [\n '__initializer__',\n '__cloner__',\n '__isInitialized__'\n ]]\n );\n }", "public function jsonSerialize() {\n\t\t$fields = get_object_vars($this);\n\t\t$fields[\"profileId\"] = $this->profileId;\n\t\treturn($fields);\n\t}", "function jsonSerialize()\n {\n return [\n 'name' => $this->name,\n 'author' => $this->authorModel->fullName,\n 'cover_path' => $this->getCoverWebPath(),\n 'cover_image_name' => $this->preview_path,\n 'release_date' => date('M d, Y', $this->release_date),\n 'created_at' => Yii::$app->getFormatter()->asDatetime($this->created_at),\n 'updated_at' => Yii::$app->getFormatter()->asDatetime($this->updated_at),\n ];\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['assetId'] = $this->assetId;\n $json['accounts'] = $this->accounts;\n\n return array_merge($json, $this->additionalProperties);\n }", "function jsonSerialize() {\n $data = [ 'Customer' => [\n 'Customer_id' => $this->Customer_id,\n 'Username' => $this->Username,\n 'Name' => $this->Name,\n 'Surname' => $this->Surname,\n 'Email' => $this->Email,\n 'Phone' => $this->Phone\n ] ];\n return $data;\n }", "public function buildJson();", "public function getDataAsJSON()\n {\n $result = array();\n if ($serializeData = $this->getSerializeData()) {\n $result = $serializeData;\n }\n elseif (!empty($this->_inputsToSerialize)) {\n return '{}';\n }\n return Mage::helper('core')->jsonEncode($result);\n }", "public function customSerialize()\n {\n return [\n 'id' => $this->getId(),\n 'name' => $this->getName(),\n 'lastName' => $this->getLastName(),\n 'age' => $this->getAge(),\n 'company' =>[\n 'id' => $this->getCompany()->getId(),\n 'name' => $this->getCompany()->getName(),\n ],\n 'type' => [\n 'id' => $this->getTypes()->getId(),\n 'name' => $this->getTypes()->getName(),\n ]\n ];\n }", "function publicData()\r\n {\r\n return [\r\n 'id' => $this->id,\r\n 'name' => $this->name,\r\n 'level' => $this->level,\r\n 'avatar' => $this->avatar->representation(),\r\n ];\r\n }", "public function jsonSerialize()\n {\n return [\n 'id' => $this->getId(),\n 'name' => $this->getName(),\n 'fields' => $this->getFields(),\n 'memberCount' => $this->getMemberCount(),\n ];\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\r\n {\r\n return get_object_vars($this);\r\n }", "public function json(): string {\n\t\t$properties = array_filter(get_object_vars($this));\n\n\t\treturn json_encode($properties, JSON_UNESCAPED_SLASHES);\n\t}", "public function jsonSerialize() {\n return get_object_vars($this);\n }", "public function jsonSerialize() {\n return get_object_vars($this);\n }", "public function getSerializableData()\n {\n return [\n 'id' => $this->getId(),\n 'name' => $this->getName(),\n 'description' => $this->getDescription(),\n 'profile' => $this->getProfile(),\n 'salt' => $this->getSalt(),\n 'type' => $this->getType(),\n 'value' => $this->getValue(),\n ];\n }", "public function jsonSerialize()\n {\n // TODO: Implement jsonSerialize() method.\n }", "public function setProperties(array $data)\n {\n $this->properties = $data;\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return array('title' => $this->title,\n 'size' => $this->size,\n 'unit_price' => $this->unitPrice,\n 'description' => $this->description);\n }", "abstract protected function serializeData();", "protected function createJsonBody($data)\n {\n\t\t\n $data = array_merge($this->getDefaultParameters(), $data);\n return json_encode($data);\n }", "function jsonSerialize()\n {\n return [\n 'id' => $this->id,\n 'title' => $this->title,\n 'quantity' => $this->quantity,\n 'clientName' => $this->clientName,\n 'address' => $this->address,\n 'email' => $this->email,\n 'state' => $this->state,\n 'dispatchingTime'=> $this->dispatchingTime\n ];\n }", "public function jsonSerialize() {\n return [\n \"nom\"=> $this->name,\n \"age\"=> $this->age,\n \"film\"=> $this->films\n ];\n }", "public function jsonSerialize()\r\n {\r\n // TODO: Implement jsonSerialize() method.\r\n return [\r\n 'codigo' => $this->getCodigo(),\r\n 'uf' => $this->getUf(),\r\n 'nome' => $this->getNome()\r\n ];\r\n }", "public function jsonSerialize() {\n\t\t$fields = get_object_vars($this);\n\t\treturn($fields);\n\t}", "public function jsonSerialize() {\n\t\t$fields = get_object_vars($this);\n\t\treturn($fields);\n\t}", "public function jsonSerialize() {\n\t\t$fields = get_object_vars($this);\n\t\treturn($fields);\n\t}", "public function jsonSerialize()\n {\n return array_merge(parent::jsonSerialize(), [\n 'displayLength' => $this->displayLength,\n ]);\n }", "public function toJson() {\n return json_encode(get_object_vars($this));\n }", "public function jsonSerialize() {\n\t\t$fields = get_object_vars($this);\n\t\t$fields[\"todoDate\"] = round(floatval($this->gettodoDate()->format(\"U.u\") * 1000));\n\t\treturn ($fields);\n\t}", "public function jsonSerialize()\n {\n return [\n 'name' => $this->name,\n 'email' => $this->email,\n 'role' => $this->role,\n 'investments' => $this->investments\n ];\n }", "public function _jsonSerialize();", "public function jsonSerialize() {\n\t\t$fields = get_object_vars($this);\n\t\treturn ($fields);\n\t}", "public function jsonSerialize(){\n return [\n \"name\" => $this->getName(),\n \"location\" => $this->getLocation()\n ];\n }", "public function jsonSerialize()\n {\n return [\n 'name' => $this->name,\n 'title' => $this->title,\n 'description' => $this->description,\n 'blacklist_expiration_time' => $this->blacklist_expiration_time,\n 'validation' => $this->validation,\n 'nextcall' => $this->nextcall,\n 'color' => $this->color\n ];\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n $userData = [\n \"email\" => $this->email,\n \"name\" => $this->name,\n \"username\" => $this->username\n ];\n\n if (!is_null($this->password)) {\n $userData[\"password\"] = $this->password;\n }\n\n if (!is_null($this->active)) {\n $userData[\"active\"] = $this->active;\n }\n\n if (!is_null($this->roles)) {\n $userData[\"roles\"] = $this->roles;\n }\n\n if (!is_null($this->joinDefaultChannels)) {\n $userData[\"joinDefaultChannels\"] = $this->joinDefaultChannels;\n }\n\n if (!is_null($this->requirePasswordChange)) {\n $userData[\"requirePasswordChange\"] = $this->requirePasswordChange;\n }\n\n if (!is_null($this->sendWelcomeEmail)) {\n $userData[\"sendWelcomeEmail\"] = $this->sendWelcomeEmail;\n }\n\n if (!is_null($this->verified)) {\n $userData[\"verified\"] = $this->verified;\n }\n\n if (!is_null($this->customFields)) {\n $userData[\"customFields\"] = $this->customFields;\n }\n\n return $userData;\n }", "function jsonSerialize()\n {\n return [\n 'id' => $this->getId(),\n 'duration' => $this->getDuration(),\n 'name' => $this->getName()\n ];\n }", "public function jsonSerialize() {\n\t\treturn(get_object_vars($this));\n\t}", "public function jsonSerialize() {\n\t\t$fields = get_object_vars($this);\n\t\tunset($fields[\"profileHash\"]);\n\t\tunset($fields[\"profileSalt\"]);\n\t\treturn ($fields);\n\t}", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "function jsonSerialize()\n {\n return get_object_vars($this);\n }", "function jsonSerialize()\n {\n return get_object_vars($this);\n }", "function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function ToJson() {\n\n $array = array( 'Name' => $this->firstName,\n 'Last Name'.$this->lastName,\n 'email' => $this->email\n );\n\n if( ! is_null($this->dob ) )\n $array['Date of Birth'] = $this->dob;\n\n if( ! is_null($this->address ) )\n $array['Address'] = $this->address;\n\n return json_encode($array, JSON_PRETTY_PRINT);\n }", "public function toJson() {\n return json_encode($this->data);\n }", "public function jsonSerialize()\n {\n $output = [];\n foreach ($this::getReflection()->getProperties() as $propertyName => $property) {\n\n $value = $this->{$propertyName};\n if ($value instanceof Entity\\Collection || $value instanceof Entity) {\n $output[$propertyName] = $value->jsonSerialize();\n } elseif ($value instanceof \\DateTime\n && $property->getType() === Entity\\Reflection\\Property::TYPE_DATE\n ) {\n $output[$propertyName] = (array) $value;\n $output[$propertyName][\"date\"] = $value->format(self::$dateFormat);\n } else {\n $output[$propertyName] = $value;\n }\n }\n\n return $output;\n }", "public function jsonSerialize()\n {\n return array_merge([\n 'component' => $this->component(),\n 'prefixComponent' => true,\n 'indexName' => $this->name,\n 'name' => $this->name,\n 'attribute' => $this->attribute,\n 'value' => $this->value,\n 'panel' => $this->panel,\n 'sortable' => $this->sortable,\n 'nullable' => $this->nullable,\n 'readonly' => $this->isReadonly(App::make(NovaRequest::class)),\n 'textAlign' => $this->textAlign,\n ], $this->meta());\n }", "public function jsonSerialize()\r\n {\r\n $json = array();\r\n $json['id'] = $this->id;\r\n $json['source'] = $this->source;\r\n $json['location_id'] = $this->locationId;\r\n $json['name'] = $this->name;\r\n $json['total_ratings'] = $this->totalRatings;\r\n $json['average_rating'] = $this->averageRating;\r\n $json['stars'] = $this->stars;\r\n $json['type_id'] = $this->typeId;\r\n $json['meta_no_index'] = $this->metaNoIndex;\r\n $json['owner_id'] = $this->ownerId;\r\n $json['trip_id'] = $this->tripId;\r\n $json['address1'] = $this->address1;\r\n $json['address2'] = $this->address2;\r\n $json['postcode'] = $this->postcode;\r\n $json['telephone'] = $this->telephone;\r\n $json['url'] = $this->url;\r\n $json['description'] = $this->description;\r\n $json['longitude'] = $this->longitude;\r\n $json['latitude'] = $this->latitude;\r\n $json['num_rooms'] = $this->numRooms;\r\n $json['redirect_accommodation_id'] = $this->redirectAccommodationId;\r\n $json['redirect_id'] = $this->redirectId;\r\n $json['page_url'] = $this->pageUrl;\r\n $json['binary_options'] = $this->binaryOptions;\r\n $json['desc_overview'] = $this->descOverview;\r\n $json['desc_room_information'] = $this->descRoomInformation;\r\n $json['desc_facilities'] = $this->descFacilities;\r\n $json['desc_food_drink'] = $this->descFoodDrink;\r\n $json['date_created'] = $this->dateCreated;\r\n $json['date_updated'] = $this->dateUpdated;\r\n $json['date_removed'] = $this->dateRemoved;\r\n\r\n return $json;\r\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['uuid'] = $this->uuid;\n $json['updatedAt'] = DateTimeHelper::toRfc3339DateTime($this->updatedAt);\n $json['title'] = $this->title;\n $json['titleTranslated'] = $this->titleTranslated;\n $json['basePrice'] = $this->basePrice;\n $json['typeName'] = $this->typeName;\n $json['typeUuid'] = $this->typeUuid;\n $json['links'] = $this->links;\n $json['validFrom'] = $this->validFrom;\n $json['validThrough'] = isset($this->validThrough) ?\n DateTimeHelper::toSimpleDate($this->validThrough) : null;\n\n return $json;\n }", "public function jsonSerialize() {\n\t\treturn [\n\t\t\t'id' => $this->getId(),\n\t\t\t'name' => $this->getName(),\n\t\t\t'url' => $this->getUrl(),\n\t\t\t'description' => $this->getDescription(),\n\t\t];\n\t}", "public function jsonSerialize() {\n\t\t$fields = get_object_vars($this);\n\t\t$fields[\"eventStartDate\"] = intval($this->eventStartDate->format(\"U\")) * 1000;\n\t\t$fields[\"eventEndDate\"] = intval($this->eventEndDate->format(\"U\")) * 1000;\n\t\treturn($fields);\n\t}" ]
[ "0.6588477", "0.64389616", "0.6410529", "0.63292783", "0.6321633", "0.6286873", "0.6277906", "0.626355", "0.62138224", "0.61932653", "0.61905366", "0.61827403", "0.61827403", "0.61605805", "0.60855246", "0.6085367", "0.60842156", "0.60544693", "0.60479873", "0.60398364", "0.6024478", "0.60204744", "0.60130405", "0.60079026", "0.60079026", "0.5981825", "0.5981599", "0.59763086", "0.5958026", "0.5956134", "0.5951754", "0.5951618", "0.5946885", "0.5944253", "0.5930318", "0.59295213", "0.5918509", "0.59077954", "0.59045106", "0.59019023", "0.58714426", "0.58646894", "0.585809", "0.5855844", "0.5850532", "0.5850532", "0.5850532", "0.5850532", "0.5850532", "0.5850532", "0.5848243", "0.5846983", "0.5837712", "0.58318794", "0.58318794", "0.5825838", "0.5825537", "0.5825308", "0.58162344", "0.58162344", "0.58157814", "0.58130425", "0.5807739", "0.5801075", "0.57998556", "0.5783966", "0.57809454", "0.57809454", "0.57809454", "0.57778525", "0.57719266", "0.5770324", "0.57651067", "0.5760012", "0.57487243", "0.57408166", "0.57359356", "0.57348377", "0.57225364", "0.57143867", "0.5712254", "0.57120484", "0.57120484", "0.57120484", "0.57120484", "0.57120484", "0.57120484", "0.57120484", "0.57120484", "0.5705106", "0.5705106", "0.5705106", "0.5704373", "0.5702726", "0.5694689", "0.56911254", "0.56906766", "0.56825364", "0.5679947", "0.56789535" ]
0.66726726
0
Run the database seeds.
public function run() { $filiations = ['Сумы', 'Киев', 'Николаев', 'удаленный филиал', ]; foreach ($filiations as $city_name) { if (!DB::table('filiations') ->where('city_name', $city_name)->first()) { DB::table('filiations')->insert([ 'city_name' => $city_name, ]); } } }
{ "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' => '[email protected]', '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'=> \"[email protected]\"\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' => '[email protected]',\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 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 // 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 // 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' => '[email protected]',\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' => '[email protected]',\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'=>'[email protected]'\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' => '[email protected]',\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 // \\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 // 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' => '[email protected]',\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 // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\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=> '[email protected]',\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' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\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' => '[email protected]',\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 $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(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 // \\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([\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' => '[email protected]',\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 $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' => '[email protected]',\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 \\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\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\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 = [email protected]\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 // $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 // 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([\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 {\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\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 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' => '[email protected]',\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 // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\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 //\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 // 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' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\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' => '[email protected]']);\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'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->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' => '[email protected]']);\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 \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 // $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 $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\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\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 // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\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 // 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 $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "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(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 // $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' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\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 // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\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'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\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 //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\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'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', '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 }", "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 }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Registers the required js files and script to initialize echarts plugin.
protected function registerClientScript() { $id = $this->options['id']; $view = $this->getView(); $option = !empty($this->pluginOptions['option']) ? Json::encode($this->pluginOptions['option']) : '{}'; if ($this->theme) { $js = "var {$this->clientId} = echarts.init(document.getElementById('{$id}'), " . $this->quote($this->theme) . ");"; } else { $js = "var {$this->clientId} = echarts.init(document.getElementById('{$id}'));"; } $js .= "{$this->clientId}.setOption({$option});"; if (isset($this->pluginOptions['group'])) { $js .= "{$this->clientId}.group = " . $this->quote($this->pluginOptions['group']) . ";"; } if ($this->responsive) { $js .= "$(window).resize(function () {{$this->clientId}.resize()});"; } foreach ($this->pluginEvents as $name => $handlers) { $handlers = (array) $handlers; foreach ($handlers as $handler) { $js .= "{$this->clientId}.on(" . $this->quote($name) . ", $handler);"; } } EChartsAsset::register($view); $view->registerJs($js); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_plugin_script() {\n\t\twp_enqueue_script ( 'tr-execute', plugin_dir_url ( __FILE__ ) . '../js/execute.js', array (\n\t\t\t\t'jquery' \n\t\t) );\n\t\twp_enqueue_script ( 'tr-jquery-custom', plugin_dir_url ( __FILE__ ) . '../js/jquery-ui.min.js', array (\n\t\t\t\t'jquery' \n\t\t) );\n\t\t// wp_enqueue_script ( 'tr-jquery-charts', plugin_dir_url ( __FILE__ ) . '../js/charts.js', array (\n\t\t// 'jquery'\n\t\t// ) );\n\t\t// include the new datachart file.\n\t\t// wp_enqueue_script ( 'tr-jquery-charts', plugin_dir_url ( __FILE__ ) . '../js/define_chart_code.js', array (\n\t\t// 'jquery'\n\t\t// ) );\n\t\t// enque the google jsapi from url\n\t\t// wp_enqueue_script ( 'kek-chart', 'https://www.google.com/jsapi');\n\t\t// wp_enqueue_script ( 'kek-chart2', 'https://www.gstatic.com/charts/loader.js');\n\t}", "public static function em_enqueue_scripts(){\n\t\twp_enqueue_script('events-manager-pro', plugins_url('includes/js/events-manager-pro.js',__FILE__), array('jquery'), EMP_VERSION); //jQuery will load as dependency\n\t}", "protected function initJS()\n\t{\n\t\tglobal $tpl;\n\t\t\n\t\tinclude_once \"Services/jQuery/classes/class.iljQueryUtil.php\";\n\t\tiljQueryUtil::initjQuery();\n\t\t\n\t\t$tpl->addJavascript(\"Services/Chart/js/flot/excanvas.min.js\");\n\t\t$tpl->addJavascript(\"Services/Chart/js/flot/jquery.flot.min.js\");\n\t\t\n\t\tif((bool)$this->auto_resize)\n\t\t{\n\t\t\t// #13108\n\t\t\t$tpl->addJavascript(\"Services/Chart/js/flot/jquery.flot.resize.min.js\");\n\t\t}\n\t\t\n\t\t$this->addCustomJS();\n\t}", "protected function registerClientScript()\n {\n $id = $this->options['id'];\n $view = $this->getView();\n ChartJsAsset::register($view);\n\n $config = Json::encode(\n [\n 'type' => $this->type,\n 'data' => $this->data ?: new JsExpression('{}'),\n 'options' => $this->clientOptions ?: new JsExpression('{}'),\n 'plugins' => $this->plugins\n ]\n );\n\n $js = \";var chartJS_{$id} = new Chart($('#{$id}'),{$config});\";\n $view->registerJs($js);\n }", "protected function registerScript()\n\t{\n\t $baseUrl = Yii::app()->getHomeUrl();\n\t $js_arr = array('triggmine-scripts.js');\n\t foreach($js_arr as $filename)\n\t {\n\t Yii::app()->getClientScript()->registerScriptFile('/js/vendor/'.$filename, CClientScript::POS_END);\n\t }\n\t}", "public function enqueue_scripts()\n\t{\n\t\twp_enqueue_script( 'orghub-upload-extended-data', ORGANIZATION_HUB_PLUGIN_URL.'/admin-pages/scripts/upload-extended-data.js' );\t\t\n\t}", "protected function loadJavaScripts()\n {\n $this->pageRenderer->loadJquery();\n $this->pageRenderer->loadRequireJsModule('bootstrap');\n $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/ContextHelp');\n $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/DocumentHeader');\n $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/SplitButtons');\n }", "public function register_scripts()\n {\n }", "private function registerClientScripts()\n {\n $view = $this->getView();\n\n DatepickerAsset::$language = $this->_language;\n DatepickerAsset::$juiNoConflict = $this->juiNoConflict;\n DatepickerAsset::register($view);\n\n $clientOptions = array_replace([\n 'format' => 'yyyy-mm-dd',\n ], $this->clientOptions);\n $options = Json::htmlEncode($clientOptions);\n\n $view->registerJs(\"jQuery('#{$this->options['id']}').datepicker(jQuery.extend({autoclose: true, zIndexOffset: 100}, $options));\");\n }", "public function registerScripts() {\n $this->scripts['bootstrap.min'] = 'assets/js/bootstrap.min.js';\n $this->scripts['jquery.nouislider.min'] = 'assets/js/mkdf-ui/jquery.nouislider.min.js';\n $this->scripts['mkdf-ui-admin'] = 'assets/js/mkdf-ui/mkdf-ui.js';\n $this->scripts['mkdf-bootstrap-select'] = 'assets/js/mkdf-ui/mkdf-bootstrap-select.min.js';\n\n foreach ($this->scripts as $scriptHandle => $scriptPath) {\n sienna_mikado_register_skin_script($scriptHandle, $scriptPath);\n }\n }", "public function registerClientScript() {\n\n// $_cssFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'jquery.innerfade/css/jq_fade.css';\n// $cssFile = Yii::app()->getAssetManager()->publish($_cssFile);\n// Yii::app()->getClientScript()->registerCssFile($cssFile);\n\n $_jsFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'jquery.innerfade/js/jquery.innerfade.js';\n $jsFile = Yii::app()->getAssetManager()->publish($_jsFile);\n\n Yii::app()->getClientScript()->registerScriptFile($jsFile);\n }", "public function DefineJsResources()\n {\n $this->carabiner->js('https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js');\n $this->carabiner->js('https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js');\n $this->carabiner->js('https://cdn.jsdelivr.net/npm/[email protected]/dist/Chart.min.js');\n // an array of arrays\n $this->carabiner->js(array(\n array('assets/js/Chart.min.js'),\n array('assets/js/Chart.bundle.min.js'),\n array('assets/js/jquery.js')\n ));\n }", "function addJSFiles()\n\t{\n\t\t\t\t$this->getContainer()->AddJSFile(\"include/zoombox/zoombox.js\");\n\t\t$this->getJSControl();\t\n\t}", "protected function registerAssets()\n {\n // register the necessary script files\n $bundle = TradingViewAsset::register($this->view)->withScripts($this->scripts);\n \n $this->options['library_path'] = $bundle->baseUrl . '/charting_library/';\n\n // prepare and register JavaScript code block\n $jsOptions = Json::encode($this->options);\n $js = \"var widget = window.tvWidget = new TradingView.widget($jsOptions);\";\n $key = __CLASS__ . '#' . $this->id;\n \n $this->view->registerJs($js, View::POS_READY, $key);\n }", "public function registerAssets()\n {\n DateRangePickerAsset::register($this->view);\n\n $key = __CLASS__ . '#' . $this->id;\n $this->options['success'] = new JsExpression($this->options['success']);\n\n $jsOptions = Json::encode($this->options);\n $javascript = \"var dateRange = new pickerDateRange('\".$this->id.\"', \".$jsOptions.\");\";\n $this->view->registerJs($javascript, View::POS_READY, $key);\n }", "public function widget_scripts() {\n\t\twp_register_script( 'elementor-hello-world', plugins_url( '/assets/js/hello-world.js', __FILE__ ), [ 'jquery' ], false, true );\n\t}", "public function loadScripts() {\n $graphcss = $this->getProperty('graphcss');\n $customcss = $this->getProperty('customcss');\n $loadjquery = $this->getProperty('loadjquery');\n\n $cssUrl = $this->sekug->config['cssUrl'].'web/';\n $jsUrl = $this->sekug->config['jsUrl'].'web/';\n\n if($loadjquery == 1){\n $this->modx->regClientStartupScript($jsUrl.'libs/'.$this->sekug->config['jqueryFile']);\n }\n if($customcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$customcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'gallery.structure.css');\n }\n if($graphcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$graphcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'directory.graph.css');\n }\n }", "public function register_scripts()\r\n\t{\r\n\t\twp_register_style('poll', plugins_url('assets/poll.css', __DIR__));\r\n\t\twp_register_script('vue', 'https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js', array('jquery'), null, true);\r\n\t\twp_register_script('poll', plugins_url('assets/poll.js', __DIR__), array('vue'), null, true);\r\n\t}", "public function registerScripts() {\r\n\t\t$baseUrl = Yii::app()->assetManager->publish(dirname(__FILE__).\"/assets/\".__CLASS__);\r\n\t\tYii::app()->clientScript->registerScriptFile($baseUrl.\"/AFileBrowser.js\");\r\n\t\t\r\n\t}", "private function registerPlugins()\n\t{\n\t\t$assetDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;\n\t\t$assetUrl = Yii::app()->assetManager->publish($assetDir);\n\n\n\t\t$cs = Yii::app()->getClientScript();\n\n\t\tforeach ($this->plugins as $p)\n\t\t{\n\n\t\t\tif ($p['flag'])\n\t\t\t{\n\t\t\t\tforeach ($p['js'] as $js)\n\t\t\t\t\t$cs->registerScriptFile($assetUrl . \"/\" . $js, CClientScript::POS_END);\n\t\t\t}\n\t\t}\n\t}", "function jigoshop_admin_coupons_scripts () {\n\twp_register_script('jigoshop-date', jigoshop::plugin_url() . '/assets/js/date.js');\n\twp_register_script('jigoshop-datepicker', jigoshop::plugin_url() . '/assets/js/datepicker.js', array('jquery', 'jigoshop-date'));\n\twp_enqueue_script('jigoshop-datepicker');\n}", "public static function add() {\n\t\t\\Layout::addJs('/composer/nnnick/chartjs/dist/Chart.min.js', 10000);\n\t\t\\Layout::addCss('/composer/nnnick/chartjs/dist/Chart.min.css', 10000);\n\t}", "public function registerScripts()\n {\n // font awesome. choose css fonts instead of svg, see more at https://fontawesome.com/how-to-use/on-the-web/other-topics/performance\n // to name font awesome handle as `plugin-name-prefix-font-awesome5` is to prevent conflict with other plugins that maybe use older version but same handle that cause some newer icons in this plugin disappears.\n wp_enqueue_style('rundizable-wp-features-font-awesome5', plugin_dir_url(RUNDIZABLEWPFEATURES_FILE).'assets/fontawesome/css/all.min.css', [], '5.5.0');\n wp_enqueue_style('rundizable-wp-features-rd-settings-tabs-css', plugin_dir_url(RUNDIZABLEWPFEATURES_FILE).'assets/css/rd-settings-tabs.css', [], RUNDIZABLEWPFEATURES_VERSION);\n wp_enqueue_script('rundizable-wp-features-rd-settings-tabs-js', plugin_dir_url(RUNDIZABLEWPFEATURES_FILE).'assets/js/rd-settings-tabs.js', ['jquery'], RUNDIZABLEWPFEATURES_VERSION, true);\n }", "public function register_scripts() {\r\n\r\n\t\t$this->nyp_style();\r\n\r\n\t\twp_register_script( 'accounting', WC_Name_Your_Price()->plugin_url() . '/assets/js/accounting.js', array( 'jquery' ), '0.4.2', true );\r\n\r\n\t\t$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\r\n\t\twp_register_script( 'woocommerce-nyp', WC_Name_Your_Price()->plugin_url() . '/assets/js/name-your-price' . $suffix . '.js', array( 'jquery', 'accounting' ), WC_Name_Your_Price()->version, true );\r\n\t}", "private function __register_scripts() {\n\t\t// Load all the registered scripts\n\t\t$assets_loader = new SwpmvcAssetsLoader();\n\t\t$assets = $assets_loader->fn_load_scripts();\n\n\t\t//Extract CSS Assets and put them into Registered CSS Container\n\t\t$this->registered_css = $assets[ 'css' ];\n\n\t\t//Extract JS Assets and put them into Registered JS Container\n\t\t$this->registered_js = $assets[ 'js' ];\n\n\t\t//Some cleanup\n\t\tunset($assets_loader);\n\t\tunset($assets);\n\n\t\t//Load all the common CSS and JS which will be required for all the pages.\n\t\t$this->fn_load_scripts();\n\t}", "public function register_assets() {\n\n $scripts = $this->get_scripts();\n $styles = $this->get_styles();\n\n foreach ( $scripts as $handle => $script ) {\n $deps = isset( $script['deps'] ) ? $script['deps'] : false;\n\n wp_register_script( $handle, $script['src'], $deps, $script['version'], true );\n }\n\n foreach ( $styles as $handle => $style ) {\n $deps = isset( $style['deps'] ) ? $style['deps'] : false;\n\n wp_register_style( $handle, $style['src'], $deps, $style['version'] );\n }\n\n wp_localize_script( 'cbxcf-scripts', 'cbxcfObj', [\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'error' => __( 'Something went wrong', 'cbxcustomform' ),\n ] );\n\n }", "private function registerClientScript()\n {\n ArrayInputAsset::register($this->view);\n }", "private function initializePlugins() {\r\n if (isset($this->settings[\"loadJsPlugins\"])) {\r\n if (count($this->settings[\"loadJsPlugins\"])) {\r\n foreach ($this->settings[\"loadJsPlugins\"] as $pluginName) {\r\n $this->addPlugin($pluginName);\r\n }\r\n }\r\n }\r\n unset($this->settings[\"loadJsPlugins\"]);\r\n }", "public function add_scripts() {\n\n\t\t\t\tFusion_Dynamic_JS::enqueue_script( 'fusion-video' );\n\t\t\t}", "public function addAssets()\n {\n $this->addJs('../../graphreport/assets/d3.js');\n $this->addJs('../../graphreport/assets/c3.js');\n $this->addCss('../../graphreport/assets/c3.css'); \n }", "public function registerClientScript()\n\t{\n\t\t/* publish assets dir */\n\t\t$assetsUrl = $this->getAssetsUrl('wheels.widgets.assets.timepicker');\n\n\t\t/* @var $cs \\CClientScript */\n\t\t$cs = \\Yii::app()->getClientScript();\n\n\t\t$cs->registerCssFile($assetsUrl . '/css/bootstrap-timepicker.min.css')\n\t\t\t->registerScriptFile($assetsUrl . '/js/bootstrap-timepicker.min.js');\n\n\t\t$this->registerPlugin('timepicker');\n\t}", "protected function registerClientScript()\n {\n $view = $this->getView();\n\n DatePickerAsset::register($view);\n JuiAsset::register($view);\n\n $id = $this->options['id'];\n $options = Json::encode($this->clientOptions);\n $view->registerJs(\"jQuery('#$id').progressiveDatePicker('{$this->options['formattedValue']}', $options);\");\n }", "function events_scripts() {\r\n\t\tglobal $post_type;\r\n\r\n\t\tif( 'event' != $post_type )\r\n\t\t\treturn;\r\n\r\n\t\twp_enqueue_script('jquery-ui-datepicker', array( 'jquery' ) );\r\n\r\n\t\twp_enqueue_script('jquery-ui-timepicker-addon', plugins_url( 'js/jquery-ui-timepicker-addon.js', dirname( __FILE__ ) ), array('jquery-ui-core','jquery-ui-datepicker') );\r\n\r\n\t\twp_enqueue_style( 'jquery-ui-datepicker', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.0/themes/smoothness/jquery-ui.css', true);\r\n\r\n\t\twp_enqueue_style( 'jquery-ui-timepicker-addon', plugins_url( 'css/jquery-ui-timepicker-addon.css', dirname( __FILE__ ) ) );\r\n\r\n\t\twp_enqueue_script('script', plugins_url( 'js/events.js', dirname( __FILE__ ) ), array('jquery') );\r\n\r\n\t\t$gapikey = get_site_option( 'pp_gapikey' );\r\n\r\n\t\tif ( $gapikey != false ) {\r\n\r\n\t\t\twp_register_script( 'google-places-api', '//maps.googleapis.com/maps/api/js?key=' . $gapikey . '&libraries=places' );\r\n\t\t\twp_print_scripts( 'google-places-api' );\r\n\r\n\t\t}\r\n\t}", "public function register_admin_scripts() {\n\t\n\t\twp_enqueue_script( 'jquery-ui-datepicker' );\n\t\t//wp_enqueue_script( 'wp-jquery', 'http://code.jquery.com/jquery-1.9.1.min.js' );\n\t\twp_enqueue_script( 'wp-jquery-migrate', 'http://code.jquery.com/jquery-migrate-1.2.1.js' );\n\t\twp_enqueue_script( 'wp-jquery-ui', 'http://code.jquery.com/ui/1.10.3/jquery-ui.min.js' );\n\t\twp_enqueue_script( 'wp-jquery-date-picker', plugins_url( 'WordPress-jQuery-Date-Picker/js/admin.js' ) );\n\t\twp_enqueue_script( 'wp-jquery-time-picker', plugins_url( 'WordPress-jQuery-Date-Picker/js/jquery-ui-timepicker.js' ) );\n\t\t\n\t}", "public function enqueue_scripts()\n\t{\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Prosvit_Extension_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Prosvit_Extension_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\t\twp_enqueue_script('script_select2', plugin_dir_url(__FILE__) . 'js/select2.min.js', array('jquery'), $this->version, false);\n\t\twp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/prosvit-extension-admin.js', array('jquery'), $this->version, false);\n\t}", "public function register_plugin_scripts() {\n\t\t//in case I need jQuery\n\t\t//wp_enqueue_script( 'jQuery', '//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js', array(), '1.10.2', true );\n\t\t\n\t\t//jQuery UI for Calendar \n\t\twp_enqueue_script( 'jQueryui', '//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', array(), '1.10.3', true );\n\t\n\t\t// Main Team Manager JS\n\t\t// Old\n\t\t//wp_enqueue_script( 'HockeyMan', plugins_url( '/js/HockeyMan.js' , __FILE__ ), array(), '1.0.0', true );\n\t\t// New Hotness\n\t\twp_enqueue_script( 'bootstrap-combobox', plugins_url( '/js/bootstrap-combobox.js' , __FILE__ ), array(), '1.0.0', true );\n\t\twp_enqueue_script( 'TeamManager', plugins_url( '/js/TeamManager.js' , __FILE__ ), array(), '1.0.0', true );\n\t\twp_localize_script( 'TeamManager', 'myAjax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ))); \n\t}", "public function dt_icon_list_loadCssAndJs() {\n wp_register_style( 'dt_extend_style', plugins_url('assets/droit-wbpakery-addons.css', __FILE__) );\n // If you need any javascript files on front end, here is how you can load them.\n //wp_enqueue_script( 'droit-wbpakery-addons_js', plugins_url('assets/droit-wbpakery-addons.js', __FILE__), array('jquery') );\n }", "function adherder_report_scripts() {\n\t// the google chart API is used for reporting\n\twp_enqueue_script('google-jsapi', 'https://www.google.com/jsapi');\n}", "public function register_plugin_scripts()\r\n\t{\r\n\t\twp_enqueue_script('jquery');\r\n\t\twp_enqueue_script( 'wp-fading-content-slider-plugin-script', plugins_url( 'wp-fading-content-slider/js/display.js' ) );\r\n\t}", "public function init() {\n //$this->js[] = YII_DEBUG ? 'js/juidatepicker.js' : 'js/juidatepicker.js';\n }", "public function registerClientScript()\n\t{\n\t\t$view = $this->getView();\n\t\tSlideoutAsset::register($view);\n\n\t\t$options = empty($this->pluginOptions) ? \"{}\" : Json::encode($this->pluginOptions);\n\t\t$js = 'var '. $this->instanceName.' = new Slideout(' . $options . ')';\n\t\t$view->registerJs($js, $view::POS_END);\n\t}", "public function enqueue_scripts()\n\t{\n\t\twp_register_script('peepso-activitystream', $this->plugin_url . 'asset/js/activitystream.js',\n\t\t\tarray('peepso'), PeepSo::PLUGIN_VERSION, TRUE);\n\t}", "function hookRegisterScripts() {\n\t \tif (!is_admin() && get_option('fse_load_fc_libs') == true) {\n\t \t\tif (get_option('fse_load_jquery') == true)\n\t \t\twp_enqueue_script('jquery');\n\t \t\tif (get_option('fse_load_jqueryui') == true)\n\t \t\twp_enqueue_script('jquery-ui-core');\n\n\t \t\twp_enqueue_script('fullcalendar', self::$plugin_js_url.'fullcalendar.min.js');\n\t \t\t//Pass Ajax Url to Javascript Paraemter\n\t \t\twp_localize_script('fullcalendar', 'WPCalendar', array('ajaxUrl'=>admin_url('admin-ajax.php')));\n\t \t}\n\t }", "public function register_admin_scripts()\r\n\t{\r\n\t\t// wp_enqueue_script('jquery');\r\n\t\t// wp_enqueue_script( 'wp-fading-content-slider-admin-script', plugins_url( 'wp-fading-content-slider/js/admin.js' ) );\r\n\t}", "protected function _initDependencies()\n {\n // Loading jsonp library for cross-domain AJAX requests\n $this->view->headScript()->appendFile('/scripts/jquery/plugins/jsonp/jquery.jsonp-2.4.0.min.js?' .\n SCRIPT_VERSION_JS);\n// $this->view->headScript()->appendFile('/scripts/libraries/content/plugins/jqueryForm/jquery.form.js');\n }", "public function initialize() {\n parent::initialize();\n Gdn_Theme::section('Dashboard');\n $this->addJsFile('log.js');\n $this->addJsFile('jquery.expander.js');\n $this->addJsFile('jquery-ui.min.js');\n $this->addJsFile('jquery.popup.js');\n }", "static function enqueue_scripts() {\n\t\tif ( ! static::matches_custom_format( get_post_format() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t//scripts\n\t\twp_register_script( 'custom-event-preview-script', get_stylesheet_directory_uri() . '/assets/js/cpf-event-preview.min.js', array( 'jquery' ), CURRENT_THEME_VERSION, true );\n\t\twp_enqueue_script( 'custom-event-preview-script' );\n\t\twp_localize_script( 'custom-event-preview-script', 'evtPreviewData', self::event_preview_data() );\n\t}", "function eventoni_init() {\n\tif (!is_admin()) {\n\t\t$options = get_option('eventoni_options');\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js', false, '1.3.2', true);\n\t\twp_enqueue_script('jquery');\n\n\t\twp_deregister_script('google_maps');\n\t\twp_register_script('google_maps', 'http://www.google.com/jsapi?key='.$options['googlemaps_api_key'], false, '1.0', true);\n\t\twp_enqueue_script('google_maps');\n\n\t\twp_enqueue_script('my_script', get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/js/eventoni.js', array('jquery','google_maps'), '1.0', true);\n\t}\n}", "public function addDependencies()\n {\n $this->Html->script('/attachments/js/vendor/jquery.ui.widget.js', ['block' => true]);\n $this->Html->script('/attachments/js/vendor/jquery.iframe-transport.js', ['block' => true]);\n $this->Html->script('/attachments/js/vendor/jquery.fileupload.js', ['block' => true]);\n $this->Html->script('/attachments/js/app/lib/AttachmentsWidget.js', ['block' => true]);\n $this->Html->css('/attachments/css/attachments.css', ['block' => true]);\n }", "function enqueue(){ \n\n wp_enqueue_script( 'jqx', 'https://code.jquery.com/jquery-1.12.4.js', array ( 'json2' ), 1.1, false);\n\n wp_enqueue_script( 'jqui','https://code.jquery.com/ui/1.12.1/jquery-ui.js', array ( 'jqx' ), 1.1, false);\n wp_enqueue_style( 'jqui','https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css',2); \n\n wp_enqueue_script( 'jqx_touch', plugins_url('/js/jquery.ui.touch-punch.min.js',__FILE__), array ( 'jquery' ), 1.1, true); \n \n wp_enqueue_script( 'dicejs', plugins_url('/js/dice.js',__FILE__), array ( 'jqx','jquery','jqx_touch' ), 1.1, true);\n wp_enqueue_style( 'dicecss', plugins_url('/css/dice.css',__FILE__), 99);\n }", "public function registerClientScript()\n {\n $view = $this->getView();\n\n CroppieAsset::register($view);\n\n if (isset($this->clientOptions['enableExif']) && $this->clientOptions['enableExif'] === true) {\n ExifJsAsset::register($view);\n }\n\n $options = !empty($this->clientOptions)\n ? Json::encode($this->clientOptions)\n : '';\n\n $id = $this->getId();\n\n $js[] = \";jQuery('#$id').croppie($options);\";\n if (!empty($this->clientEvents)) {\n foreach ($this->clientEvents as $event => $handler) {\n $js[] = \"jQuery('#$id').on('$event', $handler);\";\n }\n }\n\n $view->registerJs(implode(\"\\n\", $js), View::POS_READY, 'test-croppie-js');\n }", "function as_on_add_scripts() {\n // enqueue backbonejs, underscore\n add_existed_script('backbone');\n add_existed_script('underscore');\n if (as_option('as_option_smooth_scroll', '1')) {\n // Smoothscroll JS\n add_script('smoothscroll', TEMPLATEURL . '/js/smoothscroll.js', array(\n 'jquery'));\n }\n // Modernize JS\n add_script('modernizr', TEMPLATEURL . '/js/libs/modernizr.custom.js', array(\n 'jquery'));\n if (as_option('as_option_retina_img', '1')) {\n add_script('retina', TEMPLATEURL . '/js/libs/retina.min.js', array(\n 'jquery'));\n }\n add_script('front', TEMPLATEURL . '/js/front.js', array(\n 'jquery',\n 'backbone',\n 'underscore'));\n add_script('js-appear', TEMPLATEURL . '/js/libs/main.js', array(\n 'jquery',\n 'jquery'));\n //add js easing when plugin not active\n if (!(function_exists('dslc_register_modules'))) {\n //add js easing\n add_script('js-easing', TEMPLATEURL . '/js/libs/jquery.easing.js', array(\n 'jquery',\n 'jquery'));\n }\n wp_localize_script('front', 'as_globals', array(\n 'ajaxURL' => admin_url('admin-ajax.php'),\n 'imgURL' => get_template_directory_uri() . '/img/'\n ));\n // Custom\n add_script('main', TEMPLATEURL . '/js/main.js', array(\n 'jquery'));\n // add style demo\n if (file_exists(TEMPLATE_DIR . '/demo/js/custom_panel.js')) {\n add_script('custom_panel', TEMPLATEURL . '/demo/js/custom_panel.js', array(\n 'jquery'));\n }\n}", "public function registerClientScript()\n {\n $view = $this->getView();\n\n CroppieAsset::register($view);\n\n if (isset($this->clientOptions['enableExif']) && $this->clientOptions['enableExif'] === true) {\n ExifJsAsset::register($view);\n }\n\n $options = !empty($this->clientOptions)\n ? Json::encode($this->clientOptions)\n : '';\n\n $id = $this->getId();\n\n $js[] = \";jQuery('#$id').croppie($options);\";\n if (!empty($this->clientEvents)) {\n foreach ($this->clientEvents as $event => $handler) {\n $js[] = \"jQuery('#$id').on('$event', $handler);\";\n }\n }\n\n $view->registerJs(implode(\"\\n\", $js));\n }", "public function registerScriptsCommon() {\n $v = Wpjb_Project::VERSION;\n $p = plugins_url().'/wpjobboard/public/js/';\n $x = plugins_url().'/wpjobboard/application/vendor/';\n \n wp_register_script(\"wpjb-suggest\", $p.\"wpjb-suggest.js\", array(\"jquery\"), $v, true );\n \n wp_register_script(\"wpjb-vendor-selectlist\", $x.\"select-list/jquery.selectlist.pack.js\", array(\"jquery\"), null, true);\n wp_register_script(\"wpjb-plupload\", $p.\"wpjb-plupload.js\", array(\"plupload-all\"), $v, true);\n wp_register_script(\"wpjb-vendor-datepicker\", $x.\"date-picker/js/datepicker.js\", array(\"jquery\"));\n \n wp_register_script(\"wpjb-gmaps-infobox\", $p.\"gcode-infobox.js\", array());\n wp_register_script(\"wpjb-gmaps-markerclusterer\", $p.\"gcode-markerclusterer.js\", array());\n \n wp_register_script(\"wpjb-ace\", $x.\"ace/ace.js\", array(), \"1.2.6\");\n \n wp_register_script(\"wpjb-vendor-stripe\", \"https://js.stripe.com/v3/\");\n wp_register_script(\"wpjb-stripe\", $p.\"wpjb-stripe.js\", array(\"jquery\", \"wpjb-stripe-main\", \"wpjb-payment\"), $v);\n //wp_register_script(\"wpjb-stripe-elements\", $p.\"wpjb-stripe-elements.js\", array(\"jquery\", \"wpjb-stripe\", \"wpjb-stripe-main\"), $v);\n wp_register_script(\"wpjb-stripe-main\", \"https://js.stripe.com/v3/\", array(), $v);\n \n wp_register_script('wpjb-myresume', $p.'frontend-myresume.js', array(\"jquery\", \"wp-util\"), $v );\n \n wp_register_script('wpjb-admin-customize', $p.'admin-customize.js', array(\"jquery\"), $v, true );\n }", "protected function registerAssets(){\n\n\t\t$cs = Yii::app()->clientScript;\n\t\t$cs->registerCoreScript('jquery');\n\n\t\t$assets_path = dirname(__FILE__) . DIRECTORY_SEPARATOR.'assets';\n\t\t$url = Yii::app()->assetManager->publish($assets_path, false, -1, YII_DEBUG);\n\t\t$webroot = Yii::getPathOfAlias('webroot').DIRECTORY_SEPARATOR;\n\t\t$plugins = array();\n\t\t\n\t\t// register redactor files\n\t\t$cs->registerScriptFile($url.'/chosen.jquery.min.js');\n\t\t$cs->registerCssFile($url.'/chosen.min.css');\n\t\t\n\t\t$cs->registerScript('chosen_'.$this->id, '\n\t\t\t$(\"#'.$this->id.'\").chosen({no_results_text: \"'.Yii::t('chosen', 'Ничего не найдено').'\"});\n\t\t');\n\t\t\n\t}", "public function widget_scripts() {\n\t\twp_register_script( 'elementor-addons', plugins_url( '/assets/js/frontend.js', __FILE__ ), [ 'jquery' ], ELEMENT_ADDON_VER, true );\n\t\twp_register_script( 'elementor-addons-content-filter', plugins_url( '/assets/js/content-filter.js', __FILE__ ), [ 'jquery' ], ELEMENT_ADDON_VER, true );\n\t\twp_register_script( 'elementor-addons-custom-frontend', plugins_url( '/assets/js/custom-frontend.js', __FILE__ ), [ 'jquery' ], ELEMENT_ADDON_VER, true );\n\t\twp_register_script( 'elementor-addons-bloodhound', plugins_url( '/assets/js/typeahead/typeahead.bundle.min.js', __FILE__ ), [ 'jquery' ], ELEMENT_ADDON_VER, true );\n\t\twp_register_script( 'elementor-addons-masonry', plugins_url( '/assets/js/masonry.pkgd.min.js', __FILE__ ), [ 'jquery' ], ELEMENT_ADDON_VER, true );\n\t}", "function barjeel_scripts() {\n\n\twp_enqueue_script( 'okzoom', get_template_directory_uri() . '/javascripts/build/okzoom.js', array( 'jquery' ), '20120206', true );\n\n\twp_enqueue_script( 'barjeel', get_template_directory_uri() . '/javascripts/build/barjeel.min.js', array( 'jquery' ), '20120206', true );\n\n\n}", "public function enqueue_scripts(){\n\t\t\t// Add the color picker JS & CSS files\n\t\t\twp_enqueue_style( 'wp-color-picker' );\n\t\t\twp_enqueue_script( 'wp-color-picker' );\n\t\t}", "public function registerScriptsFrontend() {\n $v = Wpjb_Project::VERSION;\n $p = plugins_url().'/wpjobboard/public/js/';\n \n wp_register_script('wpjb-js', $p.'frontend.js', array(\"jquery\"), $v );\n \n wp_register_script('wpjb-payment', $p.'frontend-payment.js', array(\"jquery\"), $v );\n wp_register_script('wpjb-serialize', $p.'serialize.js', array(), $v, true);\n wp_register_script('wpjb-alert', $p.'frontend-alert.js', array(\"jquery\", \"wp-util\", 'wpjb-serialize'), $v, true);\n wp_register_script('wpjb-manage', $p.'frontend-manage.js', array(\"jquery\"), $v, true);\n wp_register_script('wpjb-manage-apps', $p.'frontend-manage-apps.js', array(\"jquery\"), $v, true);\n \n wp_register_script(\"wpjb-paypal-reply\", $p.\"wpjb-paypal-reply.js\", array(\"jquery\"), $v);\n\n }", "function addScriptResources()\t{\n\t\tif (t3lib_extMgm::isLoaded('t3jquery')) {\n\t\t\trequire_once(t3lib_extMgm::extPath('t3jquery').'class.tx_t3jquery.php');\n\t\t}\n\n\t\t// checks if t3jquery is loaded\n\t\tif (T3JQUERY === TRUE) {\n\t\t\ttx_t3jquery::addJqJS();\n\t\t} else {\n\t\t\tif($this->conf['jQueryRes']) $this->jsFile[] = $this->conf['jQueryRes'];\n\t\t\tif($this->conf['tooltipJSRes']) $this->jsFile[] = $this->conf['tooltipJSRes'];\n\t\t}\n\n\t\t// Fix moveJsFromHeaderToFooter (add all scripts to the footer)\n\t\tif ($GLOBALS['TSFE']->config['config']['moveJsFromHeaderToFooter']) {\n\t\t\t$allJsInFooter = TRUE;\n\t\t} else {\n\t\t\t$allJsInFooter = FALSE;\n\t\t}\n\n\t\t$pagerender = $GLOBALS['TSFE']->getPageRenderer();\n\t\t\n\t\t// add all defined JS files\n\t\tif (count($this->jsFile) > 0) {\n\t\t\tforeach ($this->jsFile as $jsToLoad) {\n\t\t\t\tif (T3JQUERY === TRUE) {\n\t\t\t\t\t$conf = array(\n\t\t\t\t\t\t'jsfile' => $jsToLoad,\n\t\t\t\t\t\t'tofooter' => ($this->conf['jsInFooter'] || $allJsInFooter),\n\t\t\t\t\t\t'jsminify' => $this->conf['jsMinify'],\n\t\t\t\t\t);\n\t\t\t\t\ttx_t3jquery::addJS('', $conf);\n\t\t\t\t} else {\n\t\t\t\t\t$file = $GLOBALS['TSFE']->tmpl->getFileName($jsToLoad);\n\t\t\t\t\tif ($file) {\n\t\t\t\t\t\tif ($allJsInFooter) {\n\t\t\t\t\t\t\t$pagerender->addJsFooterFile($file, 'text/javascript', $this->conf['jsMinify']);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$pagerender->addJsFile($file, 'text/javascript', $this->conf['jsMinify']);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt3lib_div::devLog(\"'{\".$jsToLoad.\"}' does not exists!\", $this->extKey, 2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// add defined CSS file\n\t\tif($this->conf['cssFile']) {\n\t\t\t// Add script only once\n\t\t\t$css = $GLOBALS['TSFE']->tmpl->getFileName($this->conf['cssFile']);\n\t\t\tif ($css) {\n\t\t\t\t$pagerender->addCssFile($css, 'stylesheet', 'all', '', $this->conf['cssMinify']);\n\t\t\t} else {\n\t\t\t\tt3lib_div::devLog(\"'{\".$this->conf['cssFile'].\"}' does not exists!\", $this->extKey, 2);\n\t\t\t}\n\t\t}\n\t}", "public function config_page_scripts() {\n\t\twp_enqueue_script( 'yseo-gc-admin-js', HS_DOCS_API_DIR_URL . 'js/admin.min.js', null, HS_DOCS_API_PLUGIN_VERSION );\n\t}", "public function add_scripts() {\n\t\twp_enqueue_script(\n\t\t\t'heweb17',\n\t\t\tplugins_url( '/js/heweb17.js', __FILE__ ),\n\t\t\tarray( 'jquery' ) );\t}", "protected function loadJavaScripts() {}", "function cnew_load_scripts() {\r\n wp_register_script( 'cnew-js-admin', CNEW_PLUGIN_URL . 'includes/js/cne-workshops-admin.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker', 'cnew-js-jquery-validate' ), '', true );\r\n wp_register_script( 'cnew-js-jquery-mask', CNEW_PLUGIN_URL . 'includes/js/jquery.maskedinput.min.js', array( 'jquery' ), '', true );\r\n wp_register_script( 'cnew-js-jquery-validate', CNEW_PLUGIN_URL . 'includes/js/jquery.validate.min.js', array( 'jquery' ), '', true );\r\n wp_register_style( 'cnew-css-admin', CNEW_PLUGIN_URL . 'includes/css/cne-workshops-admin.css' );\r\n wp_register_style( 'cnew-css-jquery', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css' );\r\n\r\n wp_enqueue_script( 'cnew-js-admin' );\r\n wp_enqueue_script( 'cnew-js-jquery-mask' );\r\n wp_enqueue_style( 'cnew-js-jquery-validate' );\r\n wp_enqueue_style( 'cnew-css-admin' );\r\n wp_enqueue_style( 'cnew-css-jquery' );\r\n }", "public function enqueue_scripts()\n {\n wp_enqueue_script($this->andmoraho_vendors, plugin_dir_url(__FILE__) . 'js/andmoraho-vendors-admin.js', array( 'jquery' ), $this->version, false);\n }", "public function registerScriptsAdmin() {\n $v = Wpjb_Project::VERSION;\n $p = plugins_url().'/wpjobboard/public/js/';\n $x = plugins_url().'/wpjobboard/application/vendor/';\n \n //wp_register_script(\"wpjb-color-picker\", $p.\"jquery.colorPicker.js\" );\n wp_register_script(\"wpjb-color-picker\", $p.\"colorpicker.js\" );\n wp_register_script(\"wpjb-admin\", $p.\"admin.js\", array(\"jquery\"), $v);\n wp_register_script(\"wpjb-admin-job\", $p.\"admin-job.js\", array(\"jquery\", \"wpjb-suggest\", \"wpjb-vendor-datepicker\"), $v);\n wp_register_script(\"wpjb-admin-resume\", $p.\"admin-resume.js\", array(\"jquery\"), $v);\n wp_register_script(\"wpjb-admin-config-email\", $p.\"admin-config-email.js\", array(\"jquery\", \"jquery-ui-dialog\"), $v);\n wp_register_script(\"wpjb-admin-config-email-composer\", $p.\"admin-config-email-composer.js\", array(\"jquery\", \"iris\"), $v);\n wp_register_script(\"wpjb-admin-google-for-jobs\", $p.\"admin-google-for-jobs.js\", array(\"jquery\", \"wpjb-ace\", \"jquery-ui-dialog\", \"jquery-ui-sortable\", \"wp-util\"), $v);\n wp_register_script(\"wpjb-admin-medialibrary\", $p.\"admin-medialibrary.js\", array(\"jquery\", \"media-upload\"), $v);\n wp_register_script(\"wpjb-admin-config-email-editor\", $p.\"admin-config-email-editor.js\", array(\"jquery\", \"wpjb-ace\", \"jquery-ui-dialog\"), $v);\n wp_register_script(\"wpjb-admin-config-urls\", $p.\"admin-config-urls.js\", array(\"jquery\"), $v);\n wp_register_script(\"wpjb-admin-export\", $p.\"admin-export.js\", array(\"jquery\"), $v);\n wp_register_script(\"wpjb-admin-import\", $p.\"admin-import.js\", array(\"jquery\", \"wpjb-plupload\"));\n wp_register_script(\"wpjb-admin-apps\", $p.\"admin-apps.js\", array(\"jquery\"), $v, true);\n wp_register_script(\"wpjb-vendor-ve\", $x.\"visual-editor/visual-editor.js\", array(\"jquery\"));\n wp_register_script(\"wpjb-multi-level-accordion-menu\", $p.\"multi-level-accordion-menu.js\", array(\"jquery\"), $v);\n wp_register_script(\"wpjb-admin-user-register\", $p.\"admin-user-register.js\", array(\"jquery-ui-autocomplete\", \"jquery\"), $v);\n wp_register_script(\"wpjb-admin-alert\", $p.\"admin-alert.js\", array(\"jquery\", \"wp-util\"), $v);\n\n }", "public function arvan_wp_enqueue_scripts(){\n \n wp_register_script('arvan-plugin-custom-script', plugin_dir_url(__FILE__) . '/js/custom.js', array('jquery'));\n wp_localize_script( 'arvan-plugin-custom-script', 'WPData', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ))); \n wp_enqueue_script( 'arvan-plugin-custom-script');\n \n\n }", "function load_custom_scripts() {\n\t//slidebars\n\twp_enqueue_script('slidebars', THEMEROOT . '/js/slidebars.min.js', array('jquery'), '0.13.3', true);\n\t//bootstrap\n\twp_enqueue_script('bootstrap', THEMEROOT . '/js/bootstrap.min.js', array('jquery'), '3.3.6', true);\n\t//fancybox\n\twp_enqueue_script('fancybox', THEMEROOT . '/js/jquery.fancybox.pack.js', array('jquery'), '2.1.5', true);\n\t//valitate\n\twp_enqueue_script('validate', THEMEROOT . '/js/jquery.validate.min.js', array('jquery'), '1.15', true);\n\t\n\t//script\n\twp_enqueue_script('custom_script', THEMEROOT . '/js/scripts.js', array('jquery'), false, true);\n}", "private function printScripts()\n {\n TScript::importFromFile('highcharts.js');\n }", "public static function register()\n {\n // wp_enqueue_script('comment-reply');\n wp_enqueue_script('jquery');\n wp_deregister_script('underscore');\n wp_register_script('underscore', HKM_LIBJS . 'vendor/underscore.js', array(), '1.5', false);\n wp_register_script('moment', HKM_LIBJS . 'vendor/moment.js', array('jquery'), '2.7', false);\n wp_register_script('xdantimepicker', HKM_LIBJS . 'vendor/xdantimepicker.js', array('jquery', 'moment'), '2.0', false);\n wp_register_script('twentytwelve-navigation', HKM_LIBJS . 'navigation.js', array('jquery'), '1.0', true);\n wp_register_script('crip', 'http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js', array('jquery'), '1.0', true);\n wp_register_script('onecall_core', HKM_LIBJS . 'oc.js', array('jquery'), '1.0', false);\n wp_register_script('onecall_core_zepto', HKM_LIBJS . 'vendor/zepto.js', array('jquery'), '1.0', false);\n wp_register_script('onecall_core_mustache', HKM_LIBJS . 'vendor/mustache.js', array('jquery'), '1.0', false);\n //wp_register_script('onecall_core_backbone', HKM_LIBJS . 'vendor/backbone.js', array('jquery'), '1.0', false);\n wp_register_script('onecall_core_require', HKM_LIBJS . 'vendor/require.js', array('jquery'), '1.0', false);\n wp_register_script('onecall_core_bar', HKM_LIBJS . 'vendor/mustache.handlerbar.js', array('jquery', 'onecall_core_mustache'), '1.0', false);\n wp_register_script('grid', HKM_LIBJS . 'oc_canvas_grid.js', array('onecall_core'), '20120827', false);\n wp_register_script('canvasdraw', HKM_LIBJS . 'oc_draw.js', array('onecall_core', 'grid'), '20120827', false);\n wp_register_script('addjob', HKM_LIBJS . 'oc_addjob.js', array('onecall_core'), '1.0', false);\n wp_register_script('oc_form_model', HKM_LIBJS . 'oc.form.js', array('jquery'), '1.0', false);\n wp_register_script('oc_crflow', HKM_LIBJS . 'oc_cr_flow.js', array('jquery'), '1.0', false);\n wp_register_script('oc_ostaff', HKM_LIBJS . 'oc_staff_flow.js', array('jquery'), '1.0', false);\n wp_register_script('oc_ostaff_buttons', HKM_LIBJS . 'oc_staff_buttons.js', array('jquery'), '1.0', false);\n wp_register_script('oc_interactive_piles', HKM_LIBJS . 'oc_interactive_piles.js', array('jquery'), '1.0', false);\n wp_register_script('oc_newcompany', HKM_LIBJS . 'oc_newcompany.js', array('jquery'), '1.0', false);\n wp_register_script('oc_newcompany2', HKM_LIBJS . 'pendings/new_company.js', array('jquery'), '1.0', false);\n wp_register_script('oc_newcr', HKM_LIBJS . 'oc_newcr.js', array('jquery'), '1.0', false);\n wp_register_script('oc_newcp', HKM_LIBJS . 'oc_newcp.js', array('jquery'), '1.0', false);\n wp_register_script('oc_demodata', HKM_LIBJS . 'oc_demo_data.js', array('jquery'), '1.0', false);\n wp_register_script('oc_data_page', HKM_LIBJS . 'data2.js', array('jquery'), '1.0', false);\n wp_register_script('oc_dialog', HKM_LIBJS . 'bootstrap/bootbox.min.js', array('jquery'), '1.0', false);\n wp_register_script('ocbootstrap', HKM_LIBJS . 'bootstrap/bootstrap.min.js', array('jquery'), '1.0', false);\n wp_register_script('royalslider', HKM_LIBJS . 'vendor/jquery.royalslider.min.js', array('jquery'), '1.0', false);\n wp_register_script('oc_paper_core', HKM_LIBJS . 'vendor/paper.min.js', null, '1.0', false);\n wp_register_script('oc_sketch', HKM_LIBJS . 'oc_sketch.js', null, '1.0', false);\n wp_register_script('oc_sketchtool', HKM_LIBJS . 'oc_sketch_tools.js', null, '1.0', false);\n wp_register_script('oc_dhxcore', HKM_LIBJS . 'dhx/dhtmlxscheduler.js', null, '1.0', false);\n wp_register_script('oc_dhxcore_ext_timeline', HKM_LIBJS . 'dhx/ext/dhtmlxscheduler_timeline.js', array('oc_dhxcore'), '1.0', false);\n wp_register_script('oc_dhxcore_ext_editor', HKM_LIBJS . 'dhx/ext/dhtmlxscheduler_editors.js', array('oc_dhxcore'), '1.0', false);\n wp_register_script('oc_dhxcore_ext_terrace', HKM_LIBJS . 'dhx/ext/dhtmlxscheduler_dhx_terrace.js', array('oc_dhxcore'), '1.0', false);\n wp_register_script('oc_mobihesk', HKM_LIBJS . 'mobi/mobiscroll.hesk-2.5.4.min.js', array(), '1.0', false);\n wp_register_script('jq_timepick', HKM_LIBJS . 'vendor/jquery.timepick.js', array('jquery'), '1.0', false);\n wp_register_script('oc_colorbox', HKM_LIBJS . 'colorbox/jquery.colorbox-min.js', array('jquery'), '1.0', false);\n wp_register_script('canvas_print', HKM_LIBJS . 'imageprocess/html2canvas.js', array('jquery'), '1.0', false);\n wp_register_script('canvas2image', HKM_LIBJS . 'imageprocess/canvas2image.js', array('canvas_base64'), '1.0', false);\n wp_register_script('canvas_base64', HKM_LIBJS . 'imageprocess/base64bit.js', array('canvas_print'), '1.0', false);\n wp_register_script('base_map_review_control', HKM_LIBJS . 'print_base_map_control.js', array('jquery', 'canvas_print'), '1.0', false);\n //https://datatables.net/\n wp_register_script('datatable', '//cdn.datatables.net/1.10.0/js/jquery.dataTables.js', array('jquery'), '1.0', false);\n wp_register_script('datatable_refresh', '//cdn.datatables.net/plug-ins/28e7751dbec/api/fnReloadAjax.js', array('jquery'), '1.0', false);\n wp_register_script('htmlminifier', HKM_LIBJS . 'vendor/htmlminifier.js', array('jquery'), '1.0', false);\n //map clusters\n wp_register_script('gmapscluster', 'http://maps.google.com/maps/api/js?sensor=true', array('jquery'));\n wp_register_script('gmaps', HKM_LIBJS . 'vendor/gmaps.js', array('gmapscluster'), '1.0', false);\n //gmaps clusters\n wp_register_script('kendo', HKM_LIBJS . 'kendoui/kendo.all.min.js', array('jquery'), '1.0', false);\n wp_register_script('joblisttb', HKM_LIBJS . 'admin/jblisttb.js', array('jquery', 'kendo'), '1.0', false);\n wp_register_script('cp_management', LIBJS_ADMIN_MODEL . 'CPManagement.js', array('jquery', 'datatable', 'datatable_refresh'), '1.0', false);\n wp_register_script('job_report_list', LIBJS_ADMIN_MODEL . 'JobReportList.js', array('jquery', 'datatable', 'onecall_core_bar'), '1.0', false);\n wp_register_script('reportcontenteditor', LIBJS_ADMIN_MODEL . 'ReportContentEditor.js', array('jquery'), '1.0', false);\n wp_register_script('listsubmission', LIBJS_ADMIN_MODEL . 'ListSubmission.js', array('jquery', 'datatable', 'datatable_refresh'), '1.0', false);\n wp_register_script('orderconfirmation', LIBJS_ADMIN_MODEL . 'JobOrderConfirmation.js', array('jquery'), '1.0', false);\n wp_register_script('listtemplatecontrol', LIBJS_ADMIN_MODEL . 'ListTemplateControl.js', array('jquery', 'datatable', 'datatable_refresh', 'underscore'), '1.0', false);\n wp_register_script('adminsupport', LIBJS_ADMIN_MODEL . 'adminsupporttools.js', array('jquery'), '1.0', false);\n wp_register_script('admin_post_job_process', LIBJS_ADMIN . 'jobpanel.js', array(\n 'jquery',\n 'datatable',\n 'datatable_refresh',\n 'jquery-ui-autocomplete',\n 'job_report_list',\n 'cp_management',\n 'orderconfirmation',\n 'xdantimepicker',\n 'adminsupport'\n ), '1.0', true);\n\n wp_register_script('admin_report_js', LIBJS_ADMIN . 'report_panel.js', array(\n 'jquery',\n 'datatable',\n 'datatable_refresh',\n 'jquery-ui-autocomplete',\n 'listsubmission',\n 'listtemplatecontrol',\n 'adminsupport',\n 'onecall_core_bar',\n 'royalslider',\n 'htmlminifier',\n 'reportcontenteditor'\n ), '1.1', true);\n\n wp_register_script('admin_post_company', LIBJS_ADMIN . 'company_panel.js', array(\n 'adminsupport', 'datatable', 'datatable_refresh'\n ), '1.0', false);\n\n wp_register_script('page_list_support', LIBJS_ADMIN_MODEL . 'listing_support.js', array('jquery', 'datatable', 'onecall_core_bar'), '1.0', false);\n wp_register_script('page_admin_system_log', LIBJS_ADMIN . 'admin_system_log.js', array('page_list_support', 'datatable', 'onecall_core_bar'), '1.0', false);\n wp_register_script('page_approve_new_company', LIBJS_ADMIN . 'company_new_approve.js', array('page_list_support', 'datatable', 'onecall_core_bar'), '1.0', false);\n wp_register_script('page_approve_new_cr', LIBJS_ADMIN . 'cr_new_approve.js', array('page_list_support', 'datatable', 'onecall_core_bar'), '1.0', false);\n wp_register_script('page_approve_new_cp', LIBJS_ADMIN . 'cp_new_approve.js', array('page_list_support', 'datatable', 'onecall_core_bar'), '1.0', false);\n wp_register_script('page_job_application', LIBJS_ADMIN . 'job_app.js', array('jquery', 'datatable', 'datatable_refresh', 'onecall_core_bar'), '1.0', false);\n wp_register_script('page_job_task_history', LIBJS_ADMIN . 'job_task.js', array('jquery', 'datatable', 'onecall_core_bar'), '1.0', false);\n //gravity form supports\n\n wp_register_script('gfordersupport', HKM_LIBJS . 'gravityforms/order.js', array('onecall_core_bar', 'gmaps', 'jquery', 'xdantimepicker'), '1.0', false);\n wp_register_script('gfnewcomsupport', HKM_LIBJS . 'gravityforms/reg_company.js', array('jquery', 'onecall_core_bar'), '1.0', false);\n /*royalslider css*/\n wp_register_script('rsslider', HKM_LIBJS . 'gravityforms/reg_company.js', array('jquery', 'onecall_core_bar'), '1.0', false);\n /*\n table.dataTable tbody tr\n\n wp_register_script('oc_mobihesk', HKM_LIBJS . 'mobi/mobiscroll.hesk-2.5.4.min.js', array('oc_dhxcore'), '1.0', false);\n\n */\n /**\n * implementation of CSS style loading system\n *\n *\n */\n wp_register_style('xdanstyle', HKM_LIBCSS . 'xdan/xdan.css', null, '2.0');\n wp_register_style('datatable', '//cdn.datatables.net/1.10.0/css/jquery.dataTables.css', false, '1', 'screen');\n /*royalslider css*/\n wp_register_style('rs-core', HKM_LIBCSS . 'royalslider/core.css', null, '9.5');\n wp_register_style('rs-min-white', HKM_LIBCSS . 'royalslider/rs-minimal-white.css', array(\"rs-core\"), '9.5');\n\n wp_register_style('oc_mobi_core', HKM_LIBCSS . 'mobi/mobiscroll.core-2.5.4.css', array(), '1');\n wp_register_style('oc_mobi_ios', HKM_LIBCSS . 'mobi/mobiscroll.ios-2.5.4.css', array(), '1');\n wp_register_style('oc_mobi_animation', HKM_LIBCSS . 'mobi/mobiscroll.animation-2.5.4.css', array(), '1');\n wp_register_style('oc_icons', HKM_LIBFONTS . 'icon.css', array(), '1');\n\n wp_register_style('print_single_basemap', HKM_LIBCSS . 'a3.css', array(), '1.1');\n wp_register_style('print_report', HKM_LIBCSS . 'a4.css', array(), '1.1');\n\n wp_register_style('gf_hot_fix', HKM_LIBCSS . 'gravityforms/basicfixes.css', array(), '1');\n\n wp_register_style('dashicons', HKM_LIBCSS . 'dashicons.css', array(), '1');\n\n wp_register_style('gfcsssupport', HKM_LIBCSS . 'gravityforms/orderscss.css', array('gf_hot_fix', 'xdanstyle'), '1');\n\n wp_register_style('adminsupportcss', HKM_LIBCSS . 'admin/normalcontrol.css',\n array(\n 'dashicons',\n 'datatable',\n 'xdanstyle')\n , '1');\n wp_register_style('cms_report_panel_css', HKM_LIBCSS . 'a4admin.css', array('adminsupportcss', 'rs-min-white'), '1');\n wp_register_style('kendo_common', HKM_LIBCSS . 'kendoui/kendo.common.min.css', array(), '1');\n wp_register_style('kendo_default', HKM_LIBCSS . 'kendoui/kendo.default.min.css', array('dashicons', 'kendo_common'), '1');\n\n //kendo_common\n }", "public function enqueueScripts(){}", "public function register_scripts() {\n add_action( 'admin_footer', array( $this, 'add_footer_styles' ) );\n wp_enqueue_script( 'jquery-ui-core' );\n wp_enqueue_script( 'jquery-ui-autocomplete' );\n wp_enqueue_script( 'jquery-ui-tabs' );\n wp_enqueue_script( 'fo-settings-script', plugins_url( 'assets/js/settings.js', __FILE__ ) , array( 'jquery' ) );\n\n $data = array(\n 'usable_fonts' => $this->usable_fonts,\n 'available_fonts' => $this->available_fonts,\n 'options_values' => $this->elements_options,\n 'labels' => array(\n 'default_label' => __('Not Stated', 'bk-fonts'),\n 'light' => __('Light', 'bk-fonts'),\n 'regular' => __('Normal', 'bk-fonts'),\n 'semibold' => __('Semi-Bold', 'bk-fonts'),\n 'bold' => __('Bold', 'bk-fonts'),\n 'extrabold' => __('Extra-Bold', 'bk-fonts'),\n 'black' => __('Black', 'bk-fonts'),\n 'italic' => __('Italic', 'bk-fonts'),\n ),\n );\n\n wp_localize_script( 'fo-settings-script', 'data', $data );\n\n wp_enqueue_style( 'fo-settings-css', plugins_url( 'assets/css/settings.css', __FILE__ ) );\n wp_enqueue_style( 'fontawesome', plugins_url( 'assets/css/font-awesome.min.css', __FILE__ ) );\n }", "public function registerScripts() {\n $this->registerScriptsCommon();\n \n if(is_admin()) {\n $this->registerScriptsAdmin();\n } else {\n $this->registerScriptsFrontend();\n }\n }", "public function widget_scripts() {\n\t\twp_register_script( 'elementor-daytoday', plugins_url( '/assets/js/dropdown.js', __FILE__ ), [ 'jquery' ], false, true );\n\t\twp_enqueue_script(\n\t\t\t'elementor-daytoday'\n\t\t);\n\t}", "function register_esd_scripts () {\n wp_register_style('esd-style', plugins_url('css/style.css', __FILE__));\n wp_register_script('esd-script', plugins_url('js/main.js', __FILE__));\n\n wp_localize_script( 'esd-script', 'esd_ajax_obj',\n array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );\n}", "static function enqueue_scripts(){\n\t\tself::include_css();\n\t\tself::include_js();\n\t}", "public function enqueue_scripts() {\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/deeppress-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "public function init()\n {\n Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl . \"/js/search-triple.js\", CClientScript::POS_END);\n\n }", "function load_custom_files(){\n\n wp_register_script(\n 'custom-script',\n get_stylesheet_directory_uri().'/js/custom.js',\n array('jquery')\n ); \n wp_enqueue_script('custom-script');\n\n wp_register_script(\n 'jquery-steps',\n get_stylesheet_directory_uri().'/js/jquery.steps.min.js',\n array('jquery')\n ); \n wp_enqueue_script('jquery-steps');\n\n wp_register_script(\n 'jquery-validate',\n get_stylesheet_directory_uri().'/js/jquery.validate.js',\n array('jquery')\n ); \n wp_enqueue_script('jquery-validate');\n\n wp_register_script(\n 'jquery-methods',\n get_stylesheet_directory_uri().'/js/additional-methods.min.js',\n array('jquery')\n ); \n wp_enqueue_script('jquery-methods');\n\n wp_register_style(\n 'jquery-steps-style',\n get_stylesheet_directory_uri().'/css/jquery.steps.css'); \n wp_enqueue_style('jquery-steps-style');\n\n }", "private function _registerScripts()\n\t{ \n $owner = $this->owner;\n if($this->app_id===null || $this->res_id === null)return;\n $url = $owner->createUrl('/api/public/uploadcount',array('YII_CSRF_TOKEN'=>Yii::app()->request->getCsrfToken(),'t'=>$this->res_id,'app'=>$this->app_id));\n $js = Yii::app()->getClientScript();\n $assetsUrl = $this->_getAssetsUrl();\n $js->registerScriptFile($assetsUrl.'/countupload.js'); \n $js->registerScript(\"#{$this->id}\",\"\n var url = '{$url}';\n var set = new viewCount(url);\n set.push();\n \");\n\t}", "public function enqueue_scripts() {\n wp_enqueue_script(\n 'moment',\n plugins_url('includes/moment.min.js', __FILE__),\n array(),\n VSPI_VERSION,\n false\n );\n wp_enqueue_script(\n 'minidaemon',\n plugins_url('includes/mdn-minidaemon.js', __FILE__),\n array(),\n VSPI_VERSION,\n false\n );\n wp_enqueue_script(\n 'vspi-admin',\n plugins_url('includes/vspi-admin.js', __FILE__),\n array('jquery'),\n VSPI_VERSION,\n false\n );\n }", "public function loadJavascript()\n {\n wp_enqueue_script(\n 'fortytwo_two_factor_javascript_intlTelInput',\n plugin_dir_url(__FILE__) . '../Javascript/intlTelInput.min.js',\n array('jquery')\n );\n wp_enqueue_script(\n 'fortytwo_two_factor_javascript_plugin',\n plugin_dir_url(__FILE__) . '../Javascript/plugin.js'\n );\n }", "protected function registerClientScript()\n\t{\n\t\t$cs=Yii::app()->clientScript;\n\t\t$cs->registerScriptFile(Yii::app()->request->baseUrl.'/js/ImageSelector.js', CClientScript::POS_HEAD);\n\t}", "function metabox_scripts() {\n\n\t\tif ( isset( get_current_screen()->base ) && 'post' !== get_current_screen()->base ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isset( get_current_screen()->post_type ) && 'recurring_event' != get_current_screen()->post_type ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Load scripts.\n\t\twp_register_script( 'be-events-calendar', BE_EVENTS_CALENDAR_URL . 'js/events-admin.js', array(\n\t\t\t'jquery',\n\t\t\t'jquery-ui-core',\n\t\t\t'jquery-ui-datepicker',\n\t\t), BE_EVENTS_CALENDAR_VERSION, true );\n\t\twp_enqueue_script( 'be-events-calendar' );\n\n\t\t$l18n_data['dateFormat'] = apply_filters( 'be_event_set_dmy_format', false ) ? 'dd/mm/yy' : 'mm/dd/yy';\n\n\t\twp_localize_script( 'be-events-calendar', 'beEventsCalendar', $l18n_data );\n\t}", "function load_js_css() {\n\n\t\t\twp_register_script( 'fontawesome-all', get_stylesheet_directory_uri() . '/js/fontawesome-all.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'owl', get_stylesheet_directory_uri() . '/js/owl.carousel.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'selectric', get_stylesheet_directory_uri() . '/js/jquery.selectric.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'select', get_stylesheet_directory_uri() . '/js/select.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'jquery-ui', get_stylesheet_directory_uri() . '/js/jquery-ui.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'tab_menu', get_stylesheet_directory_uri() . '/js/tab_menu.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'aos', get_stylesheet_directory_uri() . '/js/aos.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'rangeslider', get_stylesheet_directory_uri() . '/js/rangeslider.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'bootstrap', get_stylesheet_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'easymap', get_stylesheet_directory_uri() . '/js/easymap.plugin.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'markerclusterer', get_stylesheet_directory_uri() . '/js/markerclusterer.min.js', array(), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'customscrollbar', get_stylesheet_directory_uri() . '/js/jquery.mCustomScrollbar.concat.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'ddslick', get_stylesheet_directory_uri() . '/js/jquery.ddslick.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'project045-main', get_stylesheet_directory_uri() . '/js/main.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\n\t\t\twp_enqueue_script( 'fontawesome-all' );\n\t\t\twp_enqueue_script( 'owl' );\n\t\t\twp_enqueue_script( 'selectric' );\n\t\t\twp_enqueue_script( 'select' );\n\t\t\twp_enqueue_script( 'jquery-ui' );\n\t\t\twp_enqueue_script( 'tab_menu' );\n\t\t\twp_enqueue_script( 'aos' );\n\t\t\twp_enqueue_script( 'rangeslider' );\n\t\t\twp_enqueue_script( 'bootstrap' );\n\t\t\twp_enqueue_script( 'easymap' );\n\t\t\twp_enqueue_script( 'markerclusterer' );\n\t\t\twp_enqueue_script( 'customscrollbar' );\n\t\t\twp_enqueue_script( 'ddslick' );\n\t\t\twp_enqueue_script( 'project045-main' );\n\n\t\t}", "public static function load_dashboard_js()\n\t{\n global $settings;\n\n\t\tforeach($settings['js'] as $js) {\n\t\t\twp_register_script( $js['id'], plugins_url( $js['url'], __FILE__ ), array(), $settings['version'], 'all' );\n\t\t wp_enqueue_script( $js['id'] );\n\t\t}\n\t}", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Plugin_Name_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Plugin_Name_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/drinkers-edition-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "function plugin_post_new_scripts() {\r\n\t// Register & enqueue our admin.js file along with its dependancies\r\n\t\t\twp_register_script('framework', $this->plugin_url .'framework.js', array('jquery','media-upload','thickbox','editor'));\r\n\t\t\twp_enqueue_script('framework');\r\n\t\t\twp_enqueue_script('farbtastic'); \r\n\t\t\twp_enqueue_script('suggest'); // Allow Jquery Chosen\r\n\t\t\t\r\n\t\t}", "public function registerClientScripts()\n {\n // add the script\n $cs = Yii::app()->getClientScript();\n $cs->registerCoreScript('jquery');\n $js = $this->createJsCode();\n $cs->registerScript('mbmenu_' . $this->getId(), $js, CClientScript::POS_READY);\n }", "public function registerClientScript()\n {\n $view = $this->getView();\n PNotifyAsset::register($view);\n }", "public function init()\n {\n $this->sourcePath = '@barrelstrength/sproutforms/web/assets/entries/dist';\n\n // define the dependencies\n $this->depends = [\n CpAsset::class,\n ChartsAsset::class\n ];\n\n // define the relative path to CSS/JS files that should be registered with the page\n // when this asset bundle is registered\n $this->js = [\n 'js/SproutFormsEntriesIndex.js',\n 'js/SproutFormsEntriesTableView.js',\n ];\n\n parent::init();\n }", "public function editor_scripts() {\n\t\tadd_filter( 'script_loader_tag', [ $this, 'editor_scripts_as_a_module' ], 10, 2 );\n\n\t\twp_enqueue_script(\n\t\t\t'elementor-addons-editor',\n\t\t\tplugins_url( '/assets/js/editor/editor.js', __FILE__ ),\n\t\t\t[\n\t\t\t\t'elementor-editor',\n\t\t\t],\n\t\t\t'1.2.1',\n\t\t\ttrue\n\t\t);\n\t}", "public function register_assets() {\n\t\t\twp_enqueue_script(\n\t\t\t\t'wp_searchermain',\n\t\t\t\tget_stylesheet_directory_uri() . '/resources/scripts/denuncias/SearcherMain.js',\n\t\t\t\tarray(),\n\t\t\t\t'1.0.0',\n\t\t\t\ttrue\n\t\t\t);\n\t\t\twp_localize_script(\n\t\t\t\t'wp_searchermain',\n\t\t\t\t'wp_searchermain',\n\t\t\t\tarray(\n\t\t\t\t\t'ajax' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t\t'nonce' => wp_create_nonce( 'auth_nonce' )\n\t\t\t\t)\n\t\t\t);\n }", "public function registerScripts() {\n\n if ($this->_vendorBaseUrl === '' || $this->_extBaseUrl === '') {\n throw new CException('baseUrl must be set!');\n }\n\n $this->_clientScript = Yii::app()->getClientScript();\n\n // JS\n if (YII_DEBUG) {\n $this->_clientScript->registerScriptFile($this->_vendorBaseUrl . '/dist/js/standalone/selectize.js');\n } else {\n $this->_clientScript->registerScriptFile($this->_vendorBaseUrl . '/dist/js/standalone/selectize.min.js');\n }\n\n // CSS\n $this->_clientScript->registerCssFile($this->_vendorBaseUrl . '/dist/css/selectize.css');\n\n $cssTheme = 'default';\n if (!empty($this->cssTheme)) {\n if (in_array($this->cssTheme, $this->_validCssThemes)) {\n $cssTheme = $this->cssTheme;\n }\n else {\n throw new CException('Please provide a valid theme name: '.implode(',', $this->_validCssThemes));\n }\n }\n elseif ($this->useWithBootstrap) {\n $cssTheme = 'bootstrap3';\n }\n\n $this->_clientScript->registerCssFile($this->_vendorBaseUrl . \"/dist/css/selectize.{$cssTheme}.css\");\n\n\n if ($this->includeBaseCss) {\n $this->_clientScript->registerCssFile($this->_extBaseUrl . '/base.css');\n }\n\n if ($this->useWithBootstrap) {\n $this->_clientScript->registerCssFile($this->_extBaseUrl . '/bootstrap.css');\n }\n\n\n // include es5-shim if ie8 support is needed:\n if ($this->ie8support) {\n // TODO: include the <!--[if lt IE 9]> ... <![endif]--> statement when Yii will support it\n $this->_clientScript->registerScriptFile('http://cdn.bootcss.com/es5-shim/2.2.0/es5-sham.js');\n }\n }", "public function register_scripts()\n {\n wp_register_style(\n 'fau-oembed-style',\n plugins_url('assets/css/fau-oembed.css', plugin()->getBasename()),\n [],\n plugin()->getVersion()\n ); \n }", "function add_js_scripts()\n {\n wp_register_script( 'scroll-script', $this->plugin_directory.'js/jquery.scrolldepth.min.js', array( 'jquery' ) );\n\n\n // For either a plugin or a theme, you can then enqueue the script:\n wp_enqueue_script( 'scroll-script' );\n }", "public function register_scripts()\n\t{\n\n\t\twp_register_style('instant-search', plugins_url('assets/instant-search.css', __FILE__));\n\t\twp_register_script('instant-search', plugins_url('assets/instant-search.js', __FILE__), array('wp-i18n'), false, true);\n\t\twp_localize_script(\n\t\t\t'instant-search',\n\t\t\t'instantSearch',\n\t\t\t[\n\t\t\t\t'rest' => get_rest_url(null, 'wp/v2/'),\n\t\t\t\t'msg' => __('No results', 'instantsearch')\n\t\t\t]\n\t\t);\n\n\t\twp_enqueue_style('instant-search');\n\t\twp_enqueue_script('instant-search');\n\t\t//wp_set_script_translations('instant-search', 'instantsearch', basename(dirname(__FILE__)) . '/languages/');\n\t}", "function init(){\n Yii::app()->getClientScript()\n ->registerCoreScript('jquery')\n ->registerScriptFile($this->getBaseUrl().'/swfobject.js',CClientScript::POS_END)\n ->registerScriptFile($this->getBaseUrl().'/jquery.uploadify.v2.1.4.min.js',CClientScript::POS_END)\n ->registerCssFile($this->getBaseUrl().'/uploadify.css');\n \n return parent::init();\n }", "public function addPluginFrontendScripts() {\n global $laterpay_version;\n\n wp_register_script(\n 'jquery',\n '//code.jquery.com/jquery-1.11.0.min.js'\n );\n wp_register_script(\n 'laterpay-yui',\n 'https://static.laterpay.net/yui/3.13.0/build/yui/yui.js',\n array(),\n $laterpay_version,\n false\n );\n wp_register_script(\n 'laterpay-config',\n 'https://static.laterpay.net/client/1.0.0/config.js',\n array('laterpay-yui'),\n $laterpay_version,\n false\n );\n wp_register_script(\n 'laterpay-peity',\n LATERPAY_ASSET_PATH . '/static/js/vendor/jquery.peity.min.js',\n array('jquery'),\n $laterpay_version,\n false\n );\n wp_register_script(\n 'laterpay-post-view',\n LATERPAY_ASSET_PATH . '/static/js/laterpay-post-view.js',\n array('jquery', 'laterpay-peity'),\n $laterpay_version,\n false\n );\n wp_enqueue_script('laterpay-yui');\n wp_enqueue_script('laterpay-config');\n wp_enqueue_script('laterpay-peity');\n wp_enqueue_script('laterpay-post-view');\n }", "protected function registerClientScript()\n {\n $view = $this->getView();\n WebUIPopoverAsset::register($view);\n\n $id = $this->options['id'];\n if (!empty($this->pluginOptions)) {\n foreach($this->pluginOptions as $option => $value){\n if (in_array($option, ['onShow', 'onHide'])) {\n $this->pluginOptions[$option] = new JsExpression($value);\n }\n }\n }\n $options = Json::encode($this->pluginOptions);\n $js = \"$('#$id').webuiPopover($options);\";\n $view->registerJs($js);\n }" ]
[ "0.6930164", "0.6642013", "0.66358787", "0.659453", "0.65577745", "0.64857", "0.64182717", "0.6393153", "0.63474125", "0.63356113", "0.6265968", "0.62512493", "0.6246191", "0.62407136", "0.6223083", "0.62043434", "0.62031066", "0.61829865", "0.6176997", "0.6174723", "0.6174443", "0.61739224", "0.6161694", "0.61521095", "0.61516875", "0.6149621", "0.6130863", "0.61296993", "0.6116489", "0.61078537", "0.6098787", "0.6071931", "0.60648954", "0.60526186", "0.6047404", "0.60465914", "0.60461324", "0.6044316", "0.6043018", "0.6040704", "0.60349125", "0.60340416", "0.602654", "0.60199976", "0.60143673", "0.6013588", "0.6000721", "0.5990382", "0.59741837", "0.59714574", "0.59534186", "0.59532666", "0.5946543", "0.59452266", "0.5944852", "0.5938401", "0.59333014", "0.5926729", "0.5926694", "0.59173906", "0.59102845", "0.59094185", "0.5905307", "0.5903947", "0.5887806", "0.5887055", "0.58848053", "0.5872566", "0.5868417", "0.5868396", "0.5865879", "0.58648306", "0.5863208", "0.586159", "0.5850686", "0.5849764", "0.5845489", "0.58441895", "0.58399165", "0.58376044", "0.5835335", "0.58352715", "0.5833881", "0.58318055", "0.5820257", "0.581234", "0.5806157", "0.5805536", "0.58044577", "0.5804426", "0.5801716", "0.579992", "0.5799723", "0.579874", "0.5797733", "0.5794911", "0.57924473", "0.5787132", "0.5786716", "0.5786103" ]
0.70504874
0
Quotes a string for use in JavaScript.
private function quote($string) { return "'" . addcslashes($string, "'") . "'"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function intoQuote($string){ return \"'\".$string.\"'\"; }", "public function jsEscape($string = '')\n {\n return addcslashes($string, \"\\\"\");\n }", "public function quote($stringValue);", "static function quote($s){\r\n return '\"' . str_replace('\"', '\\\"', $s) . '\"';\r\n }", "function Quote( $text ) {\n\t\treturn '\\'' . getEscaped( $text ) . '\\'';\n\t}", "public function quote($string)\n {\n return $string;\n }", "function quote($s) { \n return \"'\".str_replace('\\\\\"', '\"', addslashes($s)).\"'\"; \n }", "abstract public function quoteString($value);", "private function quoted(string $value): string\n {\n return sprintf('\\'%s\\'', $value);\n }", "static function squote($s){\r\n return \"'\" . str_replace(\"'\", '\\'', $s) . \"'\";\r\n }", "function tep_html_quotes($string) {\n return str_replace(\"'\", \"&#39;\", $string);\n }", "function tep_html_quotes($string) {\n return str_replace(\"'\", \"&#39;\", $string);\n }", "public function quoteAndEscape(string $str): string;", "function add_quote($value) {\n\t\treturn '\"' . addslashes($value) . '\"';\n\t}", "public function quote($str)\n {\n $str = \"'\" . addslashes($str) . \"'\";\n return $str;\n }", "public function quote($string)\n {\n return \"'\" . str_replace(\"\\\\\\\"\", '\"', str_replace(\"\\\\&quot;\", '&quot;', $this->escape($string))) . \"'\";\n }", "public function jsQuoteEscape($data, $quote='\\'')\r\n\t{\r\n\t\treturn Mage::helper('core')->jsQuoteEscape($data);\r\n\t}", "protected function quote ( $str ) {\n\n\t\tif(strpos($str, '\"')) {\n\t\t\t$str = str_replace('\"', '\\\"', $str);\n\t\t\t$str = '\"'.$str.'\"';\n\t\t}\n\t\telseif(strpos($str, \"'\")) {\n\t\t\t$str = str_replace(\"'\", \"\\'\", $str);\n\t\t\t$str = \"'\".$str.\"'\";\n\t\t}\n\n\t\treturn $str;\n }", "function qescape($str)\n{\n $str = str_replace('\\\\', '\\\\\\\\', $str);\n return str_replace('\"', '\\\\\"', $str);\n}", "public static function quotedString($str)\n {\n }", "public static function quote( $value ) {\n\t\t# Quote \\ here, because it needs always escaping\n\t\t$value = addcslashes( $value, '\\\\' );\n\n\t\t# For readability\n\t\t$single = \"'\";\n\t\t$double = '\"';\n\t\t$quote = $single;\n\n\t\t# It is safe to use '-quoting, unless there is '-quote in the text\n\t\tif ( strpos( $value, $single ) !== false ) {\n\t\t\t# In case there is no variables that need to be escaped, just use \"-quote\n\t\t\tif ( strpos( $value, $double ) === false && !preg_match( '/\\$[^0-9]/', $value ) ) {\n\t\t\t\t$quote = $double;\n\t\t\t# Something needs quoting, pick the quote which causes less quoting\n\t\t\t} else {\n\t\t\t\t$doubleEsc = substr_count( $value, $double ) + substr_count( $value, '$' );\n\t\t\t\t$singleEsc = substr_count( $value, $single );\n\n\t\t\t\tif ( $doubleEsc < $singleEsc ) {\n\t\t\t\t\t$quote = $double;\n\t\t\t\t\t$extra = '$';\n\t\t\t\t} else {\n\t\t\t\t\t$extra = '';\n\t\t\t\t}\n\n\t\t\t\t$value = addcslashes( $value, $quote . $extra );\n\t\t\t}\n\t\t}\n\n\t\treturn $quote . $value . $quote;\n\t}", "public static function quote($s){\r\n\t\treturn LEFT_QUOTES . $s . RIGHT_QUOTES;\r\n\t}", "protected function quote_escaped()\n {\n }", "public function quote($text);", "protected function quote(?string $value): string {\n\n\t\t\t$quote = $this->quoteInputEncoded;\n\n\t\t\tif ($value === null)\n\t\t\t\treturn \"{$quote}{$quote}\";\n\n\t\t\t$value = str_replace($quote, \"{$quote}{$quote}\", $value);\n\n\t\t\treturn \"{$quote}{$value}{$quote}\";\n\t\t}", "function escape($inString) {\r\n\t\treturn str_replace('\"', '\\\"', $inString);\r\n\t}", "public function quote($stringValue) {\n return $this->escapeStringChar . $stringValue . $this->escapeStringChar;\n }", "public function quoteString($str)\n {\n return $this->quote($str);\n }", "function quote( $string, $quotes = false ) {\r\n return $this->link->quote( ( $quotes )? stripslashes( $string ) : $string, null, true, true );\r\n }", "public function addIdentifierQuotes( $s ) {\n\t\treturn '\"' . str_replace( '\"', '\"\"', $s ) . '\"';\n\t}", "static function quote($value)\n\t{\n\t\treturn \"'\" . str_replace(\"'\", \"\\\\'\", $value) . \"'\";\n\t}", "public function escape($string) {\n\t\t\treturn str_replace(\"'\", \"''\", $string);\n\t\t}", "static public function escape ( $str )\n\t{\n\t\treturn trim(self::instance(0)->quote($str), '\\'');\n\t}", "protected function quote($literal)\n {\n return \"'\" . addslashes($literal) . \"'\";\n }", "static public function addSingleQuotes($arg) \n { \n /* single quote and escape single quotes and backslashes */ \n return \"'\" . addcslashes($arg, \"'\\\\\") . \"'\"; \n }", "function bab_pm_quote($str)\n{\n return '\"' . str_replace('\"', '\"\"', $str) . '\"';\n}", "private function escapeString(string $value): string\n {\n return str_replace(\"'\", \"''\", $value);\n }", "public function quote($str) {\n\t\treturn $this->_resource->quote($str);\n\t}", "function escape($_str) {\n\t\treturn str_replace('\"', '&quot;', $_str);\n\t}", "function quote($s) {\n return \"'\" . addslashes(canonicalize_whitespace($s)) . \"'\";\n}", "public function quoteString($str)\n {\n return $this->quote($str);\n }", "public function quoteAndEscape(string $str): string\n {\n return $this->stringQuotingCharacter . $this->escape($str) . $this->stringQuotingCharacter;\n }", "public function escapeSingleQuotes($str)\n {\n return str_replace(\"'\", \"\\'\", $str);\n }", "public function escapeSingleQuotes($str)\n {\n return str_replace(\"'\", \"\\'\", $str);\n }", "public static function strJS($value)\n {\n $result = addslashes($value);\n return $result;\n }", "public function jsQuoteEscapeDataAttribute($data)\r\n\t{\r\n\t\treturn str_replace(array(chr(34), chr(39)),array('&quot;','&apos;'),$data);\r\n\t}", "private function quote($string,$param=''){\n\t\tif(empty($param)){\n\t\t\treturn \"'$string'\";\n\t\t}\n\t\treturn $string;\n\t}", "public function escape($stringValue);", "public function escapeString($string)\r\n\t{\r\n\t\treturn str_replace(\"'\", \"''\", $string);\r\n\t}", "public function quote($input)\n {\n return \"'\" . str_replace(\"'\",\"''\",$input) . \"'\";\n }", "static protected function _quote($value)\n {\n if (is_int($value)) {\n return $value;\n } elseif (is_float($value)) {\n return sprintf('%F', $value);\n }\n return \"'\" . addcslashes($value, \"\\000\\n\\r\\\\'\\\"\\032\") . \"'\";\n }", "protected function quoteContent(string $content): string {\n return \"'\".str_replace(\n ['\\\\', \"\\r\", \"\\n\", \"'\"],\n ['\\\\\\\\', '\\\\r', '\\\\n', \"\\\\'\"],\n $content\n ).\"'\";\n }", "function qa_js($value, $forcequotes = false)\n{\n\t$boolean = is_bool($value);\n\tif ($boolean)\n\t\t$value = $value ? 'true' : 'false';\n\tif ((is_numeric($value) || $boolean) && !$forcequotes)\n\t\treturn $value;\n\telse\n\t\treturn \"'\" . strtr($value, array(\n\t\t\t\t\"'\" => \"\\\\'\",\n\t\t\t\t'/' => '\\\\/',\n\t\t\t\t'\\\\' => '\\\\\\\\',\n\t\t\t\t\"\\n\" => \"\\\\n\",\n\t\t\t\t\"\\r\" => \"\\\\n\",\n\t\t\t)) . \"'\";\n}", "function qstr($string, $magic_quotes=false)\n\t{\t\n\t\tif (!$magic_quotes) {\n\t\t\treturn \"'\".str_replace(\"'\", \"''\", $string).\"'\";\n\t\t}\n\t\t$string = str_replace(\"\\\\'\", \"''\", str_replace('\\\\\\\\', '\\\\', str_replace('\\\\\"', '\"', $string)));\n\t\treturn \"'\" . $string . \"'\";\n\t}", "protected function _quote($value) {\n if (is_int($value)) {\n return $value;\n } elseif (is_float($value)) {\n return sprintf('%F', $value);\n }\n return \"'\" . addcslashes($value, \"\\000\\n\\r\\\\'\\\"\\032\") . \"'\";\n }", "public function escape($string);", "public function escape($string);", "public function escapeString($string);", "function escapeQuote($var)\n\t{\n\t\tif (isset($var))\n\t\t{\n\t\t\t$string = str_replace(\"'\",\"||\",$var);\n\t\t\t$string = str_replace('\"','||||',$string);\n\t\t}\n\n\t\treturn $string;\n\t}", "function escapeQuote($var)\n\t{\n\t\tif (isset($var))\n\t\t{\n\t\t\t$string = str_replace(\"'\",\"||\",$var);\n\t\t\t$string = str_replace('\"','||||',$string);\n\t\t}\n\n\t\treturn $string;\n\t}", "function escapeQuote($var)\n\t{\n\t\tif (isset($var))\n\t\t{\n\t\t\t$string = str_replace(\"'\",\"||\",$var);\n\t\t\t$string = str_replace('\"','||||',$string);\n\t\t}\n\n\t\treturn $string;\n\t}", "function sql_quote_string($val,$dbh=NULL) {\n global $SQL_DBH;\n if (is_null($dbh))\n return $SQL_DBH->quote($val);\n else\n return $dbh->quote($val);\n }", "function escapeSimple($string) {\n return $this->dbH->quote($string);\n }", "public function addDoubleQuotes($str){\n\t\treturn '\"'.$str.'\"';\n\t}", "public function addQuotes( $s ) {\n\t\tif ( $s === null ) {\n\t\t\treturn 'NULL';\n\t\t} else {\n\t\t\t# This will also quote numeric values. This should be harmless,\n\t\t\t# and protects against weird problems that occur when they really\n\t\t\t# _are_ strings such as article titles and string->number->string\n\t\t\t# conversion is not 1:1.\n\t\t\treturn \"'\" . $this->strencode( $s ) . \"'\";\n\t\t}\n\t}", "public static function js_escape($text) {\n\t\t$safe_text = self::specialchars($text, 'double');\n\t\t$safe_text = preg_replace('/&#(x)?0*(?(1)27|39);?/i', \"'\", stripslashes($safe_text));\n\t\t$safe_text = preg_replace(\"/\\r?\\n/\", \"\\\\n\", addslashes($safe_text));\n\t\treturn $safe_text;\n\t}", "function escape_js($txt)\n\t{\n\t\treturn str_replace(\"'\", \"\\\\'\", $txt);\n\t}", "function wp_magic_quotes()\n {\n }", "function escape_sq($str)\n{\n $esc_str = str_replace(\"'\", \"''\", $str);\n return $esc_str;\n}", "public function doubleQuoteValue($value) {\n\t\t$value = addcslashes(\n\t\t\t$value,\n\t\t\timplode('', static::DOUBLE_QUOTED_MUST_ESCAPE)\n\t\t);\n\t\treturn '\"' . $value . '\"';\n\t}", "protected function escapeString($value)\n {\n return $this->entityManager->getConnection()->quote($value);\n }", "function wrapper_escape($string) {\n\t\treturn str_replace(\"'\", \"''\", $string);\n\t}", "function smartaddslashes($str) {\n\t\tif ( get_magic_quotes_gpc() == false ) {\n\t\t\t$str = addslashes( $str );\n\t\t}\n\t\treturn $str;\n\t}", "public static function js($string) {\n if(static::noNeedToEscape($string)) return $string;\n return preg_replace_callback('/[^a-z0-9,\\._]/iSu', 'static::escapeJSChar', $string);\n }", "public function escapeString($stringToEscape);", "public static function escape(string $string): string\n {\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n }", "public function _quote($str)\n\t{\n\t\t// Check that the current value is a string,\n\t\t// and is not already quoted before quoting\n\t\t// that value, otherwise, return the original value\n\t\treturn (\n\t\t\tstrpos($str, $this->escape_char) !== 0\n\t\t\t&& strrpos($str, $this->escape_char) !== 0\n\t\t\t&& is_string($str)\n\t\t\t&& ! is_numeric($str)\n\t\t)\n\t\t\t? \"{$this->escape_char}{$str}{$this->escape_char}\"\n\t\t\t: $str;\n\n\t}", "protected function escapeArg($string)\n {\n // http://stackoverflow.com/a/1250279/871861\n return str_replace(\"'\", \"'\\\"'\\\"'\", $string);\n }", "public abstract function escapeString($value);", "private static function _replaceQuotes ($string) {\r\n return str_replace ('\"', '&quot;', $string);\r\n }", "public function quote($text, $escaped = true) {\n return '\\'' . ($escaped ? $this->getEscaped($text) : $text) . '\\'';\n }", "protected function pSingleQuotedString(string $string): string\n {\n return '\\'' . \\preg_replace(\"#'|\\\\\\\\(?=[\\\\\\\\']|$)#\", '\\\\\\\\$0', $string) . '\\'';\n }", "public function escapeString(string $value): string;", "public function escape(string $str): string;", "public function quote($string) {\n return $this->_connection->quote($string);\n }", "public function quote($value){\n $connection = $this -> connect();\n return pg_escape_literal($value);\n }", "public function quote($value) {\n $connection = $this -> connect();\n return \"'\" . $connection -> real_escape_string($value) . \"'\";\n }", "private function javascript_protect($txt) \n\t\t{\n\t\t\t$txt = str_replace(\"'\",\"\\'\",$txt);\n\t\t\treturn $txt;\n\t\t}", "private function quote( )\n {\n if ( @ count( $this->data_buffer ) == 0 )\n return;\n foreach ( $this->data_buffer as $key => $val )\n {\n if ( in_array( $key, $this->string_fields ))\n $this->data_buffer[$key] = @\"'\".mysql_real_escape_string($val,underQL::$db_handle).\"'\";\n else\n $this->data_buffer[$key] = $val;\n }\n }", "abstract public function escapeString($value);", "private function createQuote($string) {\n\t\t$string = $this->cleanString($string);\n\t\t$string = '</p><div class=\"quote\">'.$string.'</div><p>';\n\t\treturn $string;\n\t}", "function addQuote($var)\n\t{\n\t\tif (isset($var))\n\t\t{\n\t\t\t$string = str_replace(\"||\",\"'\",$var);\n\t\t\t$string = str_replace('||||','\"',$string);\n\t\t}\n\n\t\treturn $string;\n\t}", "public function escape($string)\n {\n return $string;\n }", "function ps_escape_string($str, $as_token = false, $esc_quotes = false) {\n $s = '';\n foreach (str_split($str) as $c) {\n if (($i = strpos(\"\\n\\r\\t\\10\\f\\\\()\", $c)) !== false)\n $c = '\\\\' . 'nrtbf\\\\()'[$i]; // postscript escapes, see PLRM 3.2.2 Literals\n elseif (($o = ord($c)) < 0x20 || $o >= 0x7F)\n $c = sprintf('\\\\%03o', $o); // control & non-ASCII\n elseif ($esc_quotes && $c == '\"')\n $c = '\\\\042'; // octal escape \" (for gs v9 parameters)\n $s .= $c;\n }\n return $as_token ? \"($s)\" : $s;\n}", "function privDisableMagicQuotes()\n {\n }", "public static function esc_js_sq($string = '', $times = NULL)\n\t\t{\n\t\t\t$times = (is_numeric($times) && $times >= 0) ? (int)$times : 1;\n\n\t\t\treturn str_replace(\"'\", str_repeat('\\\\', $times).\"'\", str_replace(array(\"\\r\", \"\\n\"), array('', '\\\\n'), str_replace(\"\\\\'\", \"'\", (string)$string)));\n\t\t}", "public static function escapeApostrophe($string)\n {\n return str_replace('\\'', '\\\\\\'', $string);\n }", "public function escape(string $str): string\n {\n $escaped = \"\\\\\";\n if ($this->stringQuotingCharacter !== $escaped) {\n $escaped .= $this->stringQuotingCharacter;\n }\n return addcslashes($str, $escaped);\n }", "public function quoteString(?string $value): string\n {\n if ($value===null || $value==='') return 'null';\n\n return \"'\".$this->mysqli->real_escape_string($value).\"'\";\n }", "public function interchangeQuotes(string $string)\n {\n\n // Start By Adding Slashes To All Existing Single Quotes\n $string = str_replace(\"'\", \"\\\\'\", $string);\n\n // Then Remove Any Slashes To All Existing Double Quotes\n $string = str_replace('\\\"', '\"', $string);\n\n // Remove Starting and Finishing Double Quotes Added By JSON_ENCODE\n $string = substr($string, 1, -1);\n\n // Check if last character is a slash and if so escape it\n isset($string[-1]) && '\\\\' === $string[-1] ? $string = $string.'\\\\' : null;\n\n // Finish By Adding Starting and Finishing Single Quotes\n $string = \"'\".$string.\"'\";\n\n return $string;\n }" ]
[ "0.79302377", "0.7628505", "0.75779307", "0.74377644", "0.7375173", "0.7358651", "0.73324454", "0.73208463", "0.7233523", "0.71794486", "0.7146036", "0.7146036", "0.714414", "0.712353", "0.7116891", "0.71024257", "0.7098381", "0.7083006", "0.70734584", "0.7072708", "0.7060224", "0.70427585", "0.6961597", "0.69598514", "0.69515383", "0.6934138", "0.6927732", "0.6913303", "0.68930113", "0.6885129", "0.6861119", "0.6855205", "0.6810677", "0.68016696", "0.67795473", "0.6756471", "0.67562515", "0.6745839", "0.67390335", "0.6734504", "0.6729126", "0.6701183", "0.6699299", "0.6699299", "0.6670476", "0.6662675", "0.6640931", "0.6640585", "0.6639782", "0.6612912", "0.6606501", "0.6601457", "0.6601033", "0.6591406", "0.65882146", "0.658274", "0.658274", "0.6570218", "0.6569248", "0.6569248", "0.6569248", "0.6559871", "0.6552074", "0.65443665", "0.6536962", "0.6532961", "0.6529535", "0.6518126", "0.65164924", "0.6504323", "0.64884627", "0.6486514", "0.6471617", "0.64670384", "0.6465803", "0.6457229", "0.6456075", "0.64544445", "0.64541966", "0.6453016", "0.64498305", "0.64457303", "0.6441035", "0.6420997", "0.64080924", "0.6407542", "0.6399933", "0.6397307", "0.6395679", "0.6393304", "0.63929325", "0.63892186", "0.63859206", "0.63843447", "0.63831514", "0.6379471", "0.63726646", "0.6368445", "0.6368234", "0.6362055" ]
0.726824
8
Returns the client ID of the echarts.
public function getClientId() { $id = $this->options['id']; if ($this->_clientId === null) { $this->_clientId = "echarts_{$id}"; } return $this->_clientId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClientId()\n {\n return $this->client_id;\n }", "public function getClientId()\n {\n return $this->client_id;\n }", "public function getClientId()\n {\n return $this->client_id;\n }", "public function getClientId()\n {\n return $this->client_id;\n }", "public function getClientId()\n {\n return $this->client_id;\n }", "public function getClientID()\n {\n return $this->ClientID;\n }", "public function getClientId()\n\t\t\t{\n\t\t\t\treturn $this->clientId;\n\t\t\t}", "public function getClientId()\n\t{\n\t\treturn $this->_clientId;\n\t}", "public function getClientId() {\n return $this->clientId;\n }", "public function getClientId()\n {\n return $this->clientId;\n }", "public function getClientId()\n {\n return $this->clientId;\n }", "public function getClientId()\n {\n return $this->clientId;\n }", "public function getClientId()\n {\n return $this->clientId;\n }", "public function getClientId()\n {\n return $this->clientId;\n }", "public function getClientId()\n {\n return $this->clientId;\n }", "public function getIdClient()\n {\n return $this->idClient;\n }", "public function getIdClient()\n {\n return $this->idClient;\n }", "public function getClientId(): string\n {\n return $this->configuration[ConfigurationInterface::CLIENT_ID];\n }", "public function getClientId() : string\n {\n return $this->clientId;\n }", "public function getClientId() : string\n {\n return $this->clientId;\n }", "public function get_client_id() {\n return $this->get_option( 'client-id', '' );\n }", "public function getClientId() : int\n {\n return $this->clientId;\n }", "public function getClientId(): string\n {\n return (string) data_get($this->args, 'credentials.id');\n }", "public function getClientId()\n {\n return $this->getParameter('clientId');\n }", "public function get_clientid() {\n return $this->clientid;\n }", "public function getClientes_idclient(){\n return $this->clientes_idclient;\n }", "public function getClientId();", "public function getClientId();", "public function getClientId();", "public function getClientId();", "public function getClientId();", "public function getClientId();", "public function buffer_client_id()\r\n\t{\r\n\t\treturn $this->buffer->client_id();\r\n\t}", "public function getProviderClientId(): string\n {\n return $this->getData(self::PROVIDER_CLIENT_ID);\n }", "public function clientName()\n {\n return $this->bean->client()->name;\n }", "protected function getTrackedClientId() {\n /*if (isset($_COOKIE['_ga'])) {\n list($version,$domainDepth, $cid1, $cid2) = preg_split('[\\.]', $_COOKIE[\"_ga\"],4);\n $contents = array('version' => $version, 'domainDepth' => $domainDepth, 'cid' => $cid1.'.'.$cid2);\n $cid = $contents['cid'];\n }\n else {*/\n $cid = $this->client->serial;\n //}\n return $cid;\n }", "public function getIdTypeClient()\n {\n return $this->idTypeClient;\n }", "public function getCodigoClient()\n {\n return $this->codigo_client;\n }", "public function getIdCliente()\n {\n return $this->idCliente;\n }", "public function getAdminClientId() {\n return $this->adminClientId;\n }", "public function getIdcliente() {\n\t\t\t\treturn $this->id_cliente ?? \"Id do Cliente não solicitado !!\";\n\t\t\t}", "public function getClientSystemId() {\n return $this->_clientSystemId;\n }", "public function getIdPayboxClient()\n {\n return $this->idPayboxClient;\n }", "function getIdCliente()\r\n\t {\r\n\t\t return $this->id_cliente;\r\n\t }", "public function getClientId(): ?int\n {\n return $this->clientId;\n }", "public function getClientId()\n {\n if (!$this->clientId) {\n $this->clientId = env('AUTH0_JWT_CLIENTID');\n }\n\n return $this->clientId;\n }", "public function getClientName() : string\n {\n return $this->clientName;\n }", "public function getCanvasId() {\r\n\t\treturn $this->options->getCanvasId();\r\n\t}", "public function getCalendarId()\n {\n return $this->get('CalendarId');\n }", "public function getIdCliente(){\r\n return $this->idCliente;\r\n }", "public function se_get_id() {\n\t\treturn version_compare( WC_VERSION, '3.0', '>=' ) ? $this->get_id() : $this->id;\n\t}", "public function se_get_id() {\n\t\treturn version_compare( WC_VERSION, '3.0', '>=' ) ? $this->get_id() : $this->id;\n\t}", "function getERCId() {\n\t\treturn $this->getData('ercId');\n\t}", "public function getClientId(): ?string\n {\n return $this->getParameter('clientId');\n }", "public function getExcavateId()\n {\n return $this->get(self::_EXCAVATE_ID);\n }", "public static function getGooglePlayClientId()\n {\n\t// It's temporary solution. Will be changed soon.\n $clientID = Yii::app()->db->createCommand()\n ->select('id')\n ->from('companies')\n ->where('LOWER(company_name) LIKE \"%google play qc%\"')\n ->queryScalar();\n \n if (empty($clientID))\n return '';\n \n return $clientID; \n }", "public function get_calendar_id() {\n return $this->get_option( 'calendar-id', '' );\n }", "public function getClient(): string\n {\n return $this->client;\n }", "public function getidcliente(){\n\t\treturn $this->_idcliente;\n\t}", "public function getCodigoCliente()\n {\n return $this->codigoCliente;\n }", "public function getCodigoCliente()\n {\n return $this->codigoCliente;\n }", "public function getCodigoCliente()\n {\n return $this->codigoCliente;\n }", "public function getChartOfAccountId()\n {\n return $this->chartOfAccountId;\n }", "public function getClient() : \\Elastica\\Client\n {\n return $this->elasticaClient;\n }", "public function getIdentity()\n {\n return 'zendesk_rest_connection';\n }", "public function getEventID() {\n return \"dataevent-\".$this->getID();\n }", "public function getClient() {\n return $this->_get( 'client' );\n }", "public function getClientValue()\n {\n return $this->ClientValue;\n }", "public function getGoogleAnalyticsClientId(): ?string\n {\n return $this->googleAnalyticsClientId;\n }", "public function getCliente()\n {\n return $this->cliente;\n }", "public function getId()\n {\n return $this->getAdapter()->getId();\n }", "public function getClusterId()\n {\n }", "public function getClientUrl() {\n return $this->_get( 'client_url' );\n }", "public function getSharedCatalogId()\n {\n return $this->getSessionData(self::SESSION_KEY_SHARED_CATALOG_ID);\n }", "public function getId()\n {\n return $this->elasticaResult->getId();\n }", "public function getClientUserId()\n {\n /*$prefix = $this->isPrimary ? 'primary_' : 'secondary_';\n\n return $prefix . $this->owner->getId();*/\n\n return $this->isPrimary ? $this->owner->getId() : null;\n }", "public function getID(): string {\n\t\treturn $this->appName;\n\t}", "public function getCalendarId()\r\n {\r\n if (!$this->getData('calendar_id') && $this->_calendar instanceof Mymodules_Google_Model_Calendar) {\r\n return $this->getCalendar()->getId();\r\n }\r\n\r\n return $this->getData('calendar_id');\r\n }", "public function getRetToClientId() {\n return $this->_retToClientId;\n }", "public function getClient(){ return UserData::getById($this->client_id); }", "private function getClientId($request)\n {\n $clientId = $this->getHeader($request, 'x-authorization-client-id', null);\n $clientId = $clientId ?? $this->getHeader($request, 'x-client-id', null);\n $clientId = $clientId ?? $this->getHeader($request, 'x-authorization-client-token', null);\n\n if (null !== $clientId) {\n return $clientId;\n }\n\n return $request->input('client_id');\n }", "public function client()\n {\n if ( ! $this->bean->fetchAs('person')->client) $this->bean->client = R::dispense('person');\n return $this->bean->fetchAs('person')->client;\n }", "function getEventID() \n {\n return $this->getValueByFieldName('event_id');\n }", "public function getServerId()\n {\n return $this->get(self::_SERVER_ID);\n }", "protected function _getIdentifier()\n\t{\n\t\treturn $this->_getCookieValue(Df_PageCache_Model_Cookie::COOKIE_CUSTOMER, '');\n\t}", "public function getCanvasId() {\r\n\t\tif ($this->mapBuilder->getIdentifier() === NULL) {\r\n\t\t\treturn str_replace('###UID###', '', $this->mapOptions->getCanvas());\r\n\t\t} else {\r\n\t\t\treturn str_replace('###UID###', '_Uid_' . $this->mapBuilder->getIdentifier(), $this->mapOptions->getCanvas());\r\n\t\t}\r\n\t}", "public function getStoreFrontId();", "public function client()\n {\n return $this->client;\n }", "public function getClient() {\n return $this->orient;\n }", "public function get_name() {\n\t\treturn 'main-clients';\n\t}", "private function getClientKey()\n {\n if ($this->isTestMode()) {\n $clientKey = \\Configuration::get('ADYEN_CLIENTKEY_TEST');\n } else {\n $clientKey = \\Configuration::get('ADYEN_CLIENTKEY_LIVE');\n }\n\n return $clientKey;\n }", "public function getId()\n {\n return $this->c_id;\n }", "public function getAddonId()\n {\n return $this->addon_id;\n }", "public function getAddonId()\n {\n return $this->addon_id;\n }", "public function client()\n {\n return $this->client;\n }", "public function getId()\n {\n return $this->__get(\"id\");\n }", "public function getId()\n {\n return $this->__get(\"id\");\n }", "public function getId()\n {\n return $this->__get(\"id\");\n }", "public function getIdCliente($instance=false){\n if ($instance && !is_object($this->_data['id_cliente'])){\n $this->setIdCliente('',array('required'=>false));\n }\n return $this->_data['id_cliente'];\n }", "function getClient() {\n return $this -> _client;\n }" ]
[ "0.7346107", "0.7346107", "0.7346107", "0.7346107", "0.7346107", "0.73284566", "0.73151404", "0.73117363", "0.7284441", "0.72842646", "0.72842646", "0.72842646", "0.72842646", "0.72842646", "0.72842646", "0.7238168", "0.7238168", "0.7189344", "0.7155751", "0.7155751", "0.70847577", "0.7077766", "0.6952469", "0.68494266", "0.6761313", "0.6724893", "0.6666512", "0.6666512", "0.6666512", "0.6666512", "0.6666512", "0.6666512", "0.65123695", "0.64543754", "0.643908", "0.6400385", "0.6387712", "0.6360631", "0.6353827", "0.6322037", "0.62314475", "0.62116104", "0.6205493", "0.6148095", "0.6110904", "0.6104886", "0.60658586", "0.6028672", "0.60239017", "0.59975886", "0.59713066", "0.59713066", "0.5970767", "0.5925189", "0.59156257", "0.5900862", "0.58944315", "0.58836925", "0.58708507", "0.5858691", "0.5858691", "0.5858691", "0.5857141", "0.5850732", "0.58379096", "0.5785291", "0.5747986", "0.5696784", "0.5695946", "0.56908774", "0.5689282", "0.5675389", "0.56744707", "0.56489724", "0.56449676", "0.5633266", "0.56227607", "0.56155086", "0.5610715", "0.56030947", "0.5594135", "0.5583029", "0.5578315", "0.556544", "0.5553767", "0.55513597", "0.5538946", "0.5524254", "0.55221105", "0.5511867", "0.5503066", "0.5472568", "0.54722095", "0.54722095", "0.5453947", "0.5453539", "0.5453539", "0.5453539", "0.5436041", "0.5435917" ]
0.8740448
0
Registers the JS files of the given themes.
public static function registerTheme($theme) { $themes = (array) $theme; array_walk($themes, function (&$name) { $name .= '.js'; }); static::$_themeJsFiles = array_unique(array_merge(static::$_themeJsFiles, $themes)); if (static::$_themeJsFiles) { ThemeAsset::register(Yii::$app->getView())->js = static::$_themeJsFiles; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function register_theme_styles_and_scripts(){\n // Register style\n wp_enqueue_style( 'theme-icons', get_template_directory_uri(). '/css/icons.css', array(), '1.0.0', 'all' ); // Register font icons\n wp_enqueue_style( 'google_fonts', sunset_google_fonts_url(), array(), '1.0.0'); // Register Google fonts\n wp_enqueue_style( 'slick-style', get_template_directory_uri(). '/css/slick.css', array(), '1.9.0', 'all' ); // Register theme main style\n wp_enqueue_style( 'theme-main-style', get_template_directory_uri(). '/css/main.css', array(), '1.0.0', 'all' ); // Register theme main style\n\n // Register scripts\n wp_enqueue_script( 'jquery');\n wp_enqueue_script( 'slick-scripts', get_template_directory_uri(). '/js/slick.js', array('jquery'), '1.9.0', true );\n wp_enqueue_script( 'main-scripts', get_template_directory_uri(). '/js/main.js', array('jquery'), '1.0.0', true );\n }", "function theme_files() {\n \n wp_register_style('style', get_template_directory_uri() . '/dist/app.css', [], 1, 'all');\n wp_enqueue_style('style');\n\n wp_enqueue_script('jquery');\n\n wp_register_script('app', get_template_directory_uri() . '/dist/app.js', ['jquery'], 1, true);\n wp_enqueue_script('app');\n}", "function startertheme_enqueue_files() {\n wp_enqueue_script('startertheme_scripts', get_theme_file_uri('/assets/dist/js/frontend/app.js'), NULL, '1.0', true);\n wp_enqueue_style('startertheme_style', get_theme_file_uri('/assets/dist/css/style.css'), NULL, '1.0');\n}", "public function register_assets() {\n $js_folder = SD_PLUGIN_PATH . '/src/assets/js/';\n $css_folder = SD_PLUGIN_PATH . '/src/assets/css/';\n $scripts = scandir($js_folder);\n //var_dump($scripts);\n $styles = scandir($css_folder);\n foreach ($styles as $style) {\n if( !is_dir($style) ) {\n wp_enqueue_style( URL_SCOPE . mt_rand(0, 9000), '/wp-content/plugins/'.sanitize_key(PLUGIN_NAME).'/src/assets/css/' . $style);\n }\n }\n foreach ($scripts as $script) {\n if( !is_dir($script) ) {\n wp_enqueue_script( URL_SCOPE . mt_rand(0, 9000), '/wp-content/plugins/'.sanitize_key(PLUGIN_NAME).'/src/assets/js/' . $script);\n }\n }\n }", "function register_theme_js_styles(){\n wp_register_script('global', get_template_directory_uri() . '/js/global.js', array('jquery'), false, true);\n\n wp_register_style('theme-styles', get_template_directory_uri() . '/style.css');\n wp_enqueue_style('theme-styles');\n\n wp_register_style('blocks', get_template_directory_uri() . '/blocks.css');\n wp_enqueue_style('blocks');\n\n wp_enqueue_script('jquery');\n wp_enqueue_script('global');\n //enqueue_slick();\n enqueue_lightbox();\n}", "function wp_prepare_themes_for_js($themes = \\null)\n {\n }", "function addThemeScripts() \n {\n wp_enqueue_script('constructor-theme', CONSTRUCTOR_DIRECTORY_URI.'/js/ready.js', array('jquery'));\n }", "public function register_assets() {\n\n\t\tforeach ( $this->assets as $asset ) {\n\t\t\t$js_path = $this->plugin->dir() . '/js/dist/' . $asset . '.asset.php';\n\t\t\t$css_path = $this->plugin->dir() . '/css/' . $asset . '.css';\n\t\t\tif ( file_exists( $js_path ) ) {\n\t\t\t\t$assets_dep = require_once $js_path;\n\t\t\t\twp_register_script(\n\t\t\t\t\t'formation-' . $asset . '-js',\n\t\t\t\t\t$this->plugin->asset_url( 'js/dist/' . $asset . '.js' ),\n\t\t\t\t\t$assets_dep['dependencies'],\n\t\t\t\t\t$assets_dep['version'],\n\t\t\t\t\ttrue\n\t\t\t\t);\n\n\t\t\t\tif ( file_exists( $css_path ) ) {\n\t\t\t\t\twp_register_style(\n\t\t\t\t\t\t'formation-' . $asset . '-css',\n\t\t\t\t\t\t$this->plugin->asset_url( 'css/' . $asset . '.css' ),\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\t$assets_dep['version']\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function theme_js(){\n\n\t\twp_register_script('custom-script1', get_template_directory_uri() . '/js/menu.js', array('jquery'),'', true);\n\t\twp_register_script('custom-script2', get_template_directory_uri() . '/js/main.js', array('jquery'),'', true);\n\t\twp_register_script('custom-script3', get_template_directory_uri() . '/js/css3-mediaqueries.js', array('jquery'),'', true);\n\t\n\t\twp_enqueue_script('custom-script1', get_template_directory_uri() . '/js/theme.js', array('jquery'),'', true );\n\t\twp_enqueue_script('custom-script2');\n\t\twp_enqueue_script('custom-script3');\n}", "function add_js_theme( $js_files, $is_i18n = FALSE )\n {\n if ( $is_i18n )\n return $this->add_jsi18n_theme( $js_files );\n\n // make sure that $this->includes has array value\n if ( ! is_array( $this->includes ) )\n $this->includes = array();\n\n // if $css_files is string, then convert into array\n $js_files = is_array( $js_files ) ? $js_files : explode( \",\", $js_files );\n\n foreach( $js_files as $js )\n {\n // remove white space if any\n $js = trim( $js );\n\n // go to next when passing empty space\n if ( empty( $js ) ) continue;\n\n // using sha1( $js ) as a key to prevent duplicate js to be included\n $this->includes[ 'js_files' ][ sha1( $js ) ] = base_url( \"/themes/{$this->settings->theme}/js\" ) . \"/{$js}\";\n }\n\n return $this;\n }", "function theme_assets() {\n\t// load css\n\twp_enqueue_style( 'font-awesome-css', get_template_directory_uri() . '/css/fontawesome.css' );\n\twp_enqueue_style( 'bootstrap-css', get_template_directory_uri() . '/css/bootstrap.css' );\n\twp_enqueue_style( 'style-css', get_template_directory_uri() . '/style.css', false, time() );\n\n\t// load javascript\n\twp_enqueue_script( 'bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '', true );\n wp_enqueue_script( 'waterfall-js', get_template_directory_uri() . '/js/waterfall.js', array(), '', true );\n\twp_enqueue_script( 'main', get_template_directory_uri() . '/js/main.js', array(), '', true);\n}", "public function register_assets() {\n\n $scripts = $this->get_scripts();\n $styles = $this->get_styles();\n\n foreach ( $scripts as $handle => $script ) {\n $deps = isset( $script['deps'] ) ? $script['deps'] : false;\n\n wp_register_script( $handle, $script['src'], $deps, $script['version'], true );\n }\n\n foreach ( $styles as $handle => $style ) {\n $deps = isset( $style['deps'] ) ? $style['deps'] : false;\n\n wp_register_style( $handle, $style['src'], $deps, $style['version'] );\n }\n\n wp_localize_script( 'cbxcf-scripts', 'cbxcfObj', [\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'error' => __( 'Something went wrong', 'cbxcustomform' ),\n ] );\n\n }", "function theme_scripts() {\n // Registrace scriptu (bundle.js z webpacku)\n wp_register_script(\n // Název\n 'bundle',\n // Cesta\n get_template_directory_uri() . '/dist/bundle.js',\n // Závislosti (žádné)\n '',\n // Verze (žádná)\n false,\n // Umístit do patičky\n true\n );\n\n // Zařazení stylu do fronty\n wp_enqueue_script('bundle');\n}", "public function theme_scripts() {\n\t\t$suffix = !TALEMY_DEV_MODE ? '.min' : '';\n\n\t\t// stylesheets\n\t\twp_register_style(\n\t\t\t'font-awesome-5-all',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/font-awesome/css/all.min.css',\n\t\t\tfalse,\n\t\t\t'5.10.1'\n\t\t);\n\n\t\twp_register_style(\n\t\t\t'font-awesome-5-shim',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/font-awesome/css/v4-shims.min.css',\n\t\t\tfalse,\n\t\t\t'5.10.1'\n\t\t);\n\t\t\n\t\twp_register_style(\n\t\t\t'fancybox',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/css/fancybox.min.css'\n\t\t);\n\n\t\twp_register_style(\n\t\t\t'talemy',\n\t\t\tTALEMY_THEME_URI . 'assets/css/style'. $suffix . '.css',\n\t\t\tfalse,\n\t\t\tTALEMY_THEME_VERSION\n\t\t);\n\n\t\twp_enqueue_style( 'font-awesome-5-all' );\n\t\twp_enqueue_style( 'font-awesome-5-shim' );\n\t\twp_enqueue_style( 'talemy' );\n\t\twp_style_add_data( 'talemy', 'rtl', 'replace' );\n\n\t\t// scripts\n\n \twp_register_script(\n \t\t'fancybox',\n \t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.fancybox.min.js',\n \t\tarray( 'jquery' ),\n \t\tTALEMY_THEME_VERSION,\n \t\ttrue\n \t);\n\n\t\twp_register_script(\n\t\t\t'jquery-fitvids',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.fitvids.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.1',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-matchheight',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.matchHeight.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'0.7.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-placeholder',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.placeholder.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'2.3.1',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-requestanimationframe',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.requestanimationframe.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'0.2.3',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-selectric',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.selectric.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.13.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-superfish',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.superfish.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.7.10',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-throttle-debounce',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.throttle-debounce.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.1',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'resize-sensor',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/ResizeSensor.min.js',\n\t\t\tarray(),\n\t\t\tnull,\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'theia-sticky-sidebar',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/theia-sticky-sidebar.min.js',\n\t\t\tarray( 'jquery', 'resize-sensor' ),\n\t\t\t'1.7.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'talemy-modernizr',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/modernizr.js',\n\t\t\tarray(),\n\t\t\t'3.6.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'talemy-block',\n\t\t\tTALEMY_THEME_URI . 'assets/js/talemy-block.min.js',\n\t\t\tarray( 'jquery', 'imagesloaded', 'jquery-matchheight' ),\n\t\t\tTALEMY_THEME_VERSION,\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'talemy',\n\t\t\tTALEMY_THEME_URI . 'assets/js/talemy' . $suffix . '.js',\n\t\t\tarray(\n\t\t\t\t'jquery',\n\t\t\t\t'imagesloaded',\n\t\t\t\t'jquery-fitvids',\n\t\t\t\t'jquery-superfish',\n\t\t\t\t'jquery-selectric',\n\t\t\t\t'jquery-throttle-debounce',\n\t\t\t\t'jquery-requestanimationframe',\n\t\t\t\t'jquery-matchheight',\n\t\t\t\t'jquery-placeholder',\n\t\t\t\t'theia-sticky-sidebar',\n\t\t\t\t'talemy-modernizr'\n\t\t\t),\n\t\t\tTALEMY_THEME_VERSION,\n\t\t\ttrue\n\t\t);\n\n\t\twp_enqueue_script( 'jquery-fitvids' );\n\t\twp_enqueue_script( 'jquery-superfish' );\n\t\twp_enqueue_script( 'jquery-selectric' );\n\t\twp_enqueue_script( 'jquery-throttle-debounce' );\n\t\twp_enqueue_script( 'jquery-requestanimationframe' );\n\t\twp_enqueue_script( 'jquery-matchheight' );\n\t\twp_enqueue_script( 'jquery-placeholder' );\n\t\twp_enqueue_script( 'theia-sticky-sidebar' );\n\t\twp_enqueue_script( 'talemy-modernizr' );\n\t\twp_enqueue_script( 'talemy' );\n\t\twp_localize_script( 'talemy', 'talemy_js_data', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );\n\n\t\tif ( is_single() ) {\n\t\t\tif ( talemy_get_option( 'post_comments' ) && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t\t}\n\t\t\tif ( is_singular( 'sfwd-courses' ) ) {\n\t\t\t\twp_enqueue_style( 'fancybox' );\n\t\t\t\twp_enqueue_script( 'fancybox' );\n\t\t\t} else {\n\t\t\t\t$in_focus_mode = false;\n\t\t\t\tif ( class_exists( 'LearnDash_Settings_Section' ) ) {\n\t\t\t\t\t$in_focus_mode = LearnDash_Settings_Section::get_section_setting( 'LearnDash_Settings_Theme_LD30', 'focus_mode_enabled' );\n\t\t\t\t}\n\t\t\t\tif ( !$in_focus_mode && in_array( get_post_type(), array( 'sfwd-lessons', 'sfwd-topic' ) ) ) {\n\t\t\t\t\twp_enqueue_style( 'fancybox' );\n\t\t\t\t\twp_enqueue_script( 'fancybox' );\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( is_page() && !is_front_page() ) {\n\t\t\tif ( talemy_get_option( 'page_comments' ) && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t\t}\n\t\t}\n\t}", "public function theme_assets_handler() {\n\t\t\n\t\t$version = wp_get_theme()->get('Version');\n\n\t\t//Enqueue stylesheets\n\t\tforeach ($this->styles as $style) {\n\t\t\twp_register_style($this->prefix . $style['slug'], get_template_directory_uri() . $style['path'], $style['deps'], $version);\n\t\t\twp_enqueue_style($this->prefix . $style['slug']);\n\n\n\n\t\t}\n\t\t\n\t\t//Enqueue Scripts\n\t\tforeach ($this->scripts as $script) {\n\t\t\twp_register_script($this->prefix . $script['slug'], get_template_directory_uri() . $script['path'], $script['deps'], $version);\n\t\t\twp_enqueue_script($this->prefix . $script['slug']);\n\t\t}\n\t\t\n\t\t//Enqueue WP Scripts\n\t\tif(is_array($this->wp_scripts)){\n\t\t\t\n\t\t\tforeach ($this->wp_scripts as $script) {\n\t\t\t\twp_enqueue_script($script);\n\t\t\t}\n\t\t}\n\t}", "public function registerScripts() {\n $this->scripts['bootstrap.min'] = 'assets/js/bootstrap.min.js';\n $this->scripts['jquery.nouislider.min'] = 'assets/js/mkdf-ui/jquery.nouislider.min.js';\n $this->scripts['mkdf-ui-admin'] = 'assets/js/mkdf-ui/mkdf-ui.js';\n $this->scripts['mkdf-bootstrap-select'] = 'assets/js/mkdf-ui/mkdf-bootstrap-select.min.js';\n\n foreach ($this->scripts as $scriptHandle => $scriptPath) {\n sienna_mikado_register_skin_script($scriptHandle, $scriptPath);\n }\n }", "function add_theme_scripts_styles_func() {\n//\tscripts\n\twp_register_script('modernizr', get_template_directory_uri() . '/assets/js/vendor/modernizr-3.5.0.min.js', array(), false, true);\n\twp_enqueue_script('modernizr');\n\twp_register_script('jquery-theme', get_template_directory_uri() . '/assets/js/vendor/jquery-1.12.4.min.js', array(), false, true);\n\twp_enqueue_script('jquery-theme');\n\twp_register_script('popper', get_template_directory_uri() . '/assets/js/popper.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('popper');\n\twp_register_script('bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('bootstrap');\n\twp_register_script('jquery-slicknav', get_template_directory_uri() . '/assets/js/jquery.slicknav.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('jquery-slicknav');\n\twp_register_script('owl-carousel', get_template_directory_uri() . '/assets/js/owl.carousel.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('owl-carousel');\n\twp_register_script('slick', get_template_directory_uri() . '/assets/js/slick.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('slick');\n\twp_register_script('wow', get_template_directory_uri() . '/assets/js/wow.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('wow');\n\twp_register_script('animated', get_template_directory_uri() . '/assets/js/animated.headline.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('animated');\n\twp_register_script('magnific-popup', get_template_directory_uri() . '/assets/js/jquery.magnific-popup.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('magnific-popup');\n\twp_register_script('scrollUp', get_template_directory_uri() . '/assets/js/jquery.scrollUp.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('scrollUp');\n\twp_register_script('nice-select', get_template_directory_uri() . '/assets/js/jquery.nice-select.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('nice-select');\n\twp_register_script('sticky', get_template_directory_uri() . '/assets/js/jquery.sticky.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('sticky');\n\twp_register_script('contact', get_template_directory_uri() . '/assets/js/contact.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('contact');\n\twp_register_script('mailsend', get_template_directory_uri() . '/assets/js/mailsend.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('mailsend');\n\twp_localize_script( 'mailsend', 'data',\n\t\tarray(\n\t\t\t'url' => admin_url('admin-ajax.php')\n\t\t)\n\t);\n\twp_register_script('form', get_template_directory_uri() . '/assets/js/jquery.form.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('form');\n\twp_register_script('validate', get_template_directory_uri() . '/assets/js/jquery.validate.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('validate');\n\twp_register_script('mail-script', get_template_directory_uri() . '/assets/js/mail-script.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('mail-script');\n\twp_register_script('ajaxchimp', get_template_directory_uri() . '/assets/js/jquery.ajaxchimp.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('ajaxchimp');\n\twp_register_script('plugins', get_template_directory_uri() . '/assets/js/plugins.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('plugins');\n\twp_register_script('main', get_template_directory_uri() . '/assets/js/main.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('main');\n//\tstyles\n\twp_register_style('bootstrap-style', get_template_directory_uri() . '/assets/css/bootstrap.min.css');\n\twp_enqueue_style('bootstrap-style');\n\twp_register_style('owl-carousel', get_template_directory_uri() . '/assets/css/owl.carousel.min.css');\n\twp_enqueue_style('owl-carousel');\n\twp_register_style('flaticon', get_template_directory_uri() . '/assets/css/flaticon.css');\n\twp_enqueue_style('flaticon');\n\twp_register_style('slicknav', get_template_directory_uri() . '/assets/css/slicknav.css');\n\twp_enqueue_style('slicknav');\n\twp_register_style('animate', get_template_directory_uri() . '/assets/css/animate.min.css');\n\twp_enqueue_style('animate');\n\twp_register_style('magnific-popup', get_template_directory_uri() . '/assets/css/magnific-popup.css');\n\twp_enqueue_style('magnific-popup');\n\twp_register_style('fontawesome-all', get_template_directory_uri() . '/assets/css/fontawesome-all.min.css');\n\twp_enqueue_style('fontawesome-all');\n\twp_register_style('themify-icons', get_template_directory_uri() . '/assets/css/themify-icons.css');\n\twp_enqueue_style('themify-icons');\n\twp_register_style('slick', get_template_directory_uri() . '/assets/css/slick.css');\n\twp_enqueue_style('slick');\n\twp_register_style('nice-select', get_template_directory_uri() . '/assets/css/nice-select.css');\n\twp_enqueue_style('nice-select');\n\twp_register_style('style', get_template_directory_uri() . '/assets/css/style.css');\n\twp_enqueue_style('style');\n}", "function example-theme_load_theme_assets() {\n\n\t$assetpath_css = getenv( 'WP_ENV' ) === 'production' ? '/assets/rev/' . asset_path( 'css/main.css' ) : '/assets/build/css/main.css';\n\t$assetpath_js = getenv( 'WP_ENV' ) === 'production' ? '/assets/rev/' . asset_path( 'js/app.js' ) : '/assets/build/js/app.js';\n\n\tif ( ! is_admin() ) {\n\t\twp_enqueue_style( 'example-theme-css-main', get_template_directory_uri() . $assetpath_css );\n\t}\n\n\twp_register_script( 'example-theme-script-main', get_template_directory_uri() . $assetpath_js, array(), '1.0', true );\n\twp_enqueue_script( 'example-theme-script-main' );\n\n}", "function include_config_files($themes){\n\n foreach($themes as $theme => $path){\n\n $config_path = $path->to('config') .DIRECTORY_SEPARATOR;\n \n //allow developer to replace config paths, \n //if false is returned, don't include it\n \n $scripts = $config_path .WXP::DS(\"config\\scripts.php\");\n $this->include_path($scripts, \"WXP.{$theme}.include_scripts\", function() use ($scripts){\n add_action(\"wp_enqueue_scripts\", function() use ($scripts){\n require $scripts;\n });\n });\n \n //load init file if exist\n \n $hooks = $config_path .WXP::DS(\"config/init.php\");\n $this->include_path($hooks, \"WXP.{$theme}.include_init\"); \n\n //load hooks file if exist\n \n $hooks = $config_path .WXP::DS(\"config/hooks.php\");\n $this->include_path($hooks, \"WXP.{$theme}.include_hooks\"); \n \n //load dom routes if exist\n \n $domRoutes = $config_path .WXP::DS(\"config/dom-routes.php\");\n $this->include_path($domRoutes, \"WXP.{$theme}.include_dom_routes\");\n \n //load options file if exists\n \n $theme_options = $config_path .WXP::DS(\"config/options.php\");\n $this->include_path($theme_options, \"WXP.{$theme}.include_theme_options\");\n \n //load meta boxes file if exists\n \n $meta_boxes = $config_path .WXP::DS(\"config/meta-boxes.php\");\n $this->include_path($meta_boxes, \"WXP.{$theme}.include_meta_boxes\");\n \n \n //load paths if set\n \n $t_paths = $config_path .WXP::DS(\"config/paths.php\");\n $this->include_path($t_paths, \"WXP.{$theme}.include_template_paths\");\n \n }\n }", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "function kesha_theme_scripts() {\n\n // Register Custom CSS\n wp_register_style( 'theme', get_template_directory_uri() . '/dist/css/built.min.css', array(), rand(111,9999), 'all' );\n\n // Enqueue Styles\n wp_enqueue_style( 'theme' );\n\n // Register JS.\n wp_register_script( 'scripts', get_template_directory_uri() . '/dist/js/built.min.js', array( 'jquery' ), rand(111,9999), TRUE );\n\n // Enqueue JS\n wp_enqueue_script( 'scripts' );\n}", "public function registerScripts()\n {\n // font awesome. choose css fonts instead of svg, see more at https://fontawesome.com/how-to-use/on-the-web/other-topics/performance\n // to name font awesome handle as `plugin-name-prefix-font-awesome5` is to prevent conflict with other plugins that maybe use older version but same handle that cause some newer icons in this plugin disappears.\n wp_enqueue_style('rundizable-wp-features-font-awesome5', plugin_dir_url(RUNDIZABLEWPFEATURES_FILE).'assets/fontawesome/css/all.min.css', [], '5.5.0');\n wp_enqueue_style('rundizable-wp-features-rd-settings-tabs-css', plugin_dir_url(RUNDIZABLEWPFEATURES_FILE).'assets/css/rd-settings-tabs.css', [], RUNDIZABLEWPFEATURES_VERSION);\n wp_enqueue_script('rundizable-wp-features-rd-settings-tabs-js', plugin_dir_url(RUNDIZABLEWPFEATURES_FILE).'assets/js/rd-settings-tabs.js', ['jquery'], RUNDIZABLEWPFEATURES_VERSION, true);\n }", "public function registerScripts()\r\n\t{\r\n\t\twp_register_style('social-shares', plugins_url('assets/social-shares.css', __FILE__));\r\n\t\twp_register_script('social-shares', plugins_url('assets/social-shares.js', __FILE__), array('jquery'), false, true);\r\n\t}", "public static function loadThemes()\n {\n $themesFolder = new Folder(ROOT . DS . 'themes');\n $themes = $themesFolder->read()[0];\n $loader = require ROOT . DS . 'vendor' . DS . 'autoload.php';\n foreach ($themes as $theme) {\n $loader->addPsr4('WasabiTheme\\\\' . $theme . '\\\\', [$themesFolder->path . DS . $theme . DS . 'src']);\n Plugin::load('WasabiTheme/' . $theme, [\n 'path' => $themesFolder->path . DS . $theme . DS,\n 'bootstrap' => true,\n 'routes' => false\n ]);\n }\n }", "function _appthemes_register_theme_scripts() {\n\n\t// Minimize prod or show expanded in dev.\n\t$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\trequire_once APP_THEME_FRAMEWORK_DIR . '/js/localization.php';\n\n\twp_register_script( 'colorbox', APP_THEME_FRAMEWORK_URI . \"/js/colorbox/jquery.colorbox{$min}.js\", array( 'jquery' ), '1.6.1' );\n\twp_register_style( 'colorbox', APP_THEME_FRAMEWORK_URI . \"/js/colorbox/colorbox{$min}.css\", false, '1.6.1' );\n\twp_register_style( 'font-awesome', APP_THEME_FRAMEWORK_URI . \"/lib/font-awesome/css/font-awesome{$min}.css\", false, '4.7.0' );\n\n\twp_register_script( 'footable', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable{$min}.js\", array( 'jquery' ), '2.0.3' );\n\twp_register_script( 'footable-grid', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.grid{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-sort', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.sort{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-filter', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.filter{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-striping', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.striping{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-paginate', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.paginate{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-bookmarkable', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.bookmarkable{$min}.js\", array( 'footable' ), '2.0.3' );\n\n\t_appthemes_localize_theme_scripts();\n}", "function enqueue_scripts() {\n\n\t\t//$the_theme = wp_get_theme();\n\t\t// Get the custom theme data.\n\t\twp_enqueue_style( 'styles', get_stylesheet_directory_uri() . '/css/screen.css', array(), '2.2.2' );\n\t\twp_enqueue_style( 'webfonts' , 'https://fonts.googleapis.com/css2?family=Open+Sans+Condensed:ital,wght@0,300;0,700;1,300&family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,300;1,400;1,600;1,700;1,800&display=swap', array(), false);\n\n\t\t//wp_enqueue_script( 'jquery-last', get_template_directory_uri() . '/vendor/js/jquery-3.2.1.min.js', array(), '', true);\n\t\twp_enqueue_script( 'jquery-fancybox', get_template_directory_uri() . '/vendor/js/jquery.fancybox.min.js', array(), '', true);\n\t\twp_enqueue_script( 'swiper', get_template_directory_uri() . '/vendor/js/swiper.min.js', array(), '', true);\n\n\t\twp_enqueue_script( 'theme-scripts', get_template_directory_uri() . '/js/app.min.js', array('jquery', 'jquery-fancybox', 'swiper'), '2.0.1', true );\n\n\t\twp_localize_script( 'theme-scripts', 'config', array(\n\t\t\t'ajax_url'\t=>\tadmin_url('admin-ajax.php'),\n\t\t\t'site_url'\t=>\tget_bloginfo( 'url' ),\n\t\t\t'theme_url'\t=>\tget_bloginfo( 'template_url' ),\n\t\t));\n\n\t}", "public static function loadScriptsAndStyles($theme=null)\n {\n if ($theme === null && atkTheme::getInstance()->getAttribute('dialog_theme_load', true))\n {\n $theme = atkTheme::getInstance()->getAttribute('dialog_theme_name', 'alphacube');\n }\n \n atkimport('atk.ui.atkpage');\n\n $page = &atkPage::getInstance();\n $page->register_script(atkconfig('atkroot').'atk/javascript/prototype-ui/window/window.packed.js');\n $page->register_script(atkconfig('atkroot').'atk/javascript/prototype-ui-ext.js'); \n $page->register_script(atkconfig('atkroot').'atk/javascript/class.atkdialog.js');\n $page->register_style(atkconfig('atkroot').'atk/javascript/prototype-ui/window/themes/window/window.css');\n $page->register_style(atkconfig('atkroot').'atk/javascript/prototype-ui/window/themes/shadow/mac_shadow.css'); \n \n if ($theme)\n {\n $page->register_style(atkconfig('atkroot').'atk/javascript/prototype-ui/window/themes/window/'.$theme.'.css');\n } \n }", "function theme_scripts()\r\n{\r\n // Load Bootstrap\r\n\twp_enqueue_style( 'theme-bootstrap', get_theme_file_uri( '/assets/vendor/bootstrap/css/bootstrap.min.css' ));\r\n\t// Load Font-Awesome\r\n\twp_enqueue_style( 'theme-fontawesome', get_theme_file_uri( '/assets/vendor/font-awesome/css/all.min.css' ));\r\n // Theme stylesheet.\r\n\twp_enqueue_style( 'theme-style', get_stylesheet_uri() );\r\n}", "function add_theme_scripts() {\n wp_enqueue_style( 'materialize', get_template_directory_uri() . '/materialize/materialize.css', array(), '1.1', 'all' );\n wp_enqueue_style( 'materialize', get_template_directory_uri() . '/materialize/materialize.min.css', array(), '1.1', 'all' );\n wp_enqueue_style( 'style', get_stylesheet_uri() );\n\n wp_enqueue_script( 'script', get_template_directory_uri() . '/js/jquery-3.2.1.js', array ( 'jquery' ), 1.1, true);\n wp_enqueue_script( 'materialize-js', get_template_directory_uri() . '/js/materialize.js', array( 'jquery' ), 1.1, true );\n wp_enqueue_script( 'materialize-js', get_template_directory_uri() . '/js/materialize.min.js', array( 'jquery' ), 1.1, true );\n wp_enqueue_script( 'mainjs', get_template_directory_uri() . '/js/init.js', array(), 1.1, true );\n\n}", "function theme_styles_scripts() {\n wp_enqueue_style('theme-style', get_template_directory_uri() . '/style.css');\n wp_enqueue_script('app-main', get_template_directory_uri() . '/app.bundle.js', null, null, true);\n}", "function massively_theme_assets() {\n\n\t\t$var = '1.0.0';\n\n\t\t/* CSS */\n\t\twp_enqueue_style( 'main-css', get_theme_file_uri('/assets/css/main.css'), '', $var );\n\t\twp_enqueue_style( 'noscript-css', get_theme_file_uri('/assets/css/noscript.css'), '', $var );\n\t\twp_enqueue_style( 'theme-css', get_stylesheet_uri(), '', $var );\n\n\t\t/* JavaScripts */\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script( 'scrollex-js', get_theme_file_uri('/assets/js/jquery.scrollex.min.js'), '', $var );\n\t\twp_enqueue_script( 'scrolly-js', get_theme_file_uri('/assets/js/jquery.scrolly.min.js'), '', $var );\n\t\twp_enqueue_script( 'browser-js', get_theme_file_uri('/assets/js/browser.min.js'), '', $var );\n\t\twp_enqueue_script( 'breakpoints-js', get_theme_file_uri('/assets/js/breakpoints.min.js'), '', $var );\n\t\twp_enqueue_script( 'util-js', get_theme_file_uri('/assets/js/util.js'), '', $var );\n\t\twp_enqueue_script( 'main-js', get_theme_file_uri('/assets/js/main.js'), array('jquery'), $var, true );\n\t}", "function load_theme_scripts() {\n\n // UCITAJ GOOGLE FONTOVE\n wp_enqueue_style( 'material-icons', 'http://fonts.googleapis.com/icon?family=Material+Icons');\n wp_enqueue_style( 'dosis-font', 'https://fonts.googleapis.com/css?family=Dosis:400,700&subset=latin,latin-ext');\n\n // UCITAJ CSS STILOVE\n // Dodaj Bootstrap 3 CSS >> Bootstrap framework CSS\n wp_enqueue_style( 'materialize', get_template_directory_uri() .'/css/materialize.css');\n\n // Dodaj SWIPER CSS\n wp_enqueue_style( 'swiper', get_template_directory_uri() .'/css/swiper/swiper.min.css');\n\n // Dodaj glavni Style CSS\n wp_enqueue_style( 'xception', get_stylesheet_uri() );\n\n // UCITAJ JAVASKRIPTE\n // Dodaj JQuery 1.11.3 JS\n wp_enqueue_script( 'theme-jquery', 'https://code.jquery.com/jquery-2.1.1.min.js', array(), '', true);\n\n // Dodaj Masonry\n wp_enqueue_script('masonry-js', get_template_directory_uri() .'/js/masonry/masonry.pkgd.min.js', array(),'theme-jquery', true);\n\n // Dodaj Materialize JS\n wp_enqueue_script('materialize-js', get_template_directory_uri() .'/js/materialize/materialize.min.js', array(),'theme-jquery', true);\n\n // Dodaj CLASSIE JS\n wp_enqueue_script( 'classie-js', get_template_directory_uri() .'/js/classie/classie.js', array(), 'theme-jquery', true);\n\n // Dodaj SWIPER JS\n wp_enqueue_script('swiper-js', get_template_directory_uri() .'/js/swiper/swiper.min.js', array(),'theme-jquery', true);\n\n // Add theme JS file\n wp_enqueue_script('xception-js', get_template_directory_uri() .'/js/theme.js', array(),'theme-jquery', true);\n\n }", "private function register_files() {\n\t\tif( $this->type === self::STYLE ) {\n\t\t\twp_register_style( $this->handle, $this->src, $this->settings['deps'], $this->settings['vers'], $this->settings['media'] );\n\t\t} else if ( $this->type === self::SCRIPT ) {\n\t\t\twp_register_script( $this->handle, $this->src, $this->settings['deps'], $this->settings['vers'], $this->settings['in_footer'] );\n\t\t}\n\t}", "public function theme_scripts()\n\t{\n\t\t\n\n\t\t$user_id = get_current_user_id();\n\n\t\twp_enqueue_script(\n\t\t\t'theme',\n\t\t\tTHEME_URL . '/assets/js/theme.js',\n\t\t\t[],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\n\t\twp_enqueue_script(\n\t\t\t'react-script',\n\t\t\tTHEME_URL . '/assets/js/react-main.js',\n\t\t\t[],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\n\t\t//$bannerImage = get_field('banner_image', 'option');\n\t\t//$welcomeContent = get_field('welcome_text', 'option');\n\n\t\t$banner = array(\n\t\t\t'title' => __('Search Page', 'freshportfolio'),\n\t\t\t'image' => $bannerImage,\n\t\t);\n\n\t\t$welcome = array(\n\t\t\t'title' => __('Welcome', 'freshportfolio'),\n\t\t\t'content' => $welcomeContent,\n\t\t);\n\n\t\t$filter = array(\n\t\t\t'title' => __('Search for', 'freshportfolio'),\n\t\t\t'placeholder' => __('Type keywords here...', 'freshportfolio'),\n\t\t\t'sorting' => array(\n\t\t\t\t'name' => __('Name', 'freshportfolio'),\n\t\t\t\t'time' => __('Date', 'freshportfolio'),\n\t\t\t),\n\t\t);\n\n\t\t// user data\n\t\t// 1. avatar\n\t\t// 2. displayname\n\t\t// 3. first login\n\t\t$user \t\t\t= get_user_by('id', $user_id);\n\t\t$avatar_url \t= get_avatar_url($user_id);\n\t\t$display_name = $user->display_name;\n\n\t\t$is_first_login = get_user_meta($user_id, 'first_login', true);\n\n\t\twp_localize_script('theme', 'SITE_OPTIONS', array(\n\t\t\t'siteURL' => site_url(),\n\t\t\t'ajaxURL' => admin_url('admin-ajax.php'),\n\t\t\t'themeURL' => THEME_URL,\n\t\t));\n\n\t\twp_localize_script('theme', 'SITE_AJAX', array(\n\t\t\t'hideWelcome' => array(\n\t\t\t\t'action' => 'hide_welcome',\n\t\t\t\t'nonce' => wp_create_nonce('HideWelcome'),\n\t\t\t),\n\t\t));\n\n\t\twp_localize_script('theme', 'SITE_DATA', array(\n\t\t\t'banner' => $banner,\n\t\t\t'welcome' => $welcome,\n\t\t\t'filter' => $filter,\n\t\t\t'first_login' => $is_first_login,\n\t\t\t'user_data' => array(\n\t\t\t\t'avatar' => $avatar_url,\n\t\t\t\t'display_name' => $display_name,\n\t\t\t)\n\t\t));\n\t}", "function montheme_register_assets()\n{\n\t//enregistre le style et le script\n\twp_register_style('bootstrap', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css');\n\twp_register_style('style-css', get_stylesheet_uri());\n\twp_register_script('bootstrap', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js', [], false, true); //[] =pas de dependance, false = pas de numero de version et true = script chargé dans le footer\n\t//permet d'utiliser le style et le script\n\twp_enqueue_style('bootstrap');\n\twp_enqueue_style('style-css');\n\twp_enqueue_script('bootstrap');\n}", "function theme_scripts() {\n wp_enqueue_style('main', CSS . '/main.css');\n wp_enqueue_style('my', CSS . '/my.css');\n wp_enqueue_script('scripts', JS . '/main.js', array('jquery'), null, true);\n }", "function theme_name_scripts() {\r\n //wp_enqueue_style( 'fonts', '//cloud.webtype.com/css/1b7cfdf0-9828-4ed8-b99b-ccab8b975185.css');\r\n\twp_enqueue_style( 'fonts', '//fast.fonts.net/cssapi/e64835e4-ce1a-486d-8414-bc9d3ec7ae11.css');\r\n\twp_enqueue_style( 'main-style', get_stylesheet_uri(), array(), strval(filemtime(get_template_directory().\"/style.css\")) );\r\n\twp_enqueue_script( 'main-script', get_template_directory_uri() . '/script.js', array('jquery'), '1.0.0', true );\r\n\twp_enqueue_script( 'touchswipe', get_template_directory_uri() . '/inc/jquery.touchSwipe.min.js', array('jquery'), '1.0.0', true );\r\n}", "function enqueue_scripts() {\n\twp_enqueue_style( '_s-styles', get_theme_file_uri( 'assets/dist/styles/theme.css' ), [], null );\n\twp_enqueue_script( '_s-script', get_theme_file_uri( 'assets/dist/scripts/theme.bundle.js' ), [ 'jquery' ], null, true );\n}", "private function registerPlugins()\n\t{\n\t\t$assetDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;\n\t\t$assetUrl = Yii::app()->assetManager->publish($assetDir);\n\n\n\t\t$cs = Yii::app()->getClientScript();\n\n\t\tforeach ($this->plugins as $p)\n\t\t{\n\n\t\t\tif ($p['flag'])\n\t\t\t{\n\t\t\t\tforeach ($p['js'] as $js)\n\t\t\t\t\t$cs->registerScriptFile($assetUrl . \"/\" . $js, CClientScript::POS_END);\n\t\t\t}\n\t\t}\n\t}", "public function register_scripts() {\n\t\t\t$woocommerce_base = WC()->template_path();\n\t\t\t$assets_path = str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/';\n\t\t\t$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';\n\t\t\t$prefix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? 'unminified/' : '';\n\n\t\t\t$located = locate_template( array(\n\t\t\t\t$woocommerce_base . 'wishlist.js',\n\t\t\t\t'wishlist.js'\n\t\t\t) );\n\n\t\t\twp_register_script( 'prettyPhoto', $assets_path . 'js/prettyPhoto/jquery.prettyPhoto' . $suffix . '.js', array( 'jquery' ), '3.1.6', true );\n\t\t\twp_register_script( 'jquery-selectBox', YITH_WCWL_URL . 'assets/js/jquery.selectBox.min.js', array( 'jquery' ), '1.2.0', true );\n\n\t\t\t$yith_wcwl_l10n = $this->get_localize();\n\t\t\t$main_script_deps = apply_filters( 'yith_wcwl_main_script_deps', array( 'jquery', 'jquery-selectBox' ) );\n\n\t\t\tif ( ! $located ) {\n\t\t\t\twp_register_script( 'jquery-yith-wcwl', YITH_WCWL_URL . 'assets/js/' . $prefix . 'jquery.yith-wcwl.js', $main_script_deps, $this->version, true );\n\t\t\t\twp_localize_script( 'jquery-yith-wcwl', 'yith_wcwl_l10n', $yith_wcwl_l10n );\n\t\t\t}\n\t\t\telse {\n\t\t\t\twp_register_script( 'jquery-yith-wcwl-user', str_replace( get_stylesheet_directory(), get_stylesheet_directory_uri(), $located ), $main_script_deps, $this->version, true );\n\t\t\t\twp_localize_script( 'jquery-yith-wcwl-user', 'yith_wcwl_l10n', $yith_wcwl_l10n );\n\t\t\t}\n\t\t}", "function add_theme_scripts() {\n\n wp_enqueue_style( 'style', get_stylesheet_uri());\n wp_enqueue_style( 'font-awesome-css', get_template_directory_uri().'/stylesheets/font-awesome.min.css'); \n wp_enqueue_style( 'bootstrap-css', get_template_directory_uri().'/stylesheets/bootstrap.min.css'); \n wp_enqueue_style( 'carousel-css', get_template_directory_uri().'/stylesheets/owl.carousel.css'); \n wp_enqueue_style( 'mmenu-css', get_template_directory_uri().'/stylesheets/jquery.mmenu.all.css');\n wp_enqueue_style( 'global-css', get_template_directory_uri().'/stylesheets/global.css');\n wp_enqueue_style( 'device-css', get_template_directory_uri().'/stylesheets/device.css');\n \n //js\n //wp_enqueue_script( 'jquery' );\n wp_enqueue_script( 'jquery-lib-js', get_template_directory_uri().'/javascripts/jquery-3.2.1.min.js');\n wp_enqueue_script( 'bootstrap-js', get_template_directory_uri().'/javascripts/bootstrap.min.js');\n wp_enqueue_script( 'mmenu-js', get_template_directory_uri().'/javascripts/jquery.mmenu.min.all.js');\n wp_enqueue_script( 'carousel-js', get_template_directory_uri().'/javascripts/owl.carousel.js');\n //wp_enqueue_script( 'masonry-js', get_template_directory_uri().'/javascripts/masonry.pkgd.min.js');\n wp_enqueue_script( 'global-js', get_template_directory_uri().'/javascripts/global.js');\n \n}", "function niko_register_scripts() {\n $theme_version = wp_get_theme()->get( 'Version' );\n //Подключение стилей\n wp_deregister_script('jquery');\n wp_enqueue_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js', array(), null, true );\n wp_enqueue_script( 'aos', get_template_directory_uri() . '/assets/js/aos.js', array('jquery'), $theme_version, true );\n\n wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array('jquery'), $theme_version, true );\n wp_enqueue_script( 'magnific-popup', get_template_directory_uri() . '/assets/js/jquery.magnific-popup.min.js', array('jquery'), $theme_version, true );\n wp_enqueue_script( 'validate', get_template_directory_uri() . '/assets/js/jquery.validate.min.js', array('jquery'), $theme_version, true );\n wp_enqueue_script( 'smooth-scroll', get_template_directory_uri() . '/assets/js/jquery.smooth-scroll.min.js', array('jquery'), $theme_version, true );\n wp_enqueue_script( 'custom', get_template_directory_uri() . '/assets/js/custom.js', array('jquery'), $theme_version, true );\n wp_enqueue_script( 'valid-ajax', get_template_directory_uri() . '/assets/js/valid-ajax.js', array('jquery'), $theme_version, true );\n wp_enqueue_script( 'jquery-maskedinput', get_template_directory_uri() . '/assets/js/jquery.maskedinput.min.js', array('jquery'), $theme_version, true );\n wp_enqueue_script( 'goodshare', 'https://cdn.jsdelivr.net/jquery.goodshare.js/3.2.8/goodshare.min.js', array('jquery'), $theme_version, true );\n}", "function theme_name_scripts() {\n\t\t// wp_enqueue_style( 'style-name', get_stylesheet_uri() );\n\t\twp_enqueue_script( 'jquery', get_template_directory_uri() . '/js/jquery.min.js', array(), '1.0.0', true );\n\t\twp_enqueue_script( 'retina.min', get_template_directory_uri() . '/js/retina.min.js', array(), '1.0.0', true );\n\t\twp_enqueue_script( 'isotope.pkgd.min', get_template_directory_uri() . '/js/isotope.pkgd.min.js', array(), '1.0.0', true );\n\t\twp_enqueue_script( 'jquery.magnific-popup.min', get_template_directory_uri() . '/js/jquery.magnific-popup.min.js', array(), '1.0.0', true );\n\t\twp_enqueue_script( 'jquery.mousewheel.min', get_template_directory_uri() . '/js/jquery.mousewheel.min.js', array(), '1.0.0', true );\n\t\twp_enqueue_script( 'jquery.tinycarousel.min', get_template_directory_uri() . '/js/jquery.tinycarousel.min.js', array(), '1.0.0', true );\n\t\twp_enqueue_script( 'jquery.lazylinepainter.min.js', get_template_directory_uri() . '/js/jquery.lazylinepainter.min.js', array(), '1.0.0', true );\n\t\tif ( is_page( 'contact' ) ){ wp_enqueue_script( 'jquery.gmap.min', get_template_directory_uri() . '/js/jquery.gmap.min.js', array(), '1.0.0', true ); }\n\t\twp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/scripts.js', array(), '1.0.0', true );\n\t}", "public function register_assets_admin() {\n $js_folder = SD_PLUGIN_PATH . '/src/assets/admin/js/';\n $css_folder = SD_PLUGIN_PATH . '/src/assets/admin/css/';\n $scripts = scandir($js_folder);\n //var_dump($scripts);\n $styles = scandir($css_folder);\n foreach ($styles as $style) {\n if( !is_dir($style) ) {\n wp_enqueue_style( URL_SCOPE . mt_rand(0, 9000), '/wp-content/plugins/'.sanitize_key(PLUGIN_NAME).'/src/assets/admin/css/' . $style);\n }\n }\n foreach ($scripts as $script) {\n if( !is_dir($script) ) {\n wp_enqueue_script( URL_SCOPE . mt_rand(0, 9000), '/wp-content/plugins/'.sanitize_key(PLUGIN_NAME).'/src/assets/admin/js/' . $script);\n }\n }\n }", "function basetheme_scripts() {\n\n //DEREGISTER SCRIPTS\n wp_deregister_script('jquery');\n wp_deregister_script( 'wp-embed' );\n\n\twp_enqueue_style( 'basetheme-style', get_stylesheet_uri() );\n\n wp_enqueue_script( 'jquery', get_template_directory_uri() . '/assets/js/vendor/jquery/jquery-3.5.1.min.js' );\n\twp_enqueue_script( 'basetheme-scripts', get_template_directory_uri() . '/assets/js/app.js' );\n\n\n $datatoBePassed = array (\n 'isHome' => is_home()? 'true' : 'false',\n 'theme_dir' => get_template_directory_uri()\n );\n\n wp_localize_script( 'basetheme-scripts', 'PHPVARS', $datatoBePassed );\n\n}", "function theme_scripts() {\n\twp_enqueue_style( 'theme-style', get_stylesheet_uri(), array(), _S_VERSION );\n\t// wp_style_add_data( 'theme-style', 'rtl', 'replace' );\n\n\twp_enqueue_script( 'lib-jquery', get_template_directory_uri() . '/lib/jquery-3.3.1.min.js', array(), _S_VERSION, true );\n\twp_enqueue_script( 'common-script', get_template_directory_uri() . '/assets/js/script.js', array(), _S_VERSION, true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "function add_theme_scripts(){\n\twp_enqueue_style('style',get_stylesheet_uri());\n\n\twp_enqueue_style( 'bootstrap', get_template_directory_uri().'/bootstrap/css/bootstrap.css',false,'1.1','all');\n\n\t/*\n\twp_enqueue_style( 'bootstrap-theme', get_template_directory_uri().'/bootstrap/css/bootstrap-theme.css',false,'1.1','all');\n\t*/\n\n\twp_enqueue_style( 'font-awesome', get_template_directory_uri().'/font-awesome/css/font-awesome.css',false,'1.1','all');\n\n\t//scripts\n\twp_enqueue_script( 'detectmobilebrowser', get_template_directory_uri().'/js/detectmobilebrowser.js', array ( 'jquery' ), 1.1, true);\n\twp_enqueue_script( 'jquery-1.11.1.min', get_template_directory_uri().'/js/jquery-1.11.1.min.js', array ( 'jquery' ), 1.1, true);\n\n\twp_enqueue_script( 'jquery.easing.1.3', get_template_directory_uri().'/js/jquery.easing.1.3.js', array ( 'jquery' ), 1.1, true);\n\n\twp_enqueue_script( 'bootstrap.min', get_template_directory_uri().'/bootstrap/js/bootstrap.min.js', array ( 'jquery' ), 1.1, true);\n\twp_enqueue_script( 'open-close-mobile-nav', get_template_directory_uri().'/js/open-close-mobile-nav.js', array ( 'jquery' ), 1.1, true);\n\n}", "function theme_scripts_and_styles() {\n if (!is_admin()) {\n global $wp_scripts;\n wp_deregister_script('jquery');\n foreach($wp_scripts->registered as $handle => $script) {\n $wp_scripts->add_data($handle, 'group', 1);\n }\n\n theme_scripts::register();\n theme_styles::register();\n\n // comment reply script for threaded comments\n if ( is_singular() && comments_open() && (get_option('thread_comments') == 1)) {\n wp_enqueue_script('comment-reply');\n }\n\n theme_styles::enqueue();\n theme_scripts::enqueue();\n }\n}", "public function addJavascriptFiles($js /* array */);", "function mystartertheme_scripts() {\n\t// wp_enqueue_script( 'mystartertheme-navigation', get_template_directory_uri() . '/dist/js/navigation.js', array(), '20151215', true );\n\t// wp_enqueue_script( 'mystartertheme-skip-link-focus-fix', get_template_directory_uri() . '/dist/js/skip-link-focus-fix.js', array(), '20151215', true );\n\twp_enqueue_script( 'mystartertheme-main', get_template_directory_uri() . '/dist/js/main.js', array(), '20151215', true );\n\t\n\tif (is_user_logged_in() ) {\n\t\t// wp_enqueue_script( 'mystartertheme-admin', get_template_directory_uri() . '/dist/js/admin.js', array(), '20151215', true );\n\t\twp_enqueue_style( 'mystartertheme-admin-style', get_template_directory_uri() . '/dist/css/admin.css' );\n\t}\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "function hejtiger_theme_js() {\n\n\twp_enqueue_script( 'modernizr_js' , get_template_directory_uri() . '/dist/js/modernizr.js' , '', '', false );\n\twp_enqueue_script( 'hejtiger_js' , get_template_directory_uri() . '/dist/js/hejtiger.js' , array('jquery'), '', true );\n\twp_enqueue_script( 'main_js' , get_template_directory_uri() . '/dist/js/main.js' , array('jquery'), '', true );\n\t\n}", "function add_theme_scripts() {\r\n /* CSS */\r\n wp_enqueue_style( 'style', get_stylesheet_uri() );\r\n\r\n /* JS */\r\n wp_enqueue_script( 'fontawesome', 'https://kit.fontawesome.com/2ed38fdfce.js', array (), false, true);\r\n wp_enqueue_script( 'swup', 'https://unpkg.com/swup@latest/dist/swup.min.js', array (), false, true);\r\n wp_enqueue_script( 'canvas-background', get_template_directory_uri() . '/js/canvas-background.js', array (), false, true);\r\n wp_enqueue_script( 'sounds', get_template_directory_uri() . '/js/sounds.js', array (), false, true);\r\n wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/scripts.js', array (), false, true);\r\n\r\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\r\n wp_enqueue_script( 'comment-reply' );\r\n }\r\n}", "function register_scripts() {\n\t\t\t$id = get_the_ID();\n\t\t\t// Only continue if current page is home\n\t\t\tif ( !is_home() ) return;\n\n\t\t\twp_enqueue_script( 'jquery' );\n\t\t\twp_enqueue_script( 'kevinw-sf-react', plugins_url( 'assets/react.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\twp_enqueue_script( 'kevinw-sf-react-app', plugins_url( 'assets/scripts.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\n\t\t\t$this->register_scripts_css();\n\t\t}", "function add_plugin_theme( $plugin_files, $is_common = FALSE )\n { \n // if plugin files are common\n if($is_common)\n $theme_folder = $is_common;\n else\n $theme_folder = $this->settings->theme;\n\n // make sure that $this->includes has array value\n if ( ! is_array( $this->includes ) )\n $this->includes = array();\n\n // if $plugin_files is string, then convert into array\n $plugin_files = is_array( $plugin_files ) ? $plugin_files : explode( \",\", $plugin_files );\n\n foreach( $plugin_files as $p_f )\n {\n // remove white space if any\n $js = trim( $p_f );\n\n // go to next when passing empty space\n if ( empty( $p_f ) ) continue;\n\n // using sha1( $p_f ) as a key to prevent duplicate css & js to be included\n // and if its a css file then add it into css_files else js_files\n if(strpos($p_f, '.css') === FALSE)\n $this->includes[ 'js_files' ][ sha1( $p_f ) ] = base_url( \"/themes/{$theme_folder}/plugins\" ) . \"/{$p_f}\";\n else \n $this->includes[ 'css_files' ][ sha1( $p_f ) ] = base_url( \"/themes/{$theme_folder}/plugins\" ) . \"/{$p_f}\";\n }\n\n return $this;\n }", "function pm_register_resources() {\n\t// Styles\n\n wp_enqueue_style( 'normalize', get_stylesheet_directory_uri().'/assets/css/normalize.css' );\n wp_enqueue_style( 'ts-styles', get_stylesheet_directory_uri().'/assets/css/style.css', null, pm_version_hash('/assets/css/style.css') );\n wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Crimson+Text:400,700|Raleway:500,600');\n \n // Scripts\n\n wp_deregister_script( 'jquery' );\n wp_register_script( 'jquery', includes_url( '/js/jquery/jquery.js' ), false, NULL, true );\n// wp_register_script( 'jquery', 'http://masonry.desandro.com/v2/js/jquery-1.7.1.min.js', false, NULL, true );\n wp_enqueue_script( 'jquery' );\n //wp_enqueue_script( 'jquery-masonry' );\n wp_enqueue_script( 'ts-infinitescroll', get_stylesheet_directory_uri().'/assets/js/infinite-scroll.min.js', null, null, true);\n wp_enqueue_script( 'ts-imagesloaded', get_stylesheet_directory_uri().'/assets/js/imagesloaded.min.js', null, null, true);\n wp_enqueue_script( 'ts-cookies', get_stylesheet_directory_uri().'/assets/js/js.cookies.js', null, null, true);\n wp_enqueue_script( 'ts-tweenmax', '//cdnjs.cloudflare.com/ajax/libs/gsap/1.19.1/TweenMax.min.js', null, null, true);\n// wp_enqueue_script( 'ts-masonry', get_stylesheet_directory_uri().'/assets/js/masonry.min.js', null, null, true);\n wp_enqueue_script( 'ts-scripts', get_stylesheet_directory_uri().'/assets/js/ts.js',null, pm_version_hash('/assets/js/ts.js'), true);\n \n // Fonts\n}", "public function register_assets() {\n\t\t\twp_enqueue_script(\n\t\t\t\t'wp_searchermain',\n\t\t\t\tget_stylesheet_directory_uri() . '/resources/scripts/denuncias/SearcherMain.js',\n\t\t\t\tarray(),\n\t\t\t\t'1.0.0',\n\t\t\t\ttrue\n\t\t\t);\n\t\t\twp_localize_script(\n\t\t\t\t'wp_searchermain',\n\t\t\t\t'wp_searchermain',\n\t\t\t\tarray(\n\t\t\t\t\t'ajax' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t\t'nonce' => wp_create_nonce( 'auth_nonce' )\n\t\t\t\t)\n\t\t\t);\n }", "public function registerAssets()\n {\n $jsTimeVal = Date('l d/m/Y H:i', $this->timestamp);\n $view = $this->getView();\n WeatherBundleAsset::register($view);\n $uuid = uniqid();\n $js = <<<JS\n var wb = new WeatherBundle({$this->lat}, {$this->lon}, '{$this->weatherUrl}', 'metric', {$this->droneModels}, '{$jsTimeVal}');\n wb.getWeather(\"{$this->imageDir}\", \"{$this->timeVal}\", {$this->callback});\n JS;\n $view->registerJs($js,View::POS_READY);\n }", "function add_theme_scripts() {\n wp_enqueue_style( 'main_style_file', get_stylesheet_uri());\n /********** Including all.min css file ***********/\n wp_enqueue_style( 'minified_file', get_template_directory_uri() .'/css/all.min.css', array(), '1.1', 'all');\n /********** Including style css file ***********/\n wp_enqueue_style( 'style', get_template_directory_uri() .'/css/style.css', array(), '1.1', 'all');\n /********* Including bootstrap file ************/ \n wp_enqueue_style( 'bootstrap_file', get_template_directory_uri() .'/css/bootstrap.min.css', array (),'1.1', 'all'); \n //********* Including script files ************/\n wp_enqueue_script( $handle, get_template_directory_uri().'/js/bootstrap.min.js', array(), '1.1' , true ); \n}", "function gutenberg_register_scripts_and_styles() {\n\tgutenberg_register_vendor_scripts();\n\n\tregister_tinymce_scripts();\n\n\twp_register_script(\n\t\t'wp-url',\n\t\tgutenberg_url( 'build/url/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/url/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-autop',\n\t\tgutenberg_url( 'build/autop/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/autop/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-wordcount',\n\t\tgutenberg_url( 'build/wordcount/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/wordcount/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-dom-ready',\n\t\tgutenberg_url( 'build/dom-ready/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/dom-ready/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-a11y',\n\t\tgutenberg_url( 'build/a11y/index.js' ),\n\t\tarray( 'wp-dom-ready' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/a11y/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-hooks',\n\t\tgutenberg_url( 'build/hooks/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/hooks/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-i18n',\n\t\tgutenberg_url( 'build/i18n/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/i18n/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-is-shallow-equal',\n\t\tgutenberg_url( 'build/is-shallow-equal/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/is-shallow-equal/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-token-list',\n\t\tgutenberg_url( 'build/token-list/index.js' ),\n\t\tarray( 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/token-list/index.js' ),\n\t\ttrue\n\t);\n\n\t// Editor Scripts.\n\twp_register_script(\n\t\t'wp-api-fetch',\n\t\tgutenberg_url( 'build/api-fetch/index.js' ),\n\t\tarray( 'wp-hooks', 'wp-i18n' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/api-fetch/index.js' ),\n\t\ttrue\n\t);\n\twp_add_inline_script(\n\t\t'wp-api-fetch',\n\t\tgutenberg_get_script_polyfill(\n\t\t\tarray(\n\t\t\t\t'\\'Promise\\' in window' => 'wp-polyfill-promise',\n\t\t\t\t'\\'fetch\\' in window' => 'wp-polyfill-fetch',\n\t\t\t)\n\t\t),\n\t\t'before'\n\t);\n\twp_add_inline_script(\n\t\t'wp-api-fetch',\n\t\tsprintf(\n\t\t\t'wp.apiFetch.use( wp.apiFetch.createNonceMiddleware( \"%s\" ) );',\n\t\t\t( wp_installing() && ! is_multisite() ) ? '' : wp_create_nonce( 'wp_rest' )\n\t\t),\n\t\t'after'\n\t);\n\twp_add_inline_script(\n\t\t'wp-api-fetch',\n\t\tsprintf(\n\t\t\t'wp.apiFetch.use( wp.apiFetch.createRootURLMiddleware( \"%s\" ) );',\n\t\t\tesc_url_raw( get_rest_url() )\n\t\t),\n\t\t'after'\n\t);\n\n\twp_register_script(\n\t\t'wp-deprecated',\n\t\tgutenberg_url( 'build/deprecated/index.js' ),\n\t\tarray( 'wp-hooks' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/deprecated/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-blob',\n\t\tgutenberg_url( 'build/blob/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/blob/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-compose',\n\t\tgutenberg_url( 'build/compose/index.js' ),\n\t\tarray( 'wp-element', 'wp-is-shallow-equal', 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/compose/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-keycodes',\n\t\tgutenberg_url( 'build/keycodes/index.js' ),\n\t\tarray( 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/keycodes/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-html-entities',\n\t\tgutenberg_url( 'build/html-entities/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/html-entities/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-data',\n\t\tgutenberg_url( 'build/data/index.js' ),\n\t\tarray(\n\t\t\t'wp-element',\n\t\t\t'wp-compose',\n\t\t\t'wp-is-shallow-equal',\n\t\t\t'lodash',\n\t\t\t'wp-redux-routine',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/data/index.js' ),\n\t\ttrue\n\t);\n\twp_add_inline_script(\n\t\t'wp-data',\n\t\timplode(\n\t\t\t\"\\n\",\n\t\t\tarray(\n\t\t\t\t'( function() {',\n\t\t\t\t'\tvar userId = window.userSettings.uid;',\n\t\t\t\t'\tvar storageKey = \"WP_DATA_USER_\" + userId;',\n\t\t\t\t'\twp.data',\n\t\t\t\t'\t\t.use( wp.data.plugins.persistence, { storageKey: storageKey } )',\n\t\t\t\t'\t\t.use( wp.data.plugins.controls );',\n\t\t\t\t'} )()',\n\t\t\t)\n\t\t)\n\t);\n\twp_register_script(\n\t\t'wp-core-data',\n\t\tgutenberg_url( 'build/core-data/index.js' ),\n\t\tarray( 'wp-data', 'wp-api-fetch', 'wp-url', 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/core-data/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-dom',\n\t\tgutenberg_url( 'build/dom/index.js' ),\n\t\tarray( 'wp-tinymce', 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/dom/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-block-serialization-spec-parser',\n\t\tgutenberg_url( 'build/block-serialization-spec-parser/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/block-serialization-spec-parser/index.js' ),\n\t\ttrue\n\t);\n\twp_add_inline_script(\n\t\t'wp-dom',\n\t\tgutenberg_get_script_polyfill(\n\t\t\tarray(\n\t\t\t\t'document.contains' => 'wp-polyfill-node-contains',\n\t\t\t)\n\t\t),\n\t\t'before'\n\t);\n\twp_register_script(\n\t\t'wp-shortcode',\n\t\tgutenberg_url( 'build/shortcode/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/shortcode/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-redux-routine',\n\t\tgutenberg_url( 'build/redux-routine/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/redux-routine/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-date',\n\t\tgutenberg_url( 'build/date/index.js' ),\n\t\tarray( 'moment' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/date/index.js' ),\n\t\ttrue\n\t);\n\tglobal $wp_locale;\n\twp_add_inline_script(\n\t\t'wp-date',\n\t\tsprintf(\n\t\t\t'wp.date.setSettings( %s );',\n\t\t\twp_json_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'l10n' => array(\n\t\t\t\t\t\t'locale' => get_user_locale(),\n\t\t\t\t\t\t'months' => array_values( $wp_locale->month ),\n\t\t\t\t\t\t'monthsShort' => array_values( $wp_locale->month_abbrev ),\n\t\t\t\t\t\t'weekdays' => array_values( $wp_locale->weekday ),\n\t\t\t\t\t\t'weekdaysShort' => array_values( $wp_locale->weekday_abbrev ),\n\t\t\t\t\t\t'meridiem' => (object) $wp_locale->meridiem,\n\t\t\t\t\t\t'relative' => array(\n\t\t\t\t\t\t\t/* translators: %s: duration */\n\t\t\t\t\t\t\t'future' => __( '%s from now', 'default' ),\n\t\t\t\t\t\t\t/* translators: %s: duration */\n\t\t\t\t\t\t\t'past' => __( '%s ago', 'default' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'formats' => array(\n\t\t\t\t\t\t'time' => get_option( 'time_format', __( 'g:i a', 'default' ) ),\n\t\t\t\t\t\t'date' => get_option( 'date_format', __( 'F j, Y', 'default' ) ),\n\t\t\t\t\t\t'datetime' => __( 'F j, Y g:i a', 'default' ),\n\t\t\t\t\t),\n\t\t\t\t\t'timezone' => array(\n\t\t\t\t\t\t'offset' => get_option( 'gmt_offset', 0 ),\n\t\t\t\t\t\t'string' => get_option( 'timezone_string', 'UTC' ),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\t'after'\n\t);\n\twp_register_script(\n\t\t'wp-element',\n\t\tgutenberg_url( 'build/element/index.js' ),\n\t\tarray( 'react', 'react-dom', 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/element/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-components',\n\t\tgutenberg_url( 'build/components/index.js' ),\n\t\tarray(\n\t\t\t'lodash',\n\t\t\t'moment',\n\t\t\t'wp-a11y',\n\t\t\t'wp-api-fetch',\n\t\t\t'wp-compose',\n\t\t\t'wp-deprecated',\n\t\t\t'wp-dom',\n\t\t\t'wp-element',\n\t\t\t'wp-hooks',\n\t\t\t'wp-html-entities',\n\t\t\t'wp-i18n',\n\t\t\t'wp-is-shallow-equal',\n\t\t\t'wp-keycodes',\n\t\t\t'wp-url',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/components/index.js' ),\n\t\ttrue\n\t);\n\twp_add_inline_script(\n\t\t'wp-components',\n\t\tsprintf( 'wp.components.unstable__setSiteURL(%s);', json_encode( site_url() ) )\n\t);\n\twp_register_script(\n\t\t'wp-blocks',\n\t\tgutenberg_url( 'build/blocks/index.js' ),\n\t\tarray(\n\t\t\t'wp-autop',\n\t\t\t'wp-blob',\n\t\t\t'wp-block-serialization-spec-parser',\n\t\t\t'wp-data',\n\t\t\t'wp-deprecated',\n\t\t\t'wp-dom',\n\t\t\t'wp-element',\n\t\t\t'wp-hooks',\n\t\t\t'wp-i18n',\n\t\t\t'wp-is-shallow-equal',\n\t\t\t'wp-shortcode',\n\t\t\t'lodash',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/blocks/index.js' ),\n\t\ttrue\n\t);\n\n\twp_add_inline_script(\n\t\t'wp-blocks',\n\t\tgutenberg_get_script_polyfill(\n\t\t\tarray(\n\t\t\t\t'\\'Promise\\' in window' => 'wp-polyfill-promise',\n\t\t\t)\n\t\t),\n\t\t'before'\n\t);\n\twp_register_script(\n\t\t'wp-viewport',\n\t\tgutenberg_url( 'build/viewport/index.js' ),\n\t\tarray( 'wp-element', 'wp-data', 'wp-compose', 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/viewport/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-block-library',\n\t\tgutenberg_url( 'build/block-library/index.js' ),\n\t\tarray(\n\t\t\t'editor',\n\t\t\t'lodash',\n\t\t\t'moment',\n\t\t\t'wp-api-fetch',\n\t\t\t'wp-autop',\n\t\t\t'wp-blob',\n\t\t\t'wp-blocks',\n\t\t\t'wp-components',\n\t\t\t'wp-compose',\n\t\t\t'wp-data',\n\t\t\t'wp-core-data',\n\t\t\t'wp-editor',\n\t\t\t'wp-element',\n\t\t\t'wp-html-entities',\n\t\t\t'wp-i18n',\n\t\t\t'wp-keycodes',\n\t\t\t'wp-url',\n\t\t\t'wp-viewport',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/block-library/index.js' ),\n\t\ttrue\n\t);\n\t// Remove it with 3.8.0 release.\n\twp_register_script(\n\t\t'wp-core-blocks',\n\t\tgutenberg_url( 'build/core-blocks/index.js' ),\n\t\tarray(\n\t\t\t'wp-block-library',\n\t\t\t'wp-deprecated',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/core-blocks/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-nux',\n\t\tgutenberg_url( 'build/nux/index.js' ),\n\t\tarray( 'wp-element', 'wp-components', 'wp-compose', 'wp-data', 'wp-i18n', 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/nux/index.js' ),\n\t\ttrue\n\t);\n\t// Loading the old editor and its config to ensure the classic block works as expected.\n\twp_add_inline_script(\n\t\t'editor',\n\t\t'window.wp.oldEditor = window.wp.editor;',\n\t\t'after'\n\t);\n\t$tinymce_settings = apply_filters(\n\t\t'tiny_mce_before_init',\n\t\tarray(\n\t\t\t'plugins' => implode(\n\t\t\t\t',',\n\t\t\t\tarray_unique(\n\t\t\t\t\tapply_filters(\n\t\t\t\t\t\t'tiny_mce_plugins',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'charmap',\n\t\t\t\t\t\t\t'colorpicker',\n\t\t\t\t\t\t\t'hr',\n\t\t\t\t\t\t\t'lists',\n\t\t\t\t\t\t\t'media',\n\t\t\t\t\t\t\t'paste',\n\t\t\t\t\t\t\t'tabfocus',\n\t\t\t\t\t\t\t'textcolor',\n\t\t\t\t\t\t\t'fullscreen',\n\t\t\t\t\t\t\t'wordpress',\n\t\t\t\t\t\t\t'wpautoresize',\n\t\t\t\t\t\t\t'wpeditimage',\n\t\t\t\t\t\t\t'wpemoji',\n\t\t\t\t\t\t\t'wpgallery',\n\t\t\t\t\t\t\t'wplink',\n\t\t\t\t\t\t\t'wpdialogs',\n\t\t\t\t\t\t\t'wptextpattern',\n\t\t\t\t\t\t\t'wpview',\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'toolbar1' => implode(\n\t\t\t\t',',\n\t\t\t\tarray_merge(\n\t\t\t\t\tapply_filters(\n\t\t\t\t\t\t'mce_buttons',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'formatselect',\n\t\t\t\t\t\t\t'bold',\n\t\t\t\t\t\t\t'italic',\n\t\t\t\t\t\t\t'bullist',\n\t\t\t\t\t\t\t'numlist',\n\t\t\t\t\t\t\t'blockquote',\n\t\t\t\t\t\t\t'alignleft',\n\t\t\t\t\t\t\t'aligncenter',\n\t\t\t\t\t\t\t'alignright',\n\t\t\t\t\t\t\t'link',\n\t\t\t\t\t\t\t'unlink',\n\t\t\t\t\t\t\t'wp_more',\n\t\t\t\t\t\t\t'spellchecker',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'editor'\n\t\t\t\t\t),\n\t\t\t\t\tarray( 'kitchensink' )\n\t\t\t\t)\n\t\t\t),\n\t\t\t'toolbar2' => implode(\n\t\t\t\t',',\n\t\t\t\tapply_filters(\n\t\t\t\t\t'mce_buttons_2',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'strikethrough',\n\t\t\t\t\t\t'hr',\n\t\t\t\t\t\t'forecolor',\n\t\t\t\t\t\t'pastetext',\n\t\t\t\t\t\t'removeformat',\n\t\t\t\t\t\t'charmap',\n\t\t\t\t\t\t'outdent',\n\t\t\t\t\t\t'indent',\n\t\t\t\t\t\t'undo',\n\t\t\t\t\t\t'redo',\n\t\t\t\t\t\t'wp_help',\n\t\t\t\t\t),\n\t\t\t\t\t'editor'\n\t\t\t\t)\n\t\t\t),\n\t\t\t'toolbar3' => implode( ',', apply_filters( 'mce_buttons_3', array(), 'editor' ) ),\n\t\t\t'toolbar4' => implode( ',', apply_filters( 'mce_buttons_4', array(), 'editor' ) ),\n\t\t\t'external_plugins' => apply_filters( 'mce_external_plugins', array() ),\n\t\t),\n\t\t'editor'\n\t);\n\tif ( isset( $tinymce_settings['style_formats'] ) && is_string( $tinymce_settings['style_formats'] ) ) {\n\t\t// Decode the options as we used to recommende json_encoding the TinyMCE settings.\n\t\t$tinymce_settings['style_formats'] = json_decode( $tinymce_settings['style_formats'] );\n\t}\n\twp_localize_script(\n\t\t'wp-block-library',\n\t\t'wpEditorL10n',\n\t\tarray(\n\t\t\t'tinymce' => array(\n\t\t\t\t'baseURL' => includes_url( 'js/tinymce' ),\n\t\t\t\t'suffix' => SCRIPT_DEBUG ? '' : '.min',\n\t\t\t\t'settings' => $tinymce_settings,\n\t\t\t),\n\t\t)\n\t);\n\n\twp_register_script(\n\t\t'wp-editor',\n\t\tgutenberg_url( 'build/editor/index.js' ),\n\t\tarray(\n\t\t\t'lodash',\n\t\t\t'tinymce-latest-lists',\n\t\t\t'wp-a11y',\n\t\t\t'wp-api-fetch',\n\t\t\t'wp-blob',\n\t\t\t'wp-blocks',\n\t\t\t'wp-components',\n\t\t\t'wp-compose',\n\t\t\t'wp-core-data',\n\t\t\t'wp-data',\n\t\t\t'wp-date',\n\t\t\t'wp-deprecated',\n\t\t\t'wp-dom',\n\t\t\t'wp-element',\n\t\t\t'wp-hooks',\n\t\t\t'wp-html-entities',\n\t\t\t'wp-i18n',\n\t\t\t'wp-is-shallow-equal',\n\t\t\t'wp-keycodes',\n\t\t\t'wp-nux',\n\t\t\t'wp-tinymce',\n\t\t\t'wp-token-list',\n\t\t\t'wp-url',\n\t\t\t'wp-viewport',\n\t\t\t'wp-wordcount',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/editor/index.js' )\n\t);\n\n\twp_register_script(\n\t\t'wp-edit-post',\n\t\tgutenberg_url( 'build/edit-post/index.js' ),\n\t\tarray(\n\t\t\t'jquery',\n\t\t\t'lodash',\n\t\t\t'postbox',\n\t\t\t'media-models',\n\t\t\t'media-views',\n\t\t\t'wp-a11y',\n\t\t\t'wp-api-fetch',\n\t\t\t'wp-components',\n\t\t\t'wp-compose',\n\t\t\t'wp-block-library',\n\t\t\t'wp-date',\n\t\t\t'wp-data',\n\t\t\t'wp-dom-ready',\n\t\t\t'wp-editor',\n\t\t\t'wp-element',\n\t\t\t'wp-embed',\n\t\t\t'wp-i18n',\n\t\t\t'wp-keycodes',\n\t\t\t'wp-plugins',\n\t\t\t'wp-viewport',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/edit-post/index.js' ),\n\t\ttrue\n\t);\n\twp_add_inline_script(\n\t\t'wp-edit-post',\n\t\tgutenberg_get_script_polyfill( array( 'window.FormData && window.FormData.prototype.keys' => 'wp-polyfill-formdata' ) ),\n\t\t'before'\n\t);\n\n\t// Editor Styles.\n\t// This empty stylesheet is defined to ensure backwards compatibility.\n\twp_register_style( 'wp-blocks', false );\n\n\t$fonts_url = '';\n\n\t/*\n\t * Translators: If there are characters in your language that are not supported\n\t * by Noto Serif, translate this to 'off'. Do not translate into your own language.\n\t */\n\tif ( 'off' !== _x( 'on', 'Noto Serif font: on or off', 'gutenberg' ) ) {\n\t\t$query_args = array(\n\t\t\t'family' => urlencode( 'Noto Serif:400,400i,700,700i' ),\n\t\t);\n\n\t\t$fonts_url = esc_url_raw( add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ) );\n\t}\n\n\twp_register_style(\n\t\t'wp-editor-font',\n\t\t$fonts_url,\n\t\tarray(),\n\t\tnull\n\t);\n\n\twp_register_style(\n\t\t'wp-editor',\n\t\tgutenberg_url( 'build/editor/style.css' ),\n\t\tarray( 'wp-components', 'wp-editor-font', 'wp-nux' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/editor/style.css' )\n\t);\n\twp_style_add_data( 'wp-editor', 'rtl', 'replace' );\n\n\twp_register_style(\n\t\t'wp-edit-post',\n\t\tgutenberg_url( 'build/edit-post/style.css' ),\n\t\tarray( 'wp-components', 'wp-editor', 'wp-edit-blocks', 'wp-block-library', 'wp-nux' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/edit-post/style.css' )\n\t);\n\twp_style_add_data( 'wp-edit-post', 'rtl', 'replace' );\n\n\twp_register_style(\n\t\t'wp-components',\n\t\tgutenberg_url( 'build/components/style.css' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/components/style.css' )\n\t);\n\twp_style_add_data( 'wp-components', 'rtl', 'replace' );\n\n\twp_register_style(\n\t\t'wp-block-library',\n\t\tgutenberg_url( 'build/block-library/style.css' ),\n\t\tcurrent_theme_supports( 'wp-block-styles' ) ? array( 'wp-block-library-theme' ) : array(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/block-library/style.css' )\n\t);\n\twp_style_add_data( 'wp-block-library', 'rtl', 'replace' );\n\n\twp_register_style(\n\t\t'wp-edit-blocks',\n\t\tgutenberg_url( 'build/block-library/edit-blocks.css' ),\n\t\tarray(\n\t\t\t'wp-components',\n\t\t\t'wp-editor',\n\t\t\t// Always include visual styles so the editor never appears broken.\n\t\t\t'wp-block-library-theme',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/block-library/edit-blocks.css' )\n\t);\n\twp_style_add_data( 'wp-edit-blocks', 'rtl', 'replace' );\n\n\twp_register_style(\n\t\t'wp-nux',\n\t\tgutenberg_url( 'build/nux/style.css' ),\n\t\tarray( 'wp-components' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/nux/style.css' )\n\t);\n\twp_style_add_data( 'wp-nux', 'rtl', 'replace' );\n\n\twp_register_style(\n\t\t'wp-block-library-theme',\n\t\tgutenberg_url( 'build/block-library/theme.css' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/block-library/theme.css' )\n\t);\n\twp_style_add_data( 'wp-block-library-theme', 'rtl', 'replace' );\n\n\twp_register_script(\n\t\t'wp-plugins',\n\t\tgutenberg_url( 'build/plugins/index.js' ),\n\t\tarray( 'lodash', 'wp-element', 'wp-hooks', 'wp-compose' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/plugins/index.js' )\n\t);\n\n\tif ( defined( 'GUTENBERG_LIVE_RELOAD' ) && GUTENBERG_LIVE_RELOAD ) {\n\t\t$live_reload_url = ( GUTENBERG_LIVE_RELOAD === true ) ? 'http://localhost:35729/livereload.js' : GUTENBERG_LIVE_RELOAD;\n\n\t\twp_enqueue_script(\n\t\t\t'gutenberg-live-reload',\n\t\t\t$live_reload_url\n\t\t);\n\t}\n}", "function pentamint_wp_theme_scripts() {\n\t\t// Initiate Default Wordpress jQuery\n\t\twp_enqueue_script('jquery');\n\n\t\t// Bootstrap Support\n\t\twp_enqueue_script('popper.js', 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js', array(), null, true);\n\t\twp_enqueue_script('bootstrap', 'https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js', array(), null, true);\n\n\t\t// Theme Custom\n\t\twp_enqueue_style('google-fonts', 'https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap', false);\n\t\twp_enqueue_style('nanum-fonts-nanumsquareround', 'https://cdn.rawgit.com/innks/NanumSquareRound/master/nanumsquareround.min.css', false);\n\t\twp_enqueue_style('animate.css', 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css', true);\n\t\twp_enqueue_script('ofi-min-js', get_stylesheet_directory_uri() . '/js/ofi.min.js', array(), '3.2.4', true);\n\t\twp_enqueue_script('main-js', get_stylesheet_directory_uri() . '/js/main.js', array('jquery'), time(), true);\n\t}", "function wpi_theme_js() {\n\n global $wp_scripts;\n\n wp_register_script('html5_shiv', 'https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js', '', '', false);\n wp_register_script('respond_js', 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js', '', '', false);\n\n $wp_scripts->add_data('html5_shiv', 'conditional', 'lt IE 9');\n $wp_scripts->add_data('respond_js', 'conditional', 'lt IE 9');\n/**\n * Load javascripts used by the theme\n */\n\n\n\n \n wp_enqueue_script('main_js', get_template_directory_uri(). '/js/main.js', array('jquery'), '', true);\n wp_enqueue_script('bootstrap_js', get_template_directory_uri(). '/js/bootstrap.min.js', array('jquery'), '', true);\n \n \n \n \n\n }", "function theme_scripts() {\n\t\twp_enqueue_style('bootstrap-css', get_template_directory_uri().'/styles/bootstrap/css/bootstrap.min.css');\n\t\twp_enqueue_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js');\n\t\twp_enqueue_script('bootstrap-js', get_template_directory_uri().'/styles/bootstrap/js/bootstrap.min.js');\n\t\twp_enqueue_script('custom-js', get_template_directory_uri().'/js/functions.js');\n\t}", "function theme_setup_scripts() {\n wp_enqueue_script(\"main\", get_theme_file_uri('/assets/js/script.js'), NULL, '1.0', true);\n wp_register_style('styles', get_template_directory_uri() . '/assets/css/style.css', array(), 'microtime()', 'all');\n wp_enqueue_style('styles'); // Enqueue it!\n // --> Change microtime to version number (for example '1.1') before release!\n\n //Bootstrap\n wp_enqueue_style(\"bootstrap-stylesheet\", 'https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css');\n wp_enqueue_script(\"jquery\", 'https://code.jquery.com/jquery-3.5.1.min.js');\n wp_enqueue_script(\"jquery-form-plugin\", 'https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.3.0/jquery.form.min.js');\n wp_enqueue_script(\"bootstrap-popper\", 'https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js');\n wp_enqueue_script(\"bootstrap-js\", 'https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js');\n\n}", "function include_css_js_files()\n{\n\twp_register_style('css_file1','https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css');\n\twp_enqueue_style('css_file1');\n\n\n\twp_register_script('js_file1','https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js');\n\twp_enqueue_script('js_file1');\n\twp_register_script('js_file2','https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js');\n\twp_enqueue_script('js_file2');\n\twp_register_script('js_file3','https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js');\n\twp_enqueue_script('js_file3');\n\n}", "public function register_frontend_assets() {\n\t\twp_enqueue_style( 'ghc-functionality', $this->plugin_dir_url( 'dist/css/style.min.css' ), array(), $this->version );\n\n\t\twp_register_script( 'ghc-content-types-filter', $this->plugin_dir_url( 'dist/js/content-types.min.js' ), array( 'jquery' ), $this->version, true );\n\n\t\twp_register_script( 'ghc-maps', $this->plugin_dir_url( 'dist/js/maps.min.js' ), array( 'jquery', 'google-maps-api' ), $this->version, true );\n\t\twp_register_script( 'google-maps-api', 'https://maps.googleapis.com/maps/api/js?key=' . get_option( 'options_api_key' ), array(), null, true ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters -- let Google Maps handle cache invalidation.\n\n\t\twp_enqueue_script( 'ghc-popups', $this->plugin_dir_url( 'dist/js/popups.min.js' ), array( 'jquery', 'popup-maker-site' ), $this->version, true );\n\n\t\twp_register_script( 'ghc-robly-lists', $this->plugin_dir_url( 'dist/js/robly-lists.min.js' ), array( 'jquery' ), $this->version, true );\n\n\t\twp_register_script( 'slick', $this->plugin_dir_url( 'dist/js/slick.min.js' ), array( 'jquery' ), $this->version, true );\n\t\twp_register_style( 'slick', $this->plugin_dir_url( 'dist/css/slick.min.css' ), array(), $this->version, false );\n\t}", "function aitEnqueueScriptsAndStyles(){\r\n\tif(!is_admin()){\r\n\t\t// just shortcuts\r\n\t\t$s = THEME_CSS_URL;\r\n\t\t$j = THEME_JS_URL;\r\n\r\n\t\taitAddStyles(array(\r\n\t\t\t'ait-colorbox' => array('file' => \"$s/libs/colorbox.css\"),\r\n\t\t\t'ait-fancybox' => array('file' => \"$s/libs/fancybox.css\"),\r\n\t\t\t'jquery-ui' \t => array('file' => \"$s/libs/jquery-ui.css\"),\r\n\t\t\t'prettysociable' => array('file' => \"$s/libs/prettySociable.css\"),\r\n\t\t\t'hoverzoom' \t => array('file' => \"$s/libs/hoverZoom.css\"),\r\n\t\t));\r\n\r\n\t\taitAddScripts(array(\r\n\t\t\t'jquery-ui-tabs' \t\t\t=> true,\r\n\t\t\t'jquery-ui-accordion' \t\t\t=> true,\r\n\t\t\t'jquery-infieldlabel' \t\t\t=> array('file' => \"$j/libs/jquery-infieldlabel.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-iconmenu' \t\t\t\t=> array('file' => \"$j/libs/jquery-iconmenu.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-plugins'\t \t\t\t=> array('file' => \"$j/libs/jquery-plugins.js\", 'deps' => array('jquery')),\r\n\t\t\t'modernizr'\t\t\t\t\t\t=> array('file' => \"$j/libs/modernizr-2.6.1-custom.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\r\n\t\t\t'ait-gridgallery' \t\t\t=> array('file' => \"$j/gridgallery.js\", 'deps' => array('jquery', 'jquery-plugins'), 'inFooter' => true),\r\n\t\t\t'ait-testimonials' \t\t\t=> array('file' => \"$j/testimonials.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'ait-script' \t\t\t=> array('file' => \"$j/script.js\", 'deps' => array('jquery', 'jquery-infieldlabel', 'jquery-iconmenu', 'jquery-plugins', 'modernizr'), 'inFooter' => true),\r\n\t\t));\r\n\t}\r\n}", "function enqueue_theme_scripts() {\n if ( 'development' === getenv( 'WP_ENV' ) ) {\n $minimalistmadness_template = 'global';\n } else {\n $minimalistmadness_template = 'global.min';\n }\n\n // Disable jQuery (included in all.js and normally on wp-admin)\n if ( ! is_admin() ) wp_deregister_script( 'jquery' );\n if ( ! is_admin() ) wp_deregister_script( 'jquery-core' );\n if ( ! is_admin() ) wp_deregister_script( 'jquery-migrate' );\n\n // Styles.\n wp_enqueue_style( 'styles', get_theme_file_uri( \"css/{$minimalistmadness_template}.css\" ), array(), filemtime( get_theme_file_path( \"css/{$minimalistmadness_template}.css\" ) ) );\n\n // Scripts.\n wp_enqueue_script( 'jquery-core' );\n wp_enqueue_script( 'scripts', get_theme_file_uri( 'js/all.js' ), array(), filemtime( get_theme_file_path( 'js/all.js' ) ), true );\n\n // Required comment-reply script\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n\n wp_localize_script( 'scripts', 'minimalistmadness_screenReaderText', array(\n 'expand' => esc_html__( 'Open child menu', 'minimalistmadness' ),\n 'collapse' => esc_html__( 'Close child menu', 'minimalistmadness' ),\n ) );\n\n wp_localize_script( 'scripts', 'air', array(\n 'nonce' => wp_create_nonce( 'wp_rest' ),\n 'posts_per_page' => 2,\n 'baseurl' => get_rest_url(),\n ) );\n\n wp_localize_script( 'scripts', 'dmrp', array(\n 'id' => get_the_id(),\n 'nonce' => wp_create_nonce( 'dmrp' . get_the_id() ),\n 'ajax_url' => admin_url( 'admin-ajax.php' ),\n 'cookie_timeout' => apply_filters( 'dmrp_cookie_timeout', 3600000 ),\n ) );\n\n // Remove dude-most-read-posts script (included in scripts.js for optimization)\n wp_dequeue_script( 'dmrp' );\n\n}", "function theme_register_scripts() {\n\n wp_enqueue_script( 'woo-base-js', esc_url( trailingslashit( get_template_directory_uri() ) . 'js/woo-base.min.js' ), array( 'jquery' ), '1.0', true );\n wp_enqueue_script( 'imgLiquid-js', esc_url( trailingslashit( get_template_directory_uri() ) . 'js/imgLiquid.min.js' ), array( 'jquery' ));\n wp_enqueue_script( 'jquery-matchHeight-js', esc_url( trailingslashit( get_template_directory_uri() ) . 'js/jquery.matchHeight.js' ), array( 'jquery' ));\n wp_enqueue_script( 'rater-js', esc_url( trailingslashit( get_template_directory_uri() ) . 'js/rater.js' ), array( 'jquery' ));\n wp_enqueue_script( 'slick-slider-js', esc_url( trailingslashit( get_template_directory_uri() ) . '/node_modules/slick-carousel/slick/slick.js'), array( 'jquery' ));\n wp_enqueue_script( 'nice-select-js', esc_url( trailingslashit( get_template_directory_uri() ) . 'js/jquery.nice-select.js' ), array( 'jquery' ));\n\n // Stylesheets\n wp_enqueue_style( 'normalize-css', get_stylesheet_directory_uri() . '/node_modules/normalize.css/normalize.css');\n wp_enqueue_style( 'woo-base-css', get_stylesheet_directory_uri() . '/dist/css/style.css');\n wp_enqueue_style( 'slick-1-css', get_stylesheet_directory_uri() . '/node_modules/slick-carousel/slick/slick.css');\n wp_enqueue_style( 'slick-2-css', get_stylesheet_directory_uri() . '/node_modules/slick-carousel/slick/slick-theme.css');\n\n}", "private function __register_scripts() {\n\t\t// Load all the registered scripts\n\t\t$assets_loader = new SwpmvcAssetsLoader();\n\t\t$assets = $assets_loader->fn_load_scripts();\n\n\t\t//Extract CSS Assets and put them into Registered CSS Container\n\t\t$this->registered_css = $assets[ 'css' ];\n\n\t\t//Extract JS Assets and put them into Registered JS Container\n\t\t$this->registered_js = $assets[ 'js' ];\n\n\t\t//Some cleanup\n\t\tunset($assets_loader);\n\t\tunset($assets);\n\n\t\t//Load all the common CSS and JS which will be required for all the pages.\n\t\t$this->fn_load_scripts();\n\t}", "public function register_scripts() {\n add_action( 'admin_footer', array( $this, 'add_footer_styles' ) );\n wp_enqueue_script( 'jquery-ui-core' );\n wp_enqueue_script( 'jquery-ui-autocomplete' );\n wp_enqueue_script( 'jquery-ui-tabs' );\n wp_enqueue_script( 'fo-settings-script', plugins_url( 'assets/js/settings.js', __FILE__ ) , array( 'jquery' ) );\n\n $data = array(\n 'usable_fonts' => $this->usable_fonts,\n 'available_fonts' => $this->available_fonts,\n 'options_values' => $this->elements_options,\n 'labels' => array(\n 'default_label' => __('Not Stated', 'bk-fonts'),\n 'light' => __('Light', 'bk-fonts'),\n 'regular' => __('Normal', 'bk-fonts'),\n 'semibold' => __('Semi-Bold', 'bk-fonts'),\n 'bold' => __('Bold', 'bk-fonts'),\n 'extrabold' => __('Extra-Bold', 'bk-fonts'),\n 'black' => __('Black', 'bk-fonts'),\n 'italic' => __('Italic', 'bk-fonts'),\n ),\n );\n\n wp_localize_script( 'fo-settings-script', 'data', $data );\n\n wp_enqueue_style( 'fo-settings-css', plugins_url( 'assets/css/settings.css', __FILE__ ) );\n wp_enqueue_style( 'fontawesome', plugins_url( 'assets/css/font-awesome.min.css', __FILE__ ) );\n }", "function _asset_js(array $files = [], string $pack = '') {\n\t\treturn Asset::setThemePack($pack)->getJs($files);\n\t}", "function theme_scripts() {\n\twp_enqueue_style( 'twentyfifteen-style', get_stylesheet_uri() );\n\twp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/index.js', array( 'jquery' ), '20150330', true );\n\n}", "function dfd_themes_scripts() {\n\t\tglobal $dfd_native;\n\t\t/*\n\t\t * Css styles\n\t\t */\n\t\twp_register_style('dfd_site_style', get_template_directory_uri() . '/assets/css/app.css', false, null);\n\t\t\n\t\twp_register_style('dfd_mobile_responsive', get_template_directory_uri() . '/assets/css/mobile-responsive.css', false, null);\n\t\t\n\t\twp_enqueue_style('dfd_site_style');\n\t\t\n\t\t/**\n\t\t * Check if WooCommerce is active\n\t\t * */\n\t\tif (class_exists('WooCommerce')) {\n\t\t\t$woocommerce_css_file = get_template_directory_uri() . '/assets/css/woocommerce.css';\n\t\t\t\n\t\t\twp_register_style('dfd_wocommerce_style', $woocommerce_css_file, false, null);\n\t\t\twp_enqueue_style('dfd_wocommerce_style');\n\t\t}\n\t\t\n\t\t/**\n\t\t * mobile responsive\n\t\t */\n\t\tif (!isset($dfd_native['mobile_responsive']) || $dfd_native['mobile_responsive'] != '0') {\n\t\t\twp_enqueue_style('dfd_mobile_responsive');\n\t\t}\n\t\t\n\t\tif(class_exists('ReduxFramework') && isset(ReduxFramework::$_upload_url) && isset(ReduxFramework::$_upload_dir) && file_exists(ReduxFramework::$_upload_dir . 'options.css') && isset($dfd_native['enqueue_styles_file']) && $dfd_native['enqueue_styles_file'] == 'on') {\n\t\t\twp_enqueue_style('dfd_theme_options', ReduxFramework::$_upload_url . 'options.css', false, null);\n\t\t}\n\t\t\n\t\tif(!class_exists('Dfd_Theme_extensions')) {\n\t\t\t$font_url = add_query_arg( 'family', urlencode( 'Open Sans:300,300italic,400,400italic,600,600italic,700italic,700&subset=latin,latin-ext' ), \"//fonts.googleapis.com/css\" );\n\t\t\twp_enqueue_style('dfd_defalt_fonts', $font_url, false, null);\n\t\t\twp_enqueue_style('dfd_default_icons', get_template_directory_uri() . '/assets/fonts/dfd_icon_set.css', false, null);\n\t\t}\n\t\t\n\t\twp_enqueue_style( 'main-style', get_stylesheet_uri(), false, null );\n\t\t\n\t\tif(function_exists('dfd_custom_page_style')){\n\t\t\tdfd_custom_page_style();\n\t\t}\n\t\t\n\t\t/* RTL support */\n\t\tif(is_rtl()) {\n\t\t\twp_enqueue_style('dfd_rtl', get_template_directory_uri() . '/assets/css/rtl.css', false, null);\n\t\t}\n\t\t\n\t\t/*\n\t\t * JS register\n\t\t */\n\t\t\n\t\t$google_api_key = 'AIzaSyCEc0PM7rpun59m20yBBtRsl62I6eEsKl4';\n\t\tif(isset($dfd_native['custom_google_api_key']) && !empty($dfd_native['custom_google_api_key'])) {\n\t\t\t$google_api_key = $dfd_native['custom_google_api_key'];\n\t\t}\n\t\t\n\t\twp_register_script('gmaps', '//maps.googleapis.com/maps/api/js?key='.$google_api_key, array('jquery'), null, false, true);\n\t\t\n\t\twp_register_script('gmap3', get_template_directory_uri() . '/assets/js/gmap3.min.js', array('jquery'), null, true, true);\n\t\twp_register_script('dfd_gmap', get_template_directory_uri() . '/assets/js/dfd_gmap.js', array('jquery'), null, true, true);\n\t\t\n\t\twp_register_script('dfd_woocommerce_scripts', get_template_directory_uri() . '/assets/js/woocommerce.js', array('jquery'), null, true);\n\n\t\t// Video Player\n\t\twp_register_script('dfd_zencdn_video_js', get_template_directory_uri() . '/assets/js/video-js.js', array('jquery'), null);\n\t\t\n\t\t// Facebook Widget\n\t\twp_register_script('dfd_facebook_widget_script', get_template_directory_uri().'/assets/js/widget-facebook.js', array('jquery'), null, true);\n\n\t\t// keyframe\n\t\t\n\t\t// ajax pagination\n\t\twp_register_script('ajax-pagination', get_template_directory_uri().'/assets/js/ajax-pagination.js', array('jquery'), null, true);\n\t\twp_register_script('dfd-lazy-load', get_template_directory_uri().'/assets/js/ajax-lazy-load.js', array('jquery'), null, true);\n\t\t\n\t\t//slick slider\n\t\t\n\t\twp_register_script('dfd-particleground', get_template_directory_uri().'/assets/js/jquery.particleground.min.js', array('jquery'), null, true);\n\t\twp_register_script('dfd-particleground-old', get_template_directory_uri().'/assets/js/jquery.particleground.old.min.js', array('jquery'), null, true);\n\t\t\n\t\twp_register_script('dfd-canvas-bg-first', get_template_directory_uri().'/assets/js/dfd_canvas_bg_style_1.js', array('jquery'), null, true);\n\t\t\n\t\twp_register_script('dfd-canvas-bg-third', get_template_directory_uri().'/assets/js/dfd_canvas_bg_style_3.js', array('jquery'), null, true);\n\t\t\n\t\twp_register_script('dfd-jparallax', get_template_directory_uri().'/assets/js/jquery.parallax.js', array('jquery'), null, false);\n\t\t\n//\t\twp_register_script('dfd-sly', get_template_directory_uri().'/assets/js/sly.min.js', array('jquery'), null, false);\n\t\t\n//\t\twp_register_script('dfd-jpcqarallax', get_template_directory_uri().'/assets/js/jquery.parallax.js', array('jquery'), null, false);\n\t\t\n\t\t/*\n\t\t * JS enquene\n\t\t */\n\t\tif(!isset($dfd_native['dev_mode']) || $dfd_native['dev_mode'] != 'on' || !defined('DFD_DEBUG_MODE') || !DFD_DEBUG_MODE) {\n\t\t\tif (strcmp(DfdMetaBoxSettings::compared('site_preloader_enabled', 'off'),'1')===0) {\n\t\t\t\twp_register_script('dfd_queryloader2', get_template_directory_uri() . '/assets/js/jquery.queryloader2.min.js', array('jquery'), '2', false, true);\n\t\t\t\twp_enqueue_script('dfd_queryloader2');\n\t\t\t}\n\t\t\twp_register_script('dfd_js_plugins', get_template_directory_uri() . '/assets/js/plugins.min.js', array('jquery'), null, true);\n\t\t\twp_localize_script('dfd_js_plugins', 'ajax_var', array(\n\t\t\t\t'url' => admin_url('admin-ajax.php'),\n\t\t\t\t'nonce' => wp_create_nonce('ajax-nonce')\n\t\t\t));\n\t\t\twp_enqueue_script('dfd_js_plugins');\n\t\t\t\n\t\t\twp_register_script('dfd.onepagescroll', get_template_directory_uri().'/assets/js/jquery.fullPage.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-multislider', get_template_directory_uri().'/assets/js/jquery.multiscroll.min.js', array('jquery'), null, true);\n\t\t\t\n\t\t} else {\n\t\t\twp_register_script('dfd_foundation', get_template_directory_uri() . '/assets/js/foundation.js', array('jquery'), null, true);\n\t\t\twp_register_script('keyframes', get_template_directory_uri().'/assets/js/jquery.keyframes.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd_effects', get_template_directory_uri() . '/assets/js/animation.js', array('jquery'), null, true);\n\t\t\twp_register_script('mmenu', get_template_directory_uri().'/assets/js/jquery.sidr.js', array('jquery'), null, true);\n\t\t\twp_register_script('slick', get_template_directory_uri().'/assets/js/jquery.slick.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd_scrollTo', get_template_directory_uri().'/assets/js/jquery.scrollTo.js', array('jquery'), null, true);\n\t\t\twp_register_script('jquery.easing', get_template_directory_uri().'/assets/js/jquery.easing.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-folio-hover', get_template_directory_uri().'/assets/js/jquery.hoverdir.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-chaffle', get_template_directory_uri().'/assets/js/jquery.chaffle.js', array('jquery'), null, true);\n\t\t\twp_register_script('prettyphoto', get_template_directory_uri() . '/assets/js/jquery.prettyPhoto.js', array('jquery'), null, true, true);\n\t\t\twp_register_script('custom-share', get_template_directory_uri() . '/assets/js/share.js', array('jquery'), null, true);\n\t\t\twp_register_script('vertical_js', get_template_directory_uri() . '/assets/js/vertical.js', array('jquery'), null, true);\n\t\t\twp_register_script('dropkick', get_template_directory_uri() . '/assets/js/jquery.dropkick-min.js', array('jquery'), null, true);\n\t\t\twp_register_script('isotope', get_template_directory_uri() . '/assets/js/jquery.isotope.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('justified', get_template_directory_uri() . '/assets/js/justifiedGallery.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-3d-hover', get_template_directory_uri() . '/assets/js/jquery.hover3d.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-sticky-kit', get_template_directory_uri() . '/assets/js/sticky-kit.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-tween-max', get_template_directory_uri().'/assets/js/TweenMax.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-mousestop', get_template_directory_uri().'/assets/js/mousestop.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-images-loaded', get_template_directory_uri().'/assets/js/imagesloaded.pkgd.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-fancy-text', get_template_directory_uri().'/assets/js/fancy-text.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-svg-loaded', get_template_directory_uri().'/assets/js/svgLoader.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-hotspot', get_template_directory_uri().'/assets/js/jquery.hotspot.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-multislider', get_template_directory_uri().'/assets/js/jquery.multiscroll.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd_main', get_template_directory_uri() . '/assets/js/app.js', array('jquery'), null, true);\n\t\t\twp_localize_script('dfd_main', 'ajax_var', array(\n\t\t\t\t'url' => admin_url('admin-ajax.php'),\n\t\t\t\t'nonce' => wp_create_nonce('ajax-nonce')\n\t\t\t));\n\t\t\t\n\t\t\twp_register_script('smooth-scroll', get_template_directory_uri() . '/assets/js/jquery.smoothscroll.js', array('jquery'), null, true);\n\t\t\t\n\t\t\twp_register_script('dfd_slide_parallax', get_template_directory_uri() . '/assets/js/jquery.slide_parallax.js', array('jquery'), null, true);\n\t\t\t\n\t\t\twp_register_script('dfd-typed', get_template_directory_uri().'/assets/js/typed.js', array('jquery'), null, false);\n\t\t\t\n\t\t\twp_register_script('dfd-swiper', get_template_directory_uri().'/assets/js/swiper.js', array('jquery'), null, false);\n\t\t\t\n\t\t\twp_register_script('dfd.onepagescroll', get_template_directory_uri().'/assets/js/jquery.fullPage.js', array('jquery'), null, true);\n\t\t\t\n\t\t\twp_register_script('js-audio', get_template_directory_uri().'/assets/js/audioplayer.js', array('jquery'), null, true);\n\t\t\t\n\t\t\twp_register_script('mega_menu', get_template_directory_uri().'/assets/js/jquery.mega-menu.js', array('jquery'), null, true);\n\t\t\t\n\t\t\twp_register_script('mega_menu_run', get_template_directory_uri().'/assets/js/jquery.mega-menu.run.js', array('jquery'), null, true);\n\t\t\t\n\t\t\twp_register_script('countdown-js',get_template_directory_uri().'/assets/js/jquery.countdown.min.js',array('jquery'));\n\t\t\t\n\t\t\twp_register_script( 'odometer-js', get_template_directory_uri() . '/assets/js/odometer.min.js', array( 'jquery' ), false, true );\n\t\t\t\n\t\t\twp_register_script( 'piechart-js', get_template_directory_uri() . '/assets/js/circle-progress.js', array( 'jquery' ), false, true );\n\t\t\t\n\t\t\tif (strcmp(DfdMetaBoxSettings::compared('site_preloader_enabled', 'off'),'1')===0) {\n\t\t\t\twp_register_script('dfd_queryloader2', get_template_directory_uri() . '/assets/js/jquery.queryloader2.js', array('jquery'), '2', false, true);\n\t\t\t\twp_enqueue_script('dfd_queryloader2');\n\t\t\t}\n\t\t\t\n\t\t\twp_enqueue_script('dfd_foundation');\n\t\t\twp_enqueue_script('keyframes');\n\t\t\twp_enqueue_script('dfd-chaffle');\n\t\t\twp_enqueue_script('js-audio');\n\n\t\t\twp_enqueue_script('dfd_effects');\n\t\t\twp_enqueue_script('isotope');\n\t\t\twp_enqueue_script('justified');\n\t\t\twp_enqueue_script('dfd-3d-hover');\n\t\t\twp_enqueue_script('dfd-sticky-kit');\n\t\t\twp_enqueue_script('dfd-tween-max');\n\t\t\twp_enqueue_script('dfd-mousestop');\n\t\t\twp_enqueue_script('dfd-images-loaded');\n\t\t\twp_enqueue_script('dfd-svg-loaded');\n\n\t\t\twp_enqueue_script('slick');\n\t\t\twp_enqueue_script('dfd_scrollTo');\n\t\t\twp_enqueue_script('jquery.easing');\n\t\t\twp_enqueue_script('custom-share');\n\t\t\twp_enqueue_script('vertical_js');\n\t\t\twp_enqueue_script('dropkick');\n\t\t\twp_enqueue_script('prettyphoto');\n\n\t\t\twp_enqueue_script('dfd-swiper');\n\n\t\t\twp_enqueue_script('mmenu');\n\n\t\t\twp_enqueue_script('dfd-folio-hover');\n\n\t\t\twp_enqueue_script('dfd-panr', get_template_directory_uri().'/assets/js/jquery.panr.js', array('jquery'), null, true);\n\t\t\t\n\t\t\twp_enqueue_script('mega_menu');\n\t\t\t\n\t\t\twp_enqueue_script('mega_menu_run');\n\t\t\n\t\t\twp_enqueue_script('smooth-scroll');\n\t\t\t\n\t\t\twp_enqueue_script('countdown-js');\n\t\t\twp_enqueue_script( 'odometer-js');\n\t\t\twp_enqueue_script( 'piechart-js' );\n\t\t\t\n\t\t\twp_enqueue_script('dfd_main');\n\t\t}\n\t\t\n\t\tif (class_exists('WooCommerce')) {\n\t\t\twp_enqueue_script('dfd_woocommerce_scripts');\n\t\t}\n\t\t\n\t\t# Load script/styles for page templates\n\t\tif (is_page()) {\n\t\t\t$curr_page_template = basename(get_page_template());\n\n\t\t\tif($curr_page_template == 'tmp-one-page-scroll.php') {\n\t\t\t\twp_enqueue_script('dfd.onepagescroll');\n\t\t\t}\n\n\t\t\tif($curr_page_template == 'tmp-side-by-side.php') {\n\t\t\t\twp_enqueue_script('dfd-multislider');\n\t\t\t}\n\t\t}\n\t\tif(function_exists('dfd_print_head_js')){\n\t\t\tdfd_print_head_js();\n\t\t}\n\t}", "function jitm_enqueue_files() {\n\t\t$min = ''; // ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\t\twp_register_style(\n\t\t\t'jetpack-jitm-css',\n\t\t\tplugins_url( \"assets/jetpack-admin-jitm{$min}.css\", __DIR__ ),\n\t\t\tfalse,\n\t\t\tself::PACKAGE_VERSION .\n\t\t\t'-201243242'\n\t\t);\n\t\twp_style_add_data( 'jetpack-jitm-css', 'rtl', 'replace' );\n\t\twp_style_add_data( 'jetpack-jitm-css', 'suffix', $min );\n\t\twp_enqueue_style( 'jetpack-jitm-css' );\n\n\t\twp_enqueue_script(\n\t\t\t'jetpack-jitm-new',\n\t\t\tAssets::get_file_url_for_environment( '_inc/build/jetpack-jitm.min.js', '_inc/jetpack-jitm.js' ),\n\t\t\tarray( 'jquery' ),\n\t\t\tself::PACKAGE_VERSION, // TODO: Keep in sync with version specified in composer.json\n\t\t\ttrue\n\t\t);\n\t\twp_localize_script(\n\t\t\t'jetpack-jitm-new',\n\t\t\t'jitm_config',\n\t\t\tarray(\n\t\t\t\t'api_root' => esc_url_raw( rest_url() ),\n\t\t\t\t'activate_module_text' => esc_html__( 'Activate', 'jetpack' ),\n\t\t\t\t'activated_module_text' => esc_html__( 'Activated', 'jetpack' ),\n\t\t\t\t'activating_module_text' => esc_html__( 'Activating', 'jetpack' ),\n\t\t\t)\n\t\t);\n\t}", "function uni_files(){\n // wp_enqueue_script('uni-main-js', get_theme_file_uri('/js/scripts-bundled.js'), NULL, '1.0', true);\n wp_enqueue_script('uni-main-js', get_theme_file_uri('/js/scripts-bundled.js'), NULL, microtime(), true);\n // wp_enqueue_style('uni_main_styles', get_stylesheet_uri());\n wp_enqueue_style('uni_main_styles', get_stylesheet_uri(), NULL, microtime());\n wp_enqueue_style('custom_google_font','//fonts.googleapis.com/css?family=Roboto+Condensed:300,300i,400,400i,700,700i|Roboto:100,300,400,400i,700,700i');\n wp_enqueue_style('font-awesome','//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');\n }", "protected function parseThemes()\n {\n foreach ($this->themesDirs as $dir) {\n $absDir = $this->fileLocator->locate($dir);\n $finder = Finder::create()->files()->in($absDir)->name('*.css');\n foreach ($finder as $file) {\n $this->addTheme($file->getBasename('.css'), $file->getPathname());\n }\n }\n #save to cache if env prod\n if ($this->env == 'prod') {\n $this->cacheDriver->save(static::CACHE_THEMES_NAME, $this->getThemes());\n }\n }", "function load_theme_js() {\n\n // Register and load js\n\twp_register_script('modernizr-js', get_template_directory_uri() . '/assets/js/modernizr-2.6.2.min.js', false, null, false);\n\twp_enqueue_script('modernizr-js');\n\n\twp_register_script('bootstrap-js', get_template_directory_uri() . '/assets/js/bootstrap.js', false, null, true);\n\twp_enqueue_script('bootstrap-js');\n\n\twp_register_script('barba-js', get_template_directory_uri() . '/assets/js/barba.js', false, null, true);\n\twp_enqueue_script('barba-js');\n\n\twp_register_script('slick-js', get_template_directory_uri() . '/assets/js/slick.min.js', false, null, true);\n\twp_enqueue_script('slick-js');\n\n\twp_register_script('lightbox-js', get_template_directory_uri() . '/assets/js/lightbox.js', false, null, true);\n\twp_enqueue_script('lightbox-js');\n\n\twp_register_script('script-js', get_template_directory_uri() . '/assets/js/script.js', false, null, true);\n\twp_enqueue_script('script-js');\n\n\tif (is_home() || is_front_page()){\n\t\twp_register_script('script-homepage-js', get_template_directory_uri() . '/assets/js/script-homepage.js', false, null, true);\n\t\twp_enqueue_script('script-homepage-js');\n\t} else {\n\t\t// enqueue common scripts here\n\t}\n\n}", "protected function registerCoreScripts()\n\t{\n\t\t$cs=Yii::app()->getClientScript();\n\t\tif(is_string($this->cssFile))\n\t\t\t$cs->registerCssFile($this->themeUrl.'/'.$this->theme.'/'.$this->cssFile);\n\t\telseif(is_array($this->cssFile))\n\t\t{\n\t\t\tforeach($this->cssFile as $cssFile)\n\t\t\t\t$cs->registerCssFile($this->themeUrl.'/'.$this->theme.'/'.$cssFile);\n\t\t}\n\n\t\t$cs->registerCoreScript('jquery');\n\t\tif(is_string($this->scriptFile))\n\t\t\t$this->registerScriptFile($this->scriptFile);\n\t\telseif(is_array($this->scriptFile))\n\t\t{\n\t\t\tforeach($this->scriptFile as $scriptFile)\n\t\t\t\t$this->registerScriptFile($scriptFile);\n\t\t}\n\t}", "function athemes_scripts() {\n\n\t//Load the fonts\n\t$headings_font = esc_html(get_theme_mod('headings_fonts'));\n\t$body_font = esc_html(get_theme_mod('body_fonts'));\n\tif( $headings_font ) {\n\t\twp_enqueue_style( 'athemes-headings-fonts', '//fonts.googleapis.com/css?family='. $headings_font );\t\n\t} else {\n\t\twp_enqueue_style( 'athemes-headings-fonts', '//fonts.googleapis.com/css?family=Yanone+Kaffeesatz:200,300,400,700');\n\t}\t\n\tif( $body_font ) {\n\t\twp_enqueue_style( 'athemes-body-fonts', '//fonts.googleapis.com/css?family='. $body_font );\t\n\t}\n\n\twp_enqueue_style( 'athemes-glyphs', get_template_directory_uri() . '/css/athemes-glyphs.css' );\n\n\twp_enqueue_style( 'athemes-bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css' );\n\twp_enqueue_style( 'athemes-style', get_stylesheet_uri() );\n\n\twp_enqueue_script( 'athemes-bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ) );\n\twp_enqueue_script( 'athemes-superfish', get_template_directory_uri() . '/js/superfish.js', array( 'jquery' ) );\n\twp_enqueue_script( 'athemes-supersubs', get_template_directory_uri() . '/js/supersubs.js', array( 'jquery' ) );\n\twp_enqueue_script( 'athemes-settings', get_template_directory_uri() . '/js/settings.js', array( 'jquery' ) );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "function ruven_register_scripts() {\n\n\t$theme_version = wp_get_theme()->get( 'Version' );\n\t//$env = ( wp_get_environment_type() === 'local') ? array('src','/custom', '') : array('assets','','min.');\n\t$env = array('src','/custom', '');\n\n\t//Include WP jQuery\n wp_enqueue_script('jquery');\n\n\twp_enqueue_script( 'ruven-isotope', get_template_directory_uri() . '/assets/js/vendor/isotope.min.js', array('jquery'), $theme_version,\n\tfalse );\n\twp_script_add_data( 'ruven-isotope', 'async', true );\n\n\twp_enqueue_script( 'ruven-swiper', get_template_directory_uri() . '/assets/js/vendor/swiper.min.js',\n\tarray('jquery'), $theme_version,\n\tfalse );\n\twp_script_add_data( 'ruven-swiper', 'async', true );\n\n\twp_enqueue_script( 'ruven', get_template_directory_uri() . '/'. $env[0] .'/js'. $env[1] .'/main.'. $env[2] .'js', array('jquery',\n\t'ruven-isotope', 'ruven-swiper'), $theme_version, false );\n\twp_script_add_data( 'ruven', 'async', true );\n\n\n\n}", "function hugomitoire_scripts() {\n wp_enqueue_style( 'appStyles', get_template_directory_uri() . '/dist/css/style.min.css' );\n wp_enqueue_script( 'Js', get_template_directory_uri() . '/dist/js/all.js', array(), '1.0.0', true );\n wp_enqueue_script( 'Swiper', get_template_directory_uri() . '/dis/js/all.js', array(), '4.4.2', true);\n}", "function tcsn_theme_scripts_styles() {\n\n\t\twp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/modernizr.min.js', array('jquery'), '2.6.2', false );\n\t\twp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '3.0.2', true );\n\t\twp_enqueue_script( 'theme-scripts', get_template_directory_uri() . '/js/theme-scripts.js', array('jquery'), '1.0.0', true );\n\t\twp_enqueue_script( 'theme-custom', get_template_directory_uri() . '/js/custom.js', array('jquery'), '1.0.0', true );\n\t\twp_enqueue_style( 'bootstrap-style', get_template_directory_uri() . '/css/bootstrap.css', null, '3.0.2', 'all' );\n\t\twp_enqueue_style( 'font', get_template_directory_uri() . '/css/iconfont.css' );\n\t\twp_enqueue_style( 'style-main', get_stylesheet_directory_uri() . '/style.css', null, '1.0.0' );\n\t\twp_enqueue_style( 'prettyPhoto-style', get_template_directory_uri() . '/css/prettyPhoto.css', null, '3.1.4', 'all ');\n\t\twp_enqueue_style( 'owlcarousel-style', get_template_directory_uri() . '/css/owl.carousel.css' );\n\t\twp_enqueue_style( 'elastislide-style', get_template_directory_uri() . '/css/elastislide.css', null, '1.0.0', 'all' );\n\t\twp_enqueue_style( 'isotope-style', get_template_directory_uri() . '/css/isotope.css', null, '1.5.25' );\n\t\twp_enqueue_style( 'bootstrap-override', get_template_directory_uri() . '/css/bootstrap-override.css', null, '1.0.0' );\n\t\twp_enqueue_style( 'rev-custom-style', get_template_directory_uri() . '/css/rev-custom.css', null, '1.0.0', 'all' );\n\t\twp_enqueue_style( 'responsive', get_template_directory_uri() . '/css/responsive.css', null, '1.0.0', 'all' );\n\t\t\n\t\t\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n\t\t\n\t\t// To disable responsiveness\n\t\twp_register_style( 'bootstrap-nonrs-style', get_template_directory_uri() . '/css/non-responsive.css', null, '1.0.0', 'all' );\n\t\tglobal $smof_data;\n\t\tif( $smof_data['tcsn_layout_responsive'] == 0 ) {\n\t\t\twp_enqueue_style( 'bootstrap-nonrs-style' );\n\t\t}\n}", "public function enqueue_scripts() {\n\n\t\tif ($this->js) {\n\t\t\tforeach ($this->js as $js) {\n\t\t\t\t$fileTitle = basename($js['link']);\n\t\t\t\t$fileTitle = str_replace('.js', '', $fileTitle);\n\t\t\t\t$fileTitle = preg_replace(\n\t\t\t\t\t'/[^0-9a-zA-Z]/',\n\t\t\t\t\t\"-\",\n\t\t\t\t\tstr_replace('@', '', $js['package']) . '-' . $fileTitle\n\t\t\t\t);\n\t\t\t\twp_enqueue_script($fileTitle, $js['link'], array(), $js['version']);\n\t\t\t}\n\t\t}\n\t}", "public function scanJsonFiles()\r\n {\r\n $themes = [];\r\n foreach (glob($this->themes_path('*'), GLOB_ONLYDIR) as $themeFolder) {\r\n $themeFolder = realpath($themeFolder);\r\n if (file_exists($jsonFilename = $themeFolder . '/' . 'theme.json')) {\r\n\r\n $folders = explode(DIRECTORY_SEPARATOR, $themeFolder);\r\n $themeName = end($folders);\r\n\r\n // default theme settings\r\n $defaults = [\r\n 'name' => $themeName,\r\n 'asset-path' => $themeName,\r\n 'extends' => null,\r\n ];\r\n\r\n // If theme.json is not an empty file parse json values\r\n $json = file_get_contents($jsonFilename);\r\n if ($json !== \"\") {\r\n $data = json_decode($json, true);\r\n if ($data === null) {\r\n throw new \\Exception(\"Invalid theme.json file at [$themeFolder]\");\r\n }\r\n } else {\r\n $data = [];\r\n }\r\n\r\n // We already know views-path since we have scaned folders.\r\n // we will overide this setting if exists\r\n $data['views-path'] = $themeName;\r\n\r\n $themes[] = array_merge($defaults, $data);\r\n }\r\n }\r\n return $themes;\r\n }", "function starter_scripts() {\n\twp_enqueue_style( 'google-fonts', 'https://fonts.googleapis.com/css?family=Cairo:400,600,700&display=swap', array(), null, 'screen' );\n\twp_enqueue_style( 'starter-style', get_theme_file_uri( 'dist/bundle.css' ), array(), filemtime( get_theme_file_path( 'dist/bundle.css' ) ), 'screen' );\n\twp_enqueue_script( 'starter-script', get_theme_file_uri( 'dist/bundle.js' ), array(), filemtime( get_theme_file_path( 'dist/bundle.js' ) ), true );\n\n\twp_localize_script(\n\t\t'starter-script',\n\t\t'WPglobals',\n\t\tarray(\n\t\t\t'siteurl' => get_template_directory_uri(),\n\t\t\t'homeurl' => get_home_url(),\n\t\t)\n\t);\n}", "function dw_schemas_add_assets() {\n\twp_enqueue_script('schemas-admin-js', '/wp-content/plugins/dw_schemas/assets/scripts.js');\n\twp_enqueue_style('schemas-admin-css', '/wp-content/plugins/dw_schemas/assets/styles.css');\n}", "protected function register_assets() {\n\n\t\t// Register block script for backend/editor.\n\t\t\\wp_register_script(\n\t\t\t'tcc-layout-engine',\n\t\t\tplugins_url( '/dist/blocks.build.js', __FILE__ ),\n\t\t\tarray( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ),\n\t\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'dist/blocks.build.js' ),\n\t\t\ttrue\n\t\t);\n\n\t\t// Register block editor styles for backend/editor.\n\t\t\\wp_register_style(\n\t\t\t'tcc-layout-engine',\n\t\t\tplugins_url( 'dist/blocks.editor.build.css', __FILE__ ),\n\t\t\tarray( 'wp-edit-blocks' ),\n\t\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'dist/blocks.editor.build.css' )\n\t\t);\n\n\t}", "function theme_name_scripts() { \nwp_enqueue_style( 'dsoble_theme_css', get_template_directory_uri() . '/css/jquery-ui-1.10.4.custom.min.css',array(),'1.1','all');\nwp_enqueue_style( 'dsoble_theme_css_one', get_template_directory_uri() . '/dist/css/bootstrap.css',array(),'1.1','all');\nwp_enqueue_style( 'dsoble_theme_css_two', get_template_directory_uri() . '/dist/css/bootstrap-theme.css',array(),'1.1','all');\nwp_enqueue_style( 'dsoble_theme_css_three', get_template_directory_uri() . '/css/style.css',array(),'1.1','all');\nwp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/css/font-awesome.css',array(),'1.1','all');\nwp_enqueue_script( 'query-10', get_template_directory_uri() . '/js/jquery-1.10.2.js', array('jquery'), '1.0.0', true );\t\nwp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/dist/js/bootstrap.min.js', array('jquery'), '1.0.0', true );\t\nwp_enqueue_script( 'query-ui', get_template_directory_uri() . '/js/jquery-ui-1.10.4.custom.min.js', array('jquery'), '1.0.0', true );\t\nwp_enqueue_script( 'bootstrap-paginator', get_template_directory_uri() . '/js/bootstrap-paginator.min.js', array('jquery'), '1.0.0', true );\t\nwp_enqueue_script( 'jquery.innerfade', get_template_directory_uri() . '/js/jquery.newsTicker.js', array('jquery'), '1.0.0', true );\nwp_enqueue_script( 'jquery-show', get_template_directory_uri() . '/js/custom.js', array('jquery'), '1.0.0', true );\t\t\t\n}", "function karmic_scripts() {\n // Get the theme data.\n $the_theme = wp_get_theme();\n $theme_version = $the_theme->get( 'Version' );\n \n $css_version = $theme_version . '.' . filemtime( KARMIC_THEMEROOT . '/assets/css/main.min.css' );\n wp_enqueue_style( 'karmic-styles', KARMIC_THEME_DIR . '/assets/css/main.min.css', array(), $css_version );\n \n wp_deregister_script( 'jquery' );\n \n $js_version = $theme_version . '.' . filemtime( KARMIC_THEMEROOT . '/assets/js/main.min.js' );\n wp_enqueue_script( 'jquery', 'https://code.jquery.com/jquery-3.4.1.min.js', '', '3.4.1', true );\n wp_enqueue_script( 'karmic-scripts', KARMIC_THEME_DIR . '/assets/js/main.min.js', array(), $js_version, true );\n wp_enqueue_script( 'vendor-scripts', KARMIC_THEME_DIR . '/assets/js/vendors.min.js', array(), $js_version, true );\n wp_enqueue_script( 'fontawesome', KARMIC_THEME_DIR . '/assets/js/all.min.js', array(), '5.11.2', true );\n \n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n }", "function estilos_scripts() { \n wp_enqueue_style('googlefonts', '//fonts.googleapis.com/css?family=PT+Sans:400,400i,700,700i|Yanone+Kaffeesatz:400,700', array(), '' , 'screen', false);\n wp_enqueue_style('fontawesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', array(), '' , 'screen', false);\n wp_enqueue_style('layout', get_template_directory_uri() . '/css/layout.css', array(), '', 'all', null);\n\n wp_enqueue_script( 'canvas', get_template_directory_uri() . '/js/canvas.js', array('jquery'), '', true);\n wp_enqueue_script( 'bx', get_template_directory_uri() . '/js/bx.js', array('jquery'), '', true);\n wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/scripts.js', array('bx'), '', true);\n}", "function bfc_add_scripts() {\n\twp_register_script('principal', get_template_directory_uri() . '/js/vendor/jquery.js', array(), 'null', true);\n\twp_enqueue_script('principal');\n\twp_register_script('foundation', get_template_directory_uri() . '/js/vendor/foundation.js', array(), 'null', true);\n\twp_enqueue_script('foundation');\n\twp_register_script('modernizr', get_template_directory_uri() . '/js/modernizr.js', array(), 'null', true);\n\twp_enqueue_script('modernizr');\n\twp_register_script('app', get_template_directory_uri() . '/js/app.js', array(), 'null', true);\n\twp_enqueue_script('app');\n\twp_register_script('slick', get_template_directory_uri() . '/js/slick.js', array(), 'null', true);\n\twp_enqueue_script('slick');\n}", "function add_jsi18n_theme( $js_files , $is_external = FALSE)\n {\n // make sure that $this->includes has array value\n if ( ! is_array( $this->includes ) )\n $this->includes = array();\n\n // if $css_files is string, then convert into array\n $js_files = is_array( $js_files ) ? $js_files : explode( \",\", $js_files );\n\n foreach( $js_files as $js )\n {\n // remove white space if any\n $js = trim( $js );\n\n // go to next when passing empty space\n if ( empty( $js ) ) continue;\n\n // using sha1( $js ) as a key to prevent duplicate js to be included\n if($is_external) \n {\n $this->includes[ 'js_files_i18n' ][ sha1( $js ) ] = $this->jsi18n->translate( $js );\n }\n else\n {\n $this->includes[ 'js_files_i18n' ][ sha1( $js ) ] = $this->jsi18n->translate( \"/themes/{$this->settings->theme}/js/{$js}\" );\n }\n }\n\n return $this;\n }", "protected function registerScripts() {\n\t\tforeach (static::$scripts as $handle => $scriptPath) {\n\t\t\tstatic::registerScript($handle, $scriptPath);\n\t\t}\n\t}", "function jehaann_scripts(){\n\n\n wp_register_script('scripts',RutaTema.'/js/scripts.js','','1.0','True');\n wp_enqueue_script('scripts');\n\n\n}", "function university_files() {\n // loads css files\n wp_enqueue_style('custom-google-fonts', 'https://fonts.googleapis.com/css?family=Roboto+Condensed:300,300i,400,400i,700,700i|Roboto:100,300,400,400i,700,700i' );\n wp_enqueue_style('font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );\n wp_enqueue_style('university_main_styles',\n get_stylesheet_uri(),\n null,\n microtime() // disables cache during development\n );\n\n // loads js files\n wp_enqueue_script(\n 'main_university_js',\n get_theme_file_uri('js/scripts-bundled.js'),\n null,\n microtime(), // disables cache during development\n true\n );\n}", "public function scanThemes()\r\n {\r\n\r\n $parentThemes = [];\r\n $themesConfig = config('themes.themes', []);\r\n\r\n foreach ($this->loadThemesJson() as $data) {\r\n // Are theme settings overriden in config/themes.php?\r\n if (array_key_exists($data['name'], $themesConfig)) {\r\n $data = array_merge($data, $themesConfig[$data['name']]);\r\n }\r\n\r\n // Create theme\r\n $theme = new Theme(\r\n $data['name'],\r\n $data['asset-path'],\r\n $data['views-path']\r\n );\r\n\r\n // Has a parent theme? Store parent name to resolve later.\r\n if ($data['extends']) {\r\n $parentThemes[$theme->name] = $data['extends'];\r\n }\r\n\r\n // Load the rest of the values as theme Settings\r\n $theme->loadSettings($data);\r\n }\r\n\r\n // Add themes from config/themes.php\r\n foreach ($themesConfig as $themeName => $themeConfig) {\r\n\r\n // Is it an element with no values?\r\n if (is_string($themeConfig)) {\r\n $themeName = $themeConfig;\r\n $themeConfig = [];\r\n }\r\n\r\n // Create new or Update existing?\r\n if (!$this->exists($themeName)) {\r\n $theme = new Theme($themeName);\r\n } else {\r\n $theme = $this->find($themeName);\r\n }\r\n\r\n // Load Values from config/themes.php\r\n if (isset($themeConfig['asset-path'])) {\r\n $theme->assetPath = $themeConfig['asset-path'];\r\n }\r\n\r\n if (isset($themeConfig['views-path'])) {\r\n $theme->viewsPath = $themeConfig['views-path'];\r\n }\r\n\r\n if (isset($themeConfig['extends'])) {\r\n $parentThemes[$themeName] = $themeConfig['extends'];\r\n }\r\n\r\n $theme->loadSettings(array_merge($theme->settings, $themeConfig));\r\n }\r\n\r\n // All themes are loaded. Now we can assign the parents to the child-themes\r\n foreach ($parentThemes as $childName => $parentName) {\r\n $child = $this->find($childName);\r\n\r\n if ($this->exists($parentName)) {\r\n $parent = $this->find($parentName);\r\n } else {\r\n $parent = new Theme($parentName);\r\n }\r\n\r\n $child->setParent($parent);\r\n }\r\n }", "public function scripts()\n {\n $scripts = array(\n array(\n 'handler' => 'yatri-google-fonts',\n 'style' => esc_url('//fonts.googleapis.com/css?family=Poppins:300,400,400i,500,600,700|Rubik:400,500,700,900'),\n 'absolute' => true\n ),\n\n array(\n 'handler' => 'yatri-style',\n 'style' => get_stylesheet_uri(),\n 'absolute' => true,\n ), array(\n 'handler' => 'yatri-main',\n 'style' => get_theme_file_uri('/assets/css/yatri.css'),\n 'absolute' => true,\n 'version' => YATRI_THEME_VERSION\n ),\n array(\n 'handler' => 'yatri-script',\n 'script' => get_theme_file_uri('/assets/js/yatri.js'),\n 'absolute' => true,\n 'prefix' => '',\n 'dependency' => array('jquery')\n )\n );\n\n\n Mantrabrain_Theme_Helper_Typo::render_fonts();\n\n $this->yatri_enqueue(apply_filters('yatri_scripts_styles', $scripts));\n\n $locale = apply_filters('yatri_localize_var', array(\n\n 'is_admin_bar' => is_admin_bar_showing() ? true : false,\n\n ));\n\n wp_localize_script('yatri-script', 'yatri_obj', $locale);\n\n if (is_singular() && comments_open()) {\n wp_enqueue_script('comment-reply');\n }\n }", "public function register_plugin_scripts() {\n\t\t//in case I need jQuery\n\t\t//wp_enqueue_script( 'jQuery', '//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js', array(), '1.10.2', true );\n\t\t\n\t\t//jQuery UI for Calendar \n\t\twp_enqueue_script( 'jQueryui', '//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', array(), '1.10.3', true );\n\t\n\t\t// Main Team Manager JS\n\t\t// Old\n\t\t//wp_enqueue_script( 'HockeyMan', plugins_url( '/js/HockeyMan.js' , __FILE__ ), array(), '1.0.0', true );\n\t\t// New Hotness\n\t\twp_enqueue_script( 'bootstrap-combobox', plugins_url( '/js/bootstrap-combobox.js' , __FILE__ ), array(), '1.0.0', true );\n\t\twp_enqueue_script( 'TeamManager', plugins_url( '/js/TeamManager.js' , __FILE__ ), array(), '1.0.0', true );\n\t\twp_localize_script( 'TeamManager', 'myAjax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ))); \n\t}", "function mightyResources() {\n $css_file = get_stylesheet_directory() . '/dist/assets/css/style.min.css';\n wp_enqueue_style('theme', get_stylesheet_directory_uri() . '/dist/assets/css/style.min.css', '', date('m.d.Y.H.i.s', filemtime($css_file)));\n\t\twp_dequeue_style('wp-block-library');\n\n wp_deregister_script('jquery');\n wp_register_script('jquery', ('//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js'), '', '2.2.4', false);\n wp_enqueue_script('jquery');\n\n // wp_enqueue_script('fontawesome-kit', '//kit.fontawesome.com/72e34829c8.js', '', '1.0', false);\n\t\twp_enqueue_script('google-maps', '//maps.googleapis.com/maps/api/js?key=AIzaSyClqC80DXd3luWXcJZ-a0odx1q6ddTDVr0', '', '1.0', false);\n\n\t\twp_enqueue_script('aos', '//unpkg.com/[email protected]/dist/aos.js', '', '2.3.1', true);\n wp_enqueue_script('theme', get_stylesheet_directory_uri() . '/dist/assets/js/scripts.min.js', ['jquery'], '1.0.6', true);\n\n\t\twp_localize_script('theme', 'globalVar', array(\n\t\t 'themePath' => get_template_directory_uri(),\n\t\t));\n }" ]
[ "0.7101266", "0.705379", "0.69827694", "0.6899698", "0.6832402", "0.68117875", "0.6733613", "0.67205095", "0.6696908", "0.6695708", "0.66952455", "0.666374", "0.6651311", "0.66508657", "0.6647404", "0.6642767", "0.662506", "0.66236204", "0.66072047", "0.6562304", "0.6562304", "0.654224", "0.6531109", "0.65172255", "0.6498875", "0.6493901", "0.64916646", "0.6488588", "0.64620745", "0.64318305", "0.6427121", "0.63869", "0.6371412", "0.63636875", "0.63616407", "0.63592255", "0.6352099", "0.6351341", "0.6332968", "0.63228494", "0.63210076", "0.6319237", "0.62919295", "0.6263795", "0.6249693", "0.62365997", "0.62221134", "0.6221886", "0.62202376", "0.6176675", "0.6172365", "0.6167649", "0.61597836", "0.61563283", "0.6154036", "0.61354244", "0.6135093", "0.61348283", "0.61347395", "0.6118793", "0.6103321", "0.610121", "0.6096928", "0.6093315", "0.6086523", "0.6084344", "0.6053903", "0.6052297", "0.6052141", "0.604673", "0.6043939", "0.6040268", "0.60324067", "0.6027364", "0.60238045", "0.6017054", "0.6012726", "0.60047007", "0.6003928", "0.60034794", "0.5996675", "0.5996425", "0.59915316", "0.5984825", "0.5976307", "0.5974519", "0.5973471", "0.5963896", "0.59601474", "0.59598136", "0.59589857", "0.59543735", "0.59535265", "0.595159", "0.5949078", "0.59477955", "0.5943474", "0.5941884", "0.5941786", "0.5938451" ]
0.734126
0
Registers the JS files of the given maps.
public static function registerMap($map) { $maps = (array) $map; array_walk($maps, function (&$name) { $name = 'js/' . $name . '.js'; }); static::$_mapJsFiles = array_unique(array_merge(static::$_mapJsFiles, $maps)); if (static::$_mapJsFiles) { MapAsset::register(Yii::$app->getView())->js = static::$_mapJsFiles; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addJavascriptFiles($js /* array */);", "protected function registerScripts() {\n\t\tforeach (static::$scripts as $handle => $scriptPath) {\n\t\t\tstatic::registerScript($handle, $scriptPath);\n\t\t}\n\t}", "public function register_assets() {\n\n $scripts = $this->get_scripts();\n $styles = $this->get_styles();\n\n foreach ( $scripts as $handle => $script ) {\n $deps = isset( $script['deps'] ) ? $script['deps'] : false;\n\n wp_register_script( $handle, $script['src'], $deps, $script['version'], true );\n }\n\n foreach ( $styles as $handle => $style ) {\n $deps = isset( $style['deps'] ) ? $style['deps'] : false;\n\n wp_register_style( $handle, $style['src'], $deps, $style['version'] );\n }\n\n wp_localize_script( 'cbxcf-scripts', 'cbxcfObj', [\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'error' => __( 'Something went wrong', 'cbxcustomform' ),\n ] );\n\n }", "private function getRequireJsMap(array $map)\n {\n $jsonMap = [];\n foreach ($map as $fileId => $fileInfo) {\n if (!in_array(pathinfo($fileId, PATHINFO_EXTENSION), ['js', 'html'])) {\n continue;\n }\n\n $fileId = '/' . $fileId; // add leading slash to match exclude patterns\n $filePath = $this->minification->addMinifiedSign(str_replace(Repository::FILE_ID_SEPARATOR, '/', $fileId));\n $filePath = substr($filePath, 1); // and remove\n $jsonMap[$filePath] = '../../../../'\n . $fileInfo['area'] . '/' . $fileInfo['theme'] . '/' . $fileInfo['locale'] . '/';\n }\n $jsonMap = json_encode($jsonMap);\n return \"require.config({\\\"config\\\": {\\\"baseUrlInterceptor\\\":{$jsonMap}}});\";\n }", "public function registerScripts() {\n $this->scripts['bootstrap.min'] = 'assets/js/bootstrap.min.js';\n $this->scripts['jquery.nouislider.min'] = 'assets/js/mkdf-ui/jquery.nouislider.min.js';\n $this->scripts['mkdf-ui-admin'] = 'assets/js/mkdf-ui/mkdf-ui.js';\n $this->scripts['mkdf-bootstrap-select'] = 'assets/js/mkdf-ui/mkdf-bootstrap-select.min.js';\n\n foreach ($this->scripts as $scriptHandle => $scriptPath) {\n sienna_mikado_register_skin_script($scriptHandle, $scriptPath);\n }\n }", "static function register_footer_scripts( $scripts ) {\n\n\t\tif ( ! empty ($scripts['google-maps-api']) ) {\n\n\t\t\t$google_maps_key = pixelgrade_option( 'google_maps_api_key' );\n\n\t\t\tif ( ! empty( $google_maps_key ) ) {\n\t\t\t\t$scripts['google-maps-api']['path'] .= '&key=' . $google_maps_key;\n\t\t\t}\n\t\t}\n\n\t\tself::register_scripts( $scripts, true );\n\t}", "public function includeGMapsJS() {\n\t\tif(self::$jsIncluded) return;\n // Google map JS\n\t\t\n\t\t//adding in a callback for jochen:\n //$this->content .= '<script src=\"http://maps.google.com/maps?hl='. $this->lang.'&file=api&amp;v=2&amp;key='.$this->googleMapKey.'\" type=\"text/javascript\">';\n\t\t$this->content .= '<script src=\"http://maps.google.com/maps?hl='. $this->lang.'&file=api&amp;v=2&amp;callback=load&amp;key='.$this->googleMapKey.'\" type=\"text/javascript\">';\n $this->content .= '</script>'.\"\\n\";\n \n // Clusterer JS\n if ($this->useClusterer==true) {\n\t\t\t// Source: http://gmaps-utility-library.googlecode.com/svn/trunk/markerclusterer/1.0/src/\n\t\t\t$this->content .= '<script src=\"'.$this->clustererLibraryPath.'\" type=\"text/javascript\"></script>'.\"\\n\";\n }\n \n self::$jsIncluded = true;\n\t\n\t}", "public function register_assets() {\n\n\t\tforeach ( $this->assets as $asset ) {\n\t\t\t$js_path = $this->plugin->dir() . '/js/dist/' . $asset . '.asset.php';\n\t\t\t$css_path = $this->plugin->dir() . '/css/' . $asset . '.css';\n\t\t\tif ( file_exists( $js_path ) ) {\n\t\t\t\t$assets_dep = require_once $js_path;\n\t\t\t\twp_register_script(\n\t\t\t\t\t'formation-' . $asset . '-js',\n\t\t\t\t\t$this->plugin->asset_url( 'js/dist/' . $asset . '.js' ),\n\t\t\t\t\t$assets_dep['dependencies'],\n\t\t\t\t\t$assets_dep['version'],\n\t\t\t\t\ttrue\n\t\t\t\t);\n\n\t\t\t\tif ( file_exists( $css_path ) ) {\n\t\t\t\t\twp_register_style(\n\t\t\t\t\t\t'formation-' . $asset . '-css',\n\t\t\t\t\t\t$this->plugin->asset_url( 'css/' . $asset . '.css' ),\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\t$assets_dep['version']\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function addJSFiles()\n\t{\n\t\t\t\t$this->getContainer()->AddJSFile(\"include/zoombox/zoombox.js\");\n\t\t$this->getJSControl();\t\n\t}", "protected function injectFromAssetManager() {\n $asset = dirname(__FILE__) .'/js/';\n $passet = Yii::app()->assetManager->publish($asset);\n $cs = Yii::app()->clientScript;\n foreach ($this->jsFiles as $jf) {\n $cs->registerScriptFile($passet . '/' . $jf, CClientScript::POS_HEAD);\n }\n }", "public function register_assets() {\n $js_folder = SD_PLUGIN_PATH . '/src/assets/js/';\n $css_folder = SD_PLUGIN_PATH . '/src/assets/css/';\n $scripts = scandir($js_folder);\n //var_dump($scripts);\n $styles = scandir($css_folder);\n foreach ($styles as $style) {\n if( !is_dir($style) ) {\n wp_enqueue_style( URL_SCOPE . mt_rand(0, 9000), '/wp-content/plugins/'.sanitize_key(PLUGIN_NAME).'/src/assets/css/' . $style);\n }\n }\n foreach ($scripts as $script) {\n if( !is_dir($script) ) {\n wp_enqueue_script( URL_SCOPE . mt_rand(0, 9000), '/wp-content/plugins/'.sanitize_key(PLUGIN_NAME).'/src/assets/js/' . $script);\n }\n }\n }", "protected function loadJavaScripts() {}", "private function __register_scripts() {\n\t\t// Load all the registered scripts\n\t\t$assets_loader = new SwpmvcAssetsLoader();\n\t\t$assets = $assets_loader->fn_load_scripts();\n\n\t\t//Extract CSS Assets and put them into Registered CSS Container\n\t\t$this->registered_css = $assets[ 'css' ];\n\n\t\t//Extract JS Assets and put them into Registered JS Container\n\t\t$this->registered_js = $assets[ 'js' ];\n\n\t\t//Some cleanup\n\t\tunset($assets_loader);\n\t\tunset($assets);\n\n\t\t//Load all the common CSS and JS which will be required for all the pages.\n\t\t$this->fn_load_scripts();\n\t}", "public function registerAssets()\n {\n $jsTimeVal = Date('l d/m/Y H:i', $this->timestamp);\n $view = $this->getView();\n WeatherBundleAsset::register($view);\n $uuid = uniqid();\n $js = <<<JS\n var wb = new WeatherBundle({$this->lat}, {$this->lon}, '{$this->weatherUrl}', 'metric', {$this->droneModels}, '{$jsTimeVal}');\n wb.getWeather(\"{$this->imageDir}\", \"{$this->timeVal}\", {$this->callback});\n JS;\n $view->registerJs($js,View::POS_READY);\n }", "protected function addJS() {\n foreach ($this->js_files as $js_file) {\n $this->header.=\"<script type='text/javascript' src='\" . __ASSETS_PATH . \"/\" . $js_file . \"'></script> \\n\";\n }\n }", "private function registerPlugins()\n\t{\n\t\t$assetDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;\n\t\t$assetUrl = Yii::app()->assetManager->publish($assetDir);\n\n\n\t\t$cs = Yii::app()->getClientScript();\n\n\t\tforeach ($this->plugins as $p)\n\t\t{\n\n\t\t\tif ($p['flag'])\n\t\t\t{\n\t\t\t\tforeach ($p['js'] as $js)\n\t\t\t\t\t$cs->registerScriptFile($assetUrl . \"/\" . $js, CClientScript::POS_END);\n\t\t\t}\n\t\t}\n\t}", "public function registerScripts() {\r\n\t\t$baseUrl = Yii::app()->assetManager->publish(dirname(__FILE__).\"/assets/\".__CLASS__);\r\n\t\tYii::app()->clientScript->registerScriptFile($baseUrl.\"/AFileBrowser.js\");\r\n\t\t\r\n\t}", "public function addJSInclude($jsfiles)\n\t{\n\t\tif(!is_array($jsfiles))\n\t\t\t$jsfiles = array($jsfiles);\n\n\t\tforeach($jsfiles as $file)\n\t\t{\n\t\t\tif(!in_array($file, $this->jsIncludes))\n\t\t\t\tarray_unshift($this->jsIncludes, '<script type=\"text/javascript\" src=\"' . $file . '\"></script>');\n \t\t}\n\t}", "public function registerScripts($form)\n\t{\n\t\t\n\t}", "private function addAssets($config)\n {\n if ($config->get('built_in_css', false)) {\n $this->addAssetData('plugin://googlemaps/assets/css/googlemaps.css', 'css', null, null);\n }\n\n // need Google's library from the following URL\n $googleMapLibUri = 'https://maps.googleapis.com/maps/api/js?v=3';\n $language = $this->grav['language']->getActive();\n if ($language) {\n $googleMapLibUri .= '&language=' . $language;\n }\n $apiKey = $config->get('apiKey', false);\n if (!is_bool($apiKey)) {\n $googleMapLibUri .= '&key=' . $apiKey; // appends a Google's provided key if any\n }\n $this->addAssetData($googleMapLibUri, 'js', 3, 'bottom');\n // Use normal or minified glue depending on debugging being active\n $googleMapGlueUri = ($this->config->get('system.debugger.enabled', false))\n ? 'plugin://googlemaps/assets/js/googlemaps.js'\n : $googleMapGlueUri = 'plugin://googlemaps/assets/js/googlemaps.min.js';\n $this->addAssetData($googleMapGlueUri, 'js', 2, 'bottom');\n }", "public function add_js($js) {\n $current = $this->dwoo_data->js_files;\n $current[] = $js;\n $this->dwoo_data->js_files = $current;\n }", "private function _insertJSlibcode($usedLibs) {\n\t\tforeach ($usedLibs as $libKey=>$libValue) {\n\t\t\t$GLOBALS['TSFE']->additionalHeaderData[$this->extKey.$libKey] = '<script type=\"text/javascript\">google.load(\"'.$libKey.'\", \"'.$libValue.'\");</script>';\n\t\t}\n\t}", "function ale_map_load_scripts() {\n wp_register_script( 'google-maps-api', 'http://maps.google.com/maps/api/js?sensor=false' );\n }", "protected function injectFromGoogleApi() {\n $cs = Yii::app()->clientScript;\n foreach ($this->jsFiles as $jf) {\n $cs->registerScriptFile($this->googleApiUrl . $jf, CClientScript::POS_HEAD);\n }\n }", "public function enqueueScripts(){}", "public function register_assets() {\n\t\t\twp_enqueue_script(\n\t\t\t\t'wp_searchermain',\n\t\t\t\tget_stylesheet_directory_uri() . '/resources/scripts/denuncias/SearcherMain.js',\n\t\t\t\tarray(),\n\t\t\t\t'1.0.0',\n\t\t\t\ttrue\n\t\t\t);\n\t\t\twp_localize_script(\n\t\t\t\t'wp_searchermain',\n\t\t\t\t'wp_searchermain',\n\t\t\t\tarray(\n\t\t\t\t\t'ajax' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t\t'nonce' => wp_create_nonce( 'auth_nonce' )\n\t\t\t\t)\n\t\t\t);\n }", "public function register_scripts()\n {\n }", "public function registerScripts() {\n $this->registerScriptsCommon();\n \n if(is_admin()) {\n $this->registerScriptsAdmin();\n } else {\n $this->registerScriptsFrontend();\n }\n }", "public function register_assets() {\n\t}", "function aitAdminEnqueueScriptsAndStyles()\n{\n\t$mapLanguage = get_locale();\n\taitAddScripts(array(\n\t\t'ait-googlemaps-api' => array(\n\t\t\t\t\t\t\t\t\t //'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyC62AaIu5cD1nwSCmyO4-33o3DjkFCH4KE&sensor=false&amp;language='.$mapLanguage,\n\t\t\t\t\t\t\t\t\t 'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyBL0QWiORKMYd585E4qvcsHcAR1R7wmdiY&sensor=false&amp;language='.$mapLanguage,\n\t\t\t\t\t\t\t\t\t 'deps' => array('jquery')\n\t\t\t\t\t\t\t\t\t ),\n\t\t'ait-jquery-gmap3' => array('file' => THEME_JS_URL . '/libs/gmap3.min.js', 'deps' => array('jquery', 'ait-googlemaps-api')),\n\t));\n}", "function mpfy_enqueue_gmaps() {\n\twp_dequeue_script('google_map_api');\n\twp_dequeue_script('google-maps');\n\twp_dequeue_script('cspm_google_maps_api');\n\twp_dequeue_script('gmaps');\n\twp_deregister_script('gmaps');\n\n\t// load our own version of gmaps as we require the geometry library\n\t$api_key = carbon_get_theme_option('mpfy_google_api_key');\n\t$api_key_param = $api_key ? '&key=' . $api_key : '';\n\twp_enqueue_script('gmaps', '//maps.googleapis.com/maps/api/js?libraries=geometry' . $api_key_param, array(), false, true);\n}", "protected function registerScript()\n\t{\n\t $baseUrl = Yii::app()->getHomeUrl();\n\t $js_arr = array('triggmine-scripts.js');\n\t foreach($js_arr as $filename)\n\t {\n\t Yii::app()->getClientScript()->registerScriptFile('/js/vendor/'.$filename, CClientScript::POS_END);\n\t }\n\t}", "public function enqueue()\n {\n wp_enqueue_script('google-maps', '//maps.googleapis.com/maps/api/js?key=' . $this->apiKey, array(), '3', true);\n wp_enqueue_script('google-map-init');\n }", "function register_location_js_css() {\n\twp_register_script( google_maps_register, google_maps_key );\n\n\twp_register_script(\n\t\tscript_register,\n\t\tplugins_url( 'js/google-map.js', __FILE__ ),\n\t\tarray( 'jquery' ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . '/js/google-map.js' ),\n\t\ttrue\n\t);\n\twp_register_style(\n\t\tstyle_register_plugin,\n\t\tplugins_url( 'css/style.css', __FILE__ ),\n\t\tarray(),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . '/css/style.css' )\n\t);\n}", "protected function register_files()\r\n\t\t{\r\n\t\t\t// register paths\r\n\t\t\t$this->paths[ self::ROOT_INDEX ] = $this->local;\r\n\t\t\t$this->register_ini( $this->paths[ self::ROOT_INDEX ] . self::REGISTRY_FILE );\r\n\t\t\t\t\r\n\t\t\tforeach( $this->path_follow as $index => $p )\r\n\t\t\t{\r\n\t\t\t\t// put together local path names\r\n\t\t\t\t$this->paths[ $index ] = $this->local . $p . DIRECTORY_SEPARATOR;\r\n\t\t\t\t\r\n\t\t\t\t// look for registries to assign id's to\r\n\t\t\t\t$this->register_ini( $this->paths[ $index ] . self::REGISTRY_FILE, $p, $p, $index );\r\n\t\t\t}\r\n\t\t}", "private function autoload_scripts() {\n\t\t\n\t}", "private function register_files() {\n\t\tif( $this->type === self::STYLE ) {\n\t\t\twp_register_style( $this->handle, $this->src, $this->settings['deps'], $this->settings['vers'], $this->settings['media'] );\n\t\t} else if ( $this->type === self::SCRIPT ) {\n\t\t\twp_register_script( $this->handle, $this->src, $this->settings['deps'], $this->settings['vers'], $this->settings['in_footer'] );\n\t\t}\n\t}", "static function appToJSList($js_file, $location = \"component\")\n {\n self::$arr_js_list[$js_file]=$location;\n }", "public function add_js($scripts=null, $combine=null){\n $combine = is_null($combine) ? $this->combine : $combine;\n\n if (is_string($scripts) && !empty($scripts)){\n $this->external_scripts[] = array($combine, $scripts);\n }else if (is_array($scripts) && count($scripts) != 0){\n foreach ($scripts as $script){\n $this->external_scripts[] = array($combine, $script);\n }\n }\n\t}", "function register_my_jscripts() {\n\n \t wp_register_script( 'googleapi', 'https://maps.googleapis.com/maps/api/js?libraries=geometry&key=AIzaSyA21ZwPY6xqz4gvkdil2wGGBRWSGEayq78', array( 'jquery' ), NULL, false );wp_enqueue_script( 'googleapi' );\n\n\n\t wp_register_script( 'niceScroll', THEME_DIR .'/js/jquery.nicescroll.min.js', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'niceScroll' );\n \t wp_register_script( 'fancyboxm', THEME_DIR .'/js/fancybox/jquery.mousewheel-3.0.6.pack.js', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'fancyboxm' );\n \t wp_register_script( 'fancybox', THEME_DIR .'/js/fancybox/jquery.fancybox.pack.js?v=2.1.5', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'fancybox' );\n \t wp_register_script( 'moment', THEME_DIR .'/js/moment.min.js', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'moment' );\n \t wp_register_script( 'calendar', THEME_DIR .'/js/fullcalendar.min.js', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'calendar' );\n \t if(is_rtl()){\n \t \t\twp_register_script( 'hecalendar', THEME_DIR .'/js/he.js', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'hecalendar' );\n \t }\n\t wp_register_script( 'swiper', THEME_DIR .'/js/swiper.min.js', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'swiper' );\n\n\t\twp_register_script(\"addthis\",\"//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-57e21979bdebcfe3\",array('jquery'),NULL,true);\n\t\twp_enqueue_script( 'addthis' );\n\n\t wp_register_script( 'functions', THEME_DIR .'/js/functions.js', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'functions' );\n\t wp_register_script( 'accessibility', THEME_DIR .'/js/accessibility.js', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'accessibility' );\n\n\t if( is_archive('event') )\n\t \t\twp_localize_script( 'functions', 'allPostsObject', get_all_events() );\n\n\t}", "public function attachJSFiles(&$args)\n {\n if ($this->isAppropriatePage($args['request'])) {\n $base_path = str_replace(DIRECTORY_SEPARATOR, '/', $this->getFilesPath());\n $args['js'][] = $base_path . '/vendor/es5-shim/es5-shim.js';\n $args['js'][] = $base_path . '/vendor/emojify.js/emojify.js';\n $args['js'][] = $base_path . '/js/plugin.js';\n }\n }", "function addScriptResources()\t{\n\t\tif (t3lib_extMgm::isLoaded('t3jquery')) {\n\t\t\trequire_once(t3lib_extMgm::extPath('t3jquery').'class.tx_t3jquery.php');\n\t\t}\n\n\t\t// checks if t3jquery is loaded\n\t\tif (T3JQUERY === TRUE) {\n\t\t\ttx_t3jquery::addJqJS();\n\t\t} else {\n\t\t\tif($this->conf['jQueryRes']) $this->jsFile[] = $this->conf['jQueryRes'];\n\t\t\tif($this->conf['tooltipJSRes']) $this->jsFile[] = $this->conf['tooltipJSRes'];\n\t\t}\n\n\t\t// Fix moveJsFromHeaderToFooter (add all scripts to the footer)\n\t\tif ($GLOBALS['TSFE']->config['config']['moveJsFromHeaderToFooter']) {\n\t\t\t$allJsInFooter = TRUE;\n\t\t} else {\n\t\t\t$allJsInFooter = FALSE;\n\t\t}\n\n\t\t$pagerender = $GLOBALS['TSFE']->getPageRenderer();\n\t\t\n\t\t// add all defined JS files\n\t\tif (count($this->jsFile) > 0) {\n\t\t\tforeach ($this->jsFile as $jsToLoad) {\n\t\t\t\tif (T3JQUERY === TRUE) {\n\t\t\t\t\t$conf = array(\n\t\t\t\t\t\t'jsfile' => $jsToLoad,\n\t\t\t\t\t\t'tofooter' => ($this->conf['jsInFooter'] || $allJsInFooter),\n\t\t\t\t\t\t'jsminify' => $this->conf['jsMinify'],\n\t\t\t\t\t);\n\t\t\t\t\ttx_t3jquery::addJS('', $conf);\n\t\t\t\t} else {\n\t\t\t\t\t$file = $GLOBALS['TSFE']->tmpl->getFileName($jsToLoad);\n\t\t\t\t\tif ($file) {\n\t\t\t\t\t\tif ($allJsInFooter) {\n\t\t\t\t\t\t\t$pagerender->addJsFooterFile($file, 'text/javascript', $this->conf['jsMinify']);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$pagerender->addJsFile($file, 'text/javascript', $this->conf['jsMinify']);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt3lib_div::devLog(\"'{\".$jsToLoad.\"}' does not exists!\", $this->extKey, 2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// add defined CSS file\n\t\tif($this->conf['cssFile']) {\n\t\t\t// Add script only once\n\t\t\t$css = $GLOBALS['TSFE']->tmpl->getFileName($this->conf['cssFile']);\n\t\t\tif ($css) {\n\t\t\t\t$pagerender->addCssFile($css, 'stylesheet', 'all', '', $this->conf['cssMinify']);\n\t\t\t} else {\n\t\t\t\tt3lib_div::devLog(\"'{\".$this->conf['cssFile'].\"}' does not exists!\", $this->extKey, 2);\n\t\t\t}\n\t\t}\n\t}", "public function registerAll() {\n $this->registerScripts();\n $this->localizeScripts();\n $this->registerStyles();\n }", "private function addJS($filename, $set_path = false) {\r\n if(is_array($filename)){\r\n foreach ($filename as $file) {\r\n array_push($this->js_files, 'js/'.$file.'.js');\r\n }\r\n } else if($set_path) {\r\n array_push($this->js_files, $filename);\r\n } else {\r\n array_push($this->js_files, 'js/'.$filename.'.js');\r\n }\r\n }", "public function addJSFiles($filePaths) {\n foreach ($filePaths as &$filePath) {\n $this->addJSFile($filePath);\n }\n }", "protected static function register_scripts( $scripts, $in_footer ) {\n\t\tforeach ( $scripts as $scriptname => $conf ) {\n\t\t\t// the child theme may be allowed to overwrite the configuration in\n\t\t\t// which case we support for null configuration, ie. child theme turned\n\t\t\t// the resource off\n\t\t\tif ( $conf !== null ) {\n\t\t\t\tif ( is_string( $conf ) ) {\n\t\t\t\t\t$path = $conf;\n\t\t\t\t\t$require = array();\n\t\t\t\t\t$cache_bust = '';\n\n\t\t\t\t} else { // array configuration passed\n\t\t\t\t\t$path = $conf['path'];\n\n\t\t\t\t\t// compute requirements\n\t\t\t\t\tif ( isset( $conf['require'] ) ) {\n\t\t\t\t\t\tif ( is_string( $conf['require'] ) ) {\n\t\t\t\t\t\t\t$require = array( $conf['require'] );\n\t\t\t\t\t\t} else { // assume array\n\t\t\t\t\t\t\t$require = $conf['require'];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else { // no dependencies\n\t\t\t\t\t\t$require = array();\n\t\t\t\t\t}\n\n\t\t\t\t\t// compute cache bust\n\t\t\t\t\tif ( isset( $conf['cache_bust'] ) ) {\n\t\t\t\t\t\t$cache_bust = $conf['cache_bust'];\n\t\t\t\t\t} else { // no cache bust\n\t\t\t\t\t\t$cache_bust = '';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\twp_register_script( $scriptname, $path, $require, $cache_bust, $in_footer );\n\t\t\t}\n\t\t}\n\t}", "function google_map_load_scripts(){\n\twp_register_script( 'google-maps-api', 'http://maps.google.com/maps/api/js?sensor=false' );\n}", "public function register_frontend_assets() {\n\t\twp_enqueue_style( 'ghc-functionality', $this->plugin_dir_url( 'dist/css/style.min.css' ), array(), $this->version );\n\n\t\twp_register_script( 'ghc-content-types-filter', $this->plugin_dir_url( 'dist/js/content-types.min.js' ), array( 'jquery' ), $this->version, true );\n\n\t\twp_register_script( 'ghc-maps', $this->plugin_dir_url( 'dist/js/maps.min.js' ), array( 'jquery', 'google-maps-api' ), $this->version, true );\n\t\twp_register_script( 'google-maps-api', 'https://maps.googleapis.com/maps/api/js?key=' . get_option( 'options_api_key' ), array(), null, true ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters -- let Google Maps handle cache invalidation.\n\n\t\twp_enqueue_script( 'ghc-popups', $this->plugin_dir_url( 'dist/js/popups.min.js' ), array( 'jquery', 'popup-maker-site' ), $this->version, true );\n\n\t\twp_register_script( 'ghc-robly-lists', $this->plugin_dir_url( 'dist/js/robly-lists.min.js' ), array( 'jquery' ), $this->version, true );\n\n\t\twp_register_script( 'slick', $this->plugin_dir_url( 'dist/js/slick.min.js' ), array( 'jquery' ), $this->version, true );\n\t\twp_register_style( 'slick', $this->plugin_dir_url( 'dist/css/slick.min.css' ), array(), $this->version, false );\n\t}", "public function register_assets_admin() {\n $js_folder = SD_PLUGIN_PATH . '/src/assets/admin/js/';\n $css_folder = SD_PLUGIN_PATH . '/src/assets/admin/css/';\n $scripts = scandir($js_folder);\n //var_dump($scripts);\n $styles = scandir($css_folder);\n foreach ($styles as $style) {\n if( !is_dir($style) ) {\n wp_enqueue_style( URL_SCOPE . mt_rand(0, 9000), '/wp-content/plugins/'.sanitize_key(PLUGIN_NAME).'/src/assets/admin/css/' . $style);\n }\n }\n foreach ($scripts as $script) {\n if( !is_dir($script) ) {\n wp_enqueue_script( URL_SCOPE . mt_rand(0, 9000), '/wp-content/plugins/'.sanitize_key(PLUGIN_NAME).'/src/assets/admin/js/' . $script);\n }\n }\n }", "public static function register(): void\r\n {\r\n // Run the SPL autoloader\r\n spl_autoload_register([self::class, 'loadClass']);\r\n\r\n // Iterate through the PSR4 namespace array\r\n $namespaces = array_filter(self::$psr4);\r\n if ( ! empty($namespaces) ) {\r\n foreach ( self::$psr4 as $psr4 => $path ) {\r\n self::addNamespace($psr4, $path);\r\n }\r\n }\r\n // Iterate through the PSR4 classmap array\r\n $classmap = array_filter(self::$classmap);\r\n if ( ! empty($classmap) ) {\r\n foreach ( self::$classmap as $class => $file) {\r\n self::requireFiles(strpos($file, '.php')? $file: $file . '.php');\r\n }\r\n }\r\n }", "public function register_login_scripts() {\n\t\t// Define Scripts\n\t\t$scripts = array();\n\t\t// Normalize scripts\n\t\t$scripts = $this->normalize_scripts( $scripts, 'mpress_admin_scripts' );\n\t\t// Register Scripts\n\t\t$this->register_scripts( $scripts );\n\t}", "public static function combine_js($files,$outputdir = 'static/generated/')\n {\n if(\\HMC\\Config::SITE_ENVIRONMENT() == 'development') {\n Assets::js($files);\n return;\n }\n $ofiles = (is_array($files) ? $files : array($files));\n $hashFileName = md5(join($ofiles));\n $dirty = false;\n\n if(file_exists($outputdir.$hashFileName.'.js')) {\n $hfntime = filemtime($outputdir.$hashFileName.'.js');\n foreach($ofiles as $vfile) {\n $file = str_replace(\\HMC\\Config::SITE_URL(),\\HMC\\Config::SITE_PATH(),$vfile);\n if(!$dirty){\n $fmtime = filemtime($file);\n if($fmtime > $hfntime) {\n $dirty = true;\n }\n }\n }\n } else {\n $dirty = true;\n }\n if($dirty) {\n $buffer = \"\";\n foreach ($ofiles as $vfile) {\n $jsFile = str_replace(\\HMC\\Config::SITE_URL(),\\HMC\\Config::SITE_PATH(),$vfile);\n $buffer .= \"\\n\".file_get_contents($jsFile);\n }\n\n ob_start();\n\n // Write everything out\n echo($buffer);\n\n $fc = ob_get_clean();\n\n $minifiedCode = \\JShrink\\Minifier::minify($fc, array('flaggedComments' => false));\n\n file_put_contents(SITEROOT.$outputdir.$hashFileName.'.js',$minifiedCode);\n\n }\n static::resource(str_replace(':||','://',str_replace('//','/',str_replace('://',':||',\\HMC\\Config::SITE_URL().$outputdir.$hashFileName.'.js'))),'js');\n }", "private function registerClientScripts()\n {\n $view = $this->getView();\n\n TranslitAsset::register($view);\n\n $replace = Json::htmlEncode(TranslitHelper::$replace);\n $view->registerJs(\"translit.replace = $replace;\", $view::POS_READY, 'translit');\n }", "public function enqueue_scripts() {\n\n\t\tif ($this->js) {\n\t\t\tforeach ($this->js as $js) {\n\t\t\t\t$fileTitle = basename($js['link']);\n\t\t\t\t$fileTitle = str_replace('.js', '', $fileTitle);\n\t\t\t\t$fileTitle = preg_replace(\n\t\t\t\t\t'/[^0-9a-zA-Z]/',\n\t\t\t\t\t\"-\",\n\t\t\t\t\tstr_replace('@', '', $js['package']) . '-' . $fileTitle\n\t\t\t\t);\n\t\t\t\twp_enqueue_script($fileTitle, $js['link'], array(), $js['version']);\n\t\t\t}\n\t\t}\n\t}", "function load($classmap, $base = null) {\n spl_autoload_register(function($class) use ($classmap, $base) {\n $class = strtolower($class);\n if(!isset($classmap[$class])) return false;\n if($base) {\n include($base . DS . $classmap[$class]); \n } else {\n include($classmap[$class]);\n }\n });\n}", "public function addJavascript($file) {\n $this->scripts[$file] = $file;\n }", "public function registerScripts()\n {\n if(!wp_script_is('media-upload')):\n wp_enqueue_script('media-upload');\n endif;\n if(!wp_script_is('thickbox')):\n wp_enqueue_script('thickbox');\n endif;\n }", "public function registerAssets () {\n }", "function register_scripts() {\n\t\t\t$id = get_the_ID();\n\t\t\t// Only continue if current page is home\n\t\t\tif ( !is_home() ) return;\n\n\t\t\twp_enqueue_script( 'jquery' );\n\t\t\twp_enqueue_script( 'kevinw-sf-react', plugins_url( 'assets/react.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\twp_enqueue_script( 'kevinw-sf-react-app', plugins_url( 'assets/scripts.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\n\t\t\t$this->register_scripts_css();\n\t\t}", "public function getJsFiles(&$jsFiles)\n {\n $jsFiles[] = 'plugins/Overlay/javascripts/rowaction.js';\n $jsFiles[] = 'plugins/Overlay/javascripts/Overlay_Helper.js';\n }", "public static function inclureJS() {\r\n \r\n foreach (Page::getInstance()->script as $link) {\r\n \r\n ?>\r\n <script type=\"text/javascript\" src=\"<?php echo $link; ?>\" ></script>\r\n <?php\r\n \r\n }\r\n }", "public function addScripts($scripts) {\n\n\t\t$scripts = (array) $scripts;\n\t\tif(!empty($scripts)) {\n\t\t\tforeach ($scripts as $script) {\n\t\t\t\t$filename = WEB_ROOT.'app/webroot/js/'.$script.'.js';\n\t\t\t\tif($this->isUrlFileExist($filename)) {\n\t\t\t\t\t$this->scripts[] = $filename;\n\t\t\t\t} else throw new Exception('Le script \"'.$script.'.js\" est introuvable', 1);\n\t\t\t}\n\t\t}\n\t}", "public function registerScripts()\n {\n // font awesome. choose css fonts instead of svg, see more at https://fontawesome.com/how-to-use/on-the-web/other-topics/performance\n // to name font awesome handle as `plugin-name-prefix-font-awesome5` is to prevent conflict with other plugins that maybe use older version but same handle that cause some newer icons in this plugin disappears.\n wp_enqueue_style('rundizable-wp-features-font-awesome5', plugin_dir_url(RUNDIZABLEWPFEATURES_FILE).'assets/fontawesome/css/all.min.css', [], '5.5.0');\n wp_enqueue_style('rundizable-wp-features-rd-settings-tabs-css', plugin_dir_url(RUNDIZABLEWPFEATURES_FILE).'assets/css/rd-settings-tabs.css', [], RUNDIZABLEWPFEATURES_VERSION);\n wp_enqueue_script('rundizable-wp-features-rd-settings-tabs-js', plugin_dir_url(RUNDIZABLEWPFEATURES_FILE).'assets/js/rd-settings-tabs.js', ['jquery'], RUNDIZABLEWPFEATURES_VERSION, true);\n }", "function hm_core_add_scripts( $scripts ) {\n \t$scripts->add( 'hm-core', str_replace( ABSPATH, '/', HM_CORE_PATH ) . 'scripts/hm-core.functions.js', array( 'jquery' ), '1' );\n }", "public function add()\n\t{\n\t\tforeach (func_get_args() as $script) {\n\t\t\t$asset = $this->input_path . $script;\n\t\t\tarray_push($this->files, $asset);\n\t\t}\n\t}", "private function _registerScripts()\n\t{ \n $owner = $this->owner;\n if($this->app_id===null || $this->res_id === null)return;\n $url = $owner->createUrl('/api/public/uploadcount',array('YII_CSRF_TOKEN'=>Yii::app()->request->getCsrfToken(),'t'=>$this->res_id,'app'=>$this->app_id));\n $js = Yii::app()->getClientScript();\n $assetsUrl = $this->_getAssetsUrl();\n $js->registerScriptFile($assetsUrl.'/countupload.js'); \n $js->registerScript(\"#{$this->id}\",\"\n var url = '{$url}';\n var set = new viewCount(url);\n set.push();\n \");\n\t}", "function TS_VCSC_FilesRegistrations() {\r\n\t\t\trequire_once($this->registrations_dir . 'ts_vcsc_registrations_files.php');\r\n\t\t}", "public static function _wp_enqueue_scripts()\n\t{\n\t\tstatic::$has_run = true;\n\n\t\tforeach (static::$scripts as $name => $params) {\n\t\t\tif (!isset($params['url'])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!isset($params['deps'])) $params['deps'] = array();\n\t\t\tif (!isset($params['footer'])) $params['footer'] = true;\n\n\t\t\twp_register_script($name, $params['url'], $params['deps'], $params['version'], $params['footer']);\n\n\t\t\tif (isset($params['localize'])) {\n\t\t\t\twp_localize_script($name, $params['localize']['name'], $params['localize']['data']);\n\t\t\t}\n\n\t\t\tif (isset($params['register_only']) && $params['register_only']) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\twp_enqueue_script($name);\n\t\t}\n\t}", "protected function registerScripts($id, $embeddedScript)\n\t{\n\t\t$basePath = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;\n\t\t$baseUrl = Yii::app()->getAssetManager()->publish($basePath, false, 1, YII_DEBUG);\n\t\t$scriptFile = 'http://maps.googleapis.com/maps/api/js?key=AIzaSyDY0kkJiTPVd2U7aTOAwhc9ySH6oHxOIYM&sensor=false';\n\n\t\t$cs = Yii::app()->clientScript;\n\t\t$cs->registerCoreScript('jquery');\n\t\t$cs->registerScriptFile($scriptFile);\n\n\t\techo '<script>' . $embeddedScript . '</script>';\n\t}", "public function add_js($js)\n {\n $this->_js[$js] = $js;\n }", "static function include_scripts(){\n\t\t//self::include_css();\n\t\tself::include_js();\n\t}", "protected function addAssets(): void\n {\n $this->enqueue('assets/dashifen-2022.js');\n $font1 = $this->enqueue('//fonts.googleapis.com/css2?family=El+Messiri&display=swap');\n $font2 = $this->enqueue('//fonts.googleapis.com/css2?family=Roboto&display=swap');\n $css = $this->enqueue('assets/dashifen-2022.css', [$font1, $font2]);\n \n $dir = trailingslashit($this->getStylesheetDir());\n if (file_exists($dir . 'assets/dashifen-2022-components.css')) {\n $this->enqueue('assets/dashifen-2022-components.css', [$css]);\n }\n }", "public static function add(...$names)\n {\n foreach ($names as $name) {\n $type = pathinfo($name, PATHINFO_EXTENSION);\n if (!in_array($type, [self::TYPE_CSS, self::TYPE_JS])) {\n \\core\\Debug::var_dump('Unsupported asset type \"' . $type . '\" for asset file \"' . $name . '\"');\n continue;\n }\n\n if (!isset(self::$toLoad[$type][$name])) {\n $assetUrl = self::generateUrl($name);\n if (!empty($assetUrl)) {\n self::$toLoad[$type][$name] = $assetUrl;\n } else {\n \\core\\Debug::var_dump('Asset file \"' . $name . '\" not found');\n }\n }\n }\n }", "public function testMultipleScriptFiles() {\n\t\t$this->Helper->addScript('libraries', 'default');\n\t\t$this->Helper->addScript('thing', 'second');\n\n\t\t$result = $this->Helper->includeAssets();\n\t\t$expected = array(\n\t\t\tarray('script' => array(\n\t\t\t\t'type' => 'text/javascript',\n\t\t\t\t'src' => '/cache_js/default.js?file%5B0%5D=libraries'\n\t\t\t)),\n\t\t\t'/script',\n\t\t\tarray('script' => array(\n\t\t\t\t'type' => 'text/javascript',\n\t\t\t\t'src' => '/cache_js/second.js?file%5B0%5D=thing'\n\t\t\t)),\n\t\t\t'/script'\n\t\t);\n\t\t$this->assertTags($result, $expected);\n\t}", "public static function register_assets() {\n\t\t$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG === true ? '' : '.min' ;\n\t\t// Register the js assets\n\t\twp_register_script( 'wc-acf-admin', WC_ACF_URL.'/assets/js/app'.$suffix.'.js', array( 'jquery', 'backbone' ), WC_ACF_VERSION, true );\n\t\t\n\t\twp_localize_script( 'wc-acf-admin' , 'wc_acf_vars', array(\n\t\t\t'fields' => self::$field_types,\n\t\t\t'fields_data' => get_option( WC_ACF_OPTION_FIELDS_NAME, array() )\n\t\t) );\n\t\t// Register the css assets\n\t\twp_register_style( 'wc-acf-admin', WC_ACF_URL.'/assets/css/admin-page'.$suffix.'.css', array(), WC_ACF_VERSION );\n\t}", "abstract public function register_script();", "public function registerAssets()\n {\n $view = $this->getView();\n Asset::register($view);\n//\n// $attr = $this->attribute;\n// $js = <<<SCRIPT\n//\n//SCRIPT;\n//\n// $view->registerJs($js);\n }", "function add_script($name, $file)\n{\n\tglobal $scripts_included;\n\t$scripts_included[$name] = \"<script type='text/javascript' src='\".site_url.$file.\"'></script>\\n\";\n}", "function smash_enqueue_scripts() {\n\n\tglobal $wp_scripts;\n\n\t$js_assets = smash_get_scripts();\n\n\tforeach ( $js_assets AS $handle => $asset ) {\n\n\t\twp_enqueue_script( $handle, $asset[ 'file' ], $asset[ 'deps' ], $asset[ 'ver' ], $asset[ 'in_footer' ] );\n\n\t\t// checking for localize script args\n\t\tif ( array_key_exists( 'localize', $asset ) && ! empty( $asset[ 'localize' ] ) ) {\n\t\t\tforeach ( $asset[ 'localize' ] as $name => $args ) {\n\t\t\t\twp_localize_script( $handle, $name, $args );\n\t\t\t}\n\t\t}\n\n\t\tif ( array_key_exists( 'data', $asset ) ) {\n\t\t\tforeach ( $asset[ 'data' ] as $key => $value ) {\n\t\t\t\t$wp_scripts->add_data( $handle, $key, $value );\n\t\t\t}\n\t\t}\n\n\t}\n}", "protected function register_assets() {\n\n\t\t// Register block script for backend/editor.\n\t\t\\wp_register_script(\n\t\t\t'tcc-layout-engine',\n\t\t\tplugins_url( '/dist/blocks.build.js', __FILE__ ),\n\t\t\tarray( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ),\n\t\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'dist/blocks.build.js' ),\n\t\t\ttrue\n\t\t);\n\n\t\t// Register block editor styles for backend/editor.\n\t\t\\wp_register_style(\n\t\t\t'tcc-layout-engine',\n\t\t\tplugins_url( 'dist/blocks.editor.build.css', __FILE__ ),\n\t\t\tarray( 'wp-edit-blocks' ),\n\t\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'dist/blocks.editor.build.css' )\n\t\t);\n\n\t}", "public function registerScripts()\n {\n $view = $this->getView();\n TemplateEditorAsset::register($view);\n $view->registerJs('\n $(\".connected\").sortable({connectWith: \".connected\"}).bind(\"sortupdate\", function(e, ui) {\n var item = $(ui.item);\n var input = item.find(\"input\");\n var parent = item.closest(\".block-position\");\n if (parent.length) {\n input.attr(\"name\", \"Template[positions][\"+parent.data(\"position\")+\"][]\");\n } else {\n input.attr(\"name\", \"Template[positions][' . Template::UNREGISTERED . '][]\");\n }\n }).click(function(e){\n e.preventDefault();\n });\n ', View::POS_END);\n }", "private function _load_js_files($load = array())\n\t{\n\t\t$folder = $this->EE->config->item('use_compressed_js') == 'n' ? 'src' : 'compressed';\n\n\t\tif ( ! defined('PATH_JQUERY'))\n\t\t{\n\t\t\tdefine('PATH_JQUERY', PATH_THEMES.'javascript/'.$folder.'/jquery/');\n\t\t}\n\n\t\t$types\t= array(\n\t\t\t'effect'\t=> PATH_JQUERY.'ui/jquery.effects.',\n\t\t\t'ui'\t\t=> PATH_JQUERY.'ui/jquery.ui.',\n\t\t\t'plugin'\t=> PATH_JQUERY.'plugins/',\n\t\t\t'file'\t\t=> PATH_THEMES.'javascript/'.$folder.'/',\n\t\t\t'package'\t=> PATH_THIRD,\n\t\t\t'fp_module'\t=> PATH_MOD\n\t\t);\n\t\t\n\t\t$contents = '';\n\t\t\n\t\tforeach ($types as $type => $path)\n\t\t{\t\t\t\n\t\t\tif (isset($load[$type]))\n\t\t\t{\n\t\t\t\t// Don't load the same library twice\n\t\t\t\t$load[$type] = array_unique((array)$load[$type]);\n\n\t\t\t\t$files = $load[$type];\n\n\t\t\t\tif ( ! is_array($files))\n\t\t\t\t{\n\t\t\t\t\t$files = array( $files );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach ($files as $file)\n\t\t\t\t{\n\t\t\t\t\tif ($type == 'package' OR $type == 'fp_module')\n\t\t\t\t\t{\n\t\t\t\t\t\t$file = $file.'/javascript/'.$file;\n\t\t\t\t\t}\n\t\t\t\t\telseif ($type == 'file')\n\t\t\t\t\t{\n\t\t\t\t\t\t$parts = explode('/', $file);\n\t\t\t\t\t\t$file = array();\n\n\t\t\t\t\t\tforeach ($parts as $part)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($part != '..')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$file[] = $this->EE->security->sanitize_filename($part);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$file = implode('/', $file);\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$file = $this->EE->security->sanitize_filename($file);\n\t\t\t\t\t}\n\n\t\t\t\t\t$file = $path.$file.'.js';\n\n\t\t\t\t\tif (file_exists($file))\n\t\t\t\t\t{\n\t\t\t\t\t\t$contents .= file_get_contents($file).\"\\n\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $contents;\n\t}", "private function setup_assets() {\n\t\t$this->prefix = sanitize_title($this->theme_name) . '-';\n\t\t$public_lib = '/lib/pub/';\n\t\t$source_lib = '/lib/src/';\n\n\t\t//IF WP DEBUG Is ON, load source maps and assets\n\t\tif (constant(\"WP_DEBUG\") === true) {\n\t\t\t//Style Resources\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'styles',\n\t\t\t\t'path' => $source_lib . 'css/master.css',\n\t\t\t\t'deps' => array()\n\t\t\t);\n\t\t\t\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'scss',\n\t\t\t\t'path' => $source_lib . 'scss/master.scss',\n\t\t\t\t'deps' => array( $this->prefix . 'styles')\n\t\t\t);\n\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'css-map',\n\t\t\t\t'path' => $source_lib . 'maps/master.css.map',\n\t\t\t\t'deps' => array( $this->prefix . 'styles', $this->prefix . 'scss')\n\t\t\t);\n\t\t\n\t\n\t\t\t$this->scripts[] = array(\n\t\t\t\t'slug' => $this->prefix . 'plugins',\n\t\t\t\t'path' => $source_lib . 'js/plugins.js',\n\t\t\t\t'deps' => array(\n\t\t\t\t\t'jquery'\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->scripts[] = array(\n\t\t\t\t'slug' => $this->prefix . 'the-script',\n\t\t\t\t'path' => $source_lib . 'js/script.js',\n\t\t\t\t'deps' => array(\n\t\t\t\t\t'jquery'\n\t\t\t\t)\n\t\t\t);\n\n\n\n\t\t\t// $this->scripts[] = array(\n\t\t\t// \t'slug' => $this->prefix . 'script-map',\n\t\t\t// \t'path' => $source_lib . 'maps/scripts.js.map',\n\t\t\t// \t'deps' => array(\n\t\t\t// \t\t'jquery',\n\t\t\t// \t\t$this->prefix . 'script'\n\t\t\t// \t)\n\t\t\t// );\n\t\n\t\t// Otherwise load only minified assets\n\t\t} else {\n\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'styles-min',\n\t\t\t\t'path' => $public_lib . 'css/master.min.css',\n\t\t\t\t'deps' => array()\n\t\t\t);\n\n\t\t\t$this->scripts[] = array(\n\t\t\t\t\t'slug' => $this->prefix . 'scripts-min',\n\t\t\t\t\t'path' => $public_lib . 'js/master.min.js',\n\t\t\t\t\t'deps' => array(\n\t\t\t\t\t\t'jquery'\n\t\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t}\n\t\t\n\t\t$this->add_wp_script('jquery');\n\t\t\n\t\tadd_action('wp_enqueue_scripts', array( $this, 'theme_assets_handler' ));\n\t}", "public function register(array $paths = array())\n\t{\n\t\t$this->_include_paths = $paths;\n\t\tspl_autoload_register(array($this, 'load_class'));\n\t}", "public function generateScripts($main, $scripts = []){\n $modules = config('flexmodules.modules');\n\n $base = 'vendor/flexcms/js';\n\n $files = [];\n\n if ($main == 'customs'){\n $globals = config('flexmodules.customs');;\n\n foreach($globals as $key => $value){\n if (in_array($value, $scripts) || count($scripts) == 0){\n $files[] = $base . '/' . $value . '.js';\n \n }\n else{\n\n }\n \n }\n }\n else{\n\n if ($main != 'general'){\n\n if ($main == 'global'){\n\n $globals = $modules['global'];\n\n foreach($globals as $key => $value){\n if (strpos($value, 'services/') !== 0 && strpos($value, 'directives/') !== 0){\n $files[] = $base . '/' . $value . '.js';\n }\n else{\n\n }\n \n }\n // return;\n }\n else {\n\n $files[] = $base . '/apps/' . $main . '.js'; \n $files[] = $base . '/apps/' . $main . '.config.js'; \n // TODO: Next handle directive correctly\n // $globals = $modules['global'];\n\n // foreach($globals as $key => $value){\n // if (strpos($value, 'services/') == 0 || strpos($value, 'directives/') == 0){\n // $files[] = $base . '/' . $value . '.js';\n // }\n // else{\n \n // }\n \n // } \n }\n }\n\n if ($main != 'global'){\n \n $mains = $modules[$main];\n\n foreach($mains as $key => $value){\n if (is_array($value)){\n foreach($value as $k => $v){\n $files[] = $base . '/controllers/' . $main . '/' . $key . '/' . $v . '.js'; \n }\n \n }\n else if (is_string($value)){ \n $files[] = $base . '/controllers/' . $main . '/' . $key . '/' . $value . '.js';\n }\n \n } \n }\n }\n\n\n $strings = [];\n foreach ($files as $key => $value) {\n // <script type=\"text/javascript\" src=\"{{ asset('vendor/flexcms/js/app.login.js') }}\"></script>\n $strings[] = '<script type=\"text/javascript\" src=\"' . asset($value) . '\"></script>';\n }\n\n return implode('', $strings);\n \n }", "public function registerJsModules(array $modules)\n {\n $this->manifestService->registerJsModules($modules);\n }", "private function loadScripts() {\n\t\tif(isset($this->scripts) && $this->scripts != \"\") {\n\t\t\tforeach (explode(\",\", $this->scripts) as $script) {\n\t\t\t\tOCP\\Util::addscript('ocDashboard', 'widgets/'.$this->id.'/'.$script);\n\t\t\t}\n\t\t}\n\t}", "private function registerClientScript()\n {\n ArrayInputAsset::register($this->view);\n }", "public function DefineJsResources()\n {\n $this->carabiner->js('https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js');\n $this->carabiner->js('https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js');\n $this->carabiner->js('https://cdn.jsdelivr.net/npm/[email protected]/dist/Chart.min.js');\n // an array of arrays\n $this->carabiner->js(array(\n array('assets/js/Chart.min.js'),\n array('assets/js/Chart.bundle.min.js'),\n array('assets/js/jquery.js')\n ));\n }", "public function loadMappings($filepath);", "static function wp_enqueue_scripts() {\n global $slplus_plugin; \n $api_key= (isset($slplus_plugin) && $slplus_plugin->ok_to_show()) ?\n $slplus_plugin->driver_args['api_key'] :\n ''\n ;\n $force_load = (\n isset($slplus_plugin) ?\n $slplus_plugin->settings->get_item('force_load_js',true) :\n false\n );\n\n $sl_google_map_domain=(get_option('sl_google_map_domain','')!=\"\")?\n get_option('sl_google_map_domain') : \n \"maps.google.com\"; \n $sl_map_character_encoding='&oe='.get_option('sl_map_character_encoding','utf8'); \n\n //------------------------\n // Register our scripts for later enqueue when needed\n //\n //wp_register_script('slplus_functions',SLPLUS_PLUGINURL.'/core/js/functions.js');\n if (isset($api_key))\n {\n wp_enqueue_script(\n 'google_maps',\n \"http://$sl_google_map_domain/maps/api/js?v=3.9&amp;key=$api_key&amp;sensor=false\" //todo:character encoding ???\n //\"http://$sl_google_map_domain/maps?file=api&amp;v=2&amp;key=$api_key&amp;sensor=false{$sl_map_character_encoding}\"\n );\n }\n else {\n wp_enqueue_script(\n 'google_maps',\n \"http://$sl_google_map_domain/maps/api/js?v=3.9&amp;sensor=false\"\n );\n }\n\n wp_enqueue_script(\n 'csl_script',\n SLPLUS_PLUGINURL.'/core/js/csl.js',\n array('jquery'),\n false,\n !$force_load\n );\n\n //--------------------\n // Localize The Script\n //--------------------\n // Prepare some data for JavaScript injection...\n //\n $slplus_home_icon = get_option('sl_map_home_icon');\n $slplus_end_icon = get_option('sl_map_end_icon');\n $slplus_home_icon_file = str_replace(SLPLUS_ICONURL,SLPLUS_ICONDIR,$slplus_home_icon);\n $slplus_end_icon_file = str_replace(SLPLUS_ICONURL,SLPLUS_ICONDIR,$slplus_end_icon);\n $slplus_home_size=(function_exists('getimagesize') && file_exists($slplus_home_icon_file))?\n getimagesize($slplus_home_icon_file) :\n array(0 => 20, 1 => 34);\n $slplus_end_size =(function_exists('getimagesize') && file_exists($slplus_end_icon_file)) ?\n getimagesize($slplus_end_icon_file) :\n array(0 => 20, 1 => 34);\n // Lets get some variables into our script\n //\n $scriptData = array(\n 'debug_mode' => (get_option(SLPLUS_PREFIX.'-debugging') == 'on'),\n 'disable_scroll' => (get_option(SLPLUS_PREFIX.'_disable_scrollwheel')==1),\n 'disable_dir' => (get_option(SLPLUS_PREFIX.'_disable_initialdirectory' )==1),\n 'distance_unit' => esc_attr(get_option('sl_distance_unit'),'miles'),\n 'load_locations' => (get_option('sl_load_locations_default')==1),\n 'map_3dcontrol' => (get_option(SLPLUS_PREFIX.'_disable_largemapcontrol3d')==0),\n 'map_country' => SetMapCenter(),\n 'map_domain' => get_option('sl_google_map_domain','maps.google.com'),\n 'map_home_icon' => $slplus_home_icon,\n 'map_home_sizew' => $slplus_home_size[0],\n 'map_home_sizeh' => $slplus_home_size[1],\n 'map_end_icon' => $slplus_end_icon,\n 'map_end_sizew' => $slplus_end_size[0],\n 'map_end_sizeh' => $slplus_end_size[1],\n 'use_sensor' => (get_option(SLPLUS_PREFIX.\"_use_location_sensor\")==1),\n 'map_scalectrl' => (get_option(SLPLUS_PREFIX.'_disable_scalecontrol')==0),\n 'map_type' => get_option('sl_map_type','roadmap'),\n 'map_typectrl' => (get_option(SLPLUS_PREFIX.'_disable_maptypecontrol')==0),\n 'show_tags' => (get_option(SLPLUS_PREFIX.'_show_tags')==1),\n 'overview_ctrl' => get_option('sl_map_overview_control',0),\n 'use_email_form' => (get_option(SLPLUS_PREFIX.'_email_form')==1),\n 'use_pages_links' => ($slplus_plugin->settings->get_item('use_pages_links')=='on'),\n 'use_same_window' => ($slplus_plugin->settings->get_item('use_same_window')=='on'),\n 'website_label' => esc_attr(get_option('sl_website_label','Website')),\n 'zoom_level' => get_option('sl_zoom_level',4),\n 'zoom_tweak' => get_option('sl_zoom_tweak',1),\n );\n wp_localize_script('csl_script','slplus',$scriptData);\n wp_localize_script('csl_script','csl_ajax',array('ajaxurl' => admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('em')));\n }", "public function registerScript(/*string*/ $scriptSrc);", "static function enqueue_scripts(){\n\t\tself::include_css();\n\t\tself::include_js();\n\t}", "public function includeJavascript($fileName)\n {\n $names = explode(',', $fileName);\n foreach($names as $name)\n {\n $_SESSION['include_javascript'][] = $name;\n } \n\n return true;\n }", "public function register_scripts()\n\t{\n\n\t\twp_register_style('instant-search', plugins_url('assets/instant-search.css', __FILE__));\n\t\twp_register_script('instant-search', plugins_url('assets/instant-search.js', __FILE__), array('wp-i18n'), false, true);\n\t\twp_localize_script(\n\t\t\t'instant-search',\n\t\t\t'instantSearch',\n\t\t\t[\n\t\t\t\t'rest' => get_rest_url(null, 'wp/v2/'),\n\t\t\t\t'msg' => __('No results', 'instantsearch')\n\t\t\t]\n\t\t);\n\n\t\twp_enqueue_style('instant-search');\n\t\twp_enqueue_script('instant-search');\n\t\t//wp_set_script_translations('instant-search', 'instantsearch', basename(dirname(__FILE__)) . '/languages/');\n\t}", "public function addScripts($scripts)\n\t{\n\t\tforeach ($scripts as $script) {\n\t\t\t$this->addScript($script);\n\t\t}\n\t}", "public static function addJS($view, $js) {\n $view->registerJsFile($js, ['depends' => 'frontend\\assets\\AppAsset']);\n }", "public function register_action_map($map)\n {\n if (is_array($map)) {\n foreach ($map as $idx => $val) {\n $this->action_map[$idx] = $val;\n }\n }\n }", "public function registerScripts()\r\n\t{\r\n\t\twp_register_style('social-shares', plugins_url('assets/social-shares.css', __FILE__));\r\n\t\twp_register_script('social-shares', plugins_url('assets/social-shares.js', __FILE__), array('jquery'), false, true);\r\n\t}", "public function addJS($strFile) {\n\t\t\t$strFile = fixPath($strFile); \n\t\t\tif (!in_array($strFile, $this->arJS)) array_push($this->arJS, $strFile); \n\t\t}" ]
[ "0.67518306", "0.6558918", "0.6276848", "0.6230812", "0.6142105", "0.60572845", "0.60283715", "0.5963894", "0.59283364", "0.5891478", "0.58643115", "0.58173853", "0.5811111", "0.5769973", "0.57162094", "0.5711398", "0.57052994", "0.57046634", "0.568333", "0.56821173", "0.5674974", "0.5635878", "0.56203973", "0.56117034", "0.5604749", "0.55943", "0.5584938", "0.5579401", "0.5562713", "0.5551397", "0.5520376", "0.55154485", "0.5509946", "0.54951805", "0.5484061", "0.543994", "0.54366785", "0.54233587", "0.5399817", "0.5375576", "0.5372639", "0.53721786", "0.5370998", "0.5355927", "0.53488415", "0.5340185", "0.5334482", "0.5327748", "0.532198", "0.5317303", "0.53150564", "0.5310971", "0.5305259", "0.5300496", "0.5284552", "0.5283833", "0.5276519", "0.52764016", "0.5274435", "0.52581924", "0.52534366", "0.5249058", "0.5228052", "0.52201635", "0.5213498", "0.52112955", "0.5202195", "0.5195342", "0.51953053", "0.51882297", "0.51853657", "0.5168279", "0.51600975", "0.5152033", "0.51506126", "0.5149089", "0.51335055", "0.5128636", "0.5127441", "0.5127211", "0.5121484", "0.51166064", "0.5113589", "0.51102525", "0.5109055", "0.5107267", "0.5098678", "0.5097216", "0.5096589", "0.5089133", "0.508763", "0.5085407", "0.50802875", "0.50740314", "0.5071988", "0.50717795", "0.50709325", "0.507067", "0.5068651", "0.5067737" ]
0.7561279
0
Ensure that deletes records remove their underlying file assets, without affecting other staged records.
public function onAfterDelete() { if (!$this->hasAssets()) { return; } // Prepare blank manipulation $manipulations = new AssetManipulationList(); // Add all assets for deletion $this->addAssetsFromRecord($manipulations, $this->owner, AssetManipulationList::STATE_DELETED); // Whitelist assets that exist in other stages $this->addAssetsFromOtherStages($manipulations); // Apply visibility rules based on the final manipulation $this->processManipulation($manipulations); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function beforeDelete(){\n $files = $this->getFiles()->all();\n foreach($files as $file)\n $file->delete();\n\n return parent::beforeDelete();\n }", "protected function removeSysFileReferenceRecordsFromImportDataWithRelationToMissingFile() {}", "private function deleteRecords(){\r\n\t\r\n\t\t$fileNames = explode(',', $this->collection['images']);\r\n\t\t// remove imagerecords which are not used anymore\r\n\t\tforeach($this->images as $filename => $image){\r\n\t\t\tif(array_search($filename, $fileNames) === false){\r\n\t\t\r\n\t\t\t\t$this->db->exec_DELETEquery('tx_gorillary_images', \"image='$filename' AND collection='\".$this->collection['uid'].\"'\");\r\n\t\t\t\t//unset ($this->images[$filename]);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private function purgeExisting() {\n $paths = array('tax/calculation', 'tax/calculation_rate', 'tax/calculation_rule');\n\n foreach( $paths as $path ) {\n $existingRecords = Mage::getModel($path)->getCollection();\n\n foreach( $existingRecords as $record ) {\n\n try {\n $record->delete();\n }\n catch (Exception $e) {\n Mage::getSingleton('core/session')->addError(\"There was an error deleting from Magento model \" . $path);\n }\n\n }\n\n }\n\n }", "public function removeDeletedRecords() \n {\n // this algorythm should be a fair bit\n // faster than calling DataSet::removeRecord()\n $new_recs = array();\n foreach($this->records as $rec) {\n if (!$rec->isAZombie()) {\n $new_recs[] = $rec;\n }\n }\n $this->records = $new_recs;\n }", "protected function _preDelete() {}", "public function delete() {\n // of some other file (since we're getting rid of it). We also delete all\n // the transformations of this file, so that a user who deletes an image\n // doesn't need to separately hunt down and delete a bunch of thumbnails and\n // resizes of it.\n\n $outbound_xforms = id(new PhabricatorFileQuery())\n ->setViewer(PhabricatorUser::getOmnipotentUser())\n ->withTransforms(\n array(\n array(\n 'originalPHID' => $this->getPHID(),\n 'transform' => true,\n ),\n ))\n ->execute();\n\n foreach ($outbound_xforms as $outbound_xform) {\n $outbound_xform->delete();\n }\n\n $inbound_xforms = id(new PhabricatorTransformedFile())->loadAllWhere(\n 'transformedPHID = %s',\n $this->getPHID());\n\n $this->openTransaction();\n foreach ($inbound_xforms as $inbound_xform) {\n $inbound_xform->delete();\n }\n $ret = parent::delete();\n $this->saveTransaction();\n\n $this->deleteFileDataIfUnused(\n $this->instantiateStorageEngine(),\n $this->getStorageEngine(),\n $this->getStorageHandle());\n\n return $ret;\n }", "protected function utilPurgeOrphans()\n {\n if (!$this->confirmToProceed('This will PERMANENTLY DELETE files in \"system_files\" that do not belong to any other model.')) {\n return;\n }\n\n $orphanedFiles = 0;\n\n // Locate orphans\n $files = FileModel::whereNull('attachment_id')->get();\n\n foreach ($files as $file) {\n $file->delete();\n $orphanedFiles += 1;\n }\n\n if ($orphanedFiles > 0) {\n $this->comment(sprintf('Successfully deleted %d orphaned record(s).', $orphanedFiles));\n }\n else {\n $this->comment('No records to purge.');\n }\n }", "public function delete() {\n // Fail due to double delete\n assert(!$this->hasBeenDeleted);\n\n // Initialize delete record cache, if nonextant\n if (!isset(self::$deleteRecordPreparedStatementCache)) {\n self::$deleteRecordPreparedStatementCache = array();\n }\n \n // Initiate implicit tx, if nonextant explicit tx \n $is_implicit_tx = false;\n if (self::$numTransactions == 0) {\n $is_implicit_tx = true; \n self::beginTx();\n }\n\n // Fail due to invalid database connection\n assert(isset(self::$databaseHandle));\n\n // Delete this record and all child records \n $table_name = static::getFullyQualifiedTableName();\n \n try {\n // Fetch prepared statement from cache, if present. Otherwise, create it.\n if (isset(self::$deleteRecordPreparedStatementCache[$table_name])) {\n // Fetch delete query from cache\n $delete_record_stmt = self::$deleteRecordPreparedStatementCache[$table_name];\n } else {\n $fully_qualified_table_name = static::getFullyQualifiedTableName();\n $delete_query = \"DELETE FROM {$fully_qualified_table_name} \"\n . $this->genPrimaryKeyWhereClause();\n\n $delete_record_stmt = self::$databaseHandle->prepare($delete_query);\n self::$deleteRecordPreparedStatementCache[$table_name] = $delete_record_stmt;\n }\n \n // Delete children, schedule assets for deletion\n $this->deleteChildren();\n self::$assetDeletors = array_merge(self::$assetDeletors, $this->getAssets());\n\n // Bind record's 'id' to delete-query\n $this->bindId($delete_record_stmt);\n\n // Remove record\n $delete_record_stmt->execute();\n } catch (PDOException $e) {\n self::$databaseHandle->rollback();\n die(\"\\nERROR: \" . $e->getMessage() . \"\\n\");\n }\n\n // Close implicit transaction\n if ($is_implicit_tx) {\n self::endTx();\n }\n\n // Indicate object's deletion\n $this->hasBeenDeleted = true;\n }", "public function pre_delete()\r\n\t{\r\n\t\tparent::pre_delete();\r\n\t\t$Change = App::make('Change');\r\n\t\t$Change::where('fmodel', 'GalleryItem')\r\n\t\t\t ->where('fid', $this->id)\r\n\t\t\t ->delete();\r\n\t\t\t \r\n\t\t// Thumbs\r\n\t\t/*if($this->file) {\r\n\t\t\t# Should really check if these are used anywhere else, but no easy way to do that in other modules yet so just leaving them for now\r\n\t\t\t\r\n\t\t\t// Name\r\n\t\t\t$name = basename(public_path().$this->file);\r\n\t\t\t\r\n\t\t\t// Thumbs\r\n\t\t\t$thumbs = Config::get('galleries::thumbs');\r\n\t\t\tforeach($thumbs as $k => $v) {\r\n\t\t\t\tif(file_exists(public_path().$v['path'].$name)) unlink(public_path().$v['path'].$name);\r\n\t\t\t}\r\n\t\t}*/\r\n\t}", "function beforeDelete(){\r\n\t\t$photo = $this->findById($this->id);\r\n\t\tunlink($this->dir . $photo['Photo']['small']);\r\n\t\tunlink($this->dir . $photo['Photo']['large']);\r\n\t\treturn true;\r\n\t}", "public function preDelete() { }", "protected function _postDelete()\n {\n $this->clearResources();\n }", "protected function _predelete() {\n }", "public function forceDelete();", "protected function tidyUpFiles() {\n\t\t/* load valid ids */\n\t\t$validIds = array();\n\t\t$result = $this->db->query('SELECT id FROM image');\n\t\tif ($result) {\n\t\t\twhile ($entry = $result->fetchArray(SQLITE3_NUM)) {\n\t\t\t\t$validIds[] = $entry[0];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* remove entries with missing file */\n\t\tforeach ($validIds as $id) {\n\t\t\tif (!is_file(self::getPath($id))) {\n\t\t\t\t$this->delete($id);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* delete from list what is not in the database */\n\t\tif ($dh = opendir(self::FILES_DIR)) {\n\t\t\twhile (($id = readdir($dh)) !== false) {\n\t\t\t\tif (preg_match('#^[0-9a-zA-Z]+$#', $id) && !in_array($id, $validIds) && $id != self::DATABASE_FILE) {\n\t\t\t\t\t$this->delete($id);\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($dh);\n\t\t}\n\t}", "public function postFlush()\n {\n $fileSystem = new Filesystem();\n $fileSystem->remove($this->filesScheduledForDeletion);\n }", "protected function revisionableCleanUp()\n {\n $relation = $this->model->getRevisionHistoryName();\n $relationObject = $this->model->{$relation}();\n\n $revisionLimit = property_exists($this->model, 'revisionableLimit')\n ? (int) $this->model->revisionableLimit\n : self::DEFAULT_REVISION_LIMIT;\n\n $toDelete = $relationObject\n ->orderBy('id', 'desc')\n ->skip($revisionLimit)\n ->limit(self::CLEANUP_REVISION_BATCH)\n ->get();\n\n foreach ($toDelete as $record) {\n $record->delete();\n }\n }", "public function delete() {\n\t\tif ($this->checkDependencies() == true ) {\n\t\t\t$sql = \"DELETE FROM \".$this->tablename.\" where \".$this->idcol.\" = \".$this->page->ctrl['record'];\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}", "protected function performDeleteOnModel()\n {\n $this->newQuery()->delete($this->fileName);\n }", "public function afterDeleteCommit(): void\n {\n }", "protected function _before_delete(): void\n {\n //this will try to delete all the content records to which it has access\n //if there are remaining content records the deletion of the Page will fail due to the Foreign Key contraint restrict\n $contents = PageContent::get_by( ['page_id' => $this->page_id] );\n foreach ($contents as $PageContent) {\n $PageContent->delete();\n }\n }", "private static function deleteAssets() {\n // Fail due to invalid asset deletors \n assert(isset(self::$assetDeletors));\n\n // Remove assets \n foreach (self::$assetDeletors as $deletor) {\n $deletor->delete();\n }\n\n // Clear AssetDeletors cache\n self::$assetDeletors = array();\n }", "public function markForDeletion(): void\n {\n $this->oldFileName = $this->fileName;\n $this->fileName = null;\n }", "protected function cleanup() {\n\t\tif(isset($this->data['attachment'])) {\n\t\t\tunlink($this->data['attachment']);\n\t\t}\n\t\tparent::cleanup();\n\t}", "protected function preDelete() {\n\t\treturn true;\n\t}", "protected function _postDelete()\n {\n $this->getResource()->delete();\n\n $this->getIssue()->compileHorizontalPdfs();\n }", "public function purgeAll() {\n\t\tset_time_limit(300);\n\t\t$this->load->model(\"filehandlerbase\");\n\t\t$fileList = $this->filehandlerbase->findDeletedItems();\n\t\t$mfa = $this->input->post(\"mfa\");\n\t\t$serial = $this->input->post(\"arn\");\n\n\t\t/**\n\t\t * we need to cache this because MFA is only good once\n\t\t */\n\t\t$lastUsedToken = null;\n\t\tforeach($fileList as $fileEntry) {\n\t\t\t$fileHandler = $this->filehandler_router->getHandlerForObject($fileEntry->getFileObjectId());\n\t\t\tif(!$fileHandler) { \n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(!$fileHandler->loadFromObject($fileEntry)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($lastUsedToken)) {\n\t\t\t\t$fileHandler->s3model->sessionToken = $lastUsedToken;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif(!$fileHandler->deleteSource($serial,$mfa)) {\n\t\t\t\t\t$this->logging->logError(\"purgeAll\",\"Could not delete asset with key\" . $fileEntry->getFileObjectId());\n\t\t\t\t}\n\t\t\t\t$lastUsedToken = $fileHandler->s3model->sessionToken;\n\t\t\t}\n\t\t\tcatch (Exception $e) {\n\t\t\t\techo $e;\n\t\t\t\techo \"Deletion fail\";\n\t\t\t}\n\n\t\t}\n\n\t\tinstance_redirect(\"/admin\");\n\t}", "public function cleanUploadedFiles(): void\n {\n foreach ($this->uploadedFiles as $file) {\n @unlink($file['tmp_name']);\n }\n }", "public function deleteUnusedFiles(){\n \n }", "public function __destruct()\n {\n $iMax = count($this->aFiles);\n for ($iFor = 0; $iFor < $iMax; $iFor++) {\n\n if (true === file_exists($this->aFiles[$iFor])) {\n\n unlink($this->aFiles[$iFor]);\n }\n\n $sMessage = 'delete: ' . $this->aFiles[$iFor];\n $this->oLog->writeLog(Log::HF_DEBUG, $sMessage);\n }\n }", "function delete()\n\t{\n\t\t$remove = parent::delete();\n\t\t// always call parent delete function first!!\n\t\tif (!$remove)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->deleteMetaData();\n\n\t\t// Delete all survey questions, constraints and materials\n\t\tforeach ($this->questions as $question_id)\n\t\t{\n\t\t\t$this->removeQuestion($question_id);\n\t\t}\n\t\t$this->deleteSurveyRecord();\n\t\t\n\t\tilUtil::delDir($this->getImportDirectory());\n\t\treturn true;\n\t}", "private function cleanup()\n\t{\n\t\tee()->sync_db = ee()->load->database('sync_db', true);\n\n\t\t// delete 14 day old processed product records, always leaving at least 5\n\t\tee()->sync_db->query(\"DELETE FROM products WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 14 DAY) AND id NOT IN (SELECT id FROM ( SELECT id FROM `products` WHERE processed = 1 ORDER BY id DESC LIMIT 5 ) keepers)\");\n\t\t\n\t\t// delete old inventory records\t\n\t\tee()->sync_db->query(\"DELETE FROM products_inventory WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 2 DAY)\");\n\n\t\t// delete old shipping records\n\t\tee()->sync_db->query(\"DELETE FROM orders_shipping WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 14 DAY)\");\n\n\t\t// delete old processed records\n\t\tee()->sync_db->query(\"DELETE FROM orders_processed WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 14 DAY)\");\n\t\t\n\t}", "public function testDeleteRemovesStorages()\n {\n file_put_contents(self::$temp.DS.'file1.txt', 'Hello World');\n\n Storage::delete(self::$temp.DS.'file1.txt');\n $this->assertTrue(! is_file(self::$temp.DS.'file1.txt'));\n }", "public function forceDelete()\n {\n //\n }", "public function tearDown()\n {\n foreach ($this->files as $file) {\n if (file_exists($file)) {\n unlink($file);\n }\n }\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 onAfterDeleteCleaning() {\n\t\t$classHierarchyProbe = new DataObjectOnDeleteDecorator_ClassHierarchyProbe($this->owner);\n\t\t$relatedClasses = $classHierarchyProbe->getRelatedClasses();\n\t\t\n\t\t$this->cleanRelatedRelations($relatedClasses);\n\t\t$this->cleanRelatedTables($relatedClasses);\n\t}", "protected function afterDelete()\r\n {\r\n }", "private function clean() {\n foreach (glob($this->dir . '/*') as $file) {\n $name = basename($file);\n if (!preg_match('/^\\d{10}/', $name))\n throw new \\Exception('Unexpected filename. Make sure \"' . $this->dir . '\" contains only build artefacts (and is thus safe to clean) and try again.');\n $deleted = unlink($file);\n if (!$deleted)\n throw new \\Exception('Failed to delete \"' . $file . '\". Make sure target directory is writable to allow delete of other users files.');\n }\n }", "function cleanup()\n {\n $db = eZDB::instance();\n $db->begin();\n $db->query( \"DELETE FROM ezsphinx\" );\n $db->query( \"DELETE FROM ezsphinx_pathnodes\" );\n $db->commit();\n }", "public function delete($record_id, Request $request){\n if(Ahkam::findOrFail($record_id)->first() != \" \" ) { \n $file = Ahkam::findOrFail($record_id);\n $deleted = new AhkamDeleted;\n\n \n /////////////////////////////////////////////\n\n\n $deleted->crida_number = $file->crida_number;\n $deleted->database_id = $file->id;\n $deleted->date_of_archiving = $file->date_of_archiving; \n $deleted->type_of_document = $file->type_of_document; \n $deleted->number_of_document = $file->number_of_document;\n $deleted->date_of_document = $file->date_of_document; \n $deleted->kholasmatlab = $file->kholasmatlab;\n $deleted->molahezat = $file->molahezat; \n $deleted->more = $file->more; \n $deleted->file = $file->file; \n $deleted->uuid = $file->uuid; \n\n\n $del_comment = AhkamComment::where('ahkam_id', $record_id);\n $del_access = AhkamUser::where('ahkam_id',$record_id);\n $del_notis = Noti::where('file_id', $record_id);\n \n DB::beginTransaction();\n try {\n $deleted->save();\n\n //to move a file in the (deleted) folder\n if(file_exists(storage_path('app/files/Ahkam/'. $file->file))){ \n $old = storage_path('app/files/Ahkam/'. $file->file);\n $new = storage_path('app/deleted/Ahkam/'. $file->file);\n $move = File::move($old, $new);\n }\n\n //to delete its comments\n if($del_comment){\n $del_comment->delete();\n } \n \n //to delete its user access\n if($del_access){\n $del_access->delete();\n }\n //to delete its notifications\n if($del_notis){\n $del_notis->delete();\n }\n $file->delete();\n DB::commit();\n $result = \"success\";\n } catch (\\Exception $e) {\n $result = \"failed\";\n DB::rollback();\n }\n\n return response()->json(['result' => $result]);\n }\n }", "protected function processDeletedObjects() {}", "public static function deleteAll() {\n // Initiate implicit tx if explicit one doesn't exist\n $is_implicit_tx = false;\n if (self::$numTransactions == 0) {\n $is_implicit_tx = true; \n self::beginTx();\n }\n\n // Fail because 'databaseHandle' wasn't initialized by 'beginTx()' \n assert(isset(self::$databaseHandle));\n\n try {\n $sql_records = static::fetchAll();\n foreach ($sql_records as $record) {\n $record->delete();\n } \n } catch (PDOException $e) {\n self::$databaseHandle->rollback();\n die(\"\\nERROR: \" . $e->getMessage() . \"\\n\");\n }\n\n // Close implicit tx\n if ($is_implicit_tx) {\n self::endTx();\n }\n }", "public function beforeDelete()\n {\n $fileService = $this->getCustomizationService();\n $fileService->delete($this);\n return parent::beforeDelete();\n }", "function deleteFilesFromRecord($uid)\t{\n\t\t$table = $this->theTable;\n\t\t$rec = $GLOBALS['TSFE']->sys_page->getRawRecord($table,$uid);\n\n\t\t//$GLOBALS['TSFE']->includeTCA();\n\t\tt3lib_div::loadTCA($table);\n\t\treset($GLOBALS['TCA'][$table]['columns']);\n\t\t$iFields=array();\n\t\twhile(list($field,$conf)=each($GLOBALS['TCA'][$table]['columns']))\t{\n\t\t\tif ($conf['config']['type']=='group' && $conf['config']['internal_type']=='file')\t{\n\n\t\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery($table, $this->conf['uidField'].'='.intval($uid), array($field => ''));\n\n\t\t\t\t$delFileArr = explode(',',$rec[$field]);\n\t\t\t\treset($delFileArr);\n\t\t\t\twhile(list(,$n)=each($delFileArr))\t{\n\t\t\t\t\tif ($n)\t{\n\t\t\t\t\t\t$fpath = $conf['config']['uploadfolder'].'/'.$n;\n\t\t\t\t\t\tunlink($fpath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function doRealDelete()\n {\n $this->assignSingle();\n /* Delete the record */\n DatabaseBean::dbDeleteById();\n }", "public function cleanRecords(){\n\t\tOpendocs::model()->deleteAll(\" createTime<=(NOW()-1)\");//oracle\n\t}", "protected function afterDelete()\n {\n }", "protected function removeFiles() {}", "public function afterDelete()\n {\n foreach ($this->attributes as $attribute => $attributeConfig) {\n $unlinkOnDelete = $this->getAttributeConfig($attributeConfig, 'unlinkOnDelete');\n if ($unlinkOnDelete) {\n $this->delete($attribute);\n }\n }\n }", "public function delete_data_to_tombstone(){\n }", "public function deleteUnused()\n\t{\n\t\t/*$file = Engine_Api::_()->getItem('storage_file', $this->file_id);\n\t\t if ($file) {\n\t\t $table = Engine_Api::_()->getDbtable('albumSongs', 'mp3music');\n\t\t $select = $table->select()\n\t\t ->where('file_id = ?', $file->getIdentity())\n\t\t ->limit(1);\n\t\t $count = count( $table->fetchAll($select) );\n\t\t if ($count >= 0)\n\t\t $file->delete();\n\t\t }\n\t\t $this->delete();*/\n\t\t$table = Engine_Api::_() -> getDbtable('albumSongs', 'mp3music');\n\t\t$data = array('is_delete' => 1, );\n\t\t$where = $table -> getAdapter() -> quoteInto('song_id = ?', $this -> song_id);\n\t\t$table -> update($data, $where);\n\t}", "public function delete()\n {\n $textvalues = $this->gettextvalues();\n $this->deleteValues($textvalues);\n \n $componentvalues = $this->getcomponentvalues();\n $this->deleteValues($componentvalues);\n \n $filevalues = $this->getfilevalues();\n $this->deleteValues($filevalues);\n \n $contributorvalues = $this->getcontributorvalues();\n $this->deleteValues($contributorvalues);\n \n parent::delete();\n }", "public function instance_deleted() {\n $this->purge_all_definitions();\n @rmdir($this->filestorepath);\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 testDelete()\n {\n $sampleIndexDir = dirname(__FILE__) . '/_indexSample/_files';\n $tempIndexDir = dirname(__FILE__) . '/_files';\n if (!is_dir($tempIndexDir)) {\n mkdir($tempIndexDir);\n }\n\n $this->_clearDirectory($tempIndexDir);\n\n $indexDir = opendir($sampleIndexDir);\n while (($file = readdir($indexDir)) !== false) {\n if (!is_dir($sampleIndexDir . '/' . $file)) {\n copy($sampleIndexDir . '/' . $file, $tempIndexDir . '/' . $file);\n }\n }\n closedir($indexDir);\n\n\n $index = Zend_Search_Lucene::open($tempIndexDir);\n\n $this->assertFalse($index->isDeleted(2));\n $index->delete(2);\n $this->assertTrue($index->isDeleted(2));\n\n $index->commit();\n\n unset($index);\n\n $index1 = Zend_Search_Lucene::open($tempIndexDir);\n $this->assertTrue($index1->isDeleted(2));\n unset($index1);\n\n $this->_clearDirectory($tempIndexDir);\n }", "function deleteCustomTrack ($ref, $userId, $tableName) {\n // Then remove everything from customTrackFiles and customTrackMeta\n $mysqli = connectCPB(CUSTOM_TRACK_DB_NAME);\n $stmt = $mysqli->prepare(\"SELECT * FROM `\" .\n $mysqli->real_escape_string(CUSTOM_TRACK_FILE_TABLE_NAME) .\n \"` WHERE `userId` = ? AND `ref` = ? AND `tableName` = ?\");\n $stmt->bind_param('sss', $userId, $ref, $tableName);\n $stmt->execute();\n $tableEntries = $stmt->get_result();\n if ($tableEntries && $tableEntries->num_rows > 0) {\n // table entry found\n $entry = $tableEntries->fetch_assoc();\n $fileName = $entry['fileName'];\n if (substr(\n $fileName, 0, strlen(CUSTOM_TRACK_TABLE_PREFIX)\n ) === CUSTOM_TRACK_TABLE_PREFIX) {\n // is a table\n $mysqli->query(\"DROP TABLE `\" .\n $mysqli->real_escape_string(CUSTOM_TRACK_DB_NAME) . \"`.`\" .\n $mysqli->real_escape_string($fileName) .\n \"`\");\n } else if (!filter_var($fileName, FILTER_VALIDATE_URL)) {\n // is a local file that needs to be deleted\n unlink($fileName);\n }\n } else {\n $tableEntries->free();\n $mysqli->close();\n throw new Exception('Track not found!');\n }\n $tableEntries->free();\n $stmt = $mysqli->prepare(\"DELETE FROM `\" .\n $mysqli->real_escape_string(CUSTOM_TRACK_FILE_TABLE_NAME) .\n \"` WHERE `userId` = ? AND `ref` = ? AND `tableName` = ?\");\n $stmt->bind_param('sss', $userId, $ref, $tableName);\n $stmt->execute();\n $tableEntries->free();\n $stmt = $mysqli->prepare(\"DELETE FROM `\" .\n $mysqli->real_escape_string(CUSTOM_TRACK_META_TABLE_NAME) .\n \"` WHERE `userId` = ? AND `ref` = ? AND `tableName` = ?\");\n $stmt->bind_param('sss', $userId, $ref, $tableName);\n $stmt->execute();\n $tableEntries->free();\n $mysqli->close();\n}", "public function delete()\n {\n foreach ($this->versions as $version)\n {\n $version->delete();\n }\n\n parent::delete();\n }", "function after_delete() {}", "public function teardown()\n {\n if ($this->csvFile) {\n unlink($this->csvFile);\n $this->csvFile = null;\n }\n\n if ($this->photoZip) {\n unlink($this->photoZip);\n $this->photoZip = null;\n }\n }", "public function afterDelete()\n {\n \\PProject::model()->updateAll([\n 'artist_id' => new \\CDbExpression('NULL')\n ], 'artist_id = :artist_id', [\n ':artist_id' => $this->id\n ]);\n }", "protected function _postDelete() {}", "protected function _postDelete() {}", "public function beforeDelete()\n {\n // Find the related custom value\n $customValues = CustomValueModel::where('product_id', '=', $this->id)->get();\n\n $customValues->each(function ($value) {\n // Delete relation\n $relation = DB::table('tiipiik_catalog_csf_csv')\n ->where('custom_value_id', '=', $value->id)\n ->delete();\n\n // Delete custom value\n CustomValueModel::find($value->id)->delete();\n });\n\n // Detach properties\n $this->properties()->detach();\n }", "protected function _delete()\n\t{\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}", "function media_cleanup() { \r\n global $media;\r\n global $avatars;\r\n global $photoalbumsmedia;\r\n \r\n $query1 = \"SELECT `media_id` , `media_userid` FROM `$media`s;\";\r\n $sqlr1 = bcsql_query( $query1 );\r\n $mediaids = bcsql_fetch_array( $sqlr1 );\r\n $num_rows1 = bcsql_num_rows( $mediaids );\r\n for( $i = 0; $i<$num_rows1; $i++ ) {\r\n $thismedia = $mediaids[ $i ];\r\n $thismediaid = $thismedia[ \"media_id\" ];\r\n $mediaclass = New media( $thismediaid );\r\n $userid = $mediaclass->userid();\r\n $userfile = $uploaddir . $userid .\"/\". $thismediaid;\r\n if( !file_exists( $userfile ) ) {\r\n $sql = \"DELETE FROM `$media` WHERE `media_id` = '$thismediaid';\"; \r\n bcsql_query( $sql );\r\n $sql = \"DELETE FROM `$avatars` WHERE `avatar_mediaid` = '$thismediaid';\";\r\n bcsql_query( $sql );\r\n $sql = \"DELETE FROM `$photoalbumsmedia` WHERE `pamedia_mediaid` = '$thismediaid';\";\r\n bcsql_query( $sql );\r\n }\r\n }\r\n //the oposite thing remains to be done\r\n }", "public function onAfterDelete()\n {\n if (!$this->owner->ID) {\n return;\n }\n\n // Force SearchUpdater to mark this record as dirty\n // Note: Some extensions require entire hierarchy passed to augmentWrite()\n $manipulation = array();\n foreach (ClassInfo::ancestry($this->owner) as $class) {\n if (!is_subclass_of($class, DataObject::class)) {\n continue;\n }\n\n $tableName = DataObject::getSchema()->tableName($class);\n $manipulation[$tableName] = array(\n 'fields' => array(),\n 'id' => $this->owner->ID,\n 'class' => $class,\n // Note: 'delete' command not actually handled by manipulations,\n // but added so that SearchUpdater can detect the deletion\n 'command' => 'delete'\n );\n }\n\n $this->owner->extend('augmentWrite', $manipulation);\n\n SearchUpdater::handle_manipulation($manipulation);\n }", "protected function beforeDelete()\n {\n }", "protected function deleteStore() {\n $keys = ['entity_type', 'entity_id', 'export_type'];\n foreach ($keys as $key) {\n $this->store->delete($key);\n }\n }", "function _process_delete($update_id)\n{\n\n $data = $this->fetch_data_from_db($update_id);\n \n $this->_delete($update_id);\n\n //delete the faciitiy record from store_items\n}", "public function cleanRecordVersions()\n\t{\n \t\t$this -> db -> query(\"DELETE FROM `\".$this -> table.\"` \n \t\t\t\t\t\t\t WHERE `model`='\".$this -> model.\"' \n \t\t\t\t\t\t\t AND `row_id`='\".$this -> row_id.\"'\");\n \t\treturn $this;\n \t}", "function beforeDelete($cascade = true) {\r\n\t\t// Reading content to get the data and then removing the files from disk\r\n\t\t$this->read();\r\n\t\t$this->deleteFile();\r\n\t\treturn true;\r\n\t}", "public function onBeforeDelete(){\n\t\tparent::onBeforeDelete();\n\n\t\tif($this->Images() && $images = $this->Images()){\n\t\t\tforeach($images as $image){\n\t\t\t\tif($image->exists()){\n\t\t\t\t\t$image->delete();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function delete() {\n $events = $this->getEventsCreatedHere(); # we will need to write this method\n foreach ($events as $record) {\n $record->delete();\n }\n\n # delete the calendar_has_event records\n $has_events = $this->getCalendarHasEvents();\n foreach ($has_events as $record) {\n $record->delete();\n }\n\n # delete the user_has_permission records\n $permissions = $this->getAllPermissions();\n foreach ($permissions as $record) {\n $record->delete();\n }\n\n # delete the subscriptions on the calendar\n $subscriptions = $this->getSubscriptions();\n foreach ($subscriptions as $record) {\n $record->delete();\n }\n\n # delete the subscription_has_calendar records (remove calendar from subscriptions that subscribe to it)\n $subscriptions = $this->getSubscriptionHasCalendarRecords();\n foreach ($subscriptions as $record) {\n $record->delete();\n }\n\n return parent::delete();\n }", "public function delete()\n\t{\n\t\t$this->hard_delete();\n\t}", "protected function delete() {\n\t}", "abstract public function shouldIDelete();", "function removeHard()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\t$userid = ($this->user) ? $this->user->id : $this->owner_id;\r\n\r\n\t\tUserFilesRemoveFile($dbh, $this->id, $userid, false, true);\r\n\t}", "private function removeOldParts()\n {\n $filename = $this->substream->getFilename();\n for ($i = $this->index + 1; true; ++$i) {\n $indexed_filename = $this->getIndexPartFilename($filename, $i);\n $target = dirname($this->filename).'/'.$indexed_filename;\n if (file_exists($target)) {\n unlink($target);\n } else {\n break;\n }\n }\n }", "protected function deleteAll()\n {\n Yii::$app->db->createCommand()\n ->delete($this->tableName, [$this->primaryKey => $this->owner->{$this->primaryKey}])\n ->execute();\n }", "protected function cleanup()\n {\n foreach ($this->temp_files as $file) {\n $this->filesystem->remove($file);\n }\n $this->temp_files = [];\n }", "public function delete()\n\t{\n\t\t$transaction = $this->dbConnection->beginTransaction();\n\t\ttry {\n\t\t\tforeach ($this->previnterventions as $prev) {\n\t\t\t\t$prev->delete();\n\t\t\t}\n\t\t\tforeach ($this->relevantinterventions as $relv) {\n\t\t\t\t$relv->delete();\n\t\t\t}\n\t\t\tforeach ($this->deviationreasons as $devr) {\n\t\t\t\t$devr->delete();\n\t\t\t}\n\t\t\tforeach ($this->filecollection_assignments as $fca) {\n\t\t\t\t$fca->delete();\n\t\t\t}\n\t\t\tif (parent::delete()) {\n\t\t\t\t$transaction->commit();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new Exception('unable to delete');\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\t$transaction->rollback();\n\t\t\tthrow $e;\n\t\t}\n\n\t}", "public function testDeleteReplenishmentFile()\n {\n }", "public function clean() {\n $this->requires = array();\n $this->getResource()->clear();\n }", "public function after_delete() {}", "protected function _delete()\r\n {\r\n parent::_delete();\r\n }", "protected function beforeDelete($data)\n {\n $this->cleanFiles($data);\n }", "private function doCleanup($unchecked)\n {\n $tracker = $this->tracker;\n /* @var \\PhpGuard\\Listen\\Resource\\TrackedObject $tracked */\n foreach($unchecked as $id=>$tracked){\n $origin = $tracked->getResource();\n if(!$origin->isExists()){\n $tracker->addChangeSet($tracked,FilesystemEvent::DELETE);\n $tracker->remove($tracked);\n }\n unset($unchecked[$id]);\n }\n }", "protected function MetaAfterDelete() {\n\t\t}", "function preDelete()\n {\n }", "public function afterDelete()\n {\n if ($this->image) $this->image->delete();\n if ($this->reindex) Slide::reindex();\n }", "public function clean()\n\t{\n\t\t$this->deleteFromContainer($this->binary);\n\t}", "function deleteFile() {\r\n\t\tif (file_exists($this->data[$this->alias]['path'])) {\r\n\t\t\tunlink($this->data[$this->alias]['path']);\r\n\t\t}\r\n\t}", "public function deleteSource()\n {\n return Yii::$app->storage->fileSystemDeleteFile($this->filter_id . '_' . $this->file->name_new_compound);\n }", "protected function preDelete($keyValueArray) {\n $resources = $this->getAllWhere($keyValueArray, 'e.*');\n if ($resources) {\n foreach ($resources as $resource) {\n if ($resource && file_exists($resource['file_path'] . $resource['file_name'])) {\n if (!@unlink($resource['file_path'] . $resource['file_name'])) {\n log_message('error', 'Could Not Delete: ' . $resource['file_path'] . $resource['file_name']);\n }\n }\n $thumbs[] = \"_tiny\";\n $thumbs[] = \"_small\";\n $thumbs[] = \"_big\";\n $thumbs[] = \"_admin\";\n foreach ($thumbs as $thumb) {\n $thumbPath = site_image_thumb_path($thumb, $resource);\n if (file_exists($thumbPath)) {\n @unlink($thumbPath);\n }\n }\n }\n }\n }", "protected function runTransactionDestroy()\n {\n $this->request->transaction->destroy(); /* Unlink the transaction file */\n unset($this->request->transaction); /* Destroy the pointer in memory */\n }", "abstract public function deleteAll();", "public function testDeleteMetadata2UsingDELETE()\n {\n }" ]
[ "0.6916688", "0.6694917", "0.6648253", "0.6619436", "0.65787554", "0.65740263", "0.643434", "0.6400751", "0.6371196", "0.631779", "0.6182005", "0.61655694", "0.61603624", "0.61326957", "0.60912347", "0.59851456", "0.5976356", "0.5969098", "0.59485453", "0.59480375", "0.59333736", "0.5913049", "0.59126455", "0.59123474", "0.59002656", "0.58886147", "0.5884406", "0.58720255", "0.58700657", "0.58581084", "0.5857907", "0.58535314", "0.5839321", "0.58372194", "0.58312124", "0.5831101", "0.58291143", "0.5826293", "0.5825556", "0.5822423", "0.5800201", "0.57998246", "0.57985467", "0.57960635", "0.5788727", "0.57884973", "0.5782049", "0.5772642", "0.5767899", "0.573941", "0.57366645", "0.57352823", "0.5725885", "0.57236195", "0.5715272", "0.5704784", "0.5690567", "0.5689579", "0.5679858", "0.5678021", "0.5670922", "0.5665159", "0.566315", "0.566263", "0.56590086", "0.5658822", "0.56573063", "0.56542933", "0.56525534", "0.5651908", "0.5641326", "0.5640821", "0.5639563", "0.5639267", "0.56300116", "0.56245416", "0.56195664", "0.56184584", "0.56179744", "0.56155306", "0.5611333", "0.5609163", "0.5608974", "0.5607534", "0.5601131", "0.5597931", "0.5587629", "0.5587248", "0.55732405", "0.5572868", "0.5572511", "0.5566098", "0.5565859", "0.5562729", "0.5562054", "0.5556783", "0.55534446", "0.5551251", "0.5546097", "0.55398077" ]
0.6041394
15
Ensure that changes to records flush overwritten files, and update the visibility of other assets.
public function onBeforeWrite() { if (!$this->hasAssets()) { return; } // Prepare blank manipulation $manipulations = new AssetManipulationList(); // Mark overwritten object as deleted if ($this->owner->isInDB()) { $priorRecord = DataObject::get(get_class($this->owner))->byID($this->owner->ID); if ($priorRecord) { $this->addAssetsFromRecord($manipulations, $priorRecord, AssetManipulationList::STATE_DELETED); } } // Add assets from new record with the correct visibility rules $state = $this->getRecordState($this->owner); $this->addAssetsFromRecord($manipulations, $this->owner, $state); // Whitelist assets that exist in other stages $this->addAssetsFromOtherStages($manipulations); // Apply visibility rules based on the final manipulation $this->processManipulation($manipulations); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function flushAssets()\n\t{\n\t\t(new Version)->refreshMediaVersion();\n\t}", "public function flush() {\n if ($this->c_owner) {\n if ($this->update('owner', $this->owner, Project::$tableName)) {\n $this->c_owner = false;\n }\n }\n if ($this->c_name) {\n if ($this->update('name', $this->name, Project::$tableName)) {\n $this->c_name = false;\n }\n }\n if ($this->c_description) {\n if ($this->update('description', $this->description, Project::$tableName)) {\n $this->c_description = false;\n }\n }\n \n if ($this->c_deadline) {\n if ($this->update('deadline', $this->deadline, Project::$tableName)) {\n $this->c_deadline = false;\n }\n }\n if ($this->c_time) {\n if ($this->update('time', $this->time, Project::$tableName)) {\n $this->c_time = false;\n }\n }\n }", "private function checkFileUpdates() {\n\n if ($this->request->params['controller'] != 'acos' || ($this->request->params['action'] != 'admin_synchronize' && $this->request->params['action'] != 'admin_prune_acos' && $this->request->params['action'] != 'admin_build_acl')) {\n if ($this->AclManager->isControllerHashFileOutOfSync()) {\n $missingAcoNodes = $this->AclManager->getMissingAcos();\n $nodesToPrune = $this->AclManager->getAcosToPrune();\n\n $hasUpdates = false;\n\n if (count($missingAcoNodes) > 0) {\n $hasUpdates = true;\n }\n\n if (count($nodesToPrune) > 0) {\n $hasUpdates = true;\n }\n\n $this->set('nodesToPrune', $nodesToPrune);\n $this->set('missingAcoNodes', $missingAcoNodes);\n\n if ($hasUpdates) {\n $this->render('Acl.Acos/admin_has_updates');\n $this->response->send();\n $this->AclManager->updateControllerHashFile();\n exit();\n } else {\n $this->AclManager->updateControllerHashFile();\n }\n \t\t\n \t\t$this->AclManager->update_controllers_hash_file();\n }\n }\n }", "protected function processChangedAndNewFiles() {}", "public function onAfterSkippedWrite()\n {\n $this->updateChildFilesystem();\n }", "public function onAfterDelete()\n {\n if (!$this->hasAssets()) {\n return;\n }\n\n // Prepare blank manipulation\n $manipulations = new AssetManipulationList();\n\n // Add all assets for deletion\n $this->addAssetsFromRecord($manipulations, $this->owner, AssetManipulationList::STATE_DELETED);\n\n // Whitelist assets that exist in other stages\n $this->addAssetsFromOtherStages($manipulations);\n\n // Apply visibility rules based on the final manipulation\n $this->processManipulation($manipulations);\n }", "protected function afterUpdating()\n {\n }", "public function updateChildFilesystem()\n {\n // Don't synchronise on live (rely on publishing instead)\n if (class_exists(Versioned::class) && $this->hasExtension(Versioned::class) && Versioned::get_stage() === Versioned::LIVE) {\n return;\n }\n\n $this->flushCache();\n // Writing this record should trigger a write (and potential updateFilesystem) on each child\n foreach ($this->AllChildren() as $child) {\n $child->write();\n }\n }", "private function flushFileCachedValues() {\n\n foreach ( $this->getSheetNames( true ) as $sheet ) {\n\n $this->setActiveSheet( $sheet, 'name' );\n $this->activeSheet->updateCalculations();\n $this->saveActiveSheetChanges();\n }\n\n }", "function damopen_assets_library_post_update_change_public_files_to_private() {\n $connection = Database::getConnection();\n // Select the uri from the database.\n $query = $connection\n ->select('file_managed', 'fm')\n ->fields('fm', ['fid', 'uri']);\n $result = $query->execute();\n\n $fileStorage = Drupal::entityTypeManager()->getStorage('file');\n $fileSystem = Drupal::service('file_system');\n $priv_path = $fileSystem->realpath('private://');\n\n foreach ($result as $row) {\n $uri = str_replace('public://', '', $row->uri);\n $file_name = substr(strrchr($uri, '/'), 1);\n $folder = str_replace($file_name, '', $uri);\n // Check if the directory already exists.\n // Directory does not exist, so lets create it.\n if (\n !is_dir($priv_path . '/' . $folder)\n && !mkdir($concurrentDirectory = $priv_path . '/' . $folder, 0775, TRUE)\n && !is_dir($concurrentDirectory)\n ) {\n throw new RuntimeException(sprintf('Directory \"%s\" was not created', $concurrentDirectory));\n }\n\n // Move the file to the private folder.\n $new_uri = $fileSystem->move('public://' . $uri, 'private://' . $uri, FileSystemInterface::EXISTS_REPLACE);\n\n if ($new_uri !== NULL) {\n // Replace the uri with the new private schema's uri.\n /** @var \\Drupal\\file\\FileInterface $file */\n $file = $fileStorage->load($row->fid);\n $file->setFileUri($new_uri);\n $file->save();\n }\n }\n}", "public function afterSave()\n {\n if (!$this->files) {\n return;\n } else if ($this->contentAttribute) {\n $this->owner->updateAttributes([$this->contentAttribute => $this->processContentFiles(true)['content']]);\n } else {\n /** @var UploadedFile $file */\n foreach ($this->files as $key => $file) {\n $this->files[$key] = $this->saveFile($file->tempName, $file->name);\n }\n }\n $this->setAttributeValue(\\array_map(function($v){ return basename($v); }, array_filter($this->files)));\n }", "public function beforeSave()\n {\n /** @var BaseActiveRecord $model */\n $model = $this->owner;\n foreach ($this->attributes as $attribute => $attributeConfig) {\n if ($this->hasScenario($attributeConfig)) {\n if (isset($this->files[$attribute]) && $this->validateFile($this->files[$attribute])) {\n if (!$model->getIsNewRecord() && $model->isAttributeChanged($attribute)) {\n if ($this->getAttributeConfig($attributeConfig, 'unlinkOnSave') === true) {\n $this->deleteFileName[$attribute] = $this->resolveFileName($attribute, true);\n }\n }\n } else {\n // Protect attribute\n $model->$attribute = $model->getOldAttribute($attribute);\n }\n } else {\n if (!$model->getIsNewRecord() && $model->isAttributeChanged($attribute)) {\n if ($this->getAttributeConfig($attributeConfig, 'unlinkOnSave')) {\n $this->deleteFileName[$attribute] = $this->resolveFileName($attribute, true);\n }\n }\n }\n }\n $this->fileSave();\n }", "protected function processUpdates()\n {\n $this->importStaticData();\n }", "public function update(){\n parent::update();\n $this->collection = null;\n $this->files = null;\n $this->dublinCore = null;\n }", "private function postUpdate() {\n\t\t$this->info('Import finished, cleaning up.');\n\t\t$this->reCache();\n\t}", "public function flushFile()\n {\n $this->em->flush();\n }", "protected function removeSysFileReferenceRecordsFromImportDataWithRelationToMissingFile() {}", "protected function fixFiles()\n {\n\n \tforeach (glob(base_path($this->passport_path) . '*.php') as $filename)\n \t{\n \t $file = file_get_contents($filename);\n \t file_put_contents($filename, str_replace($this->laravel_model, $this->mongo_model, $file));\n \t //$this->info($filename . \" has been Checked/Modified\");\n \t}\n\n }", "function onAfterWrite(){\r\n\t\tparent::onAfterWrite();\r\n\t\t$this->cleaningUpVariationData();\r\n\t}", "protected function after_execute() {\n $this->add_related_files('block_file', 'intro', null);\n $this->add_related_files('block_file', 'file', null);\n }", "public function onBeforeWrite()\n {\n $this->getTextCache()->invalidate($this->owner);\n }", "protected function updateVisibility()\n {\n if($this->visibility === null) {\n return;\n }\n\n if ($this->instance->content->visibility != $this->visibility) {\n $this->instance->content->visibility = $this->visibility;\n\n $contentIds = [];\n foreach($this->instance->mediaList as $media) {\n $contentIds[] = $media->content->id;\n }\n\n Content::updateAll(['visibility' => $this->visibility], ['in', 'id', $contentIds]);\n }\n }", "protected function afterSave(){\n\t\tparent::afterSave();\n\t\t\n\t\tYii::app()->cache->delete('sponsorsAdDisplayPercent');\n\t}", "function checkSavedFiles(){\n\t\t \n\t\t $tableFiles = new TabOut_TableFiles;\n\t\t $baseFileName = $this->tableID;\n\t\t $tableFiles->getAllFileSizes($baseFileName);\n\t\t $this->files = $tableFiles->savedFileSizes;\n\t\t $metadata = $this->metadata;\n\t\t $tableFields = $metadata[\"tableFields\"];\n\t\t unset($metadata[\"tableFields\"]);\n\t\t $metadata[\"files\"] = $this->files;\n\t\t $metadata[\"tableFields\"] = $tableFields; //just for sake of order! :)\n\t\t $this->metadata = $metadata;\n\t\t \n\t }", "public function ApplyChanges()\n {\n parent::ApplyChanges();\n\n }", "public function reAnimate()\n {\n $this->addOrRemovePublishedAtTimeToFrontmatter();\n\n // get last modified unixtime from file\n $lastModified = filemtime($this->index_path);\n\n // check if file has been modified since last save\n if ($this->post->last_modified != $lastModified) {\n $data = $this->prepareContentData();\n $this->post = $this->content->update($this->post, $data);\n $this->addSlugToFrontmatter();\n $this->regenerateStatic($this->post->id, $this->path.'/index.md', $this->frontmatter, $this->discharger->getMarkdown());\n clearstatcache();\n $data['last_modified'] = filemtime($this->path.'/index.md');\n $this->post = $this->content->update($this->post, $data);\n }\n }", "public function flush()\n {\n if (file_exists($this->CacheFolder . \"/\" . $this->CacheIndex)) {\n unlink($this->CacheFolder . \"/\" . $this->CacheIndex);\n touch($this->CacheFolder . \"/\" . $this->CacheIndex);\n }\n if (file_exists($this->CacheFolder . \"/\" . $this->CacheDB)) {\n unlink($this->CacheFolder . \"/\" . $this->CacheDB);\n touch($this->CacheFolder . \"/\" . $this->CacheDB);\n }\n }", "public function updateSource() {\n if (!empty($this->imported)) {\n $data = $this->source->data;\n if (empty($data)) {\n $data = array();\n }\n foreach ($this->imported as $key) {\n $data[] = $key;\n }\n $this->source->data = $data;\n $this->source->last_updated = date('Y-m-d H:i:s', strtotime('now'));\n $this->source->save();\n $this->imported = array();\n }\n }", "protected function beforeUpdating()\n {\n }", "function commitChanges() {\r\n\t\tglobal $file;\r\n\t\tglobal $expenses;\r\n\r\n\t\tsortExpensesDate();\r\n\t\trenumber(&$expenses);\r\n\r\n\t\t$xmlString = toXML();\r\n\r\n\t\t$fp = fopen($file.\".bak\", \"w\");\r\n\t\tflock($fp, LOCK_EX);\r\n\t\tfputs($fp, $xmlString);\r\n\t\tflock($fp, LOCK_UN);\r\n\t\tfclose($fp);\r\n\r\n\t\tswapFiles();\r\n\t}", "public function flush()\n {\n $f = fopen($this->file, 'w');\n\n foreach ($this->duplicates as $hash => $similarFiles) {\n $lines = implode(\"\\r\\n\", $similarFiles) . \"\\r\\n\\r\\n\";\n fwrite($f, $lines);\n }\n\n fclose($f);\n }", "function update_file() {\r\n\t\tset_transient( 'av5_css_file', true );\r\n\t}", "public function afterValidate()\n {\n if ($this->owner->hasAttribute($this->attribute) && $this->files) {\n $this->owner->setAttribute($this->attribute, array_map(function($v){ return $v->name; }, $this->files));\n }\n if ($this->contentAttribute) {\n $this->owner->addErrors([$this->contentAttribute => $this->owner->getErrors($this->attribute)]);\n $this->owner->clearErrors($this->attribute);\n }\n if (!$this->files) {\n $this->owner->{$this->attribute} = $this->oldValue;\n }\n }", "public function postImport() {\n parent::postImport();\n if (!civicrm_initialize()) {\n return;\n }\n // Need to clear the cache once the fields are created.\n civicrm_api3('system', 'flush', array('version' => 3));\n }", "public function flushChanges()\n {\n $this->om->flush();\n }", "function saveAndFlushCalculationCaches() {\n\n $this->saveToFile();\n\n $file = $this->getExtractedFile();\n\n $this->flushFileCachedValues();\n\n $this->saveToFile();\n }", "public function staticAssets(): void\n {\n $this->handle->writeln('');\n $this->handle->writeln('<white>Mirroring Static Asset(s)</white>');\n $this->mirrorStaticAssets();\n $this->teardown('Finished mirroring Static Asset');\n }", "public function refreshUploaded()\n {\n $this->setUploaded(new \\DateTime());\n }", "protected function _preupdate() {\n }", "public function ApplyChanges()\n {\n parent::ApplyChanges();\n\n // Update data\n $this->Update();\n }", "public function flushUpdates();", "public function updateOriginal()\n {\n // @todo Bug#1101: shouldn't just serialise this object\n // because some things change for the original\n // loaded_width\n // loaded_height\n $this->write($this->getOriginalSourceFilename());\n }", "public function onAfterWrite()\n\t{\n\t\tparent::onAfterWrite();\n\t\tif ($this->owner->UntranslatableFields_skipOnAfterWrite) return; //Another object has started the saving process, so don't create an infinite recursion loop\n\t\t$untranslatable_fields = $this->getUntranslatableFields();\n\t\tif (empty($untranslatable_fields)) return; //Should not translate this model at all (for some reason this extension has still been applied to this model, but there's nothing to do)\n\t\tforeach ($this->owner->getTranslations() as $translated_object)\n\t\t{\n\t\t\t$write = false;\n\t\t\tforeach ($untranslatable_fields as $field_name)\n\t\t\t{\n\t\t\t\tif ($translated_object->$field_name != $this->owner->$field_name)\n\t\t\t\t{\n\t\t\t\t\t$translated_object->$field_name = $this->owner->$field_name;\n\t\t\t\t\t$write = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($write)\n\t\t\t{\n\t\t\t\t$do_publish = $translated_object->hasMethod('Published') && $translated_object->Published();\n\t\t\t\tif ($do_publish) die();\n\t\t\t\t$translated_object->UntranslatableFields_skipOnAfterWrite = true;\n\t\t\t\t$translated_object->write();\n\t\t\t\tunset($translated_object->UntranslatableFields_skipOnAfterWrite);\n\t\t\t\t#if ($do_publish) $translated_object->Publish(); //If an object was published before this modification, publish it again in order to make the changes public.\n\t\t\t}\n\t\t}\n\t}", "public function afterUpdate(): void\n {\n if ($this->oldParentId != $this->owner->getAttribute($this->ownerParentIdAttribute)) {\n $this->rebuildTreePath();\n }\n }", "function updated_file() {\r\n\t\tdelete_transient( 'av5_css_file' );\r\n\t}", "public function updateDateHolds() {\n\t\t$now = time();\n\t\t$this->load->model(\"asset_model\");\n\t\t$this->load->model(\"search_model\");\n\n\t\t$qb = $this->doctrine->em->createQueryBuilder();\n\t\t$qb->select(\"a\")->from(\"Entity\\Asset\", \"a\")\n\t\t\t->where(\"a.availableAfter <= CURRENT_DATE()\")\n\t\t\t->andWhere(\"a.assetId IS NOT NULL\")\n\t\t\t->andWhere(\"a.deleted = FALSE\");\n\n\t\t$assets = $qb->getQuery()->execute();\n\t\tforeach($assets as $entry) {\n\t\t\t$this->asset_model->loadAssetFromRecord($entry);\n\t\t\t$this->search_model->addOrUpdate($this->asset_model);\n\t\t\techo $this->asset_model->getAssetTitle(true) . \"\\n\";\n\t\t}\n\n\t}", "public function beforeValidate()\n {\n if ($this->filesToDelete()) {\n $this->deleteFiles(json_decode($this->owner->getOldAttribute($this->attribute)), null, false);\n }\n $this->owner->{$this->attribute} = $this->files = $this->contentAttribute\n ? $this->processContentFiles(false)['files']\n : UploadedFile::getInstances($this->owner, $this->attribute);\n }", "protected function markImportDatabaseDone() {}", "protected function sweep()\n\t{\n\t\tforeach ($this->flashRecord as $key => $record) {\n\t\t\tif ($record['is'] == 'old') {\n\t\t\t\t/* remove old */\n\t\t\t\tunset($this->flashRecord[$key]);\n\t\t\t} elseif ($record['is'] == 'new' && !isset($record['until'])) {\n\t\t\t\t/* tag new as old unless it has until */\n\t\t\t\t$this->flashRecord[$key]['is'] = 'old';\n\t\t\t} elseif (isset($record['until']) && $record['until'] < time()) {\n\t\t\t\t/* remove until */\n\t\t\t\tunset($this->flashRecord[$key]);\n\t\t\t}\n\t\t}\n\n\t\t$this->save();\n\t}", "protected function versionablePreSave()\n {\n if ($this->versioningEnabled === true) {\n $this->versionableDirtyData = $this->getDirty();\n $this->updating = $this->exists;\n }\n }", "function beforeSaveLoop()\r\n {\r\n }", "protected function writeSysFileStorageRecords() {}", "public function syncMetadata() {}", "protected function afterSave()\n {\n return;\n }", "protected function after_execute() {\n $this->add_related_files('mod_ableplayer', 'intro', null);\n $this->add_related_files('mod_ableplayer', 'poster', null);\n $this->add_related_files('mod_ableplayer', 'media', 'ableplayer_media');\n $this->add_related_files('mod_ableplayer', 'desc', 'ableplayer_desc');\n $this->add_related_files('mod_ableplayer', 'caption', 'ableplayer_caption');\n }", "public function beforeSave()\n {\n $this->getRecord()->clearCache() && $this->getRecord()->triggerEvent();\n return parent::beforeSave();\n }", "protected function after_execute() {\n $this->add_related_files('mod_activitystatus', 'default_background', null);\n $this->add_related_files('mod_activitystatus', 'default_status', null);\n $this->add_related_files('mod_activitystatus', 'modstatusimages', null);\n $this->add_related_files('mod_activitystatus', 'coursestatusimages', null);\n\n $oldmodid = $this->task->get_old_activityid();\n $newmodid = $this->task->get_old_moduleid();\n }", "public function update() {\n\t\treturn;\n\t}", "protected function flushWrites()\n {\n foreach ($this->queuedForWrite as $style) {\n $ext = pathinfo($this->uploadedFile->getFilename(), PATHINFO_EXTENSION);\n if (\n $style->dimensions\n && (\n $this->uploadedFile->isImage()\n || in_array($ext, ['psd', 'ai', 'eps', 'ar3'])\n )\n ) {\n if ($ext == 'psd') {\n $uploadedFile = new UploadedFile(\n new SymfonyUploadedFile(public_path('img/files/psd.png'), 'psd.png')\n );\n $file = $this->resizer->resize($uploadedFile, $style);\n }\n else if ($ext == 'ai') {\n $uploadedFile = new UploadedFile(\n new SymfonyUploadedFile(public_path('img/files/ai.png'), 'ai.png')\n );\n $file = $this->resizer->resize($uploadedFile, $style);\n }\n else if ($ext == 'eps') {\n $uploadedFile = new UploadedFile(\n new SymfonyUploadedFile(public_path('img/files/eps.png'), 'eps.png')\n );\n $file = $this->resizer->resize($uploadedFile, $style);\n }\n else if ($ext == 'ar3') {\n $uploadedFile = new UploadedFile(\n new SymfonyUploadedFile(public_path('img/files/ar3.png'), 'ar3.png')\n );\n $file = $this->resizer->resize($uploadedFile, $style);\n }\n else if ($this->uploadedFile->isImage()) {\n $file = $this->resizer->resize($this->uploadedFile, $style);\n }\n }\n else {\n $file = $this->uploadedFile->getRealPath();\n }\n\n $filePath = $this->path($style->name);\n $this->move($file, $filePath);\n }\n\n $this->queuedForWrite = [];\n }", "protected function performUpdate() {}", "public function onOutputGenerated()\n {\n if (isset($this->assetData)) {\n $cache = $this->grav['cache'];\n if (0 < count($this->assetData) || !method_exists($cache, \"delete\")) {\n $cache->save($this->assetId, $this->assetData);\n } else {\n $cache->delete($this->assetId);\n }\n }\n }", "private function youreMine ()\n {\n if ( CACHE_ENABLED === true ) {\n $status = $this->cache->fetch( CACHE_ID_RUNNING );\n if ( $status === \"DONE\" || $status === false ) {\n $running = false;\n $this->cache->save( CACHE_ID_RUNNING, \"STARTED\" );\n } else {\n $running = true;\n }\n } else {\n if( file_exists( RUNNING_FILE ) ) {\n if( file_get_contents( RUNNING_FILE ) === \"DONE\" ) {\n $running = false;\n $this->createLocal( \"file\", RUNNING_FILE, \"put\", \"STARTED\" );\n } else {\n $running = true;\n }\n } else {\n $running = false;\n $this->createLocal( \"file\", RUNNING_FILE, \"put\", \"STARTED\" );\n }\n }\n if ( $running === false ) {\n $contents = $this->recurse();\n if ( CACHE_ENABLED === true ) {\n foreach ( $contents as $content ){\n $dbx_cache_id = md5( \"dbxContent\" . $content[0] );\n list( $object, , $mtime, , $rev ) = $this->cache->fetch( $dbx_cache_id );\n if ( $object === null || $object !== null && $mtime < $content[2] ) {\n $content[4] = $rev;\n $metadata = $this->uploadFile( $content );\n $content[2] = $metadata['modified'];\n $content[4] = $metadata['rev'];\n $this->cache->save( $dbx_cache_id, $content );\n }\n }\n $this->cache->save( CACHE_ID_RUNNING, \"DONE\" );\n } else {\n foreach( $contents as $content ){\n $this->uploadFile( $content );\n }\n $this->createLocal( \"file\", RUNNING_FILE, \"put\", \"DONE\" );\n }\n }\n }", "public function doNotSaveFiles() {\n $this->_saveToFile = false;\n }", "public function postImport() {\n $this->closeFile();\n }", "public function flush() {\n foreach ($this->openedFiles as $handle) {\n fclose($handle);\n }\n }", "function _saveOriginal(&$model, $name) {\n $setting = $this->settings[$model->name][$name];\n \n # create original data to save into the database\n $original = array(\n 'foreign_key' => $model->id,\n 'model' => $model->name,\n 'field' => $name,\n 'version' => 'original',\n 'filename' => null,\n 'mime' => assetMimeType($model->data[$name]['tmp_name']),\n 'size' => $model->data[$name]['size']\n );\n \n # include dimensions if a valid file-type (image, swf, etc)\n list($original['width'], $original['height']) = getimagesize($model->data[$name]['tmp_name']);\n \n # if this is not an update and files are set to overwrite\n if (!isset($setting['overwrite']) || $setting['overwrite'] == true) {\n \n # count the existing rows for renaming the file\n $existing = $model->{$name}->find('all', array(\n 'fields' => array('id', 'filename'),\n 'conditions' => array('model' => $model->name, 'foreign_key' => $model->id, 'field' => $name)\n ));\n \n # loop through the existing files and remove each entry\n foreach (!empty($existing) && is_array($existing) ? $existing : array() as $remove) {\n assetDelete($model, array($remove[$name]['filename']));\n }\n \n # delete all existing records for this field\n $model->{$name}->deleteAll(array('model' => $model->name, 'foreign_key' => $model->id, 'field' => $name));\n }\n \n # set the filename field value\n $original['filename'] = assetFileName($model->data[$name]['name'], 'original', $name);\n \n # create new entry\n $model->{$name}->create();\n \n # save the original file data\n if (!$model->{$name}->create() || !$model->{$name}->save($original, false)) {\n $model->{$name}->delete($original['parent_id']);\n $this->_setError($model, 'Critical Error found while saving record in afterSave: '. $name, 'error');\n return false;\n }\n \n # update the parent_id\n $model->{$name}->saveField('parent_id', $model->{$name}->id);\n \n # create the directory path for this asset\n if (!assetDirectoryCreate($model)) {\n $this->_setError($model, 'Storage directory was not created, file not properly uploaded. Please try again and/or contact an Administrator.');\n return false;\n }\n \n $this->directory = assetDirectoryPath($model);\n \n # move the original file\n if (!assetSaveFile($model, $model->data[$name]['tmp_name'], $original['filename'])) {\n $this->_setError($model, 'Critical Error found while saving file in afterSave: '. $name, 'error');\n return false;\n }\n \n # save the original filename\n unset($model->data[$name]);\n $model->data[$name]['filename'] = $original['filename'];\n $model->data[$name]['type'] = $original['mime'];\n \n return true;\n }", "protected function update() {}", "private function flush_maps()\r\n {\r\n $fp = fopen(Mapprovider::MAP_STORAGE, \"w\");\r\n fwrite($fp, serialize($this->maps));\r\n fclose($fp);\r\n }", "protected function _flushVars() {\n if (isset($this->LdapObject->id)) {\n $this->LdapObject->id = null;\n }\n if (isset($this->LdapObject->primaryKey)) {\n $this->LdapObject->primaryKey = 'uid';\n }\n \n $this->sforceData = array();\n $this->stagingData = array();\n $this->ldapData = array();\n $this->syncOperation = 'nothing';\n \n }", "protected function resetStatuses()\n {\n $this->pubDirectory->delete($this->getRelativeFilePath(self::IMPORT_STATUS_READY));\n $this->pubDirectory->delete($this->getRelativeFilePath(self::IMPORT_STATUS_BUSY));\n $this->pubDirectory->delete($this->getRelativeFilePath(self::IMPORT_STATUS_FAILED));\n }", "function refreshDataSet(){\n\t\t$this->LoadFiles();\n\n\t\t$this->getUsers();\n\t\t$this->getSchedule();\n\n\t\t//close and free the file locks\n\t\t$this->fileHandler->close($this->userFile);\n\t\t$this->fileHandler->close($this->scheduleFile);\n\t}", "protected function recreatePackageStatesFileIfNotExisting() {}", "protected function afterUpdate() {\n\t}", "public function postFlush()\n {\n $fileSystem = new Filesystem();\n $fileSystem->remove($this->filesScheduledForDeletion);\n }", "private function moveAssets()\n {\n foreach ($this->reports as $report) {\n $old_file = config('import.import_assets_reports_path') . DIRECTORY_SEPARATOR . $report->file;\n $new_file = config('momentum.reports_path') . DIRECTORY_SEPARATOR . $report->file;\n\n $this->moveFile($old_file, $new_file);\n }\n\n foreach ($this->organizations as $organization) {\n // not every organization has a logo\n if (!$organization->logo) {\n continue;\n }\n\n $old_file = config('import.import_assets_logos_path') . DIRECTORY_SEPARATOR . $organization->logo;\n $new_file = config('momentum.logos_path') . DIRECTORY_SEPARATOR . $organization->logo;\n\n $this->moveFile($old_file, $new_file);\n }\n }", "public function _afterSave()\n {\n Mage::getResourceModel('bpost_shm/tablerates_international')->uploadAndImport($this);\n }", "private function updateRows()\n {\n $path = $this->getVar('upload_folder');\n $rows = $this->entityManager->getRepository('Downloads_Entity_Download')->findAll();\n $count = 0;\n foreach ($rows as $row) {\n $parts = explode('.', $row->getUrl());\n if (is_numeric($parts[0]) && ((int)$parts[0] == (int)$row->getLid())) {\n // this section renames numeric filenames to strings and attempts to\n // rename the actual file it also corrects the url for local files\n $filenameParts = explode('.', $row->getFilename());\n $newname = DataUtil::formatForURL($filenameParts[0]) . '.' . array_pop($filenameParts);\n $newurl = \"$path/$newname\";\n $oldurl = $path . '/' . $row->getUrl();\n if (@rename(DataUtil::formatForOS($oldurl), DataUtil::formatForOS($newurl))) {\n // update DB\n $row->setUrl($newurl);\n $row->setFilename($newname);\n } else {\n // update DB\n $row->setUrl($oldurl);\n $row->setFilename($newname);\n }\n } else {\n // this section simply renames filenames to only have one extension\n // old versions of the module somehow added double extensions\n $filenameParts = explode('.', $row->getFilename());\n if (count($filenameParts) > 2) {\n $newname = DataUtil::formatForURL($filenameParts[0]) . '.' . array_pop($filenameParts);\n // update DB\n $row->setFilename($newname);\n }\n }\n $this->entityManager->persist($row);\n if ($count > 20) {\n $this->entityManager->flush();\n $count = 0;\n } else {\n $count++;\n }\n }\n // clean up leftovers\n $this->entityManager->flush();\n }", "protected function _afterSave()\n {\n if ($this->isValueChanged()) {\n Mage::getModel('core/design_package')->cleanMergedJsCss();\n }\n }", "public function autosaved()\n {\n }", "function updateFileDescriptions() {\n try {\n $project_objects_table = TABLE_PREFIX . 'project_objects';\n $content_backup_table = TABLE_PREFIX . 'content_backup';\n\n DB::beginWork('Updating file descriptions @ ' . __CLASS__);\n\n $rows = DB::execute(\"SELECT id, body FROM $project_objects_table WHERE type = 'File' AND body != '' AND body IS NOT NULL\");\n if($rows) {\n foreach($rows as $row) {\n DB::execute(\"INSERT INTO $content_backup_table (parent_type, parent_id, body) VALUES ('File', ?, ?)\", $row['id'], $row['body']);\n DB::execute(\"UPDATE $project_objects_table SET body = ? WHERE id = '$row[id]'\", $this->updateHtmlContent($row['body']));\n } // foreach\n } // if\n\n DB::commit('File descriptions updated @ ' . __CLASS__);\n } catch(Exception $e) {\n DB::rollback('Failed to upgrade file descriptions @ ' . __CLASS__);\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function updateAnalysis() {\n return;\n }", "protected function preSave() {\n return TRUE;\n }", "public function preSave() {}", "protected function sync()\n {\n $this->image =& $this->temp;\n unset($this->temp);\n }", "protected function saving() {\n // This will get reimplemented by children when necessary\n }", "public function after_update() {}", "public function afterSave()\n {\n $this->unlinkOnSave();\n }", "public function upgradeRecords() {\n foreach ($this->records as $record) {\n $type = $record[$this->Version->Version->alias]['type'];\n $version = $record[$this->Version->Version->alias]['version'];\n\n $mapping = $this->mappings[$type];\n $migration = $mapping[$version];\n\n $this->Version->Version->id = $record[$this->Version->Version->alias]['id'];\n $this->Version->Version->saveField('class', $migration['class']);\n }\n }", "public function save() {\n $tmpHandle = new \\SplFileObject('php://temp', 'w+');\n $tmpData = '';\n\n $tmpHandle->fputcsv($this->model->columns());\n\n foreach($this->all() as $record) {\n $tmpHandle->fputcsv($record->toArray());\n $record->exists = true;\n }\n\n $tmpHandle->rewind();\n\n while ( ! $tmpHandle->eof()) {\n $tmpData .= $tmpHandle->fgets();\n }\n\n $this->file->flock(\\LOCK_EX | \\LOCK_NB);\n $this->file->ftruncate(0);\n $this->file->rewind();\n $this->file->fwrite($tmpData);\n $this->file->flock(\\LOCK_UN);\n }", "public function postFlush(): void\n {\n try {\n foreach ($this->createdObjects as $object) {\n $this->publishUpdate($object, $this->createdObjects[$object], 'create');\n }\n\n foreach ($this->updatedObjects as $object) {\n $this->publishUpdate($object, $this->updatedObjects[$object], 'update');\n }\n\n foreach ($this->deletedObjects as $object) {\n $this->publishUpdate($object, $this->deletedObjects[$object], 'delete');\n }\n } finally {\n $this->reset();\n }\n }", "public function reconcile() {\n $volume = $this->orders->sum('pivot.volume');\n\n if($this->volume > $volume) $this->order_status = 'p';\n else $this->order_status = 's';\n\n $this->save();\n }", "function onAfterWrite() {\n\t\t$bt = defined('DB::USE_ANSI_SQL') ? \"\\\"\" : \"`\";\n\n\t\tif(!$this->owner->ApproverGroups()->Count() && $this->owner->CanApproveType == 'OnlyTheseUsers') {\n\t\t\t$SQL_group = Convert::raw2sql('site-content-approvers');\n\t\t\t$groupCheckObj = DataObject::get_one('Group', \"{$bt}Code{$bt} = '{$SQL_group}'\");\n\t\t\tif($groupCheckObj) $this->owner->ApproverGroups()->add($groupCheckObj);\n\t\t}\n\t\t\n\t\tif(!$this->owner->PublisherGroups()->Count() && $this->owner->CanPublishType == 'OnlyTheseUsers') {\n\t\t\t$SQL_group = Convert::raw2sql('site-content-publishers');\n\t\t\t$groupCheckObj = DataObject::get_one('Group', \"{$bt}Code{$bt} = '{$SQL_group}'\");\n\t\t\tif($groupCheckObj) $this->owner->PublisherGroups()->add($groupCheckObj);\n\t\t}\n\t}", "public function preSave() { }", "public function onAfterWrite()\n {\n if ($this->owner->ImageID) {\n $this->owner->Image()->publishSingle();\n }\n }", "public function flush(): void\n {\n $this->issues = [];\n }", "public function onPreUpdate()\n {\n $this->modified_at = new \\DateTime(\"now\");\n }", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "public function updateAction()\n {\n// $client = $init->getClient();\n// $init->updateFile($client);\n }", "public function markForDeletion(): void\n {\n $this->oldFileName = $this->fileName;\n $this->fileName = null;\n }" ]
[ "0.66175604", "0.59279233", "0.58682835", "0.5860525", "0.5831702", "0.578855", "0.578303", "0.56967306", "0.5691274", "0.5666461", "0.56320786", "0.5621597", "0.562093", "0.5562484", "0.5547433", "0.5499615", "0.5479114", "0.5458401", "0.5456594", "0.5452077", "0.54365784", "0.5433267", "0.5399764", "0.5397148", "0.53889525", "0.53678733", "0.5346857", "0.53425133", "0.53422016", "0.53386986", "0.5335988", "0.53297734", "0.5322759", "0.5308785", "0.530336", "0.5267854", "0.52638394", "0.5258073", "0.52505696", "0.5248843", "0.5247358", "0.5243154", "0.52405083", "0.5234839", "0.52217525", "0.5211613", "0.5201495", "0.5198801", "0.5195819", "0.5193826", "0.51922077", "0.5183319", "0.5183267", "0.51596326", "0.5159597", "0.515046", "0.5142969", "0.5134556", "0.51326174", "0.5124895", "0.511894", "0.5117611", "0.50943345", "0.50928366", "0.5087771", "0.50862443", "0.508623", "0.5085726", "0.50837976", "0.5070934", "0.50668824", "0.5060697", "0.5058012", "0.505636", "0.5053316", "0.5048534", "0.50448257", "0.5044511", "0.5044337", "0.50395215", "0.50287867", "0.5027831", "0.50127685", "0.50061154", "0.50053275", "0.5004932", "0.5001539", "0.49933666", "0.49826032", "0.49740064", "0.4970629", "0.49622044", "0.4960927", "0.49603012", "0.49589798", "0.49528745", "0.49514368", "0.49514368", "0.49486074", "0.49474436" ]
0.68842894
0
Check default state of this record
protected function getRecordState($record) { if ($this->isVersioned()) { // Check stage this record belongs to $stage = $record->getSourceQueryParam('Versioned.stage') ?: Versioned::get_stage(); // Non-live stages are automatically non-public if ($stage !== Versioned::LIVE) { return AssetManipulationList::STATE_PROTECTED; } } // Check if canView permits anonymous viewers return Member::actAs(null, function () use ($record) { return $record->canView() ? AssetManipulationList::STATE_PUBLIC : AssetManipulationList::STATE_PROTECTED; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function get_default_state();", "public function getIsDefault();", "function getDefaultState()\r\n\t{\r\n\t}", "public function isDefault()\n {\n return ($this->getOriginalInstance()->Default);\n }", "protected function hasDefault() {\n return $this->getFieldDefinition()->hasDefault();\n }", "public function getDefaultUserState();", "public function isDefault();", "public function hasOnlyDefaultValues()\n {\n if ($this->is_active !== false) {\n return false;\n }\n\n if ($this->is_closed !== false) {\n return false;\n }\n\n // otherwise, everything was equal, so return true\n return true;\n }", "protected function get_default() {\n\t\treturn false;\n\t}", "public function hasDefault();", "public function hasDefaults(): bool;", "function getDefaultState(){\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where(array('is_default'=>true));\r\n\t\t$recordSet = $this->db->get(TBL_MST_STATES);\r\n\t\t$data=$recordSet->result() ;\r\n\t\treturn $data[0]->id;\r\n\t}", "public function hasOnlyDefaultValues()\n {\n if ($this->active !== false) {\n return false;\n }\n\n // otherwise, everything was equal, so return true\n return true;\n }", "public function isDefault()\n {\n return $this->default;\n }", "public function isDefault()\n {\n return $this->default;\n }", "public function isDefault()\n {\n return $this->default;\n }", "public function isDefault()\n {\n return $this->default;\n }", "public function getIsDefault()\n {\n return $this->_isDefault === 1;\n }", "public function hasOnlyDefaultValues()\n {\n if ($this->deleted !== false) {\n return false;\n }\n\n if ($this->amount !== 1) {\n return false;\n }\n\n if ($this->amountevaluation !== 0) {\n return false;\n }\n\n if ($this->defaultstatus !== 0) {\n return false;\n }\n\n if ($this->defaultdirectiondate !== 0) {\n return false;\n }\n\n if ($this->defaultenddate !== 0) {\n return false;\n }\n\n if ($this->defaultpersoninevent !== 0) {\n return false;\n }\n\n if ($this->defaultpersonineditor !== 0) {\n return false;\n }\n\n if ($this->maxoccursinevent !== 0) {\n return false;\n }\n\n if ($this->showtime !== false) {\n return false;\n }\n\n if ($this->ispreferable !== true) {\n return false;\n }\n\n if ($this->isrequiredcoordination !== false) {\n return false;\n }\n\n if ($this->isrequiredtissue !== false) {\n return false;\n }\n\n if ($this->mnem !== '') {\n return false;\n }\n\n // otherwise, everything was equal, so return true\n return true;\n }", "public function usedDefault()\r\n {\r\n $attributeCode = $this->getAttribute()->getAttributeCode();\r\n $defaultValue = $this->getDataObject()->getAttributeDefaultValue($attributeCode);\r\n\r\n if (!$this->getDataObject()->getExistsStoreValueFlag($attributeCode)) {\r\n return true;\r\n } else if ($this->getElement()->getValue() == $defaultValue &&\r\n $this->getDataObject()->getStoreId() != $this->_getDefaultStoreId()\r\n ) {\r\n return false;\r\n }\r\n if ($defaultValue === false && !$this->getAttribute()->getIsRequired() && $this->getElement()->getValue()) {\r\n return false;\r\n }\r\n return $defaultValue === false;\r\n }", "public function hasDefaultValue(): bool;", "public function isDefault(): bool {\n return $this->attributeExists('default');\n }", "public function getIsDefault()\n {\n return $this->getProperty(\"IsDefault\");\n }", "public function isAllowedDefault()\n {\n return !$this->crud->request['crud'];\n }", "public function get_default_availability() {\n\t\treturn true;\n\t}", "public function hasOnlyDefaultValues()\n {\n if ($this->jml_lantai !== '1') {\n return false;\n }\n\n if ($this->asal_data !== '1') {\n return false;\n }\n\n if ($this->last_sync !== '1901-01-01 00:00:00') {\n return false;\n }\n\n // otherwise, everything was equal, so return true\n return true;\n }", "public function hasOnlyDefaultValues()\n {\n if ($this->last_sync !== '1901-01-01 00:00:00') {\n return false;\n }\n\n // otherwise, everything was equal, so return true\n return true;\n }", "public function isDefault(): bool\n {\n return $this->default;\n }", "public function isDefault()\n {\n return $this->column->name === 'id' && $this->column->type === 'id';\n }", "public function getdefaultStatus()\n {\n return $this->defaultstatus;\n }", "protected function control_record()\n\t{\n\t\treturn $this->key ? parent::control_record() : true;\n\t}", "public function hasOnlyDefaultValues()\n\t{\n\t\t\tif ($this->closed !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->lastfmid !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->hasphotos !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "public function hasDefaultValue()\n {\n return $this->hasDefaultValue;\n }", "public function hasOnlyDefaultValues()\n {\n if ($this->create_date !== '2020-04-16 09:40:03') {\n return false;\n }\n\n if ($this->last_update !== '2020-04-16 09:40:03') {\n return false;\n }\n\n if ($this->last_sync !== '1901-01-01 00:00:00') {\n return false;\n }\n\n // otherwise, everything was equal, so return true\n return true;\n }", "function hasDefaultValue() {\n return ($this->getProperty('default_value') !== null);\n }", "public function isInitial();", "public function applyDefaultValues()\n {\n $this->is_active = false;\n $this->is_closed = false;\n }", "private function getStateDefaultStatus($state)\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\t$status = false;\n $stateNode = $this->_getState($state);\n if ($stateNode) {\n $status = $this->quoteStatusFactory->create()->loadDefaultByState($state);\n $status = $status->getStatus();\n }\n return $status;\n\t\t}\n\t}", "public function getUserDefaultStatus();", "public function isDefault(): bool\n\t{\n\t\treturn boolval($this->default);\n\t}", "public function a_status_default_value_must_be_zero()\n {\n $email = factory(Email::class)->raw();\n unset($email['status']);\n\n Email::create($email);\n\n $this->assertCount(1, Email::all());\n }", "public function hasOnlyDefaultValues()\n {\n if ($this->setregis !== 0) {\n return false;\n }\n\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function hasOnlyDefaultValues()\n {\n if ($this->sessionid !== '') {\n return false;\n }\n\n if ($this->recno !== 0) {\n return false;\n }\n\n if ($this->type !== '') {\n return false;\n }\n\n if ($this->custid !== '') {\n return false;\n }\n\n if ($this->shiptoid !== '') {\n return false;\n }\n\n if ($this->custname !== '') {\n return false;\n }\n\n if ($this->orderno !== '') {\n return false;\n }\n\n if ($this->custpo !== '') {\n return false;\n }\n\n if ($this->custref !== '') {\n return false;\n }\n\n if ($this->status !== '') {\n return false;\n }\n\n if ($this->orderdate !== '') {\n return false;\n }\n\n if ($this->careof !== '') {\n return false;\n }\n\n if ($this->quotdate !== '') {\n return false;\n }\n\n if ($this->invdate !== '') {\n return false;\n }\n\n if ($this->shipdate !== '') {\n return false;\n }\n\n if ($this->revdate !== '') {\n return false;\n }\n\n if ($this->expdate !== '') {\n return false;\n }\n\n if ($this->hasdocuments !== '') {\n return false;\n }\n\n if ($this->hastracking !== '') {\n return false;\n }\n\n if ($this->subtotal !== '0.00') {\n return false;\n }\n\n if ($this->salestax !== '0.00') {\n return false;\n }\n\n if ($this->freight !== '0.00') {\n return false;\n }\n\n if ($this->misccost !== '0.00') {\n return false;\n }\n\n if ($this->ordertotal !== '0.00') {\n return false;\n }\n\n if ($this->hasnotes !== '') {\n return false;\n }\n\n if ($this->editord !== '') {\n return false;\n }\n\n if ($this->error !== '') {\n return false;\n }\n\n if ($this->errormsg !== '') {\n return false;\n }\n\n if ($this->sconame !== '') {\n return false;\n }\n\n if ($this->shipname !== '') {\n return false;\n }\n\n if ($this->shipaddress !== '') {\n return false;\n }\n\n if ($this->shipaddress2 !== '') {\n return false;\n }\n\n if ($this->shipcity !== '') {\n return false;\n }\n\n if ($this->shipstate !== '') {\n return false;\n }\n\n if ($this->shipzip !== '') {\n return false;\n }\n\n if ($this->shipcountry !== '') {\n return false;\n }\n\n if ($this->contact !== '') {\n return false;\n }\n\n if ($this->phintl !== '') {\n return false;\n }\n\n if ($this->phone !== '') {\n return false;\n }\n\n if ($this->extension !== '') {\n return false;\n }\n\n if ($this->faxnbr !== '') {\n return false;\n }\n\n if ($this->email !== '') {\n return false;\n }\n\n if ($this->releasenbr !== '') {\n return false;\n }\n\n if ($this->shipviacd !== '') {\n return false;\n }\n\n if ($this->shipviadesc !== '') {\n return false;\n }\n\n if ($this->pricecode !== '') {\n return false;\n }\n\n if ($this->pricecodedesc !== '') {\n return false;\n }\n\n if ($this->pricedisp !== '') {\n return false;\n }\n\n if ($this->taxcode !== '') {\n return false;\n }\n\n if ($this->taxcodedesc !== '') {\n return false;\n }\n\n if ($this->taxcodedisp !== '') {\n return false;\n }\n\n if ($this->termcode !== '') {\n return false;\n }\n\n if ($this->termtype !== '') {\n return false;\n }\n\n if ($this->termcodedesc !== '') {\n return false;\n }\n\n if ($this->rqstdate !== '') {\n return false;\n }\n\n if ($this->shipcom !== '') {\n return false;\n }\n\n if ($this->sp1 !== '') {\n return false;\n }\n\n if ($this->sp1name !== '') {\n return false;\n }\n\n if ($this->sp2 !== '') {\n return false;\n }\n\n if ($this->sp2name !== '') {\n return false;\n }\n\n if ($this->sp2disp !== '') {\n return false;\n }\n\n if ($this->sp3 !== '') {\n return false;\n }\n\n if ($this->sp3name !== '') {\n return false;\n }\n\n if ($this->sp3disp !== '') {\n return false;\n }\n\n if ($this->fob !== '') {\n return false;\n }\n\n if ($this->deliverydesc !== '') {\n return false;\n }\n\n if ($this->whse !== '') {\n return false;\n }\n\n if ($this->cardnumber !== '') {\n return false;\n }\n\n if ($this->cardexpire !== '') {\n return false;\n }\n\n if ($this->cardcode !== '') {\n return false;\n }\n\n if ($this->cardapproval !== '') {\n return false;\n }\n\n if ($this->totalcost !== '') {\n return false;\n }\n\n if ($this->totaldiscount !== '') {\n return false;\n }\n\n if ($this->paymenttype !== '') {\n return false;\n }\n\n if ($this->srcdatefrom !== '') {\n return false;\n }\n\n if ($this->srcdatethru !== '') {\n return false;\n }\n\n if ($this->billname !== '') {\n return false;\n }\n\n if ($this->billaddress !== '') {\n return false;\n }\n\n if ($this->billaddress2 !== '') {\n return false;\n }\n\n if ($this->billaddress3 !== '') {\n return false;\n }\n\n if ($this->billcountry !== '') {\n return false;\n }\n\n if ($this->billcity !== '') {\n return false;\n }\n\n if ($this->billstate !== '') {\n return false;\n }\n\n if ($this->billzip !== '') {\n return false;\n }\n\n if ($this->prntfmt !== '') {\n return false;\n }\n\n if ($this->prntfmtdisp !== '') {\n return false;\n }\n\n if ($this->dummy !== 'x') {\n return false;\n }\n\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function hasOnlyDefaultValues()\n\t{\n\t\t\tif ($this->is_archived !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->google_analytics_enabled !== false) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "public function testHasDefault() : void\n {\n $reflex = new \\ReflectionClass($this->getTestedInstance());\n $instance = $reflex->newInstanceWithoutConstructor();\n\n $hasDefault = $reflex->getProperty('hasDefault');\n $hasDefault->setAccessible(true);\n\n $this->getTestCase()->assertFalse($instance->hasDefault());\n $hasDefault->setValue($instance, true);\n $this->getTestCase()->assertTrue($instance->hasDefault());\n\n return;\n }", "public function beforeSave()\n {\n if ($this->getStatus() == null) {\n $this->setStatus(self::STATUS_NEW);\n }\n }", "public function ensureDefaultKeys() {}", "public function byDefault() {\n\t\treturn $this->byDefault;\n\t}", "public function hasOnlyDefaultValues()\n\t{\n\t\t\tif ($this->st_usuario !== true) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "public function setDefault()\n\t\t{\n\t\t\tif(!isset($this->id))\n\t\t\t\treturn FALSE;\n\t\t\t\n\t\t\tglobal $conn;\n\t\t\t\n\t\t\t$conn->beginTransaction();\n\t\t\t\n\t\t\t// Set all other workspace to not default\n\t\t\t$n = $conn->prepare(\"UPDATE ServiCenter_Workspace SET `default` = 0\");\n\t\t\t$n->execute();\n\t\t\t\n\t\t\t// Set this workspace to default\n\t\t\t$d = $conn->prepare(\"UPDATE ServiCenter_Workspace SET `default` = 1 WHERE id = ?\");\n\t\t\t$d->bindParam(1, $this->id);\n\t\t\t$d->execute();\n\t\t\t\n\t\t\tif($d->rowCount() == 1)\n\t\t\t{\n\t\t\t\t$conn->commit();\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\t\n\t\t\t$conn->rollback();\n\t\t\treturn FALSE;\n\t\t}", "public function applyDefaultValues()\n {\n $this->active = false;\n }", "public function hasInitial()\n {\n return !empty($this->initialStates);\n }", "public function hasOnlyDefaultValues()\n {\n // otherwise, everything was equal, so return true\n return true;\n }", "public function hasOnlyDefaultValues()\n\t{\n\t\t\tif ($this->type !== 1) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->total_index !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->is_published !== true) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->is_featured !== false) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->comments_count !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "public function hasState(){\n return $this->_has(4);\n }", "public function hasOnlyDefaultValues()\n {\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function hasOnlyDefaultValues()\n {\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function hasOnlyDefaultValues()\n {\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function hasOnlyDefaultValues()\n {\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function hasOnlyDefaultValues()\n {\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function hasOnlyDefaultValues()\n {\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function hasOnlyDefaultValues()\n {\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function inited()\t{\treturn ( $this->_IsInited() ) ? 'Y' : 'N';\t\t}", "public function check()\r\n\t{\r\n\t\tif(!$this->active)\r\n\t\t{\r\n\t\t\t// Activate it with a default value\r\n\t\t\t$this->setType('');\r\n\t\t}\r\n\t\t\r\n\t\t$nullDate\t= $this->_db->getNullDate();\r\n\t\tif (empty($this->modified_date) || $this->modified_date == $nullDate)\r\n\t\t{\r\n\t\t\t$date = JFactory::getDate();\r\n\t\t\t$this->modified_date = $date->toMysql();\r\n\t\t}\r\n\t\tif (empty($this->created_date) || $this->created_date == $nullDate)\r\n\t\t{\r\n\t\t\t$date = JFactory::getDate();\r\n\t\t\t$this->created_date = $date->toMysql();\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public function hasOnlyDefaultValues()\n {\n if ($this->is_not !== false) {\n return false;\n }\n\n if ($this->rank !== 0) {\n return false;\n }\n\n // otherwise, everything was equal, so return true\n return true;\n }", "function getDefaultValue() \n {\n return $this->getValueByFieldName( 'statevar_default' );\n }", "public function hasOnlyDefaultValues()\n {\n if ($this->shnttype !== '') {\n return false;\n }\n\n if ($this->shntseq !== 0) {\n return false;\n }\n\n if ($this->shntkey2 !== '') {\n return false;\n }\n\n if ($this->shntform !== '') {\n return false;\n }\n\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function hasOnlyDefaultValues()\n\t{\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function verifyUpdateDefault($data) {\n if(isset($data['is_default'])) {\n return Language::where('status', '1')\n ->update(['is_default' => '0']);\n }\n\n return false;\n }", "public function isAuthed() {\n return $this->state == 2;\n }", "public function isDefault()\n\t{\n\t\treturn \\IPS\\Dispatcher::i()->application->directory == 'core' and \\IPS\\Dispatcher::i()->module->key == 'members' and \\IPS\\Dispatcher::i()->controller != 'groups';\n\t}", "public function getDefinitive() : bool\n {\n return $this->definitive;\n }", "public function hasOnlyDefaultValues()\n\t{\n\t\t\tif ($this->ativo !== true) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->tipo_acesso !== 'M') {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->estado_civil !== 'O') {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->nivel_acesso !== '1') {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->usuario_validado !== false) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "public function getDefaultepaiement(): bool\n {\n return $this->defaultepaiement;\n }", "public function hasOnlyDefaultValues()\n\t{\n\t\t\t// First, ensure that we don't have any columns that have been modified which aren't default columns.\n\t\t\tif (array_diff($this->modifiedColumns, array())) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "public function hasOnlyDefaultValues()\n\t{\n\t\t\t// First, ensure that we don't have any columns that have been modified which aren't default columns.\n\t\t\tif (array_diff($this->modifiedColumns, array())) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "public function hasOnlyDefaultValues()\n\t{\n\t\t\t// First, ensure that we don't have any columns that have been modified which aren't default columns.\n\t\t\tif (array_diff($this->modifiedColumns, array())) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "public function getDefaultStateName() {\n return $this->values->get('DefaultStateName');\n }", "public function isNewRecord(){\n return !isset($this->data['id']);\n }" ]
[ "0.6837914", "0.6714377", "0.6639284", "0.6569754", "0.6529168", "0.64857405", "0.6465748", "0.63196856", "0.6317322", "0.6254194", "0.625237", "0.6222079", "0.6209048", "0.6204157", "0.6204157", "0.6204157", "0.6204157", "0.6191652", "0.61852527", "0.6172774", "0.61535347", "0.6139517", "0.6089863", "0.60844946", "0.60803795", "0.60547954", "0.6043628", "0.60027814", "0.5998869", "0.5969601", "0.59563375", "0.5922121", "0.5908202", "0.5888844", "0.58693576", "0.5821797", "0.58153", "0.58120567", "0.5783909", "0.5773277", "0.57721454", "0.57596123", "0.5758767", "0.5751669", "0.57230747", "0.5722798", "0.5714494", "0.57140326", "0.5709648", "0.5693499", "0.56860924", "0.56853384", "0.5681927", "0.5676986", "0.5676979", "0.5665191", "0.5665191", "0.5665191", "0.5665191", "0.5665191", "0.5665191", "0.5665191", "0.56601167", "0.5645286", "0.5626689", "0.56150156", "0.56082374", "0.56038827", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.5599439", "0.559449", "0.55831116", "0.55810714", "0.5573282", "0.557002", "0.55680823", "0.55544084", "0.55544084", "0.55544084", "0.5549366", "0.5541402" ]
0.0
-1
Given a set of asset manipulations, trigger any necessary publish, protect, or delete actions on each asset.
protected function processManipulation(AssetManipulationList $manipulations) { // When deleting from stage then check if we should archive assets $archive = $this->owner->config()->get('keep_archived_assets'); // Check deletion policy $deletedAssets = $manipulations->getDeletedAssets(); if ($archive && $this->isVersioned()) { // Publish assets $this->swapAll($manipulations->getPublicAssets()); // Archived assets are kept protected $this->protectAll($deletedAssets); } else { // Remove old version $this->deleteAll($deletedAssets); // Publish assets $this->publishAll($manipulations->getPublicAssets()); } // Protect assets $this->protectAll($manipulations->getProtectedAssets()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 perform()\n {\n foreach ($this->actions as $action) {\n $action->perform();\n }\n }", "public function OnAllAction() {\n\n // get current action\n $HookName= current_filter();\n $HookNameParts= explode(' (', $HookName);\n $SearchName= isset($HookNameParts[1]) ? $HookNameParts[0] : $HookName;\n\n // find profiles containing that action and execute invalidation\n foreach($this->Profiles as $Name => $Profile) {\n if (in_array($SearchName, $Profile['InvalidatingActions'])) {\n $this->GetDealer($Name)->Invalidate($HookName);\n }\n }\n\n // search in group actions and trigger custom action if found\n foreach($this->GroupActions as $Name => $List) {\n if (in_array($HookName, $List)) {\n //$this->Log(\"[GroupAction: {$Name}] triggered by action: {$HookName}\");\n do_action(\"$Name ($HookName)\");\n }\n }\n }", "private function setup_actions() {\n\n\t\tadd_action( 'load-post.php', array( self::$instance, 'action_load_customizations' ) );\n\t\tadd_action( 'load-post-new.php', array( self::$instance, 'action_load_customizations' ) );\n\t\tadd_action( 'added_post_meta', array( self::$instance, 'update_schedule' ), 10, 4 );\n\t\tadd_action( 'updated_post_meta', array( self::$instance, 'update_schedule' ), 10, 4 );\n\t\tadd_action( 'deleted_post_meta', array( self::$instance, 'remove_schedule' ), 10, 3 );\n\t\tadd_action( 'trashed_post', array( self::$instance, 'unschedule_unpublish' ) );\n\t\tadd_action( 'untrashed_post', array( self::$instance, 'reschedule_unpublish' ) );\n\t\tadd_action( self::$cron_key, array( self::$instance, 'unpublish_post' ) );\n\t\tadd_filter( 'is_protected_meta', array( self::$instance, 'protect_meta_key' ), 10, 3 );\n\n\t\tif ( wp_next_scheduled( self::$deprecated_cron_key ) ) {\n\t\t\tadd_action( self::$deprecated_cron_key, array( self::$instance, 'unpublish_content' ) );\n\t\t}\n\t}", "public function onBeforeWrite()\n {\n if (!$this->hasAssets()) {\n return;\n }\n\n // Prepare blank manipulation\n $manipulations = new AssetManipulationList();\n\n // Mark overwritten object as deleted\n if ($this->owner->isInDB()) {\n $priorRecord = DataObject::get(get_class($this->owner))->byID($this->owner->ID);\n if ($priorRecord) {\n $this->addAssetsFromRecord($manipulations, $priorRecord, AssetManipulationList::STATE_DELETED);\n }\n }\n\n // Add assets from new record with the correct visibility rules\n $state = $this->getRecordState($this->owner);\n $this->addAssetsFromRecord($manipulations, $this->owner, $state);\n\n // Whitelist assets that exist in other stages\n $this->addAssetsFromOtherStages($manipulations);\n\n // Apply visibility rules based on the final manipulation\n $this->processManipulation($manipulations);\n }", "public function implement_all_effects()\n\t{\n\t\tforeach ($this->collection as $image)\n\t\t{\n\t\t\t$image->implement_effects();\n\t\t}\n\t}", "function process_bulk_action() {\n global $wbdb;\n \n //Detect when a bulk action is being triggered...\n if( 'delete'===$this->current_action() ) {\n #wp_die('Items deleted (or they would be if we had items to delete)!');\n #$wpdb->query(\"DELETE FROM {$wpdb->prefix}amazon_listings WHERE id = ''\",)\n }\n\n if( 'verify'===$this->current_action() ) {\n\t\t\t#echo \"<br>verify handler<br>\";\t\t\t\n }\n \n }", "public function actions() {\n\t\tadd_action( 'wp_loaded', array( $this, 'generate_data' ) );\n\t\tadd_action( 'wp_loaded', array( $this, 'update_storage_site' ) );\n\t\tadd_action( 'wp_loaded', array( $this, 'update_storage_network' ) );\n\t}", "private function actions()\n {\n }", "public function run()\n {\n\t\t$policies = Policy::get(); \n\t\t$resources = Resource::get(); \n\n\t\tforeach($policies as $policy) {\n\t\t\tforeach($resources as $resource) {\n\t\t\t\t$policy->resources()->attach($resource); \n\t\t\t}\n\t\t}\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\n\t\tdo_actions()\n\t{\n\t}", "public static function setup_actions() {\n\t\tadd_action(\n\t\t\t'astoundify_import_content_after_import_item_type_object',\n\t\t\tarray( __CLASS__, 'set_products' )\n\t\t);\n\t}", "public function bulk_action_scripts() {\n\t\t \tglobal $post_type;\n\t\t\tif( $post_type == 'shop_order' ) {\n\t\t\t\twp_register_script(\n\t\t\t\t\t'dropbox-export',\n\t\t\t\t\tplugins_url( 'js/dropbox-export.js' , dirname(__FILE__) ),\n\t\t\t\t\tarray( 'jquery', 'thickbox' )\n\t\t\t\t);\n\t\t\t\twp_enqueue_script( 'dropbox-export' );\n\t\t\t\twp_enqueue_style( 'thickbox' );\n\t\t\t}\n\n\t\t}", "public function admin_table_bulk_actions($actions)\n {\n }", "public function distribution() {\n if (isset($_POST[\"filter\"])) {\n $this->admin_filter();\n }\n if (isset($_POST[\"add\"])) {\n $this->add_media();\n }\n if (isset($_POST[\"delete\"])) {\n $this->delete_media();\n }\n if (isset($_POST[\"modify\"])) {\n $this->modify_media();\n }\n }", "protected function publishApprovalsFiles(): void\n {\n $this->call('vendor:publish', [\n '--tag' => 'migrations',\n '--provider' => \"Nesiasoft\\Core\\Approvals\\ApprovalsServiceProvider\",\n ]);\n\n $this->call('vendor:publish', [\n '--tag' => 'config',\n '--provider' => \"Nesiasoft\\Core\\Approvals\\ApprovalsServiceProvider\",\n ]);\n }", "public function run()\n {\n $policies = config('policies.policies');\n\n foreach ($policies as $roleName => $permissions) {\n $role = Role::where('name', $roleName)->first();\n\n foreach ($permissions as $permissionName) {\n $permission = Permission::where('name', $permissionName)->first();\n\n $role->givePermissionTo($permission);\n }\n }\n }", "public function action()\n {\n foreach ($this->actions as $action) {\n $action->run();\n }\n }", "protected function checkAllScheduledByAction(array $objects, string $action): void\n {\n foreach ($objects as $object) {\n $this->postResetPermissions[] = $object;\n\n if ('delete' !== $action) {\n $this->getObjectFilter()->restore($object);\n }\n }\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}", "public function bulkAction()\r\n {\r\n $this->checkIfDemo();\r\n $this->AdminJobModel->bulkAction();\r\n }", "private function processAssets()\n {\n $js = $this->assetmanager->getAssetHandler('js');\n\n $afh = new \\Core\\Asset\\AssetFileHandler();\n $afh->setFilename($this->config->get('Core', 'dir.cache') . '/script.js');\n $afh->setTTL($this->config->get('Core', 'cache.ttl.js'));\n\n $js->setFileHandler($afh);\n\n $css = $this->assetmanager->getAssetHandler('css');\n\n $theme = $this->config->get('Core', 'style.theme.name');\n\n $css->addProcessor(new \\Core\\Asset\\Processor\\ReplaceProcessor('../fonts/', '../Themes/' . $theme . '/fonts/'));\n $css->addProcessor(new \\Core\\Asset\\Processor\\ReplaceProcessor('../img/', '../Themes/' . $theme . '/img/'));\n\n $afh = new \\Core\\Asset\\AssetFileHandler();\n $afh->setFilename($this->config->get('Core', 'dir.cache') . '/style.css');\n $afh->setTTL($this->config->get('Core', 'cache.ttl.css'));\n\n $css->setFileHandler($afh);\n\n foreach ($this->apps as $app) {\n foreach ($app->javascript as $aio) {\n $js->addObject($aio);\n }\n\n foreach ($app->css as $aio) {\n $css->addObject($aio);\n }\n }\n\n // Process assets\n $this->assetmanager->process();\n }", "private function hooks() {\n // stripe non3ds refund\n add_action( 'dokan_refund_request_created', [ $this, 'process_refund' ] );\n add_filter( 'dokan_refund_approve_vendor_refund_amount', [ $this, 'vendor_refund_amount_non_3ds' ], 10, 3 );\n add_action( 'dokan_refund_approve_before_insert', [ $this, 'add_vendor_withdraw_entry_non_3ds' ], 10, 3 );\n\n // process 3ds refund\n add_action( 'dokan_refund_request_created', [ $this, 'process_3ds_refund' ] );\n add_filter( 'dokan_refund_approve_vendor_refund_amount', [ $this, 'vendor_refund_amount_3ds' ], 10, 3 );\n add_action( 'dokan_refund_approve_before_insert', [ $this, 'add_vendor_withdraw_entry_3ds' ], 10, 3 );\n }", "protected function protectAll($assets)\n {\n if (empty($assets)) {\n return;\n }\n $store = $this->getAssetStore();\n foreach ($assets as $asset) {\n $store->protect($asset['Filename'], $asset['Hash']);\n }\n }", "function process_bulk_action() {\n\t\t\n\t\t//Detect when a bulk action is being triggered...\n\t\tif( 'delete'=== $this->current_action() ) {\n\t\t\twp_die( 'Items deleted (or they would be if we had items to delete)!' );\n\t\t}\n\t\t\n\t}", "public function run()\n {\n $permissions = [\n 'product_create',\n 'product_show',\n 'product_edit',\n 'product_delete'\n ];\n\n $user = Role::findByName('admin');\n\n foreach ($permissions as $permission) {\n $user->givePermissionTo($permission);\n }\n }", "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 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 onAfterDelete()\n {\n if (!$this->hasAssets()) {\n return;\n }\n\n // Prepare blank manipulation\n $manipulations = new AssetManipulationList();\n\n // Add all assets for deletion\n $this->addAssetsFromRecord($manipulations, $this->owner, AssetManipulationList::STATE_DELETED);\n\n // Whitelist assets that exist in other stages\n $this->addAssetsFromOtherStages($manipulations);\n\n // Apply visibility rules based on the final manipulation\n $this->processManipulation($manipulations);\n }", "private function publishAssets()\n {\n $this->call('vendor:publish', [\n '--provider' => 'A17\\Twill\\TwillServiceProvider',\n '--tag' => 'assets',\n '--force' => true,\n ]);\n }", "public function assets(): void\n {\n $count = count($this->grav['assets']['assets_css']) + count($this->grav['assets']['assets_js']);\n $this->handle->writeln('');\n $this->handle->writeln('<white>Processing Asset(s): ' . $count . '</white>');\n $this->progressBar = new ProgressBar(\n $this->handle,\n $count\n );\n $this->buildAssets();\n $this->teardown('Finished ' . $count . ' Asset(s)');\n }", "public function bulk_actions( $which = '' ) {\n\t\t//edd_log_views();\n\t}", "public function process_bulk_action()\n {\n if ('update' === $this->current_action()) {\n wp_die('Items deleted (or they would be if we had items to delete)!');\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 setup_actions() {}", "protected function actions_and_filters()\n\t\t{\n\t\t $ver = AviaBuilder::VERSION;\n\t\t\n #js\n\t\t\twp_enqueue_script('avia_template_save_js' , AviaBuilder::$path['assetsURL'].'js/avia-template-saving.js' , array('avia_element_js'), $ver, TRUE );\n\t\t\t\n\t\t\t#ajax\n\t\t\tadd_action('wp_ajax_avia_ajax_save_builder_template', array($this,'save_builder_template'), 10);\n\t\t\tadd_action('wp_ajax_avia_ajax_delete_builder_template', array($this,'delete_builder_template'), 10);\n\t\t\tadd_action('wp_ajax_avia_ajax_fetch_builder_template', array($this,'fetch_builder_template'), 10);\n\t\t\t\n\t\t\t\n\t\t}", "public function process_bulk_action() {\n\n\t\tswitch ( $this->current_action() ) {\n\t\t\tcase 'delete':\n\t\t\t\t// This case is handled in \\WPMailSMTP\\Pro\\Emails\\Logs\\Logs::process_email_delete().\n\t\t\t\tbreak;\n\t\t}\n\t}", "function hook_dms_client_actions_alter(&$actions) {\r\n // Alter any action, add a new one...\r\n}", "public function bulkAction() {\n\t\t$this->_helper->ajaxgrid->massActions ();\n\t}", "public function bulkAction() {\n\t\t$this->_helper->ajaxgrid->massActions ();\n\t}", "private function run_actions() {\n\t\tadd_action( 'admin_menu', [ $this, 'register' ] );\n\t\tadd_action( 'admin_enqueue_scripts', [ $this, 'enqueue' ] );\n\t\tadd_action( 'init', array( $this, 'register_settings' ) );\n\t}", "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 process_bulk_action() {\n \n //Detect when a bulk action is being triggered...\n if( 'delete'===$this->current_action() ) {\n wp_die('Items deleted (or they would be if we had items to delete)!');\n }\n \n }", "function run()\n {\n $category = Request :: get(AssessmentManager :: PARAM_CATEGORY);\n \t$publications = Request :: get(AssessmentManager :: PARAM_ASSESSMENT_PUBLICATION);\n\n if ($publications && ! is_array($publications))\n {\n $publications = array($publications);\n }\n\n $locations = array();\n\n foreach ($publications as $publication)\n {\n \tif ($this->get_user()->is_platform_admin() || $publication->get_publisher() == $this->get_user_id())\n \t{ \n \t\t$locations[] = AssessmentRights :: get_location_by_identifier_from_assessments_subtree($publication, AssessmentRights :: TYPE_PUBLICATION);\n \t}\n }\n\n if(count($locations) == 0)\n {\n \tif ($this->get_user()->is_platform_admin())\n \t{\n \t\tif($category == 0)\n \t\t{\n \t\t\t$locations[] = AssessmentRights :: get_assessments_subtree_root();\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$locations[] = AssessmentRights :: get_location_by_identifier_from_assessments_subtree($category, AssessmentRights :: TYPE_CATEGORY);\n \t\t}\n \t}\n }\n \n $manager = new RightsEditorManager($this, $locations);\n\t $manager->exclude_users(array($this->get_user_id()));\n \t$manager->run();\n }", "private function doActions()\n {\n add_filter('woocommerce_add_to_cart_fragments', [$this, 'updateCart'], 10, 1);\n add_action('woocommerce_register_post', [$this, 'validateExtraRegistrationData'], 10, 3);\n add_action('woocommerce_created_customer', [$this, 'saveExtraRegistrationData']);\n add_filter('woocommerce_login_redirect', [$this, 'redirectAfterLogin']);\n add_filter('woocommerce_registration_redirect', [$this, 'redirectAfterRegister']);\n }", "public function actions() {\n\t\trequire_once( WPEX_FRAMEWORK_DIR .'hooks/hooks.php' );\n\t\trequire_once( WPEX_FRAMEWORK_DIR .'hooks/actions.php' );\n\t\trequire_once( WPEX_FRAMEWORK_DIR .'hooks/partials.php' );\n\t}", "function execute()\r\n\t\t{\r\n\t\t\tforeach($this->data as $actionType => $action)\r\n\t\t\t{\r\n\t\t\t\tif(isset($actionType)) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tswitch($actionType)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcase \"destroy\":\r\n\t\t\t\t\t\t\t\t$this->remove($action);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}catch(Exception $e) {\r\n\t\t\t\t\t\tdump('item module error', 'item module error');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "protected function performActionList()\n\t{\n\t\t// copy order\n\t\t$this->performActionCopyOrder();\n\n\t\t// some other ...\n\t}", "public function run()\n {\n $effects = ['chorus', 'delay', 'reverb'];\n\n foreach ($effects as $effect) {\n Effect::create(['name' => $effect]);\n }\n }", "protected function executeAction()\n {\n $this->triggerEvent( __FUNCTION__ . '.pre');\n if ($this->flowEvaluator->executeActionInFlow()) {\n $this->triggerEvent(__FUNCTION__ . '.success');\n $this->manageExecutedAction();\n } else {\n $this->triggerEvent(__FUNCTION__ . '.fail');\n }\n $this->triggerEvent( __FUNCTION__ . '.post');\n }", "function process_bulk_action() {\r\n if( 'apporve'===$this->current_action() ) {\r\n wp_die('Items deleted (or they would be if we had items to delete)!');\r\n }\r\n elseif( 'reject'===$this->current_action() ) {\r\n wp_die('Items deleted (or they would be if we had items to delete)!');\r\n }\r\n \r\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 }", "private function setup_actions() {\n\n\t\tadd_action( 'init', array( $this, 'action_init' ) );\n\n\t\tadd_action( 'p2p_init', array( $this, 'action_p2p_init' ) );\n\n\t\tadd_action( 'pre_get_posts', array( $this, 'action_pre_get_posts' ) );\n\n\t\tadd_action( 'add_attachment', array( $this, 'action_add_attachment' ) );\n\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'action_wp_enqueue_scripts' ) );\n\n\t}", "protected function bulk_actions($which = '')\n {\n }", "public function run() {\n\t\tforeach ( $this->filters as $hook ) {\n\t\t\tadd_filter( $hook['hook'], [\n\t\t\t\t$hook['component'],\n\t\t\t\t$hook['callback']\n\t\t\t], $hook['priority'], $hook['acc_args'] );\n\t\t}\n\t\tforeach ( $this->actions as $hook ) {\n\t\t\tadd_action( $hook['hook'], [\n\t\t\t\t$hook['component'],\n\t\t\t\t$hook['callback']\n\t\t\t], $hook['priority'], $hook['acc_args'] );\n\t\t}\n\t}", "public function setup_actions() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'register_scripts' ) );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );\n\t\t\n\t\t/** Dequeue GMAP Script */\n\t\tadd_filter( 'facetwp_assets', array( $this, 'dequeue_gmap' ) );\n\n\t\t/** Theme Support */\n\t\tadd_action( 'after_setup_theme', array( $this, 'add_theme_support' ) );\n\t}", "protected function addAssetsFromOtherStages(AssetManipulationList $manipulation)\n {\n // Skip unversioned or unsaved assets\n if (!$this->isVersioned() || !$this->owner->isInDB()) {\n return;\n }\n\n // Unauthenticated member to use for checking visibility\n $baseClass = $this->owner->baseClass();\n $baseTable = $this->owner->baseTable();\n $filter = [\n Convert::symbol2sql(\"{$baseTable}.ID\") => $this->owner->ID,\n ];\n $stages = $this->owner->getVersionedStages(); // {@see Versioned::getVersionedStages}\n foreach ($stages as $stage) {\n // Skip current stage; These should be handled explicitly\n if ($stage === Versioned::get_stage()) {\n continue;\n }\n\n // Check if record exists in this stage\n $record = Versioned::get_one_by_stage($baseClass, $stage, $filter);\n if (!$record) {\n continue;\n }\n\n // Check visibility of this record, and record all attached assets\n $state = $this->getRecordState($record);\n $this->addAssetsFromRecord($manipulation, $record, $state);\n }\n }", "private function _actions()\n {\n add_action('init', array($this, 'add_short_code'));\n add_action('wp_enqueue_scripts', array($this, 'cyl_enqueue_script'));\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 bulkAction()\r\n {\r\n $this->checkIfDemo();\r\n $this->AdminInterviewCategoryModel->bulkAction();\r\n }", "public function run() {\n\t\tforeach ( $this->filters as $hook ) {\n\t\t\tadd_filter( $hook['hook'], $hook['callback'], $hook['priority'], $hook['accepted_args'] );\n\t\t}\n\n\t\tforeach ( $this->actions as $hook ) {\n\t\t\tadd_action( $hook['hook'], $hook['callback'], $hook['priority'], $hook['accepted_args'] );\n\t\t}\n\t}", "public function actions();", "private function process_frontend_actions() {\n\t\t\n\t\tif(is_admin()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif($this->is_working() && is_object($this->extras)) {\n\t\t\t$this->extras->page_load_actions();\n\t\t}\n\n\t\n\t}", "public function run()\n {\n $admin = Role::where('name', 'Admin')->first();\n\n $editor = Role::where('name', 'Editor')->first();\n\n $writer = Role::where('name', 'Writer')->first();\n\n $admin->attachPermissions(Permission::all());\n\n $editor->attachPermissions(\n Permission::whereNotIn('name', ['create-post', 'delete-post'])->get()\n );\n\n $writer->attachPermissions(\n Permission::whereNotIn('name', ['edit-post', 'delete-post'])->get()\n );\n }", "public function run()\n {\n $collection = collect([\n 'Haram',\n 'Fisal',\n 'Omranya',\n ]);\n $collectionCairo = collect([\n 'El marg',\n 'El Salam',\n 'El Salam Owel',\n 'El Elnozha',\n 'ein Shams',\n 'Naser City',\n ]);\n City::create(['city' => 'Giza']);\n City::create(['city' => 'Cairo']);\n $city = City::where('city', 'Giza')->first();\n $cairo = City::where('city', 'Cairo')->first();\n $collection->each(function ($item, $key) use($city){\n // create permissions for each collection item\n Region::create([\n 'city_id' => $city->id,\n 'region' => $item]);\n });\n $collectionCairo->each(function ($item, $key) use($cairo){\n // create permissions for each collection item\n Region::create([\n 'city_id' => $cairo->id,\n 'region' => $item]);\n });\n }", "public function hooks() {\n\t\tadd_action( 'add_meta_boxes', [ $this, 'add_boxes' ] );\n\t\tadd_action( 'save_post', [ $this, 'save' ] );\n\n\t\tforeach ( $this->taxonomy_allowed as $taxonomy ) {\n\t\t\tadd_action( \"{$taxonomy}_edit_form_fields\", [ $this, 'display_taxonomy_boxes' ], 99 );\n\t\t\tadd_action( \"edited_{$taxonomy}\", [ $this, 'save_taxonomy' ] );\n\t\t}\n\t}", "public function addAdminAssets() {}", "private function setup_actions() {\n\n\t\t\t// Register managers, sections, settings, and controls.\n\t\t\tadd_action( 'butterbean_register', array( $this, 'register' ), 10, 2 );\n\t\t}", "public function run()\n {\n $sync_data = [1=>['base_price' => 10000, 'vat' => 1500, ], 2=>['base_price' => 15000, 'vat' => 1500, ], 3=>['base_price' => 20000, 'vat' => 1500, ], 4=>['base_price' => 25000, 'vat' => 1500, ], 5=>['base_price' => 30000, 'vat' => 1500, ], 6=>['base_price' => 35000, 'vat' => 1500, ], 7=>['base_price' => 40000, 'vat' => 1500, ], 8=>['base_price' => 45000, 'vat' => 1500, ]] ;\n $audit1 = new Audit();\n $audit1->audit_name = 'BSCI';\n $audit1->slug = 'bsci';\n $audit1->save();\n $audit1->auditors()->sync($sync_data);\n \n $sync_data = [1=>['base_price' => 10000, 'vat' => 1500, ], 2=>['base_price' => 15000, 'vat' => 1500, ], 3=>['base_price' => 20000, 'vat' => 1500, ], 4=>['base_price' => 25000, 'vat' => 1500, ], 5=>['base_price' => 30000, 'vat' => 1500, ], 6=>['base_price' => 35000, 'vat' => 1500, ], 7=>['base_price' => 40000, 'vat' => 1500, ], 8=>['base_price' => 45000, 'vat' => 1500, ]] ;\n $audit2 = new Audit();\n $audit2->audit_name = 'SEDEX';\n $audit2->slug = 'sedex';\n $audit2->save();\n $audit2->auditors()->sync($sync_data);\n \n $sync_data = [1=>['base_price' => 15000, 'vat' => 1500, ], 2=>['base_price' => 25000, 'vat' => 1500, ], 3=>['base_price' => 30000, 'vat' => 1500, ], 4=>['base_price' => 35000, 'vat' => 1500, ], 5=>['base_price' => 40000, 'vat' => 1500, ]] ;\n $audit3 = new Audit();\n $audit3->audit_name = 'WRAP';\n $audit3->slug = 'wrap';\n $audit3->save();\n $audit3->auditors()->sync($sync_data);\n }", "private function installActions()\n {\n $actions = array(\n array(\n 'class' => RETS_RABBIT_V2_NAME,\n 'method' => 'run_search'\n ),\n );\n\n ee()->db->insert_batch('actions', $actions);\n }", "public function run()\n {\n // equipment_id\n // asset_number\n // campus_id\n // building_id\n // room\n\n $assets = [\n [\n 'equipment_id'=>null,\n 'asset_number'=>null,\n 'campus_id'=>null,\n 'building_id'=>null,\n 'room'=>null,\n ],\n [\n 'equipment_id'=>2,\n 'asset_number'=>null,\n 'campus_id'=>2,\n 'building_id'=>null,\n 'room'=>null,\n ],\n\n ];\n\n }", "function wc_tab_manager_edit_product_tab_bulk_actions( $actions ) {\n\n\tunset( $actions['edit'] );\n\n\t// Remove the date filter dropdown as well.\n\tadd_filter( 'disable_months_dropdown', '__return_true' );\n\n\treturn $actions;\n}", "public function setup_actions() {\n\t\t// Setup the CTT\n\t\tadd_action( 'init', array( $this, 'register_taxonomy' ) );\n\t\tadd_action( 'add_meta_boxes', array( $this, 'remove_meta_box' ) );\n\n\t\t// Handle our project filtering\n\t\tadd_action( 'wp_ajax_ctrs_filter_group', array( $this, 'filter_group' ) );\n\t\tadd_action( 'wp_ajax_nopriv_ctrs_filter_group', array( $this, 'filter_group' ) );\n\n\t\t// Handle event filtering\n\t\tadd_action( 'wp_ajax_ctrs_filter_event', array( $this, 'filter_event' ) );\n\t\tadd_action( 'wp_ajax_nopriv_ctrs_filter_event', array( $this, 'filter_event' ) );\n\t}", "public function hooks()\n {\n foreach ($this->getActions() as $key => $action) {\n switch (true) {\n case $action instanceof HooksAdminInterface:\n if (is_admin()) {\n $action->hooks();\n }\n break;\n case $action instanceof HooksFrontInterface:\n if (!is_admin()) {\n $action->hooks();\n }\n break;\n case $action instanceof HooksInterface:\n $action->hooks();\n break;\n }\n }\n }", "public function register_actions() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'register_jquery' ) );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'register_public_scripts' ) );\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'register_admin_scripts' ) );\n\t\tadd_action( 'login_enqueue_scripts', array( $this, 'register_login_scripts' ) );\n\t\tadd_action( 'wp_head', array( $this, 'header_scripts' ) );\n\t\tadd_action( 'wp_after_body', array( $this, 'body_scripts' ) );\n\t}", "protected function publishAll($assets)\n {\n if (empty($assets)) {\n return;\n }\n\n $store = $this->getAssetStore();\n foreach ($assets as $asset) {\n $store->publish($asset['Filename'], $asset['Hash']);\n }\n }", "protected function get_bulk_actions()\n {\n }", "protected function get_bulk_actions()\n {\n }", "public function process_bulk_action() {\n\n if ( ! isset( $_REQUEST[ 'template' ] ) ) {\n return;\n }\n \n switch( strtolower( $this->current_action() ) ){\n case 'activate':\n do_action( 'aal_action_activate_templates', ( array ) $_REQUEST[ 'template' ], true );\n break;\n case 'deactivate':\n do_action( 'aal_action_deactivate_templates', ( array ) $_REQUEST[ 'template' ], true );\n break; \n default:\n return; // do nothing.\n }\n\n // Reload the page.\n exit( \n wp_safe_redirect( \n add_query_arg( \n array(\n 'post_type' => AmazonAutoLinks_Registry::$aPostTypes[ 'unit' ],\n 'page' => AmazonAutoLinks_Registry::$aAdminPages[ 'template' ],\n 'tab' => 'table',\n ), \n admin_url( $GLOBALS[ 'pagenow' ] ) \n )\n )\n );\n \n }", "public function add_actions() {\n\t\t\t$acf_types = acf_get_field_types();\n\t\t\t$filtered_types = apply_filters('acf_to_content/field_types', array());\n\t\t\t// active handlings\n\t\t\tglobal $acf_to_post_content;\n\t\t\t$active_handlers = $acf_to_post_content->get_active_handlings();\n\t\t\tforeach ($acf_types as $type => $settings) {\n\t\t\t\tif (isset($filtered_types[$type]) && \n\t\t\t\t\t\tin_array($filtered_types[$type]['handling'], $active_handlers)) {\n\t\t\t\t\t$function = $filtered_types[$type]['handling'];\n\t\t\t\t\tadd_action('acf/render_field_settings/type='.$type, array($this, $function), 1);\n\t\t\t\t} // end if isset type\n\t\t\t} // end foreach type\n\t\t}", "public function run()\n {\n $permissions = [\n 'users',\n 'sales',\n 'billing'\n ];\n\n $permissionsRow = [];\n foreach ($permissions as $permission) {\n $permissionsRow[] = Permission::create(['group' => $permission, 'name' => $permission . '.read']);\n $permissionsRow[] = Permission::create(['group' => $permission, 'name' => $permission . '.edit']);\n $permissionsRow[] = Permission::create(['group' => $permission, 'name' => $permission . '.delete']);\n }\n\n $dev = Role::create(['name' => 'dev']);\n $admin = Role::create(['name' => 'admin']);\n\n foreach ($permissionsRow as $p) {\n $dev->givePermissionTo($p);\n $admin->givePermissionTo($p);\n }\n }", "public function run()\n {\n foreach (['campaign', 'character', 'location', 'quest', 'note', 'user', 'role', 'journal'] as $type) {\n Permission::create(['name' => $type]);\n }\n }", "public function add_actions() {\n\t\tif ( is_admin() ) {\n\n\t\t\t// Add the menu screen for inserting license information\n\t\t\tadd_action( 'admin_init', \t\tarray( $this, 'register_license_settings' ) );\n\t\t\tadd_action( 'admin_init', \t\tarray( $this, 'activate_license' ) );\n\t\t\tadd_action( 'admin_init', \t\tarray( $this, 'deactivate_license' ) );\n\t\t\tadd_action( 'admin_notices', \tarray( $this, 'admin_notices' ) );\n\t\t\tadd_action( 'eael_licensing', [ $this, 'render_licenses_page' ] );\n\n\t\t}\n\t}", "private function setup_actions() {\n\n add_action( 'init', [ $this, 'action_init_register_rewrites' ] );\n add_action( 'widgets_init', [ $this, 'action_widgets_init' ], 11 );\n\n add_action( 'draft_to_publish', [ $this, 'handle_post_notifications' ] );\n add_action( 'draft_to_publish', [ $this, 'handle_set_post_pedestal_version' ] );\n add_action( 'future_to_publish', [ $this, 'handle_post_notifications' ] );\n add_action( 'future_to_publish', [ $this, 'handle_set_post_pedestal_version' ] );\n\n /**\n * Modify what appears in the admin bar menu\n */\n add_action( 'wp_before_admin_bar_render', function () {\n global $wp_admin_bar;\n\n // Remove comments because we don't have comments\n $wp_admin_bar->remove_menu( 'comments' );\n\n // Remove the New Post link from the My Sites admin bar menu becuase\n // we don't have Posts\n foreach ( $wp_admin_bar->get_nodes() as $node ) {\n if ( $node->title == 'New Post' || $node->title == 'Manage Comments' ) {\n $wp_admin_bar->remove_node( $node->id );\n }\n }\n }, 999 );\n }", "function slidedeck_lens_manage_entry_actions( $lens, $is_writable ) {\n $namespace = $this->slidedeck_namespace;\n\n include( SLIDEDECK2_DEVELOPER_DIRNAME . '/views/_lens-manage-entry-actions.php' );\n }", "function process_invoice_actions($action, $ids) {\r\n global $wpi_settings;\r\n\r\n // Set status\r\n switch ($action) {\r\n case 'trash':\r\n $status = 'trashed';\r\n break;\r\n case 'delete':\r\n $status = 'deleted';\r\n break;\r\n case 'untrash':\r\n $status = 'untrashed';\r\n break;\r\n case 'unarchive':\r\n $status = 'un-archived';\r\n break;\r\n case 'archive':\r\n $status = 'archived';\r\n break;\r\n }\r\n\r\n if (!is_array($ids)) {\r\n $ids = explode(',', $ids);\r\n }\r\n\r\n // Process action\r\n $invoice_ids = array();\r\n foreach ((array) $ids as $ID) {\r\n // Perfom action\r\n $this_invoice = new WPI_Invoice();\r\n $this_invoice->load_invoice(\"id={$ID}\");\r\n $invoice_id = $this_invoice->data['invoice_id'];\r\n switch ($action) {\r\n case 'trash':\r\n if ($this_invoice->trash()) {\r\n $invoice_ids[] = $invoice_id;\r\n }\r\n break;\r\n case 'delete':\r\n if ($this_invoice->delete()) {\r\n $invoice_ids[] = $invoice_id;\r\n }\r\n break;\r\n case 'untrash':\r\n if ($this_invoice->untrash()) {\r\n $invoice_ids[] = $invoice_id;\r\n }\r\n break;\r\n case 'unarchive':\r\n if ($this_invoice->unarchive()) {\r\n $invoice_ids[] = $invoice_id;\r\n }\r\n break;\r\n case 'archive':\r\n if ($this_invoice->archive()) {\r\n $invoice_ids[] = $invoice_id;\r\n }\r\n break;\r\n }\r\n }\r\n if (!empty($status) && $status) {\r\n // Get Referer and clean it up\r\n $sendback = wp_get_referer();\r\n $sendback = remove_query_arg(array('trashed', 'untrashed', 'deleted', 'invoice_id, unarchived, archived'), $sendback);\r\n // Determine if reffer is not main page, we set it ( anyway, will do redirect to main page )\r\n if (!strpos($sendback, $wpi_settings['links']['overview_page'])) {\r\n $sendback = $wpi_settings['links']['overview_page'];\r\n }\r\n wp_redirect(add_query_arg(array($status => 1, 'invoice_id' => implode(',', $invoice_ids)), $sendback));\r\n die();\r\n }\r\n }", "public function supportsAction($actions);", "public function applyFilters() {\n\t\tforeach ($this->filters as $filter) {\n\t\t\t$filter->apply($this);\n\t\t}\n\t\t$this->removeFilters();\n\t}", "function process_bulk_action()\n {\n //Detect when a bulk action is being triggered...\n if ('delete_selected' === $this->current_action() && $_GET['shortcode']) {\n foreach ($_GET['shortcode'] as $id) {\n $this->delete_shortcode($id);\n }\n }\n }", "public function run()\n {\n\n $policies = Policy::insert([\n [ \"name\" => \"readall-user\", \"action\" => \"readall\", \"resource\" => \"user\" ],\n [ \"name\" => \"assign-user\", \"action\" => \"update\", \"resource\" => \"user\" ],\n\n [ \"name\" => \"create-role\", \"action\" => \"create\", \"resource\" => \"role\" ],\n [ \"name\" => \"readall-role\", \"action\" => \"readall\", \"resource\" => \"role\" ],\n [ \"name\" => \"update-role\", \"action\" => \"update\", \"resource\" => \"role\" ],\n\n [ \"name\" => \"create-ticket\", \"action\" => \"create\", \"resource\" => \"ticket\" ],\n [ \"name\" => \"readall-ticket\", \"action\" => \"readall\", \"resource\" => \"ticket\" ],\n [ \"name\" => \"delete-ticket\", \"action\" => \"delete\", \"resource\" => \"ticket\" ],\n [ \"name\" => \"open-ticket\", \"actipn\" => \"open\", \"resource\" => \"ticket\" ],\n [ \"name\" => \"close-ticket\", \"actipn\" => \"close\", \"resource\" => \"ticket\" ],\n\n ]);\n\n $policies_ids = Policy::get('id');\n\n $owner_role = Role::where(\"name\",\"owner\")->first();\n $owner_role->policies()->attach($policies_ids);\n\n $owner = $owner_role->users()->first();\n $owner->policies()->attach($policies_ids);\n\n }", "function run () {\n\t\tforeach ( $this->genes AS $gene ) {\n\t\t\t$this->createOrAmendGeneItem ( $gene ) ;\n\t\t}\n\t}", "private function setup_actions() {\n\n\t\t// Register panels, sections, settings, controls, and partials.\n\t\tadd_action( 'customize_register', array( $this, 'sections' ) );\n\n\t\t// Register scripts and styles for the controls.\n\t\tadd_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 );\n\t}", "private function setup_actions() {\n\n\t\t// Register panels, sections, settings, controls, and partials.\n\t\tadd_action( 'customize_register', array( $this, 'sections' ) );\n\n\t\t// Register scripts and styles for the controls.\n\t\tadd_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 );\n\t}", "public function alter_assets(&$files, &$dependencies, $embed) {\n if (!has_action('h5p_alter_library_scripts') && !has_action('h5p_alter_library_styles')) {\n return;\n }\n\n // Refactor dependency list\n $libraries = array();\n foreach ($dependencies as $dependency) {\n $libraries[$dependency['machineName']] = array(\n 'majorVersion' => $dependency['majorVersion'],\n 'minorVersion' => $dependency['minorVersion']\n );\n }\n\n /**\n * Allows you to alter which JavaScripts are loaded for H5P. This is\n * useful for adding your own custom scripts or replacing existing once.\n *\n * @since 1.5.3\n *\n * @param array &$scripts List of JavaScripts to be included.\n * @param array $libraries The list of libraries that has the scripts.\n * @param string $embed_type Possible values are: div, iframe, external, editor.\n */\n do_action_ref_array('h5p_alter_library_scripts', array(&$files['scripts'], $libraries, $embed));\n\n /**\n * Allows you to alter which stylesheets are loaded for H5P. This is\n * useful for adding your own custom stylesheets or replacing existing once.\n *\n * @since 1.5.3\n *\n * @param array &$styles List of stylesheets to be included.\n * @param array $libraries The list of libraries that has the styles.\n * @param string $embed_type Possible values are: div, iframe, external, editor.\n */\n do_action_ref_array('h5p_alter_library_styles', array(&$files['styles'], $libraries, $embed));\n }", "public function process()\n {\n $this->minifier = AssetMinifier::createObjet($this->minifier, Minifier::className());\n foreach (Yii::$app->view->assetBundles as $key => $assetBundle) {\n if ($this->minifyJs && $assetBundle->js) {\n Yii::$app->view->assetBundles[$key] = $this->minifier->minifyJs($assetBundle);\n }\n\n if ($this->minifyCss && $assetBundle->css) {\n Yii::$app->view->assetBundles[$key] = $this->minifier->minifyCss($assetBundle);\n }\n }\n\n if ($this->combine) {\n $this->combiner = AssetMinifier::createObjet($this->combiner, Combiner::className());\n $this->combiner->process($this->minifyJs, $this->minifyCss);\n }\n }", "function get_bulk_actions() {\n $actions = array(\n // 'update' \t=> __( 'Update details from Amazon', 'wp-lister-for-amazon' ), // TODO\n // 'reapply' => __( 'Re-apply profile', 'wp-lister-for-amazon' ),\n // 'end_item' => __( 'Pause listings', 'wp-lister-for-amazon' ),\n 'wpla_get_compet_price' => __( 'Fetch latest prices from Amazon', 'wp-lister-for-amazon' ),\n 'wpla_resubmit' => __( 'Resubmit items', 'wp-lister-for-amazon' ),\n 'wpla_change_profile' => __( 'Change profile', 'wp-lister-for-amazon' ),\n 'wpla_trash_listing' => __( 'Remove from Amazon', 'wp-lister-for-amazon' ),\n 'wpla_delete' => __( 'Delete from database', 'wp-lister-for-amazon' ),\n 'wpla_get_lowest_offers' => __( 'Get lowest offer listings', 'wp-lister-for-amazon' ) . ' (beta)',\n 'wpla_fetch_pdescription' => __( 'Fetch full description', 'wp-lister-for-amazon' ) . ' (beta)',\n );\n return $actions;\n }", "public function apply(): void {\n\t\t// can we safely execute this?\n\t\t$entity_types = $this->getRegisteredEntityTypes();\n\t\t$tag_names = $this->getTagNames();\n\t\t\n\t\tif (empty($entity_types) || empty($tag_names)) {\n\t\t\t// no, we could remove too much\n\t\t\t// quit\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// prepare\n\t\t$this->preApply();\n\t\t\n\t\telgg_call(ELGG_IGNORE_ACCESS | ELGG_SHOW_DISABLED_ENTITIES, function() {\n\t\t\ttry {\n\t\t\t\tswitch ($this->tag_action) {\n\t\t\t\t\tcase 'delete':\n\t\t\t\t\t\t$this->applyDelete();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'replace':\n\t\t\t\t\t\t$this->applyReplace();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\telgg_log($e->getMessage(), 'ERROR');\n\t\t\t}\n\t\t});\n\t\t\n\t\t// restore\n\t\t$this->postApply();\n\t}", "protected function executeAction() {}", "protected function executeAction() {}" ]
[ "0.60173655", "0.58534074", "0.57009554", "0.55504906", "0.5447694", "0.5443552", "0.542013", "0.53905857", "0.53546125", "0.5334522", "0.5262782", "0.5244542", "0.5243241", "0.5241503", "0.52274954", "0.52269995", "0.52255386", "0.52150524", "0.51883805", "0.5181081", "0.51739943", "0.5172638", "0.5157503", "0.51556325", "0.50914806", "0.50861377", "0.50785714", "0.5046849", "0.50350857", "0.50271285", "0.5023554", "0.50222087", "0.5013245", "0.50058085", "0.49958503", "0.49945527", "0.4985349", "0.49835455", "0.49779037", "0.49759957", "0.49759957", "0.49654928", "0.49484214", "0.49475423", "0.49465945", "0.49433696", "0.49407634", "0.49350336", "0.4928702", "0.4926069", "0.49242914", "0.49186537", "0.49117327", "0.49095207", "0.4902806", "0.49021634", "0.49018002", "0.48985645", "0.48964602", "0.48957333", "0.48913023", "0.48872975", "0.48679647", "0.486617", "0.48652905", "0.4856633", "0.48565793", "0.48459503", "0.4821447", "0.48202214", "0.48068628", "0.4800728", "0.47967333", "0.47919673", "0.4790921", "0.4774746", "0.4759774", "0.47579226", "0.47577548", "0.4753433", "0.47528565", "0.47289273", "0.47287908", "0.47272602", "0.47258008", "0.47247282", "0.472334", "0.47202763", "0.4712283", "0.47097716", "0.47076684", "0.4704144", "0.470055", "0.470055", "0.46976233", "0.46906823", "0.46869427", "0.46842462", "0.4683423", "0.4683423" ]
0.6238898
0
Checks all stages other than the current stage, and check the visibility of assets attached to those records.
protected function addAssetsFromOtherStages(AssetManipulationList $manipulation) { // Skip unversioned or unsaved assets if (!$this->isVersioned() || !$this->owner->isInDB()) { return; } // Unauthenticated member to use for checking visibility $baseClass = $this->owner->baseClass(); $baseTable = $this->owner->baseTable(); $filter = [ Convert::symbol2sql("{$baseTable}.ID") => $this->owner->ID, ]; $stages = $this->owner->getVersionedStages(); // {@see Versioned::getVersionedStages} foreach ($stages as $stage) { // Skip current stage; These should be handled explicitly if ($stage === Versioned::get_stage()) { continue; } // Check if record exists in this stage $record = Versioned::get_one_by_stage($baseClass, $stage, $filter); if (!$record) { continue; } // Check visibility of this record, and record all attached assets $state = $this->getRecordState($record); $this->addAssetsFromRecord($manipulation, $record, $state); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onBeforeWrite()\n {\n if (!$this->hasAssets()) {\n return;\n }\n\n // Prepare blank manipulation\n $manipulations = new AssetManipulationList();\n\n // Mark overwritten object as deleted\n if ($this->owner->isInDB()) {\n $priorRecord = DataObject::get(get_class($this->owner))->byID($this->owner->ID);\n if ($priorRecord) {\n $this->addAssetsFromRecord($manipulations, $priorRecord, AssetManipulationList::STATE_DELETED);\n }\n }\n\n // Add assets from new record with the correct visibility rules\n $state = $this->getRecordState($this->owner);\n $this->addAssetsFromRecord($manipulations, $this->owner, $state);\n\n // Whitelist assets that exist in other stages\n $this->addAssetsFromOtherStages($manipulations);\n\n // Apply visibility rules based on the final manipulation\n $this->processManipulation($manipulations);\n }", "public function usesStages()\n\t{\n\t\t$stages = $this->rocketeer->getStages();\n\n\t\treturn $this->usesStages and !empty($stages);\n\t}", "public function hasStage(){\n return $this->_has(7);\n }", "protected function isStageEnabled() : bool\n {\n return true;\n }", "public function onAfterDelete()\n {\n if (!$this->hasAssets()) {\n return;\n }\n\n // Prepare blank manipulation\n $manipulations = new AssetManipulationList();\n\n // Add all assets for deletion\n $this->addAssetsFromRecord($manipulations, $this->owner, AssetManipulationList::STATE_DELETED);\n\n // Whitelist assets that exist in other stages\n $this->addAssetsFromOtherStages($manipulations);\n\n // Apply visibility rules based on the final manipulation\n $this->processManipulation($manipulations);\n }", "private function inActiveCurrentStage()\n {\n $activeStage = $this->getJobAwardedStage();\n\n if ($activeStage) {\n $activeStage->active = 0;\n $activeStage->save();\n }\n }", "protected function resolveWorkspacesSetStageDependencies() {}", "public function stageIsClean() : bool\n {\n return !$this->stageIsDirty();\n }", "function isRead() {\n\t\t$submissionDao = Application::getSubmissionDAO();\n\t\t$userGroupDao = DAORegistry::getDAO('UserGroupDAO');\n\t\t$userStageAssignmentDao = DAORegistry::getDAO('UserStageAssignmentDAO');\n\t\t$viewsDao = DAORegistry::getDAO('ViewsDAO');\n\n\t\t$submission = $submissionDao->getById($this->getSubmissionId());\n\n\t\t// Get the user groups for this stage\n\t\t$userGroups = $userGroupDao->getUserGroupsByStage(\n\t\t\t$submission->getContextId(),\n\t\t\t$this->getStageId()\n\t\t);\n\t\twhile ($userGroup = $userGroups->next()) {\n\t\t\t$roleId = $userGroup->getRoleId();\n\t\t\tif ($roleId != ROLE_ID_MANAGER && $roleId != ROLE_ID_SUB_EDITOR) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Get the users assigned to this stage and user group\n\t\t\t$stageUsers = $userStageAssignmentDao->getUsersBySubmissionAndStageId(\n\t\t\t\t$this->getSubmissionId(),\n\t\t\t\t$this->getStageId(),\n\t\t\t\t$userGroup->getId()\n\t\t\t);\n\n\t\t\t// Check if any of these users have viewed it\n\t\t\twhile ($user = $stageUsers->next()) {\n\t\t\t\tif ($viewsDao->getLastViewDate(\n\t\t\t\t\tASSOC_TYPE_REVIEW_RESPONSE,\n\t\t\t\t\t$this->getId(),\n\t\t\t\t\t$user->getId()\n\t\t\t\t)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function hasArtifacts(): bool {\n return $this->fetchInventory()->filter(function ($slot) {\n return $slot->item->type === 'artifact' && $slot->equipped;\n })->isNotEmpty();\n }", "public function removeStage()\n {\n if ($this->stageFilename !== null) {\n $finder = new Finder();\n $fs = new Filesystem();\n $imagePath = FRONTEND_FILES_PATH . '/festival/artists/files/stages';\n\n foreach ($finder->directories()->in($imagePath) as $directory) {\n $file = $directory . '/' . $this->stageFilename;\n\n if (is_file($file)) {\n $fs->remove($file);\n }\n }\n\n $this->stageFilename = null;\n\n return true;\n }\n\n return false;\n }", "public function doRevertToLive() {\n\t\tif($this->Fields()) {\n\t\t\tforeach($this->Fields() as $field) {\n\t\t\t\t$field->writeToStage('Live', 'Stage');\n\t\t\t}\n\t\t}\n\t\t\n\t\tparent::doRevertToLive();\n\t}", "protected function isVisible()\n {\n return parent::isVisible()\n && $this->getProduct()\n && $this->getAttachments();\n }", "public function load_additional_assets() {\n\n // Grab current screen\n $screen = get_current_screen();\n\n // Make sure we're on the correct screen\n if ( ! in_array( $screen->id, $this->screens ) ) {\n return;\n }\n\n do_action( 'cv_builder_inline_assets' );\n\n // Render template options callback for modal\n $this->render_template_options_template();\n\n // Render module options for modal\n $this->render_available_modules_template();\n\n }", "public function setStageData(Request $request)\n {\n $user = $request->user();\n $result = 'false';\n $code = 403;\n $message = \"You haven't permission to edit stage\";\n\n foreach ($user->user_permissions as $item){\n if ($item->permission == 'edit-stage'){\n $code = 400;\n $message = \"Bad request\";\n\n $team = $user->currentTeam();\n $owner_id = $team->owner_id;\n $settings = UserSettings::where(['user_id' => $owner_id])->first();\n\n $settings->stage_visibility = $request->input('stage_visibility');\n $settings->show_email_capture = $request->input('show_email_capture');\n $settings->notify_to_subscribers = $request->input('notify_to_subscribers');\n $settings->auto_tag_email_list = $request->input('auto_tag_email_list');\n $settings->stage_tags = json_encode($request->input('stage_tags'));\n $settings->stage_name = $request->input('stage_name');\n\n if ($request->has('email_list_id') && !is_null($request->input('email_list_id')) && !empty($request->input('email_list_id'))) {\n $email_list_id = $request->input('email_list_id');\n $settings->email_list_id = $email_list_id;\n $service_key = explode('_', $email_list_id);\n if ($service_key) {\n $owner = User::where(['id' => $owner_id])->with(['integrations' => function($q) use($service_key){\n $q->where(['service_key' => $service_key[0]]);\n }])->first();\n\n if (is_array($owner->integrations) && !empty($owner->integrations)) {\n $settings->integration_id = $owner->integrations->id;\n }\n }\n }\n\n User::saveDashboardSetting(\"2\");\n if ($settings->save()){\n $code = 200;\n $result = 'success';\n $message = 'Stage data successfully saved';\n }\n }\n }\n\n return response()->json([\n 'result' => $result,\n 'message' => $message\n ], $code);\n }", "private function accountForAllDependenciesToBeReleased()\n {\n $allAccountedFor = false;\n do {\n $allAccountedFor = true;\n // each repo requiring a release\n foreach ($this->toBeReleased as $releasableRepoName) {\n // all repositories not added to release yet\n foreach ($this->repos as $repoName => $repo) {\n if (empty($repo->getDependencies()) || in_array($repoName, $this->toBeReleased)) {\n continue;\n }\n\n if (in_array($releasableRepoName, $repo->getDependencies())\n && !in_array($repoName, $this->toBeReleased)\n ) {\n $allAccountedFor = false;\n $this->toBeReleased[] = $repoName;\n if ($repoName === $this->mainRepoName) {\n $this->msg(\"$repoName needs a new release because it is the main repository\");\n } else {\n $this->msg(\"$repoName needs a new release because $releasableRepoName is released\");\n }\n }\n }\n }\n } while ($allAccountedFor = false);\n }", "public static function assetsAreCurrent()\n {\n $publishedPath = public_path('vendor/orchid/mix-manifest.json');\n\n throw_unless(File::exists($publishedPath), new RuntimeException('Orchid assets are not published. Please run: `php artisan orchid:publish`'));\n\n return File::get($publishedPath) === File::get(__DIR__.'/../../public/mix-manifest.json');\n }", "public function actionCheckFiles(){\n\n if (!ClientDetectorComponent::getInstance()->isSferastudios())\n return;\n\n PRMTaskQueueComponent::$consoleUsage = true;\n\n PRMProjectsComponent::checkExistingFiles();\n }", "public function test_asset_not_loading() {\n\n\t\t// Check that the items are not enquened before we start.\n\t\t$this->assertFalse( $this->are_batch_assets_enqueued() );\n\n\t\t// Call our loader class on the general options page.\n\t\t$this->load_admin_enqueue_hook( 'options-general.php' );\n\n\t\t// Check that our assets aren't enquened.\n\t\t$this->assertFalse( $this->are_batch_assets_enqueued() );\n\t}", "public static function Rechercher_Stages(){\n\t\t \t//connexion à la base de données\n\t\t \t$oMysqliLib = new MySqliLib();\n\t\t \t//requête de recherche du Document\n\t\t \t$sRequete = \"SELECT * FROM stages\";\t\t \t\t\n\t\t \t\n\t\t \t//exécuter la requête\n\t\t \t$oResult = $oMysqliLib->executer($sRequete); \n\t\t \t//récupérer le tableau des enregistrements\n\t\t \t$aStage= $oMysqliLib->recupererTableau($oResult);\n\t\t\t\n\t\t \t//retourner array contenant les stages\n\t\t \treturn $aStage;\t\n\t\t }", "public function supportsStage($stage_identifier);", "public function isAssetAclEnabled()\n {\n $assetFieldAlias = $this->getFieldAlias('asset_id');\n\n if ( $this->hasField($assetFieldAlias) && $this->isAssetsTracked() )\n {\n return true;\n }\n\n return false;\n }", "public function doAnalyze()\n {\n $backdropFinder = new Finder();\n $backdropFinder->in($this->sourceDir.'/backdrop');\n foreach ($backdropFinder->files() as $row ) {\n /* @var $row SplFileInfo*/\n if (in_array($row->getExtension(), $this->filter)) {\n $this->doAnalyzingBackdrop($row, 'backdrop');\n }\n }\n $this->dumpLibraryJson('backdrop');\n\n }", "public function validate()\n {\n parent::validate();\n if ( ! $this->getRelease()\n || in_array($this->getRelease()->getState(), [\n array_search('failed', config('projects.states')),\n array_search('destroyed', config('projects.states'))\n ])\n ) {\n $this->failedValidation($this->getValidatorInstance());\n }\n }", "public function updateStageMetadata()\n {\n $histories = $this->histories()->orderBy('created_at')->get();\n\n $stages = new stdClass();\n $assignees = new stdClass();\n $closing = new stdClass();\n $assignees_track = new stdClass();\n\n // Iterate history\n foreach ($histories as $history) {\n // All stages\n if ($history->stage_name) {\n $stage_name = $history->stage_name;\n $actor = $history->actor;\n $history_key = $history->key;\n $metadata = $history->metadata;\n // Track of created stages\n if ($history->status === 'created') {\n $stages->$stage_name = [\n 'stage_name' => $stage_name,\n 'actor' => $actor,\n 'history_key' => $history_key,\n 'actory_key' => $metadata['actor_key'],\n 'assignee_key' => $metadata['assignee_key'],\n 'assignee' => $metadata['assignee_name']\n ];\n\n // Create list of assignees and add track for faster retrival\n $assignee_key = $metadata['assignee_key'];\n $assignees->$assignee_key[$stage_name] = 'created';\n $assignees_track->$stage_name = $metadata['assignee_key'];\n } else if ($history->status === 'completed') {\n // If completed remove stages, and remove from assignees\n unset($stages->$stage_name);\n $assinee_key = $assignees_track->$stage_name;\n unset($assignees->$assinee_key[$stage_name]);\n }\n } else if (isset($history->metadata['candidacy_closing_reason'])) {\n // Track candidacy closing and add\n $actor = $history->actor;\n $actor_key = $history->metadata['actor_key'];\n $close_reason = $history->metadata['candidacy_closing_reason'];\n $history_key = $history->key;\n\n $closing->actor = $actor;\n $closing->actor_key = $actor_key;\n $closing->reason = $close_reason;\n $closing->history_key = $history_key;\n }\n }\n\n // Iterate assignee and remove if all assigned stages\n foreach ($assignees as $key => $val) {\n if (!$val) {\n unset($assignees->$key);\n }\n }\n\n $metadata = new stdClass();\n\n // Old keys remains as it is\n foreach ($this->metadata as $key => $value) {\n $metadata->$key = $value;\n }\n\n $metadata->assignees = $assignees;\n $metadata->stages = $stages;\n $metadata->closing = $closing;\n\n $this->metadata = $metadata;\n $this->save();\n }", "public function stageIsDirty() : bool\n {\n $stage = $this\n ->runProcess(new Process('git status --porcelain'))\n ->getOutput()\n ;\n\n return !!trim($stage);\n }", "function check_access() {\n foreach ($this->children as $child) {\n if ($child->check_access()) {\n return true;\n }\n }\n return false;\n }", "public function performChecks(){\n\t\t\n\t}", "public function getIsModifiedOnStage() {\n\t\treturn true;\n\t}", "private function are_batch_assets_enqueued() {\n\n\t\t// Run the check on both the style and script enqueue.\n\t\tif ( false !== wp_style_is( 'batch-process-styles', 'enqueued' ) && false !== wp_script_is( 'batch-js', 'enqueued' ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function CheckForEditableFields($ScreenName){\n $Screen = &$this->getScreen($ScreenName);\n //$Screen = &$this->Screens[$ScreenName];\n $nEditableFields = 0;\n foreach($Screen->Fields as $sf){\n if ($sf->isEditable()){\n $nEditableFields += 1;\n }\n }\n if ($nEditableFields > 0){\n return true;\n } else {\n return false;\n }\n }", "public static function manageinventory()\n\t\t{\n\t\t\t$stageDBO = DatabaseObjectFactory::build('Material');\n\t\t\t$arr = ['material_id','unit_price'];\n\t\t\t$materials = $stageDBO->getRecords($arr);\n\t\t\t\n\t\t\t$stageDBO = DatabaseObjectFactory::build('craft');\n\t\t\t$arr = ['craft_id','calculated_qoh'];\n\t\t\t$stageDBO->SetJoin(['[><]item' => 'item_id']);\n\t\t\t$crafts = $stageDBO->getRecords($arr);\n\n\t\t\t$stageDBO = DatabaseObjectFactory::build('return_details');\n\t\t\t$stageDBO->SetJoin(['[><]item' => 'item_id']);\n\t\t\t$arr = ['return_id','item_id','qty','current_price'];\n\t\t\t$returns = $stageDBO->getRecords($arr);\n\n\t\t\tinclude('views/pages/manageinventory.php');\n\t\t}", "public function progress_check(){\n \ttry {\n\t $json = file_get_contents(\"php://input\");\n\t $data = json_decode($json);\n\t $stage_id=$data->stage_id;\n\t $next_stage_id=$data->next_stage_id;\n\t $opportunity_id = $data->opp_id;\n\t $finalArray = array();\n\t $qualifier_data = $this->opp_common->check_qualifiers($next_stage_id);\n\t $finalArray['qualifier'] = $qualifier_data;\n\t $files_data = $this->opp_sales->check_files_for_stage($stage_id,$opportunity_id);\n\t $finalArray['fileCheck'] = $files_data;\n\t echo json_encode($finalArray);\n \t} catch (LConnectApplicationException $e) {\n \t\techo $this->exceptionThrower($e);\n \t}\n }", "public function index()\n {\n $breadcrumbs = $this->breadcrumbs;\n $total_active_lease_asset = Lease::query()->whereIn('business_account_id', getDependentUserIds())->where('status', '=', '1')->with('assets')->count();\n\n $leases = Lease::query()->where('status', '=', '1')->whereIn('business_account_id', getDependentUserIds());\n $lease_id = $leases->get()->pluck('id')->toArray();\n\n //Tengible Properties -Land\n $total_land = LeaseAssets::query()->whereHas('category', function ($query) {\n $query->where('id', 1);\n })->whereIn('lease_id', $lease_id)->count();\n\n $lease_asset_categories = LeaseAssetCategories::query()->where('is_capitalized', '=', '1')->get();\n $category_id = $lease_asset_categories->pluck('id')->toArray();\n\n $own_assets_capitalized = LeaseAssets::query()->whereIn('lease_id', $lease_id)\n ->where('specific_use', '=', 1)\n ->whereIn('category_id', $category_id)\n ->whereHas('leaseSelectLowValue', function ($query) {\n $query->where('is_classify_under_low_value', '=', 'no');\n })->whereHas('leaseDurationClassified', function ($query) {\n $query->where('lease_contract_duration_id', '=', '3');\n })->count();\n\n\n $sublease_assets_capitalized = LeaseAssets::query()->whereIn('lease_id', $lease_id)\n ->where('specific_use', '=', 2)\n ->whereIn('category_id', $category_id)\n ->whereHas('leaseSelectLowValue', function ($query) {\n $query->where('is_classify_under_low_value', '=', 'no');\n })->whereHas('leaseDurationClassified', function ($query) {\n $query->where('lease_contract_duration_id', '=', '3');\n })->count();\n\n //Tangible Properties - Other than Land\n $total_other_land = LeaseAssets::query()->whereHas('category', function ($query) {\n $query->where('id', 2);\n })->whereIn('lease_id', $lease_id)->count();\n\n //Plant & Equipments\n $total_plant = LeaseAssets::query()->whereHas('category', function ($query) {\n $query->where('id', 3);\n })->whereIn('lease_id', $lease_id)->count();\n\n //Investment Properties\n $total_investment = LeaseAssets::query()->whereHas('category', function ($query) {\n $query->where('id', 6);\n })->whereIn('lease_id', $lease_id)->count();\n\n //Intangible Assets\n $total_intangible = LeaseAssets::query()->whereHas('category', function ($query) {\n $query->where('id', 7);\n })->whereIn('lease_id', $lease_id)->count();\n\n //Agricultural Assets\n $total_agricultural = LeaseAssets::query()->whereHas('category', function ($query) {\n $query->where('id', 4);\n })->whereIn('lease_id', $lease_id)->count();\n\n //Short Term Lease\n $total_short_term_lease = LeaseAssets::query()->whereIn('lease_id', $lease_id)\n ->whereHas('leaseDurationClassified', function ($query) {\n $query->where('lease_contract_duration_id', '=', '2');\n })->count();\n\n //Low Value lease assets\n $total_low_value_asset = LeaseAssets::query()->whereIn('lease_id', $lease_id)\n ->whereHas('leaseSelectLowValue', function ($query) {\n $query->where('is_classify_under_low_value', '=', 'yes');\n })->count();\n\n $category_excluded = \\App\\CategoriesLeaseAssetExcluded::query()\n ->whereIn('business_account_id', getDependentUserIds())\n ->where('status', '=', '0')\n ->get();\n\n $category_excluded_id = $category_excluded->pluck('category_id')->toArray();\n\n //other lease asset combining together intangible and biological\n $total_other_lease_asset = LeaseAssets::query()->whereHas('category', function ($query) use ($category_excluded_id) {\n $query->whereIn('category_id', $category_excluded_id);\n })->whereIn('lease_id', $lease_id)->count();\n\n //undiscounted lease assets\n $total_undiscounted_capitalized = LeaseAssets::query()->whereIn('lease_id', $lease_id)\n ->where('specific_use', 1)\n ->whereHas('leaseSelectLowValue', function ($query) {\n $query->where('is_classify_under_low_value', '=', 'no');\n })->whereHas('leaseDurationClassified', function ($query) {\n $query->where('lease_contract_duration_id', '=', '3');\n })->whereNotIn('category_id', [5, 8])->count();\n return view('home', compact(\n 'own_assets_capitalized',\n 'sublease_assets_capitalized',\n 'total_active_lease_asset',\n 'total_land',\n 'total_short_term_lease',\n 'total_low_value_asset',\n 'total_other_lease_asset',\n 'total_other_land',\n 'total_plant',\n 'total_investment',\n 'total_undiscounted_capitalized',\n 'total_intangible',\n 'total_agricultural',\n 'breadcrumbs'\n ));\n }", "protected abstract function ensureAvisLoaded(array $ids = array());", "private function accept_opp_stage($given_data)\t{\n \t$opp_stage= $this->opp_sales->stage_owner($given_data['opp_id']);\n $opp_status= $opp_stage[0]->stage_owner_status;\n $opp_value=$opp_stage[0]->opportunity_value;\n $stage_manager_owner_id=$opp_stage[0]->stage_manager_owner_id;\n\n //if($opp_status=='1' || $opp_status=='0'){\n $repotmgr=$this->opp_sales->getrepmgr($given_data['userid']);\n if($opp_value=='onlyexe'){\n $data1= array(\n 'stage_owner_id'=>$given_data['userid'],\n 'stage_owner_status'=>2,\n 'stage_manager_owner_id'=>$repotmgr\n );\n }else{\n $data1= array(\n 'stage_owner_id'=>$given_data['userid'],\n 'stage_owner_status'=>2\n );\n\n }\n if($opp_value=='onlyexe'){\n $data2= array(\n 'mapping_id'=> uniqid(rand()),\n 'opportunity_id'=>$given_data['opp_id'],\n 'lead_cust_id'=> $given_data['lead_cust_id'],\n 'from_user_id'=> $repotmgr,\n 'to_user_id'=> $given_data['userid'],\n 'cycle_id'=> $given_data['cycle_id'],\n 'stage_id'=>$given_data['opportunity_stage'],\n 'module'=> 'sales',\n 'sell_type'=> $given_data['sell_type'],\n 'timestamp'=> date('Y-m-d H:i:s'),\n 'action' => 'stage accepted',\n 'state' => '1'\n );\n }else{\n $data2= array(\n 'mapping_id'=> uniqid(rand()),\n 'opportunity_id'=>$given_data['opp_id'],\n 'lead_cust_id'=> $given_data['lead_cust_id'],\n 'from_user_id'=> $given_data['userid'],\n 'to_user_id'=> $given_data['userid'],\n 'cycle_id'=> $given_data['cycle_id'],\n 'stage_id'=>$given_data['opportunity_stage'],\n 'module'=> 'sales',\n 'sell_type'=> $given_data['sell_type'],\n 'timestamp'=> date('Y-m-d H:i:s'),\n 'action' => 'stage accepted',\n 'state' => '1'\n );\n\n }\n $update = $this->opp_sales->accept_opp($given_data['opp_id'],$data1);\n $update2 = $this->opp_sales->update_stage_transaction($given_data['opp_id']);\n $update1 = $this->opp_sales->insert_transaction($data2);\n\n //---------------- notification code----------------------------------\n $get_fromuser= $this->opp_sales->get_from_userid1($given_data['opp_id'],$given_data['userid']);\n //to user---- is the one who is to be notified.\n // from user---- is the one who performs action\n $dt = date('ymdHis');\n $notify_id= uniqid($dt);\n $remarks=\"accept of opp from executive module \";\n $getusername=$this->opp_mgr->getusernamae($get_fromuser);\n $getusername1=$this->opp_mgr->getusernamae($given_data['userid']);\n \t\t$data21= array(\n \t\t\t'notificationID' =>$notify_id,\n \t\t\t'notificationShortText'=>'Opportunity Stage Accepted',\n \t\t\t'notificationText' =>'Opportunity Stage Accepted by '.$getusername1.' given by '.$getusername,\n \t\t\t'from_user'=>$given_data['userid'],\n \t\t\t'to_user'=>$get_fromuser,\n \t\t\t'action_details'=>'Opportunity',\n \t\t\t'notificationTimestamp'=>$dt,\n \t\t\t'read_state'=>0,\n \t\t\t'remarks'=>$remarks,\n \t\t\t'show_status'=>0\n \t\t);\n //array_push($insertArray1, $data2);\n if($get_fromuser!=\"\"){\n $get_fromuser= $this->opp_sales->rej_opp_notification($data21);\n }\n\n //---------------------------------------------------------end -----------------\n\n if($update==true && $update1==true && $update2==true){\n return 1;\n }\n //}\n }", "public static function stage(CandidateStage $stage): ?array\n {\n // has a decision been made at this stage?\n $decision = null;\n if ($stage->status != CandidateStage::STATUS_PENDING) {\n $decider = $stage->decider()->with('position')->first();\n\n $decision = [\n 'decider' => $decider ? [\n 'id' => $decider->id,\n 'name' => $decider->name,\n 'avatar' => ImageHelper::getAvatar($decider, 32),\n 'position' => (! $decider->position) ? null : [\n 'id' => $decider->position->id,\n 'title' => $decider->position->title,\n ],\n 'url' => route('employees.show', [\n 'company' => $decider->company,\n 'employee' => $decider,\n ]),\n ] : [\n 'id' => null,\n 'name' => $stage->decider_name,\n ],\n 'decided_at' => $stage->decided_at ? DateHelper::formatDate($stage->decided_at) : null,\n ];\n }\n\n return [\n 'id' => $stage->id,\n 'status' => $stage->status,\n 'decision' => $decision,\n ];\n }", "public function checkRecords() {\n foreach ($this->records as $record) {\n $type = $record[$this->Version->Version->alias]['type'];\n $version = $record[$this->Version->Version->alias]['version'];\n\n if ( ! isset($this->mappings[$type])) {\n $this->mappings[$type] = $this->Version->getMapping($type);\n }\n\n // Existing mapping\n if (empty($this->mappings[$type][$version])) {\n throw new RuntimeException(sprintf(\n 'Not able to match version `%d` in `%s`. Make sure every migration applied to the database is present on the filesystem.',\n $version, $type\n ));\n }\n\n // Migration file and class present? If not, will throw an exception\n $info = $this->mappings[$type][$version];\n $migration = $this->Version->getMigration($info['name'], $info['class'], $type);\n unset($migration);\n }\n }", "public function allowsCascading()\n {\n return false;\n }", "public function allowsCascading()\n {\n return false;\n }", "public function get_reject_stage($given_data) {\n\t\ttry {\n\t\t\t$prevStage = $this->opp_sales->fetch_reject_stage($given_data['stage_id']);\n\t\t\tif ($prevStage == null) {\n\t\t\t\t$error = array('error' => 'Something went wrong in fetching predefined stage.', 'name' => '');\n\t\t\t\techo json_encode(array('errors' => array(0=>$error), 'status' => false));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$old_stage_owner = $this->opp_sales->fetch_owner_stage($prevStage, $given_data['opportunity_id']);\n\n\t\t\t//$old_stage_manger_owner = $this->opp_sales->fetch_reporting_manager($old_stage_owner);\n\t\t\t//$old_stage_manger_owner = $old_stage_manger_owner[0]->manager_id;\n\n\t\t\t$oppo_attr = $this->opp_common->fetch_oppoAttr($given_data['opportunity_id']);\n\t\t\tif ($oppo_attr == null) {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\t$changed_attr = array();\n\t\t\t/*if ($oppo_attr[0]->numbers != $given_data['stage_numbers']) {\n\t\t\t\t$changed_attr['opportunity_numbers'] = $given_data['stage_numbers'];\n\t\t\t}*/\n\t\t\tif ($oppo_attr[0]->close_date != $given_data['stage_closed_date']) {\n\t\t\t\t$changed_attr['opportunity_date'] = $given_data['stage_closed_date'];\n\t\t\t}\n\t\t\t/*if ($oppo_attr[0]->value != $given_data['stage_value']) {\n\t\t\t\t$changed_attr['opportunity_value'] = $given_data['stage_value'];\n\t\t\t}*/\n\t\t\tif ($oppo_attr[0]->rate != $given_data['stage_rate']) {\n\t\t\t\t$changed_attr['opportunity_rate'] = $given_data['stage_rate'];\n\t\t\t}\n\t\t\tif ($oppo_attr[0]->score != $given_data['stage_score']) {\n\t\t\t\t$changed_attr['opportunity_score'] = $given_data['stage_score'];\n\t\t\t}\n\t\t\tif ($oppo_attr[0]->customer_code != $given_data['stage_customer_code']) {\n\t\t\t\t$changed_attr['opportunity_customer_code'] = $given_data['stage_customer_code'];\n\t\t\t}\n\t\t\tif ($oppo_attr[0]->priority != $given_data['stage_priority']) {\n\t\t\t\t$changed_attr['opportunity_priority'] = $given_data['stage_priority'];\n\t\t\t}\n\t\t\tif ($oppo_attr[0]->stage != $prevStage) {\n\t\t\t\t$changed_attr['opportunity_stage'] = $prevStage;\n\t\t\t}\n\t\t\t$changed_attr['stage_owner_id'] = $old_stage_owner;\n\t\t\t//$changed_attr['stage_manager_owner_id'] = $old_stage_manger_owner;\n\t\t\t$this->opp_common->updateOpportunity($changed_attr, $given_data['opportunity_id']);\n\n\n\t\t\t$log_trans_data = array(\n\t\t\t\t'mapping_id' => $given_data['mapping_id'],\n\t\t\t\t'opportunity_id'=> $given_data['opportunity_id'],\n\t\t\t\t'lead_cust_id' => $given_data['lead_cust_id'],\n\t\t\t\t'from_user_id'=> $given_data['user_id'],\n\t\t\t\t'to_user_id'=> $given_data['user_id'],\n\t\t\t\t'cycle_id' => $given_data['cycle_id'],\n\t\t\t\t'stage_id' => $given_data['stage_id'],\n\t\t\t\t'module' => 'sales',\n\t\t\t\t'action' => 'rejected',\n\t\t\t\t'timestamp'=> date('Y-m-d H:i:s'),\n\t\t\t\t'sell_type' => $given_data['sell_type'],\n\t\t\t\t'remarks' => $given_data['stage_remarks'],\n\t\t\t);\n\t\t\t$insert=$this->opp_common->map_opportunity(array(0 => $log_trans_data)); //log into transaction table as stage changed\n\n\t\t\treturn array('errors' => array(), 'status' => $insert);\n\t\t} catch (LConnectApplicationException $e) {\n\t\t\techo $this->exceptionThrower($e);\n\t\t}\n\t}", "protected function updateVisibility()\n {\n if($this->visibility === null) {\n return;\n }\n\n if ($this->instance->content->visibility != $this->visibility) {\n $this->instance->content->visibility = $this->visibility;\n\n $contentIds = [];\n foreach($this->instance->mediaList as $media) {\n $contentIds[] = $media->content->id;\n }\n\n Content::updateAll(['visibility' => $this->visibility], ['in', 'id', $contentIds]);\n }\n }", "function effect() {\n\t\t$request = $this->_request;\n\t\t$context = $request->getContext();\n\t\t$contextId = $context->getId();\n\t\t$user = $request->getUser();\n\t\tif (!is_a($user, 'User')) return AUTHORIZATION_DENY;\n\n\t\t$userId = $user->getId();\n\t\t$submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);\n\n\t\t$accessibleWorkflowStages = array();\n\t\t$workflowStages = Application::getApplicationStages();\n\t\tforeach ($workflowStages as $stageId) {\n\t\t\t$accessibleStageRoles = $this->_getAccessibleStageRoles($userId, $contextId, $submission, $stageId);\n\t\t\tif (!empty($accessibleStageRoles)) {\n\t\t\t\t$accessibleWorkflowStages[$stageId] = $accessibleStageRoles;\n\t\t\t}\n\t\t}\n\n\t\t$this->addAuthorizedContextObject(ASSOC_TYPE_ACCESSIBLE_WORKFLOW_STAGES, $accessibleWorkflowStages);\n\n\t\t// Does the user have a role which matches the requested workflow?\n\t\tif (!is_null($this->_workflowType)) {\n\t\t\t$workflowTypeRoles = Application::getWorkflowTypeRoles();\n\t\t\tforeach ($accessibleWorkflowStages as $stageId => $roles) {\n\t\t\t\tif (array_intersect($workflowTypeRoles[$this->_workflowType], $roles)) {\n\t\t\t\t\treturn AUTHORIZATION_PERMIT;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn AUTHORIZATION_DENY;\n\n\t\t// User has at least one role in any stage in any workflow\n\t\t} elseif (!empty($accessibleWorkflowStages)) {\n\t\t\treturn AUTHORIZATION_PERMIT;\n\t\t}\n\n\t\treturn AUTHORIZATION_DENY;\n\t}", "public function isIsolated() {}", "function afficherstages(){\n\t\t$sql=\"SElECT * From stage\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "public function turnOnWaitingChecks()\n {\n $this->isModal = false;\n return;\n }", "public function validate()\n {\n /* @var $model \\yii\\db\\ActiveRecord */\n $valid = true;\n\n foreach ($this->_relationsToSave as $model) {\n $model->{$this->relPrimaryKey} = ($this->owner->primaryKey) ? $this->owner->primaryKey : null;\n\n $attributes = array_diff($model->activeAttributes(), [$this->relPrimaryKey]);\n\n if (!$model->validate($attributes)) {\n $this->owner->addErrors($model->getErrors());\n\n $valid = false;\n }\n }\n\n return $valid;\n }", "public function optimize()\n {\n $this->deoptimize();\n $modules = $this->getAllModules();\n $id_header = Hook::getIdByName('displayHeader');\n foreach ($modules as $module) {\n $module_obj = Module::getInstanceById($module['id_module']);\n if (!$this->checkModuleInFrontHooks($module_obj)) {\n $pages = $this->checkModuleInLayouts($module_obj);\n if (count($pages) > 0) {\n $this->editExceptions($module_obj, $id_header, $this->id_shop, $pages);\n }\n }\n }\n }", "public function test_asset_loading() {\n\n\t\t// Check that the items are not enquened before we start.\n\t\t$this->assertFalse( $this->are_batch_assets_enqueued() );\n\n\t\t// Call our loader class on the locomotive settings page.\n\t\t$this->load_admin_enqueue_hook( 'tools_page_locomotive' );\n\n\t\t// Check that the items are enquened.\n\t\t$this->assertTrue( $this->are_batch_assets_enqueued() );\n\t}", "public function hasStudyDatasets() {\n return $this->_has(2);\n }", "function updateStateAndVisibility() {\n $project_objects_table = TABLE_PREFIX . 'project_objects';\n $activity_logs_table = TABLE_PREFIX . 'activity_logs';\n\n try {\n DB::execute(\"ALTER TABLE $project_objects_table CHANGE state state tinyint(3) unsigned not null default '0'\");\n DB::execute(\"ALTER TABLE $project_objects_table ADD original_state tinyint(3) unsigned null default null after state\");\n //DB::execute(\"ALTER TABLE $project_objects_table CHANGE visibility visibility tinyint(3) UNSIGNED NOT NULL DEFAULT '0'\");\n DB::execute(\"ALTER TABLE $project_objects_table CHANGE visibility visibility tinyint(3) NOT NULL DEFAULT '0'\"); // Keep the field as UNSIGNED, so confidentiality module can continue to work\n DB::execute(\"ALTER TABLE $project_objects_table ADD original_visibility tinyint UNSIGNED NULL DEFAULT NULL AFTER visibility\");\n\n DB::execute(\"UPDATE $project_objects_table SET original_state = ? WHERE state = ?\", 3, 1); // Set original state to visible for trashed objects\n //DB::execute(\"UPDATE $project_objects_table SET visibility = ? WHERE visibility IS NOT NULL AND visibility < ?\", 0, 0); // Reset all invalid visibility values\n\n DB::execute(\"UPDATE $activity_logs_table SET type = ? WHERE type = ?\", 'MovedToTrashActivityLog', 'ObjectTrashedActivityLog');\n DB::execute(\"UPDATE $activity_logs_table SET type = ? WHERE type = ?\", 'RestoredFromTrashActivityLog', 'ObjectRestoredActivityLog');\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function assets(): void\n {\n $count = count($this->grav['assets']['assets_css']) + count($this->grav['assets']['assets_js']);\n $this->handle->writeln('');\n $this->handle->writeln('<white>Processing Asset(s): ' . $count . '</white>');\n $this->progressBar = new ProgressBar(\n $this->handle,\n $count\n );\n $this->buildAssets();\n $this->teardown('Finished ' . $count . ' Asset(s)');\n }", "public function valid()\n {\n return (current($this->objects) !== false);\n }", "public function checkAllSystems() {\n\t\techo \"All system are ready<br>\";\n\t\t$this->missionControl->setState($this->missionControl->getStartPowerUnits());\n\t}", "public function attachStageComposers()\n {\n if (! isset($this->app['stage']) || ! is_dir($path = $this->app['stage']['path'] . '/View/Composers')) {\n return;\n }\n\n $namespace = $this->app['stage']['namespace'];\n\n // TODO: This should be cacheable, perhaps via `wp acorn` command\n foreach ((new Finder())->in($path)->files() as $composer) {\n $composer = $namespace . str_replace(\n ['/', '.php'],\n ['\\\\', ''],\n Str::after($composer->getPathname(), $this->app['stage']['path'] . DIRECTORY_SEPARATOR)\n );\n\n if (\n is_subclass_of($composer, Composer::class) &&\n ! (new ReflectionClass($composer))->isAbstract()\n ) {\n $this->view()->composer($composer::views(), $composer);\n }\n }\n }", "public function hasNoErrors(){\n \n global $DB;\n \n // Name\n if (strlen($this->name) == 0){\n $this->errors[] = get_string('errors:gradestructures:name', 'block_gradetracker');\n }\n \n $params = array(\"name\" => $this->name, \"deleted\" => 0);\n if (!is_null($this->qualStructureID)){\n $params['qualstructureid'] = $this->qualStructureID;\n } elseif (!is_null($this->qualBuildID)){\n $params['buildid'] = $this->qualBuildID;\n }\n \n $check = $DB->get_record(\"bcgt_crit_award_structures\", $params);\n if ($check && $check->id <> $this->id)\n {\n $this->errors[] = get_string('errors:gradestructures:name:duplicate', 'block_gradetracker') . ' - ' . $this->name;\n }\n \n // Qual Structure or Qual Build\n if ($this->qualStructureID <= 0 && ($this->qualBuildID <= 0 || is_null($this->qualBuildID))){\n $this->errors[] = get_string('errors:gradestructures:qualstructureorbuild', 'block_gradetracker') . ' - ' . $this->name;\n }\n \n // Awards\n if (!$this->awards){\n $this->errors[] = get_string('errors:gradestructures:awards', 'block_gradetracker') . ' - ' . $this->name;\n }\n \n if ($this->awards)\n {\n foreach($this->awards as $award)\n {\n if (!$award->hasNoErrors())\n {\n foreach($award->getErrors() as $err)\n {\n $this->errors[] = $err;\n }\n }\n }\n }\n \n return (!$this->errors);\n \n }", "public function checkAssetRecord(JAsset $asset)\n {\n try\n {\n $isAssetValid = $asset->check();\n }\n catch (\\Exception $e)\n {\n // ... continue to error handling below\n }\n\n\t\tif (!$isAssetValid)\n\t\t{\n throw new AssetException( Text::_('COM_CAJOBBOARD_BEHAVIOUR_ASSETS_EXCEPTION_RECORD_INVALID') );\n }\n }", "public function hasDatasets() {\n return $this->_has(3);\n }", "public static function ensureIndexes() {\n\t\t$export_queue = new self();\n\t\t$export_queue->getCollection()->ensureIndex(array('lead._id' => 1), array('background' => true));\n\t\t$export_queue->getCollection()->ensureIndex(array('export._id' => 1), array('background' => true));\n\t\t$export_queue->getCollection()->ensureIndex(array('split._id' => 1), array('background' => true));\n\t\treturn true;\n\t}", "function check_module_visibilityANDavailability($DB, $module_infos, $visibility_allowhiddenmodules, $availability_ignoreavailabilityrestrictions){\n\n //Controlled in Moodle Gui: under 'availability (under \"Common module settings\")'\n $module_restrictions= new stdClass();\n try {\n\n $module_section_infos= $DB->get_record('course_sections', array('id' =>$module_infos->section));\n $module_section_availability = $module_section_infos->availability;\n\n //Get all module/section availability restrictions in array format: including those on complexe set of restrictions.\n $module_section_access_restrictions= get_availability_restelements_fromavfield( $module_section_availability);\n $module_access_restrictions= get_availability_restelements_fromavfield( $module_infos->availability );\n\n //Module visisbility: \"module visibility\" AND \"section visibility\"\n $module_restrictions->mod_visibility = $module_infos->visible;\n $module_restrictions->mod_accrestrictions = $module_access_restrictions;\n $module_restrictions->mod_section_accrestrictions = $module_section_access_restrictions;\n\n\n } catch (\\Exception $e) {\n //$module_infos->course_gen_infos = 'Resource not existant. Verify your request or contact Univ-Nantes Admin.';\n return $e;\n echo \"Exception occurred\";\n }\n\n return array($module_restrictions,decide_about_modVisibilityANDAvailability( $module_restrictions, $visibility_allowhiddenmodules, $availability_ignoreavailabilityrestrictions ));\n\n }", "public function isUsedInAssessments(){\n return ($this->assessments == 1);\n }", "public function clean()\n\t{\n\t\t(($sPlugin = Phpfox_Plugin::get('video.component_block_related_clean')) ? eval($sPlugin) : false);\n\t}", "public function actionVerifyImages()\n {\n $srcImgDir = Yii::getAlias('@frontend') . DIRECTORY_SEPARATOR .\n 'web' . DIRECTORY_SEPARATOR .\n 'images' . DIRECTORY_SEPARATOR .\n 'i1' . DIRECTORY_SEPARATOR;\n\n $dstImgDir = Yii::getAlias('@frontend') . DIRECTORY_SEPARATOR .\n 'web' . DIRECTORY_SEPARATOR .\n 'images' . DIRECTORY_SEPARATOR .\n 'product' . DIRECTORY_SEPARATOR;\n\n echo 'Checking missing images in: ' . $srcImgDir . ' to ' . $dstImgDir . PHP_EOL;\n\n $imgDst = glob($dstImgDir . '*.{jpg,JPG}', GLOB_BRACE);\n $cId = count($imgDst);\n if ($cId) {\n echo 'Found ' . $cId . ' in ' . $dstImgDir . ' folder '. PHP_EOL;\n }\n\n $imgSrc = glob($srcImgDir . '*.{jpg,JPG}', GLOB_BRACE);\n $cIs = count($imgSrc);\n if ($cIs) {\n echo 'Found ' . $cIs . ' in ' . $srcImgDir . ' folder '. PHP_EOL;\n\n $cOk = $cErr = $j = 0;\n foreach ($imgSrc as $i) {\n /* if ($j == 7) {\n break;\n } */\n $art = substr($i, strlen($srcImgDir) + 1, -4);\n echo 'Checking image ' . $i . ' Checking articul: ' . $art . PHP_EOL;\n\n $civQuery = CatalogItemVariant::find()\n ->where(['published' => 1]);\n $civ = $civQuery->andFilterWhere(['like', 'img_url', $art])\n ->asArray()\n ->all();\n\n // echo 'Found: ' . print_r($civ, 1) . PHP_EOL;\n if (!empty($civ[0]['img_url'])) {\n $bsDst = basename($civ[0]['img_url']);\n echo 'Checking destination file: ' . $dstImgDir . $bsDst . PHP_EOL;\n if (file_exists($dstImgDir . $bsDst)) {\n echo 'Skip destination file exists: ' . $dstImgDir . $bsDst . PHP_EOL;\n } else {\n if (copy($i, $dstImgDir . $bsDst)) {\n echo 'Copied ' . $i . ' to ' . $dstImgDir . $bsDst . PHP_EOL;\n $cOk ++;\n } else {\n echo 'Error: can`t copy ' . $i . ' to ' . $dstImgDir . $bsDst . PHP_EOL;\n $cErr ++;\n }\n }\n }\n $j ++;\n }\n }\n $imgDst2 = glob($dstImgDir . '*.{jpg,JPG}', GLOB_BRACE);\n $cId2 = count($imgDst2);\n if ($cId2) {\n echo 'Found ' . $cId2 . ' in ' . $dstImgDir . ' folder '. PHP_EOL;\n }\n echo 'Checked ' . $j . ' image files. Copied ' . $cOk . ' images. Image copy errors: ' . $cErr . PHP_EOL;\n }", "public function has_inactive_dependencies(): bool;", "public function updating(GrowlogStage $growlogstage){\n $actual_start = new Carbon($growlogstage->stage_start);\n\n //PREVIA\n $prev = $growlogstage->prevStage();\n while($prev!=null){\n $prev_start = new Carbon($prev->stage_start);\n if(($actual_start->lt($prev_start))&&($prev->stage_start!=null) ){\n session::flash('warning','es mas chico');\n return false;\n }\n else {\n $prev = $prev->prevStage();\n }\n }\n //FIN PREVIA\n //NEXT\n $next = $growlogstage->nextStage();\n\n while($next!=null){\n $next_start = new Carbon($next->stage_start);\n\n if(($actual_start->gt($next_start))&&($next->stage_start!=null) ){\n session::flash('warning','es mas grande');\n return false;\n\n }\n else {\n $next = $next->nextStage();\n }\n }\n //FIN NEXT\n\n session::flash('success','todo bien');\n\n }", "function rejectRecord(){ \n\n // No need to read the list of participants when processing those tabs\n if ($this->current_tab_does_not_need_applicants()) return True;\n\n $reply = False;\n $dbg_text = '';\n if (is_object($this->b_tabs)){\n $active_tab_index = $this->b_tabs->active_tab();\n $tabs = array_values($this->tabs_toShow);\n $reply = (strpos($tabs[$active_tab_index],'bList') !== False);\n $dbg_text = 'b_Tabs';\n }\n\n $this->v = Null;\n if (!$reply && empty($this->av)) switch ($this->doing){\n\t\n case '2excel':\n\tif (bForm_vm_Visit::_getStatus($this->rec) != STATUS_YES) return True;\n case 'photos':\n\tif (bForm_vm_Visit::_getStatus($this->rec) == STATUS_NO) return True;\n case 'budget':\n case 'myguests':\n case 'budget_byProjects':\n\tbreak;\n\t\n case 'lists':\n\tif (bForm_vm_Visit::_getStatus($this->rec) == STATUS_NO){\n\t if (VM_organizer_here && VM::$e->isEventEndorsed()){\n\t $dbg_text = $this->rec['av_firstname'].' '.$this->rec['av_lastname'].' - After the approval do not show the refused applicants to the organizers';\n\t $reply = True;\n\t }\n\t}\n case 'show_mails_exchange':\n\tif (!cnf_dev && $this->rec['v_type'] === VISIT_TYPE_RENT){\n\t $dbg_text = 'VISIT_TYPE_RENT... to be completed';\n\t $reply = True;\n\t}elseif (empty(VM::$e)){\n\t // Visits outside conferences/programs\n\t if (!VM_administrator_here && ($this->rec['v_host_avid'] != @bAuth::$av->ID)){\n\t $dbg_text = 'not my visit';\n\t $reply = True;\n\t }else{\n\t // Guarantee the correct value of status&policy in the snapshot record\n\t if (empty($this->rec['v_status'])){\n\t $this->v = loader::getInstance_new('bForm_vm_Visit',$this->rec['v_id'],'fatal');\n\t $this->rec['v_status'] = $this->v->getStatus();\n\t $this->rec['v_policy'] = $this->v->getValue('v_policy',True);\n\t }\n\t }\n\t}\n }\n if ($reply) $this->dbg($dbg_text);\n return $reply;\n }", "public function hasFieldsets(): bool\n {\n return File::exists($this->path().'/fieldsets');\n }", "function wds_acf_blocks_dependency_check() {\n\t$asset_file = plugin_dir_path( dirname( __FILE__ ) ) . 'build/index.asset.php';\n\n\tif ( file_exists( $asset_file ) ) {\n\t\treturn;\n\t}\n\t?>\n\t<div class=\"notice notice-error\">\n\t\t<p>\n\t\t\t<?php\n\t\t\tesc_html_e(\n\t\t\t\t'Whoops! You need to run `npm install` in the terminal for the WDS ACF Blocks plugin to work first.',\n\t\t\t\t'wds-acf-blocks'\n\t\t\t);\n\t\t\t?>\n\t\t</p>\n\t</div>\n\t<?php\n}", "protected function prepareForValidation() {\n\t\t$this->importStatus = [\n\t\t\tContentUserReportViewHelper::COPY_CONTENT_JOB_NOT_STARTED,\n\t\t\tContentUserReportViewHelper::COPY_CONTENT_JOB_RUNNING,\n\t\t\tContentUserReportViewHelper::COPY_CONTENT_JOB_COMPLETED,\n\t\t\tContentUserReportViewHelper::COPY_CONTENT_JOB_FAILED,\n\t\t];\n\t}", "protected function compileAssets()\n {\n if ($this->config->assets->live) {\n $classMap = Compiler::$classMap;\n\n // We don't want to compile pages here\n unset($classMap['pages']);\n\n foreach ($classMap as $scope => $scopeClass) {\n $config = $this->config->assets->{$scope};\n\n if ($config) {\n $config->clean = $this->config->assets->clean;\n $compiler = new $scopeClass($config);\n $compiler->compile();\n }\n }\n }\n }", "private function groups_check(){\n\t\t\n\t\t$production_formats = new \\gcalc\\db\\production\\formats();\n\t\t$needed_groups = $production_formats->get_product_groups( $this->slug );\n\t\t$needed_groups_ = array_flip( $needed_groups );\n\t\t$todo_groups = $this->get_todo_groups();\n\t\tforeach ($todo_groups as $key => $value) {\t\t\n\t\t\tif ( array_key_exists( $key, $needed_groups_)) {\n\t\t\t\t$index = $needed_groups_[ $key ];\n\t\t\t\tunset($needed_groups[ $index ]);\n\t\t\t}\t\t\t\n\t\t}\n\t\tif ( count( $needed_groups) > 0) {\n\t\t\t\t\t\n\t\t}\n\t}", "public function doPublish() {\n\t\t// remove fields on the live table which could have been orphaned.\n\t\t$live = Versioned::get_by_stage(\"EditableFormField\", \"Live\", \"\\\"EditableFormField\\\".\\\"ParentID\\\" = $this->ID\");\n\n\t\tif($live) {\n\t\t\tforeach($live as $field) {\n\t\t\t\t$field->doDeleteFromStage('Live');\n\t\t\t}\n\t\t}\n\n\t\t// publish the draft pages\n\t\tif($this->Fields()) {\n\t\t\tforeach($this->Fields() as $field) {\n\t\t\t\t$field->doPublish('Stage', 'Live');\n\t\t\t}\n\t\t}\n\n\t\tparent::doPublish();\n\t}", "private function previously_added_fields_available() {\n $fields = wpcf_admin_fields_get_fields( true, true, false, $this->type );\n\n // abort if no fields created yet\n if( empty( $fields ) )\n return false;\n\n // already used fields in current group\n $already_used_fields = isset( $_REQUEST['current'] ) && is_array( $_REQUEST['current'] )\n ? $_REQUEST['current']\n : array();\n\n // if there's the same amount of fields and used fields we have no fields left to show,\n // as one field can't be assigned twice to a group\n if( count( $fields ) == count( $already_used_fields ) )\n return false;\n\n // add this point we definitely have previously added fields which weren't used yet.\n return true;\n }", "protected function setLockedFieldsets()\n {\n foreach ($this->defs['panels'] as $pIndex => $panel) {\n foreach ($panel as $rIndex => $row) {\n foreach ($row as $fIndex => $field) {\n $fieldName = is_array($field) && isset($field['name'])\n ? $field['name']\n : $field;\n\n if (in_array($fieldName, $this->lockedFields)) {\n if (isset($field['type']) && $field['type'] == 'address') {\n $this->lockedFieldsets[$fieldName] = 1;\n }\n }\n }\n }\n }\n }", "public function hasDatasets() {\n return $this->_has(1);\n }", "public function showAction(Request $request, Stage $stage)\n {\n $this->denyAccessUnlessGranted('view', $stage);\n if ($request->isMethod('DELETE')) {\n //TODO: Handle move to other stage\n $data = $request->request;\n $em = $this->getDoctrine()->getManager();\n $em->remove($stage);\n $em->flush();\n\n return new JsonResponse([\"success\" => [\"code\" => 0, \"message\" => \"success\"]]);\n }\n if ($request->isMethod('PUT')) {\n return new JsonResponse(json_decode('[{\"success\":[{\"code\":0,\"message\":\"success\"}]}'));\n }\n return new JsonResponse([]);\n }", "private function requireAssets()\n {\n $css = config('asgard.media.assets.media-partial-required-assets.css');\n $js = config('asgard.media.assets.media-partial-required-assets.js');\n\n if (!empty($css)) {\n $this->assetPipeline->requireCss($css);\n }\n\n if (!empty($js)) {\n $this->assetPipeline->requireJs($js);\n }\n }", "public function run()\n {\n DB::table('stages')->delete();\n $json= File::get('database/data/stages.json');\n $data=json_decode($json);\n foreach ($data as $obj) {\n Stage::create(array(\n 'name' =>$obj->name\n ));\n }\n }", "public function shouldHaveOwnerVisibility()\n {\n $this->makeVisible([\n 'card_brand',\n 'card_last_four',\n 'card_country',\n 'billing_address',\n 'billing_address_line_2',\n 'billing_city',\n 'billing_state',\n 'billing_zip',\n 'billing_country',\n 'extra_billing_information',\n ]);\n }", "public function has_no_inactive_dependencies(): bool;", "private function getInvisibleOnFrontStatuses()\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\treturn $this->_getStatuses(false);\n\t\t}\n\t}", "public function filterLoad($asset) {}", "public function index()\n {\n $gallery = DB::table('artifacts')\n ->where('day', '<=' ,Auth::user()->current_day)\n ->get();\n\n\n if (Auth::user()->assigned) {\n foreach ($gallery as $artifact) {\n // Searches by group ID\n $edited = DB::table('student_artifacts')\n ->where([\n ['group_id', Auth::user()->groupId],\n ['artifact_id', $artifact->artifact_id],\n ])\n ->first();\n\n $artifact->tags = [];\n if($edited) {\n $artifact->title = $edited->title;\n $artifact->description = $edited->description;\n\n $artifact->tags = DB::table('tags')\n ->join('student_artifact_has_tag', 'student_artifact_has_tag.tag_id', 'tags.tag_id')\n ->where('student_artifact_has_tag.student_artifact_id', $edited->student_artifact_id)\n ->select('tags.tag_id', 'tags.title')\n ->get();\n }\n\n $artifact->hidden = false;\n\n }\n\n } else {\n\n foreach ($gallery as $artifact) {\n // Searches by user ID\n $edited = DB::table('student_artifacts')\n ->where([\n ['user_id', Auth::user()->user_id],\n ['artifact_id', $artifact->artifact_id],\n ])\n ->first();\n\n $artifact->tags = [];\n if($edited) {\n $artifact->title = $edited->title;\n $artifact->description = $edited->description;\n\n $artifact->tags = DB::table('tags')\n ->join('student_artifact_has_tag', 'student_artifact_has_tag.tag_id', 'tags.tag_id')\n ->where('student_artifact_has_tag.student_artifact_id', $edited->student_artifact_id)\n ->select('tags.tag_id', 'tags.title')\n ->get();\n\n }\n $artifact->hidden = false;\n }\n\n }\n\n $tags = DB::table('tags')->get();\n\n return view('gallery', compact('gallery', 'tags'));\n\n }", "protected function checkShowState($scope)\n {\n if (!isset($this->showState[$scope])) {\n $this->showState[$scope] = [];\n }\n }", "public function block_assets() {\n\n\t\t// Styles.\n\t\twp_enqueue_style(\n\t\t\t$this->slug . '-frontend',\n\t\t\t$this->url . '/build/style.build.css',\n\t\t\tarray(),\n\t\t\tPOSTSLISTBLOCK_VERSION\n\t\t);\n\t}", "public function isHidden()\n {\n return !is_null($this->_dependsOf);\n }", "public function checkCurrentSlot() {\n $result = array();\n foreach($this->workflowSlotUser as $user) {\n $processUser = WorkflowProcessUserTable::instance()->getProcessUserByWorkflowSlotUserId($user->getId())->toArray();\n $this->decission[] = $this->checkProcessState($processUser);\n }\n }", "private function getVisibleOnFrontStatuses()\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\treturn $this->_getStatuses(true);\n\t\t}\n\t}", "public function getPreviousStages()\n {\n /* get active stage */\n $stages = $this->model->whereCompanyId($this->scope->id())\n ->whereActive(0)\n ->get();\n\n return ApiResponse::success([\n 'data' => $stages,\n ]);\n }", "function _set_all_lines_is_prepared(TPDOdb &$PDOdb, $fk_expedition, $is_prepared)\n{\n\tglobal $langs;\n\n\tdol_include_once('/dispatch/class/dispatchdetail.class.php');\n\n\t$langs->load('dispatch@dispatch');\n\n\t$sql = 'SELECT eda.rowid\n\t\t\tFROM ' . MAIN_DB_PREFIX . 'expeditiondet_asset eda\n\t\t\tINNER JOIN ' . MAIN_DB_PREFIX .'expeditiondet ed ON (ed.rowid = eda.fk_expeditiondet)\n\t\t\tWHERE ed.fk_expedition = ' . $fk_expedition;\n\n\t$TDispatchDetail = $PDOdb->ExecuteAsArray($sql);\n\n\t$countFail = 0;\n\n\tforeach($TDispatchDetail as $dispatchDetailStatic)\n\t{\n\t\t$TResult = _set_line_is_prepared($PDOdb, $dispatchDetailStatic->rowid, $is_prepared);\n\n\t\tif(empty($TResult['success']))\n\t\t{\n\t\t\t$countFail++;\n\t\t}\n\t}\n\n\t$message = $langs->trans(empty($is_prepared) ? 'AssetsMarkedAsNotPrepared' : 'AssetsMarkedAsPrepared');\n\n\tif($countFail > 0)\n\t{\n\t\t$message = $langs->trans('NAssetsMarkedCouldNotBeMarked', $countFail);\n\t}\n\n\treturn array('success' => $countFail == 0, 'message' => $message);\n}", "public function block_assets() {\n\n\t\t// Styles.\n\t\twp_enqueue_style(\n\t\t\t$this->slug . '-frontend',\n\t\t\t$this->url . '/build/style.build.css',\n\t\t\tarray(),\n\t\t\tBREADCRUMBSBLOCK_VERSION\n\t\t);\n\t}", "public function valid()\n {\n\n if ($this->container['phase'] === null) {\n return false;\n }\n return true;\n }", "public function stages(){\n return $this->belongsToMany('SimulatorOperation\\Stage')->withPivot('cabin_id')->withTimestamps();\n }", "public function clean()\n\t{\n\t\t(($sPlugin = Phpfox_Plugin::get('video.component_block_detail_clean')) ? eval($sPlugin) : false);\n\t}", "protected function _setStagingData() {\n $this->stagingData = $this->_setSyncMap($this->sforceData);\n \n return isset($this->stagingData) ? true : false;\n }", "public function findRecords()\n {\n $this->MissingFiles->findRecords();\n\n return true;\n }", "function changes(&$asset) {\n global $changed;\n $changed = false;\n foreach ($asset[\"metadata\"]->dynamicFields->dynamicField as $dyn) {\n if ($dyn->name == \"audiences\") {\n if (isset($dyn->fieldValues->fieldValue) ) {\n $el = new StdClass();\n $el->value = 'Press Release';\n if ( is_array($dyn->fieldValues->fieldValue) ) {\n if ( !in_array($el, $dyn->fieldValues->fieldValue) ) {\n array_push($dyn->fieldValues->fieldValue, $el);\n $changed = true;\n echo 'added to array';\n } else {\n echo 'Already one of the tags';\n }\n } else {\n if ( $dyn->fieldValues->fieldValue->value != 'Press Release' ) {\n $dyn->fieldValues->fieldValue = array ($dyn->fieldValues->fieldValue);\n array_push($dyn->fieldValues->fieldValue, $el);\n $changed = true;\n echo 'added second tag';\n } else {\n echo 'Already the only tag';\n }\n }\n } else {\n $dyn->fieldValues->fieldValue = new StdClass();\n $dyn->fieldValues->fieldValue->value = 'Press Release';\n $changed = true;\n echo 'added as only tag';\n }\n }\n }\n}", "public function refreshStageConvocados(){\n $contador=0;\n foreach($this->convocados as $convocado){\n if($convocado->updateStage())$contador++;\n }\n return $contador;\n }", "public function hasDatasets() {\n return $this->_has(4);\n }", "private function check()\n {\n foreach ($this->scheduler->getQueuedJobs() as $job) {\n if ($job->isDue(new DateTime()) === true) {\n\n $this->executeIfNotOverlapped($job);\n }\n }\n }" ]
[ "0.5793878", "0.5756445", "0.5516381", "0.5369971", "0.5215049", "0.50056267", "0.49587068", "0.49037033", "0.48252228", "0.4821411", "0.48211318", "0.4803867", "0.47528902", "0.47431618", "0.4733472", "0.47045866", "0.46955317", "0.4675476", "0.46644557", "0.46627045", "0.46561596", "0.45794165", "0.4515123", "0.44699937", "0.44674882", "0.44563878", "0.44530454", "0.44385538", "0.44294766", "0.44258425", "0.4423585", "0.44169313", "0.44162443", "0.44086993", "0.4396751", "0.43720412", "0.43588486", "0.43566152", "0.4355127", "0.4355127", "0.43454343", "0.43356982", "0.43306917", "0.4329942", "0.43139216", "0.4303179", "0.4285303", "0.42814827", "0.4273778", "0.42728013", "0.42708555", "0.42690307", "0.4261025", "0.42594582", "0.4258321", "0.4255981", "0.42452982", "0.42441133", "0.42361495", "0.4229734", "0.42114252", "0.42103708", "0.42100504", "0.42055193", "0.41988263", "0.4197196", "0.41946483", "0.419455", "0.418855", "0.41842228", "0.4183269", "0.41757128", "0.41710597", "0.4167361", "0.41654482", "0.41628224", "0.41622266", "0.41545588", "0.4154197", "0.41518855", "0.41491574", "0.41461414", "0.41460106", "0.41361055", "0.41331396", "0.41326332", "0.41221803", "0.41180247", "0.41168234", "0.41133845", "0.41062373", "0.41056252", "0.41023248", "0.4102293", "0.4100673", "0.4099702", "0.40976173", "0.40956637", "0.40925825", "0.40855208" ]
0.5076373
5
Given a record, add all assets it contains to the given manipulation. State can be declared for this record, otherwise the underlying DataObject will be queried for canView() to see if those assets are public
protected function addAssetsFromRecord(AssetManipulationList $manipulation, DataObject $record, $state) { // Find all assets attached to this record $assets = $this->findAssets($record); if (empty($assets)) { return; } // Add all assets to this stage foreach ($assets as $asset) { $manipulation->addAsset($asset, $state); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onBeforeWrite()\n {\n if (!$this->hasAssets()) {\n return;\n }\n\n // Prepare blank manipulation\n $manipulations = new AssetManipulationList();\n\n // Mark overwritten object as deleted\n if ($this->owner->isInDB()) {\n $priorRecord = DataObject::get(get_class($this->owner))->byID($this->owner->ID);\n if ($priorRecord) {\n $this->addAssetsFromRecord($manipulations, $priorRecord, AssetManipulationList::STATE_DELETED);\n }\n }\n\n // Add assets from new record with the correct visibility rules\n $state = $this->getRecordState($this->owner);\n $this->addAssetsFromRecord($manipulations, $this->owner, $state);\n\n // Whitelist assets that exist in other stages\n $this->addAssetsFromOtherStages($manipulations);\n\n // Apply visibility rules based on the final manipulation\n $this->processManipulation($manipulations);\n }", "protected function addAssetsFromOtherStages(AssetManipulationList $manipulation)\n {\n // Skip unversioned or unsaved assets\n if (!$this->isVersioned() || !$this->owner->isInDB()) {\n return;\n }\n\n // Unauthenticated member to use for checking visibility\n $baseClass = $this->owner->baseClass();\n $baseTable = $this->owner->baseTable();\n $filter = [\n Convert::symbol2sql(\"{$baseTable}.ID\") => $this->owner->ID,\n ];\n $stages = $this->owner->getVersionedStages(); // {@see Versioned::getVersionedStages}\n foreach ($stages as $stage) {\n // Skip current stage; These should be handled explicitly\n if ($stage === Versioned::get_stage()) {\n continue;\n }\n\n // Check if record exists in this stage\n $record = Versioned::get_one_by_stage($baseClass, $stage, $filter);\n if (!$record) {\n continue;\n }\n\n // Check visibility of this record, and record all attached assets\n $state = $this->getRecordState($record);\n $this->addAssetsFromRecord($manipulation, $record, $state);\n }\n }", "public function addAssets() {}", "public function addAssets() {}", "public function onAfterDelete()\n {\n if (!$this->hasAssets()) {\n return;\n }\n\n // Prepare blank manipulation\n $manipulations = new AssetManipulationList();\n\n // Add all assets for deletion\n $this->addAssetsFromRecord($manipulations, $this->owner, AssetManipulationList::STATE_DELETED);\n\n // Whitelist assets that exist in other stages\n $this->addAssetsFromOtherStages($manipulations);\n\n // Apply visibility rules based on the final manipulation\n $this->processManipulation($manipulations);\n }", "private function setAssetsFromData()\n {\n if (is_array($this->assetData)) {\n $assets = $this->grav['assets'];\n foreach ($this->assetData as $item) {\n $assetType = $item['type'];\n if ($assetType == 'css') {\n $assets->addCss($item['data']);\n } elseif ($assetType == 'js') {\n $assets->addJs($item['data'], $item['prio'], true, null, $item['where']);\n } elseif ($assetType == 'inlinejs') {\n $assets->addInlineJs($item['data'], $item['prio'], $item['where']);\n }\n }\n }\n }", "public function addAdminAssets() {}", "public function loadAssetFromRecord($record=null, $noHydrate = false) {\n\t\tif(!$record && !$this->assetObject) {\n\t\t\treturn;\n\t\t}\n\n\t\tif($record) {\n\t\t\t$this->assetObject = $record;\t\n\t\t}\n\n\n\t\t$this->templateId = $record->getTemplateId();\n\t\t$this->setGlobalValue(\"readyForDisplay\", $record->getReadyForDisplay());\n\t\t$this->setGlobalValue(\"templateId\", $record->getTemplateId());\n\t\t$this->setGlobalValue(\"collectionId\", $record->getCollectionId());\n\t\t$this->setGlobalValue(\"availableAfter\", $record->getAvailableAfter());\n\t\t$this->setGlobalValue(\"modified\", $record->getModifiedAt());\n\t\t$this->setGlobalValue(\"modifiedBy\", $record->getModifiedBy());\n\t\t$this->setGlobalValue(\"deletedBy\", $record->getDeletedBy());\n\t\t$this->setGlobalValue(\"deleted\", $record->getDeleted());\n\t\t$this->setGlobalValue(\"deletedAt\", $record->getDeletedAt());\n\t\t$this->setGlobalValue(\"csvBatch\", $record->getCSVImport()?$record->getCSVImport()->getId():null);\n\n\t\tif($noHydrate) {\n\t\t\treturn;\n\t\t}\n\n\t\tif($this->loadWidgetsFromArray($record->getWidgets())) {\n\t\t\treturn TRUE;\n\t\t}\n\t\telse {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "protected function findAssets(DataObject $record)\n {\n // Search for dbfile instances\n $files = [];\n $fields = DataObject::getSchema()->fieldSpecs($record);\n foreach ($fields as $field => $db) {\n $fieldObj = $record->$field;\n if (!($fieldObj instanceof DBFile)) {\n continue;\n }\n\n // Omit variant and merge with set\n $next = $record->dbObject($field)->getValue();\n unset($next['Variant']);\n if ($next) {\n $files[] = $next;\n }\n }\n\n // De-dupe\n return array_map(\"unserialize\", array_unique(array_map(\"serialize\", $files ?? [])));\n }", "public function addAsset() {\n try {\n if (!($this->asset instanceof Base_Model_ObtorLib_App_Core_Asset_Entity_Asset)) {\n throw new Base_Model_ObtorLib_App_Core_Asset_Exception(\" Asset Asset Entity not initialized\");\n } else {\n $objAsset = new Base_Model_ObtorLib_App_Core_Asset_Dao_Asset();\n $objAsset->asset = $this->asset;\n return $objAsset->addAsset();\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Asset_Exception($ex);\n }\n }", "protected function processManipulation(AssetManipulationList $manipulations)\n {\n // When deleting from stage then check if we should archive assets\n $archive = $this->owner->config()->get('keep_archived_assets');\n\n // Check deletion policy\n $deletedAssets = $manipulations->getDeletedAssets();\n if ($archive && $this->isVersioned()) {\n // Publish assets\n $this->swapAll($manipulations->getPublicAssets());\n // Archived assets are kept protected\n $this->protectAll($deletedAssets);\n } else {\n // Remove old version\n $this->deleteAll($deletedAssets);\n // Publish assets\n $this->publishAll($manipulations->getPublicAssets());\n }\n\n // Protect assets\n $this->protectAll($manipulations->getProtectedAssets());\n }", "function slidedeck_lens_manage_entry_actions( $lens, $is_writable ) {\n $namespace = $this->slidedeck_namespace;\n\n include( SLIDEDECK2_DEVELOPER_DIRNAME . '/views/_lens-manage-entry-actions.php' );\n }", "function add($record)\n {\n $data = get_object_vars($record);\n $this->rest->initialize(array('server' => REST_SERVER));\n $this->rest->option(CURLOPT_PORT, REST_PORT);\n $retrieved = $this->rest->post('recipe/maintenance/item/id/' . $record->menu_id.'-'.$record->inventory_id, $data);\n }", "public function loadAssets()\n {\n add_action('admin_enqueue_scripts', [$this, 'enqueueAdminAssets']);\n add_filter('script_loader_tag', [$this, 'addAssetAttribute'], 10, 3);\n }", "public function add(Record $record)\n {\n $this->list[] = $record;\n }", "private function addAssets()\n {\n foreach (config('asgard.media.assets.media-partial-assets', []) as $assetName => $path) {\n $path = $this->assetFactory->make($path)->url();\n $this->assetManager->addAsset($assetName, $path);\n }\n }", "public static function addCraft()\n\t\t{\n\t\t\t$stageDBO = DatabaseObjectFactory::build('material');\n\t\t\t$arr = ['material_id','unit_price','name'];\n\t\t\t$stageDBO->SetJoin(['[><]item' => 'item_id']);\n\t\t\t$materials = $stageDBO->getRecords($arr);\n\t\t\tinclude('views/pages/addCraft.php');\n\t\t}", "public function load(ORM $record)\n\t{\n\t\t$restocks = [];\n\t\t$records = $record->restocks->find_all();\n\t\tforeach($records as $r)\n\t\t{\n\t\t\t$restocks[] = array_merge($r->as_array(), ['item_name' => $r->item->name]);\n\t\t}\n\t\treturn array('restocks' => $restocks);\n\t}", "protected function createAudit($record, $mutation = 'delete')\n {\n $needle = get_class($this->owner);\n $hayStack = self::config()->get('audit_exclusions');\n // Early exit on exclusions\n if (in_array($needle, $hayStack)) {\n return;\n }\n\n $auditId = Audit::create()->update([\n Audit::DB_MODEL_NAME => $this->owner->getField('ClassName'),\n Audit::DB_MODEL_ID => $this->owner->getField('ID'),\n Audit::DB_MUTATION_PEFORMED => $mutation\n ])->write();\n\n foreach ($record as $key => $value) {\n AuditValue::create()\n ->setField(AuditValue::DB_FIELD, $key)\n ->setField(AuditValue::DB_PREVIOUS_VALUE, $value)\n ->setField(AuditValue::HAS_ONE_AUDIT_ID, $auditId)\n ->write();\n }\n }", "public function assets()\n {\n return $this->morphMany(Asset::class, 'assetable');\n }", "public function assets()\n {\n return $this->morphToMany('HugoKalidas\\LaravelFlexCms\\Assets\\Assets' , 'assetable');\n }", "public function addChild(Doctrine_Record $record);", "public function store($updateNulls = false)\n\t{\t\t\n\t\t// always an insert\t\t\n\t\t$stored = $this->_db->insertObject($this->_tbl, $this, $this->_tbl_key);\n\n\t\t// If the store failed return false.\n\t\tif (!$stored)\n\t\t{\n\t\t\t$e = new JException(JText::sprintf('JLIB_DATABASE_ERROR_STORE_FAILED', get_class($this), $this->_db->getErrorMsg()));\n\t\t\t$this->setError($e);\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the table is not set to track assets return true.\n\t\tif (!$this->_trackAssets) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->_locked) {\n\t\t\t$this->_unlock();\n\t\t}\n\n\t\t//\n\t\t// Asset Tracking\n\t\t//\n\n\t\t$parentId\t= $this->_getAssetParentId();\n\t\t$name\t\t= $this->_getAssetName();\n\t\t$title\t\t= $this->_getAssetTitle();\n\n\t\t$asset\t= JTable::getInstance('Asset');\n\t\t$asset->loadByName($name);\n\n\t\t// Check for an error.\n\t\tif ($error = $asset->getError())\n\t\t{\n\t\t\t$this->setError($error);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Specify how a new or moved node asset is inserted into the tree.\n\t\tif (empty($this->asset_id) || $asset->parent_id != $parentId) {\n\t\t\t$asset->setLocation($parentId, 'last-child');\n\t\t}\n\n\t\t// Prepare the asset to be stored.\n\t\t$asset->parent_id\t= $parentId;\n\t\t$asset->name\t\t= $name;\n\t\t$asset->title\t\t= $title;\n\t\tif ($this->_rules instanceof JRules) {\n\t\t\t$asset->rules = (string) $this->_rules;\n\t\t}\n\n\t\tif (!$asset->check() || !$asset->store($updateNulls))\n\t\t{\n\t\t\t$this->setError($asset->getError());\n\t\t\treturn false;\n\t\t}\n\n\t\tif (empty($this->asset_id))\n\t\t{\n\t\t\t// Update the asset_id field in this table.\n\t\t\t$this->asset_id = (int) $asset->id;\n\n\t\t\t$query = $this->_db->getQuery(true);\n\t\t\t$query->update($this->_db->quoteName($this->_tbl));\n\t\t\t$query->set('asset_id = '.(int) $this->asset_id);\n\t\t\t$query->where($this->_db->quoteName($k).' = '.(int) $this->$k);\n\t\t\t$this->_db->setQuery($query);\n\n\t\t\tif (!$this->_db->query())\n\t\t\t{\n\t\t\t\t$e = new JException(JText::sprintf('JLIB_DATABASE_ERROR_STORE_FAILED_UPDATE_ASSET_ID', $this->_db->getErrorMsg()));\n\t\t\t\t$this->setError($e);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function addAssets()\n {\n $this->addJs('../../graphreport/assets/d3.js');\n $this->addJs('../../graphreport/assets/c3.js');\n $this->addCss('../../graphreport/assets/c3.css'); \n }", "private function _addTags()\n {\n $metadata = $this->getRecordMetadata();\n $this->_record->addTags($metadata[self::TAGS]);\n }", "public function addAudit(Audit $audit);", "public function isAssetAclEnabled()\n {\n $assetFieldAlias = $this->getFieldAlias('asset_id');\n\n if ( $this->hasField($assetFieldAlias) && $this->isAssetsTracked() )\n {\n return true;\n }\n\n return false;\n }", "private function add_record_or_update_record() {\n\t\t\t$this->before_custom_save();\n\t\t\t$this->before_save();\n\t\t\tif($this->new_record) {\n\t\t\t\t$this->before_create();\n\t\t\t\t$result = $this->add_record();\n\t\t\t\t$this->after_create();\n\t\t\t} else {\n\t\t\t\t$this->before_update();\n\t\t\t\t$result = $this->update_record();\n\t\t\t\t$this->after_update();\n\t\t\t}\n\t\t\t$this->after_save();\n\n\t\t\t// init user custom cache\n\t\t\tif (is_array($this->cache)) {\n\t\t\t\t$this->rebuild_cache();\n\t\t\t}\n\n\t\t\tif($this->blob_fields) {\n\t\t\t\t$this->update_blob_fields();\n\t\t\t}\n\t\t\treturn $result;\n\t\t}", "public static function prepare($record) {\n $fieldRepo = Field::getRepository();\n /**\n * @var FieldEntity[] $fields\n */\n $fields = $fieldRepo->findBy(['is_hidden' => false, 'organisation' => Apollo::getInstance()->getUser()->getOrganisationId()]);\n /**\n * @var FieldEntity $field\n */\n foreach($fields as $field) {\n $record->findOrCreateData($field->getId());\n }\n }", "public function loadAssets()\r\n {\r\n $this->app->document->addStylesheet('elements:imagebox/assets/css/edit.css');\r\n return parent::loadAssets();\r\n }", "public function load_additional_assets() {\n\n // Grab current screen\n $screen = get_current_screen();\n\n // Make sure we're on the correct screen\n if ( ! in_array( $screen->id, $this->screens ) ) {\n return;\n }\n\n do_action( 'cv_builder_inline_assets' );\n\n // Render template options callback for modal\n $this->render_template_options_template();\n\n // Render module options for modal\n $this->render_available_modules_template();\n\n }", "public function getAssets3()\n {\n return $this->hasMany(Asset::className(), ['sales_gl_acc_id' => 'account_id']);\n }", "function add($record)\n\t{\n\t\t// convert object from associative array, if needed\n\t\t$record = (is_array($record)) ? (object) $record : $record;\n\n\t\t// update the DB table appropriately\n\t\t$key = $record->{$this->_keyfield};\n\t\t$this->_data[$key] = $record;\n\n\t\t$this->store();\n\t}", "public function add_record()\n {\n $data['main_content'] = $this->type.'/'.$this->viewname.'/add';\n\t $this->load->view($this->type.'/assets/template',$data);\n }", "public function store(AddRecordRequest $request)\n {\n $record = new Record();\n $record->user_id = Auth::user()->id;\n $record->name = $request->name;\n $record->image = $request->file('image')\n ->store('images', 'public');\n\n $record->save();\n\n return response()->json([\n 'message' => 'Record created.',\n 'record' => $record->with('users')\n ], 200);\n }", "function _creative_include_layout_additional_assets($file_name) {\n foreach (array('css', 'js') as $type) {\n $file_relative_path = CREATIVE_THEME_PATH . \"/$type/includes/$file_name.$type\";\n\n if (file_exists(DRUPAL_ROOT . '/' . $file_relative_path)) {\n call_user_func(\"drupal_add_$type\", $file_relative_path, array(\n 'group' => constant(strtoupper($type) . '_THEME'),\n ));\n }\n }\n}", "public function getAssets()\n {\n return $this->hasMany(Asset::className(), ['asset_gl_acc_id' => 'account_id']);\n }", "public function persist()\n {\n $asset = Asset::create($this->only([\n 'school_id', 'category_id', 'type_id', 'name', 'tag', 'serial_number',\n 'make', 'model', 'processor', 'memory', 'storage', 'operating_system',\n 'warranty', 'notes'\n ]));\n\n if ($asset->wasRecentlyCreated) {\n Finance::create([\n 'asset_id' => $asset->id,\n 'accounting_start' => $this->accounting_start,\n 'accounting_end' => $this->accounting_end,\n 'purchase_date' => $this->purchase_date,\n 'end_of_life' => $this->end_of_life,\n 'purchase_cost' => $this->purchase_cost,\n 'current_value' => $this->current_value,\n 'depreciation' => $this->depreciation,\n 'net_book_value' => $this->net_book_value,\n ]);\n }\n\n return $asset;\n }", "protected function canEditState($record)\n\t{\n\t\t$user = JFactory::getUser();\n\n\t\tif (JFactory::getApplication()->isAdmin())\n\t\t{\n\t\t\treturn $user->authorise('core.edit.state', 'com_solidres.reservationasset.'.(int) $record->id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn SRUtilities::isAssetPartner($user->get('id'), $record->id);\n\t\t}\n\t}", "function add() {\n if(!$this->request->is('restful')) {\n // We can't just saveAll because Cake will create rows in the database for all\n // non-member non-owners, which is silly. Create a version without those\n // entries (and properly structured).\n \n // Set page title\n $this->set('title_for_layout', _txt('op.add-a', array(_txt('ct.co_group_members.1'))));\n\n // We may get here via co_groups, in which case co_group_id is static, or\n // via co_people, in which case co_person_id is static\n \n $a = array('CoGroupMember' => array());\n\n foreach($this->request->data['CoGroupMember'] as $g)\n {\n // Must be a member or an owner to get a row created\n \n if(is_array($g)\n && ((isset($g['member']) && $g['member'])\n || (isset($g['owner']) && $g['owner'])))\n {\n $a['CoGroupMember'][] = array(\n 'co_group_id' => (!empty($g['co_group_id'])\n ? $g['co_group_id']\n : $this->request->data['CoGroupMember']['co_group_id']),\n 'co_person_id' => (!empty($g['co_person_id'])\n ? $g['co_person_id']\n : $this->request->data['CoGroupMember']['co_person_id']),\n 'member' => $g['member'],\n 'owner' => $g['owner']\n );\n }\n }\n \n if(count($a['CoGroupMember']) > 0) {\n if($this->CoGroupMember->saveAll($a['CoGroupMember']))\n $this->Flash->set(_txt('rs.added'), array('key' => 'success'));\n else\n $this->Flash->set($this->fieldsErrorToString($this->CoGroupMember->invalidFields()), array('key' => 'error'));\n } else {\n $this->Flash->set(_txt('er.grm.none'), array('key' => 'information'));\n }\n \n $this->performRedirect();\n }\n else\n parent::add();\n }", "protected function _prepareRecords()\n {\n // Remove default records.\n $this->_deleteAllRecords();\n\n $metadata = array('public' => true);\n $isHtml = false;\n\n $collections = array();\n $items = array();\n $files = array();\n foreach ($this->_recordsByType as $type => $recordsMetadata) {\n foreach ($recordsMetadata as $recordMetadata) {\n $identifiers = array();\n foreach ($recordMetadata['Identifier'] as $identifier) {\n $identifiers[] = array('text' => $identifier, 'html' => $isHtml);\n }\n $elementTexts = array('Dublin Core' => array(\n 'Title' => array(array('text' => $recordMetadata['Title'], 'html' => $isHtml)),\n 'Identifier' => $identifiers,\n ));\n switch ($type) {\n case 'Collection':\n $collections[$recordMetadata['collection_id']] = insert_collection($metadata, $elementTexts);\n break;\n case 'Item':\n $metadataItem = $metadata;\n if (!empty($recordMetadata['collection_id'])) {\n $metadataItem['collection_id'] = $collections[$recordMetadata['collection_id']]->id;\n }\n $record = insert_item($metadataItem, $elementTexts);\n if (!empty($recordMetadata['files'])) {\n $fileUrl = TEST_DIR . '/_files/test.txt';\n $files[$recordMetadata['item_id']] = insert_files_for_item($record, 'Filesystem', array_fill(0, $recordMetadata['files'], $fileUrl));\n }\n break;\n case 'File':\n $record = $files[$recordMetadata['item_id']][$recordMetadata['file_key']];\n $record->addElementTextsByArray($elementTexts);\n $record->save();\n break;\n }\n }\n }\n }", "public function onRelationManageAdd()\n {\n $this->beforeAjax();\n\n $recordId = post('record_id');\n $sessionKey = $this->deferredBinding ? $this->relationGetSessionKey() : null;\n\n /*\n * Add\n */\n if ($this->viewMode == 'multi') {\n\n $checkedIds = $recordId ? [$recordId] : post('checked');\n\n if (is_array($checkedIds)) {\n /*\n * Remove existing relations from the array\n */\n $existingIds = $this->findExistingRelationIds($checkedIds);\n $checkedIds = array_diff($checkedIds, $existingIds);\n $foreignKeyName = $this->relationModel->getKeyName();\n\n $models = $this->relationModel->whereIn($foreignKeyName, $checkedIds)->get();\n foreach ($models as $model) {\n $this->relationObject->add($model, $sessionKey);\n }\n }\n\n }\n /*\n * Link\n */\n elseif ($this->viewMode == 'single') {\n if ($recordId && ($model = $this->relationModel->find($recordId))) {\n\n $this->relationObject->add($model, $sessionKey);\n $this->viewWidget->setFormValues($model->attributes);\n\n /*\n * Belongs to relations won't save when using add() so\n * it should occur if the conditions are right.\n */\n if (!$this->deferredBinding && $this->relationType == 'belongsTo') {\n $parentModel = $this->relationObject->getParent();\n if ($parentModel->exists) {\n $parentModel->save();\n }\n }\n\n }\n }\n\n return $this->relationRefresh();\n }", "public function add()\n\t{\n\t\tEvent::add('ushahidi_filter.map_base_layers', array($this, '_add_layer'));\n\t\tif (Router::$controller != 'settings')\n\t\t{\n\t\t\tEvent::add('ushahidi_filter.map_layers_js', array($this, '_add_map_layers_js'));\n\t\t}\n\t}", "public function add_asset($type, $name, $data = array())\n\t{\n\t\tif(!in_array(strtolower(trim($type)), array('css', 'js')))\n\t\t{\n\t\t\tshow_error('Only CSS and JS can be added');\n\t\t}\n\t\t\n\t\t$validated_data = $this->_validate_asset_data($type, $name, $data);\n\t\t\n\t\t$this->_assets[$type][$name] = $validated_data;\n\t}", "public function addAsset(Asset $asset)\n {\n $this->assets[$asset->getId()] = $asset;\n\n return $this;\n }", "public function addOwners(): void\n {\n foreach ($this->attributes as $attributeName) {\n $this->linkModelWithOwner($attributeName, $this->owner->{$attributeName});\n }\n }", "public function add_asset_form(){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$categories = Category::all();\n \t\treturn view('storage.add_asset', compact('categories'));\n \t}", "function damopen_assets_library_post_update_change_public_files_to_private() {\n $connection = Database::getConnection();\n // Select the uri from the database.\n $query = $connection\n ->select('file_managed', 'fm')\n ->fields('fm', ['fid', 'uri']);\n $result = $query->execute();\n\n $fileStorage = Drupal::entityTypeManager()->getStorage('file');\n $fileSystem = Drupal::service('file_system');\n $priv_path = $fileSystem->realpath('private://');\n\n foreach ($result as $row) {\n $uri = str_replace('public://', '', $row->uri);\n $file_name = substr(strrchr($uri, '/'), 1);\n $folder = str_replace($file_name, '', $uri);\n // Check if the directory already exists.\n // Directory does not exist, so lets create it.\n if (\n !is_dir($priv_path . '/' . $folder)\n && !mkdir($concurrentDirectory = $priv_path . '/' . $folder, 0775, TRUE)\n && !is_dir($concurrentDirectory)\n ) {\n throw new RuntimeException(sprintf('Directory \"%s\" was not created', $concurrentDirectory));\n }\n\n // Move the file to the private folder.\n $new_uri = $fileSystem->move('public://' . $uri, 'private://' . $uri, FileSystemInterface::EXISTS_REPLACE);\n\n if ($new_uri !== NULL) {\n // Replace the uri with the new private schema's uri.\n /** @var \\Drupal\\file\\FileInterface $file */\n $file = $fileStorage->load($row->fid);\n $file->setFileUri($new_uri);\n $file->save();\n }\n }\n}", "protected function getRecordState($record)\n {\n if ($this->isVersioned()) {\n // Check stage this record belongs to\n $stage = $record->getSourceQueryParam('Versioned.stage') ?: Versioned::get_stage();\n\n // Non-live stages are automatically non-public\n if ($stage !== Versioned::LIVE) {\n return AssetManipulationList::STATE_PROTECTED;\n }\n }\n\n // Check if canView permits anonymous viewers\n return Member::actAs(null, function () use ($record) {\n return $record->canView()\n ? AssetManipulationList::STATE_PUBLIC\n : AssetManipulationList::STATE_PROTECTED;\n });\n }", "public function addAssets()\n {\n if ($this->enabled) {\n // Only add assets if Page is HTML\n $page = $this->grav['page'];\n if ($page->templateFormat() !== 'html') {\n return $this;\n }\n\n /** @var Assets $assets */\n $assets = $this->grav['assets'];\n\n // Clockwork specific assets\n if ($this->clockwork) {\n $assets->addCss('/system/assets/debugger/clockwork.css', ['loading' => 'inline']);\n $assets->addJs('/system/assets/debugger/clockwork.js', ['loading' => 'inline']);\n }\n\n\n // Debugbar specific assets\n if ($this->debugbar) {\n // Add jquery library\n $assets->add('jquery', 101);\n\n $this->renderer = $this->debugbar->getJavascriptRenderer();\n $this->renderer->setIncludeVendors(false);\n\n [$css_files, $js_files] = $this->renderer->getAssets(null, JavascriptRenderer::RELATIVE_URL);\n\n foreach ((array)$css_files as $css) {\n $assets->addCss($css);\n }\n\n $assets->addCss('/system/assets/debugger/phpdebugbar.css', ['loading' => 'inline']);\n\n foreach ((array)$js_files as $js) {\n $assets->addJs($js);\n }\n }\n }\n\n return $this;\n }", "protected function assets()\n\t{\n\t\tswitch($this->method)\n\t\t{\n\t\t\tcase 'GET':\n\t\t\t\t\n\t\t\t\t$ev = 'read';\n\t\t\t\t$evObj = array(\"assettype\"=>$this->verb,\"args\"=>$this->args);\n\t\t\tbreak;\n\t\t\tcase 'POST':\n\t\t\t\t\n\t\t\t\t$ev = 'update';\n\t\t\t\t$evObj = array('id'=>$this->verb,'args'=>$this->args);\n\t\t\tbreak;\n\t\t\tcase 'PUT':\t\t\t\t\n\t\t\t\t$ev = 'create';\n\t\t\t\t$evObj = array('args'=>$this->verb);\n\t\t\tbreak;\n\t\t\tcase 'DELETE':\n\t\t\t\t\n\t\t\t\t$ev = 'delete';\n\t\t\t\t$evObj = array('id'=>$this->verb,'args'=>$this->args);\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$this->fireEvent($this->endpoint,$ev,\"before\",$evObj);\n\t\t$obj = $this->$ev();\n\t\t$evObj['results']=$obj;\n\t\t$this->fireEvent($this->endpoint,$ev,\"after\",$evObj);\n\t\treturn $obj;\n\t}", "public function implement_all_effects()\n\t{\n\t\tforeach ($this->collection as $image)\n\t\t{\n\t\t\t$image->implement_effects();\n\t\t}\n\t}", "function v2_mumm_include_asset($variable, $type) {\n $path = drupal_get_path('theme', 'v2_mumm');\n if ($type == 'css') {\n foreach ($variable as $key => $item) {\n drupal_add_css($path . '/css/' . $item . '.css', array(\n 'group' => CSS_THEME,\n 'type' => 'file',\n 'media' => 'screen',\n 'preprocess' => TRUE,\n 'every_page' => TRUE,\n 'group' => CSS_THEME,\n 'weight' => $key,\n ));\n }\n }\n if ($type == 'js') {\n foreach ($variable as $key => $item) {\n drupal_add_js($path . '/js/' . $item . '.js', array(\n 'type' => 'file',\n 'scope' => 'footer',\n 'group' => JS_THEME,\n 'every_page' => TRUE,\n 'preprocess' => TRUE,\n 'cache' => TRUE,\n 'weight' => $key,\n ));\n }\n }\n}", "public function index()\n {\n $breadcrumbs = $this->breadcrumbs;\n $total_active_lease_asset = Lease::query()->whereIn('business_account_id', getDependentUserIds())->where('status', '=', '1')->with('assets')->count();\n\n $leases = Lease::query()->where('status', '=', '1')->whereIn('business_account_id', getDependentUserIds());\n $lease_id = $leases->get()->pluck('id')->toArray();\n\n //Tengible Properties -Land\n $total_land = LeaseAssets::query()->whereHas('category', function ($query) {\n $query->where('id', 1);\n })->whereIn('lease_id', $lease_id)->count();\n\n $lease_asset_categories = LeaseAssetCategories::query()->where('is_capitalized', '=', '1')->get();\n $category_id = $lease_asset_categories->pluck('id')->toArray();\n\n $own_assets_capitalized = LeaseAssets::query()->whereIn('lease_id', $lease_id)\n ->where('specific_use', '=', 1)\n ->whereIn('category_id', $category_id)\n ->whereHas('leaseSelectLowValue', function ($query) {\n $query->where('is_classify_under_low_value', '=', 'no');\n })->whereHas('leaseDurationClassified', function ($query) {\n $query->where('lease_contract_duration_id', '=', '3');\n })->count();\n\n\n $sublease_assets_capitalized = LeaseAssets::query()->whereIn('lease_id', $lease_id)\n ->where('specific_use', '=', 2)\n ->whereIn('category_id', $category_id)\n ->whereHas('leaseSelectLowValue', function ($query) {\n $query->where('is_classify_under_low_value', '=', 'no');\n })->whereHas('leaseDurationClassified', function ($query) {\n $query->where('lease_contract_duration_id', '=', '3');\n })->count();\n\n //Tangible Properties - Other than Land\n $total_other_land = LeaseAssets::query()->whereHas('category', function ($query) {\n $query->where('id', 2);\n })->whereIn('lease_id', $lease_id)->count();\n\n //Plant & Equipments\n $total_plant = LeaseAssets::query()->whereHas('category', function ($query) {\n $query->where('id', 3);\n })->whereIn('lease_id', $lease_id)->count();\n\n //Investment Properties\n $total_investment = LeaseAssets::query()->whereHas('category', function ($query) {\n $query->where('id', 6);\n })->whereIn('lease_id', $lease_id)->count();\n\n //Intangible Assets\n $total_intangible = LeaseAssets::query()->whereHas('category', function ($query) {\n $query->where('id', 7);\n })->whereIn('lease_id', $lease_id)->count();\n\n //Agricultural Assets\n $total_agricultural = LeaseAssets::query()->whereHas('category', function ($query) {\n $query->where('id', 4);\n })->whereIn('lease_id', $lease_id)->count();\n\n //Short Term Lease\n $total_short_term_lease = LeaseAssets::query()->whereIn('lease_id', $lease_id)\n ->whereHas('leaseDurationClassified', function ($query) {\n $query->where('lease_contract_duration_id', '=', '2');\n })->count();\n\n //Low Value lease assets\n $total_low_value_asset = LeaseAssets::query()->whereIn('lease_id', $lease_id)\n ->whereHas('leaseSelectLowValue', function ($query) {\n $query->where('is_classify_under_low_value', '=', 'yes');\n })->count();\n\n $category_excluded = \\App\\CategoriesLeaseAssetExcluded::query()\n ->whereIn('business_account_id', getDependentUserIds())\n ->where('status', '=', '0')\n ->get();\n\n $category_excluded_id = $category_excluded->pluck('category_id')->toArray();\n\n //other lease asset combining together intangible and biological\n $total_other_lease_asset = LeaseAssets::query()->whereHas('category', function ($query) use ($category_excluded_id) {\n $query->whereIn('category_id', $category_excluded_id);\n })->whereIn('lease_id', $lease_id)->count();\n\n //undiscounted lease assets\n $total_undiscounted_capitalized = LeaseAssets::query()->whereIn('lease_id', $lease_id)\n ->where('specific_use', 1)\n ->whereHas('leaseSelectLowValue', function ($query) {\n $query->where('is_classify_under_low_value', '=', 'no');\n })->whereHas('leaseDurationClassified', function ($query) {\n $query->where('lease_contract_duration_id', '=', '3');\n })->whereNotIn('category_id', [5, 8])->count();\n return view('home', compact(\n 'own_assets_capitalized',\n 'sublease_assets_capitalized',\n 'total_active_lease_asset',\n 'total_land',\n 'total_short_term_lease',\n 'total_low_value_asset',\n 'total_other_lease_asset',\n 'total_other_land',\n 'total_plant',\n 'total_investment',\n 'total_undiscounted_capitalized',\n 'total_intangible',\n 'total_agricultural',\n 'breadcrumbs'\n ));\n }", "public function addByPath($asset_path){\n #i: Get asset container\n $asset = $this->parseAsset($asset_path);\n\n #i: Add object to collection\n $this->add($asset);\n }", "public function scriptAssets($collection, $key, $path, $web)\r\n {\r\n if (true === $collection['debug']) {\r\n $this->debugWriteAssets(CON_ROOT_PATH, DOCUMENT_ROOT, $web, $collection);\r\n return true;\r\n }\r\n \r\n $am = $this->setAssetsCollection($collection['assets'], $key, $path);\r\n $this->fm = null;\r\n $factory = new AssetFactory(DOCUMENT_ROOT . $web, $collection['debug']);\r\n $factory->setAssetManager($am);\r\n $filters = array();\r\n if (false === $collection['debug']) {\r\n if (isset($collection['includes'])) {\r\n $this->includeResources($collection['includes']);\r\n }\r\n if (isset($collection['filters'])) {\r\n foreach ($collection['filters'] as $alias => $filter) {\r\n $filters[] = '?' . $alias;\r\n $this->getFm()->set($alias, new $filter());\r\n }\r\n $factory->setFilterManager($this->getFm());\r\n $factory->addWorker(new CacheBustingWorker());\r\n }\r\n }\r\n $js = $factory->createAsset(array(\r\n '@' . $key\r\n ), $filters);\r\n $js->setTargetPath($key . '.js');\r\n \r\n $this->writeAssets($js, self::ASSETS_LASTMODIFIED . $key, DOCUMENT_ROOT . $web, '/' . $key . '.js');\r\n $src = '';\r\n if (isset($collection['onload']) && true === $collection['onload']) {\r\n $src = $this->onloadScript($web . '/' . $key . '.js', $collection);\r\n } else {\r\n $src = $this->linkScript($web . '/' . $key . '.js', $collection['attr']);\r\n }\r\n if (isset($collection['area']) && 'head' === $collection['area']) {\r\n $this->setHeadLink($src);\r\n } else {\r\n $this->setInlineLink($src);\r\n }\r\n return true;\r\n }", "protected function addAclRules(): void\n {\n /** @var \\Omeka\\Permissions\\Acl $acl */\n $services = $this->getServiceLocator();\n $acl = $services->get('Omeka\\Acl');\n\n // The resources are added automatically by Omeka (@see \\Omeka\\Service\\AclFactory::addResources).\n\n // Nevertheless, acl should be specified, because log is not a resource.\n $entityManagerFilters = $services->get('Omeka\\EntityManager')->getFilters();\n $entityManagerFilters->enable('log_visibility');\n $entityManagerFilters->getFilter('log_visibility')->setAcl($acl);\n\n // Public users cannot see own logs.\n // TODO How to make a distinction between public and admin roles? Which new rule?\n $baseRoles = [\n \\Omeka\\Permissions\\Acl::ROLE_RESEARCHER,\n \\Omeka\\Permissions\\Acl::ROLE_AUTHOR,\n ];\n $editorRoles = [\n \\Omeka\\Permissions\\Acl::ROLE_REVIEWER,\n \\Omeka\\Permissions\\Acl::ROLE_EDITOR,\n ];\n $adminRoles = [\n \\Omeka\\Permissions\\Acl::ROLE_SITE_ADMIN,\n \\Omeka\\Permissions\\Acl::ROLE_GLOBAL_ADMIN,\n ];\n\n // TODO Check if not allowed to create log by api?\n // Everybody can create log.\n $acl\n ->allow(\n null,\n [\n \\Log\\Api\\Adapter\\LogAdapter::class,\n \\Log\\Entity\\Log::class,\n ],\n ['create']\n )\n\n // Everybody can see own logs, except guest user or visitors.\n ->allow(\n $baseRoles,\n [\\Log\\Entity\\Log::class],\n ['read'],\n new OwnsEntityAssertion\n )\n ->allow(\n $baseRoles,\n [\\Log\\Api\\Adapter\\LogAdapter::class],\n ['read', 'search']\n )\n ->allow(\n $baseRoles,\n [\\Log\\Controller\\Admin\\LogController::class],\n ['browse', 'search', 'show-details']\n )\n\n ->allow(\n $editorRoles,\n [\\Log\\Entity\\Log::class],\n ['read', 'view-all']\n )\n ->allow(\n $editorRoles,\n [\\Log\\Api\\Adapter\\LogAdapter::class],\n ['read', 'search']\n )\n ->allow(\n $editorRoles,\n [\\Log\\Controller\\Admin\\LogController::class],\n ['browse', 'search', 'show-details']\n )\n\n ->allow(\n $adminRoles,\n [\n \\Log\\Entity\\Log::class,\n \\Log\\Api\\Adapter\\LogAdapter::class,\n \\Log\\Controller\\Admin\\LogController::class,\n ]\n )\n ;\n }", "public function canEdit($record = null, $user = null)\n\t{\n\t\tif ($user)\n\t\t{\n\t\t\tthrow new Exception(__FUNCTION__ . '(): Error model does not support checking ACL of specific user', 500);\n\t\t}\n\n\t\t$record = $record ?: $this->_record;\n\t\t$user = $user ?: JFactory::getUser();\n\n\t\treturn !$record || !$record->id\n\t\t\t? $this->canCreate\n\t\t\t: $user->authorise('flexicontent.editfield', 'com_flexicontent.field.' . $record->id);\n\t}", "public function store(Request $request)\n {\n //\n $request->validate([\n 'serial_number' => 'required',\n 'asset_old' => 'required',\n 'asset_new' => 'required',\n 'team' => 'required',\n 'location' => 'required',\n 'pic' => 'required'\n ]);\n DB::beginTransaction();\n try {\n //code...\n Assets::create([\n 'serial_number' => $request->serial_number,\n 'asset_old' => $request->asset_old,\n 'asset_new' => $request->asset_new,\n 'status' => $request->status,\n 'team' => $request->team,\n 'location' => $request->location,\n 'pic' => $request->pic,\n 'label' => $request->label,\n 'ad_join' => $request->ad,\n 'drm' => $request->drm,\n 'antivirus' => $request->antivirus,\n 'hw' => $request->hw,\n 'power' => $request->power,\n 'remarks' => $request->remarks,\n 'created_by' => Auth::user()->name\n ]);\n DB::commit();\n } catch (\\Throwable $th) {\n //throw $th;\n DB::rollback();\n }\n return redirect()->route('assets.index')->with(['success'=>'Data has been saved']);\n //return $request->ad;\n }", "public function loadAssets() {\r\n\t\t$this->app->document->addScript('elements:relateditems/relateditems.js');\r\n\t}", "protected function _dependentRecordsFromJson(&$record)\n {\n $config = $record::getConfiguration();\n if ($config) {\n \n $recordsFields = $config->recordsFields;\n \n if ($recordsFields) {\n foreach ($recordsFields as $property => $fieldDef) {\n\n $rcn = $fieldDef['config']['recordClassName'];\n if ($record->has($property) && $record->{$property} && is_array($record->{$property})) {\n $recordSet = new RecordSet($rcn);\n foreach ($record->{$property} as $recordArray) {\n if (is_array($recordArray)) {\n $srecord = new $rcn(array(), true);\n $srecord->setFromJsonInUsersTimezone($recordArray);\n $recordSet->addRecord($srecord);\n } else {\n if (Core::isLogLevel(LogLevel::ERR)) Core::getLogger()->err(__METHOD__ . '::' . __LINE__\n . ' Record array expected, got: ' . $recordArray);\n throw new InvalidArgument('Record array expected');\n }\n $record->{$property} = $recordSet;\n }\n }\n }\n }\n }\n }", "function Assets() {\r\n\t\t\treturn $this->QueryPublic( 'Assets' );\r\n\t\t}", "public function assetsManagerAddAsset(UnitTester $I)\n {\n $I->wantToTest('Assets\\Manager - addAsset()');\n\n $assets = new Manager();\n\n $assets->addAsset(\n new Css('/css/style1.css')\n );\n\n $I->assertCount(\n 1,\n $assets->get('css')\n );\n }", "public function add()\n\t{\n\t\tEvent::add('ushahidi_filter.fetch_incidents_set_params', array($this, '_fetch_incidents_set_params'));\n\t\tEvent::add('ushahidi_filter.json_index_features', array($this, '_json_index_features'));\n\n\t\t// Add a Sub-Nav Link\n\t\tEvent::add('ushahidi_action.nav_admin_reports', array($this, '_report_link'));\n\n\t\t// Only add the events if we are on that controller\n\t\tif (Router::$controller == 'reports')\n\t\t{\n\t\t\n\t\t\tEvent::add('ushahidi_action.report_filters_ui', array($this, '_reports_filters'));\n\t\t\tEvent::add('ushahidi_action.report_js_filterReportsAction', array($this, '_reports_filters_js'));\n\n\t\t\n\t\t\tswitch (Router::$method)\n\t\t\t{\n\t\t\t\t// Hook into the Report Add/Edit Form in Admin\n\t\t\t\tcase 'edit':\n\t\t\t\t\t// Hook into the form itself\n\t\t\t\t\tEvent::add('ushahidi_action.report_form_admin', array($this, '_report_form'));\n\t\t\t\t\t// Hook into the report_submit_admin (post_POST) event right before saving\n\t\t\t\t\t// Event::add('ushahidi_action.report_submit_admin', array($this, '_report_validate'));\n\t\t\t\t\t// Hook into the report_edit (post_SAVE) event\n\t\t\t\t\tEvent::add('ushahidi_action.report_edit', array($this, '_report_form_submit'));\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// Hook into the Report view (front end)\n\t\t\t\tcase 'view':\n\t\t\t\t\tplugin::add_stylesheet('actionable/css/actionable');\n\t\t\t\t\tEvent::add('ushahidi_action.report_meta', array($this, '_report_view'));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telseif (Router::$controller == 'feed')\n\t\t{\n\t\t\t// Add Actionable Tag to RSS Feed\n\t\t\tEvent::add('ushahidi_action.feed_rss_item', array($this, '_feed_rss'));\n\t\t}\n\t\telseif (Router::$controller == 'main')\n\t\t{\t\n\t\t\tplugin::add_stylesheet('actionable/css/actionable_filter');\n\t\t\tEvent::add('ushahidi_action.map_main_filters', array($this, '_map_main_filters'));\n\t\t}\n\t\telseif (Router::$controller == 'json' OR Router::$controller == 'bigmap_json')\n\t\t{\t\t\t\n\t\t\t// Never cluster actionable json\n\t\t\tif (Router::$method == 'cluster' AND $this->_check_media_type())\n\t\t\t{\n/* \t\t\t\tRouter::$method = 'index'; */\n\t\t\t}\n\t\t}\n\t}", "public function addBehaviour(Datastore_RecordBehaviour_Base $oBehaviour)\n {\n $this->aoBehaviours[] = $oBehaviour;\n\n $oBehaviour->addFields($this);\n }", "public function process(ContainerBuilder $container)\n {\n if (false === $container->hasDefinition('asset.projects_collection')) {\n return;\n }\n $definition = $container->getDefinition('asset.projects_collection');\n foreach ($container->findTaggedServiceIds('asset.project') as $id => $attributes) {\n $definition->addMethodCall('addProject', array(new Reference($id)));\n }\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 create_new_assign_assets() {\n if (get_user_permission('assign_assets') === false) {\n redirect(base_url('user_login'));\n }\n\n $this->data['title'] = \"Assign Assets\";\n $this->data['assets_info_list'] = $this->Assets_info_Model->get_assets_info();\n $this->data['employee_list'] = $this->Employee_Model->get_employee();\n $this->load->view('header');\n $this->load->view('navigation');\n $this->load->view('assign_assets/assign_assets', $this->data);\n }", "public static function manageinventory()\n\t\t{\n\t\t\t$stageDBO = DatabaseObjectFactory::build('Material');\n\t\t\t$arr = ['material_id','unit_price'];\n\t\t\t$materials = $stageDBO->getRecords($arr);\n\t\t\t\n\t\t\t$stageDBO = DatabaseObjectFactory::build('craft');\n\t\t\t$arr = ['craft_id','calculated_qoh'];\n\t\t\t$stageDBO->SetJoin(['[><]item' => 'item_id']);\n\t\t\t$crafts = $stageDBO->getRecords($arr);\n\n\t\t\t$stageDBO = DatabaseObjectFactory::build('return_details');\n\t\t\t$stageDBO->SetJoin(['[><]item' => 'item_id']);\n\t\t\t$arr = ['return_id','item_id','qty','current_price'];\n\t\t\t$returns = $stageDBO->getRecords($arr);\n\n\t\t\tinclude('views/pages/manageinventory.php');\n\t\t}", "public function add()\n {\n $access = Utilities::checkAccess('item-warehouse', 'add');\n if($access == 1)\n { \n $data[\"merchantwarehouse\"] = Utilities::checkAccess('item-warehouse', 'merchantwarehouse');\n $data['_warehouse'] = Warehouse2::get_all_warehouse($this->user_info->shop_id);\n $data[\"_item\"] = Tbl_item::where(\"archived\",0)->where(\"item_type_id\",1)->where(\"shop_id\",$this->user_info->shop_id)->get();\n // $data[\"_cat\"] = Tbl_category::where(\"type_category\",\"inventory\")->where(\"type_parent_id\",0)->where(\"type_shop\",$this->user_info->shop_id)->get();\n return view(\"member.warehouse.warehouse_add\",$data);\n }\n else\n {\n return $this->show_no_access_modal();\n }\n }", "public function add_asset_model($data)\n {\n if (count($data) !== count($data, COUNT_RECURSIVE)) {\n $this->db->insert_batch('asset', $data);\n } else {\n $this->db->insert('asset', $data);\n }\n return $this->db->affected_rows();\n }", "private function storeJTable($updateNulls = false)\n\t{\n\t\t// Initialise variables.\n\t\t$k = $this->_tbl_key;\n\n\t\tif (!empty($this->asset_id))\n\t\t{\n\t\t\t$currentAssetId = $this->asset_id;\n\t\t}\n\n\t\t// The asset id field is managed privately by this class.\n\t\tif ($this->_trackAssets)\n\t\t{\n\t\t\tunset($this->asset_id);\n\t\t}\n\n\t\t// If a primary key exists update the object, otherwise insert it.\n\t\tif ($this->$k)\n\t\t{\n\t\t\t$stored = $this->_db->updateObject($this->_tbl, $this, $this->_tbl_key, $updateNulls);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$stored = $this->_db->insertObject($this->_tbl, $this, $this->_tbl_key);\n\t\t}\n\n\t\t$this->log->add('Store menu entry');\n\n\t\t// If the store failed return false.\n\t\tif (!$stored)\n\t\t{\n\t\t\t$e = new JException(JText::sprintf('JLIB_DATABASE_ERROR_STORE_FAILED', get_class($this), $this->_db->getErrorMsg()));\n\t\t\t$this->setError($e);\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the table is not set to track assets return true.\n\t\tif (!$this->_trackAssets)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->_locked)\n\t\t{\n\t\t\t$this->_unlock();\n\t\t}\n\n\t\t//\n\t\t// Asset Tracking\n\t\t//\n\n\t\t$parentId = $this->_getAssetParentId();\n\t\t$name = $this->_getAssetName();\n\t\t$title = $this->_getAssetTitle();\n\n\t\t$asset = JTable::getInstance('Asset', 'JTable', array('dbo' => $this->getDbo()));\n\t\t$asset->loadByName($name);\n\n\t\t// Re-inject the asset id.\n\t\t$this->asset_id = $asset->id;\n\n\t\t// Check for an error.\n\t\tif ($error = $asset->getError())\n\t\t{\n\t\t\t$this->setError($error);\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Specify how a new or moved node asset is inserted into the tree.\n\t\tif (empty($this->asset_id) || $asset->parent_id != $parentId)\n\t\t{\n\t\t\t$asset->setLocation($parentId, 'last-child');\n\t\t}\n\n\t\t// Prepare the asset to be stored.\n\t\t$asset->parent_id = $parentId;\n\t\t$asset->name = $name;\n\t\t$asset->title = $title;\n\n\t\tif ($this->_rules instanceof JAccessRules)\n\t\t{\n\t\t\t$asset->rules = (string) $this->_rules;\n\t\t}\n\n\t\tif (!$asset->check() || !$asset->store($updateNulls))\n\t\t{\n\t\t\t$this->setError($asset->getError());\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Create an asset_id or heal one that is corrupted.\n\t\tif (empty($this->asset_id) || ($currentAssetId != $this->asset_id && !empty($this->asset_id)))\n\t\t{\n\t\t\t// Update the asset_id field in this table.\n\t\t\t$this->asset_id = (int) $asset->id;\n\n\t\t\t$query = $this->_db->getQuery(true);\n\t\t\t$query->update($this->_db->quoteName($this->_tbl));\n\t\t\t$query->set('asset_id = ' . (int) $this->asset_id);\n\t\t\t$query->where($this->_db->quoteName($k) . ' = ' . (int) $this->$k);\n\t\t\t$this->_db->setQuery($query);\n\n\t\t\tif (!$this->_db->execute())\n\t\t\t{\n\t\t\t\t$e = new JException(JText::sprintf('JLIB_DATABASE_ERROR_STORE_FAILED_UPDATE_ASSET_ID', $this->_db->getErrorMsg()));\n\t\t\t\t$this->setError($e);\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function index() {\n if (get_user_permission('assign_assets') === false) {\n redirect(base_url('user_login'));\n }\n\n $this->data['title'] = \"Assign Assets\";\n $this->data['assets_info_list'] = $this->Assets_info_Model->get_assets_info();\n $this->data['employee_list'] = $this->Employee_Model->get_employee();\n $this->data['all_assign_assets_by_employee_list'] = $this->Assign_assets_Model->get_all_assign_assets_by_employee_view();\n $this->load->view('header');\n $this->load->view('navigation');\n $this->load->view('assign_assets/assign_assets_details', $this->data);\n }", "public function dsp_all_record()\n {\n $record_type_id = get_post_var('hdn_record_type_id','');\n $member_id = get_post_var('sel_member','');\n \n $VIEW_DATA['arr_all_record'] = $this->model->qry_all_record($record_type_id,$member_id);\n $VIEW_DATA['arr_all_notice'] = $this->model->qry_all_notice($member_id);\n $VIEW_DATA['arr_all_member'] = $this->model->qry_all_member();\n \n $this->view->render('dsp_all_record',$VIEW_DATA);\n }", "public function set_assets( $template ) {\n\n\t\t$data = get_file_data( $template, [ 'assetsID' => 'Assets ID' ] );\n\n\t\tif ( $data['assetsID'] ) {\n\t\t\t$this->assets_id = $data['assetsID'];\n\t\t} else {\n\t\t\t$this->assets_id = 'index';\n\t\t}\n\n\t\tif ( is_singular() ) {\n\t\t\tglobal $post;\n\t\t\tif ( get_post_meta( $post->ID, 'assets_id', true ) ) {\n\t\t\t\t$this->assets_id = get_post_meta( $post->ID, 'assets_id', true );\n\t\t\t}\n\t\t}\n\n\t\treturn $template;\n\t}", "public function store()\n {\n request()->validate([\n 'field_observation_ids' => [\n 'required', 'array', 'min:1', new ApprovableFieldObservation,\n ],\n ]);\n\n $fieldObservations = $this->getFieldObservations();\n\n $fieldObservations->each(function ($fieldObservation) {\n $this->authorize('approve', $fieldObservation);\n });\n\n $fieldObservations->approve();\n\n $fieldObservations->each(function ($fieldObservation) {\n $this->logActivity($fieldObservation);\n $this->notifyCreator($fieldObservation);\n });\n\n return FieldObservationResource::collection($fieldObservations);\n }", "public function add($asset)\n\t{\n\t\tif(is_array($asset))\n\t\t{\n\t\t\tforeach($asset as $a)\n\t\t\t\t$this->add($a);\n\t\t}\n\n\t\t// Collection\n\t\telseif(isset($this->collections[$asset]))\n\t\t\t$this->add($this->collections[$asset]);\n\n\t\t// JavaScript asset\n\t\telseif(preg_match($this->js_regex, $asset))\n\t\t\t$this->addJs($asset);\n\n\t\t// CSS asset\n\t\telseif(preg_match($this->css_regex, $asset))\n\t\t\t$this->addCss($asset);\n\n\t\treturn $this;\n\t}", "private function buildCollection(): void\n {\n //todo 這邊可以在sql裡面處理,但因為時程的關係,先用這種方法處理\n $userId = auth()->user()->id;\n $this->collection->map(function ($item) use ($userId) {\n $item->isAuthor = ($item->user_id == $userId);\n $item->user_id = null;\n });\n }", "private function _load_assets()\r\n {\r\n //set default page title\r\n $this->data['title'] = \"\";\r\n\r\n $this->data['base'] = $this->config->item(\"base_url\");\r\n \r\n if(count($this->config->item('assets')) > 1):\r\n foreach($this->config->item('assets') as $asset_name => $location): \r\n $this->data[$asset_name] = base_url($location);\r\n endforeach;\r\n endif;\r\n\r\n //load Simer variables\r\n if($user_details = $this->session->userdata('user_details')):\r\n\r\n //then user is logged in\r\n $this->user_details = $user_details;\r\n $this->user_id = $user_details->id;\r\n $this->data['user_details'] =$user_details;//setup user details globally for views\r\n $this->data['custom_nav'] = $this->build_nav();\r\n\r\n endif;\r\n }", "public function assets()\n {\n return $this->hasMany(Asset::class, 'supplier_id','id');\n }", "public function canEditState($record = null, $user = null)\n\t{\n\t\tif ($user)\n\t\t{\n\t\t\tthrow new Exception(__FUNCTION__ . '(): Error model does not support checking ACL of specific user', 500);\n\t\t}\n\n\t\t$record = $record ?: $this->_record;\n\t\t$user = $user ?: JFactory::getUser();\n\n\t\treturn $record->id < 7\n\t\t\t?\tfalse\n\t\t\t: $user->authorise('flexicontent.publishfield', 'com_flexicontent.field.' . $record->id);\n\t}", "public function beforeFilter() {\n parent::beforeFilter();\n $this->Auth->allow('add');\n //$this->getNamedArgs(); \n\t\t\n\t\t// Load action specific models\n//\t\tswitch ($this->params['action']) {\n//\t\t\tcase 'users':\t\t$models = array('Household'); break;\n//\t\t}\n//\t\tif (!empty($models)) {\n//\t\t\tforeach ($models as $model) {\n//\t\t\t\t$this->loadModel($model);\n//\t\t\t}\n//\t\t}\n \n }", "public function getAssets2()\n {\n return $this->hasMany(Asset::className(), ['disposal_gl_acc_id' => 'account_id']);\n }", "function recordActions(&$record, &$actions, &$mraactions)\n\t{\n\t\t// remove all actions for main 3 initial records\n\t\tif (is_numeric($record['id']) && $record['id']<=1999)\n\t\t{\n\t\t\t$actions[\"view\"] = '';\n\t\t\t$actions[\"edit\"] = '';\n\t\t\t$actions[\"delete\"] = '';\n\t\t}\n\t}", "protected function getAssets() { return array(); }", "public function testAssetRelatedAssets()\n {\n $mockAdminApi = new MockAdminApi();\n $mockAdminApi->asset(self::$UNIQUE_TEST_ID, ['related' => true, 'related_next_cursor' => self::NEXT_CURSOR]);\n $lastRequest = $mockAdminApi->getMockHandler()->getLastRequest();\n\n self::assertRequestQueryStringSubset(\n $lastRequest,\n ['related' => '1', 'related_next_cursor' => self::NEXT_CURSOR]\n );\n }", "protected function process()\n {\n\n // initialize the store view code\n $this->getSubject()->prepareStoreViewCode();\n\n // load the PK\n $pk = $this->getValue($this->getPrimaryKeyColumnName());\n\n // load the store view - if no store view has been set, we assume the admin\n // store view, which will contain the default (fallback) attribute values\n $storeViewCode = $this->getSubject()->getStoreViewCode(StoreViewCodes::ADMIN);\n\n // query whether or not the row has already been processed\n if ($this->storeViewHasBeenProcessed($pk, $storeViewCode)) {\n // log a message\n $this->getSystemLogger()->warning(\n $this->getSubject()->appendExceptionSuffix(\n sprintf(\n 'Attributes for %s \"%s\" + store view code \"%s\" has already been processed',\n $this->getPrimaryKeyColumnName(),\n $pk,\n $storeViewCode\n )\n )\n );\n\n // return immediately\n return;\n }\n\n // load the store ID, use the admin store if NO store view code has been set\n $storeId = $this->getSubject()->getRowStoreId(StoreViewCodes::ADMIN);\n\n // load the image attribute\n $attribute = $this->getEavAttributeByAttributeCode('image');\n\n // remove the image if one exists\n if ($value = $this->loadVarcharAttribute($pk, $attribute[MemberNames::ATTRIBUTE_ID], $storeId)) {\n $this->deleteVarcharAttribute(array(MemberNames::VALUE_ID => $value[MemberNames::VALUE_ID]));\n }\n }", "private function add_model_visibility()\n {\n }", "function sopac_bib_record() {\n global $user;\n\n $locum = sopac_get_locum();\n $insurge = sopac_get_insurge();\n $actions = sopac_parse_uri();\n $bnum = $actions[1];\n $getvars = sopac_parse_get_vars();\n $output = $getvars['output'];\n\n // Load social function\n require_once('sopac_social.php');\n drupal_add_js('misc/collapse.js');\n drupal_add_js(drupal_get_path('theme', 'aadl').'/soundmanager2-nodebug-jsmin.js');\n drupal_add_js(drupal_get_path('theme', 'aadl').'/inlineplayer.js');\n $no_circ = $locum->csv_parser($locum->locum_config['location_limits']['no_request']);\n $show_inactive = user_access('show suppressed records');\n $item = $locum->get_bib_item($bnum, $show_inactive);\n $bnum_arr[] = $bnum;\n $reviews = $insurge->get_reviews(NULL, $bnum_arr, NULL);\n $i = 0;\n foreach ($reviews['reviews'] as $insurge_review) {\n $rev_arr[$i]['rev_id'] = $insurge_review['rev_id'];\n $rev_arr[$i]['bnum'] = $insurge_review['bnum'];\n if ($insurge_review['uid']) {\n $rev_arr[$i]['uid'] = $insurge_review['uid'];\n }\n $rev_arr[$i]['timestamp'] = $insurge_review['rev_create_date'];\n $rev_arr[$i]['rev_title'] = $insurge_review['rev_title'];\n $rev_arr[$i]['rev_body'] = $insurge_review['rev_body'];\n $i++;\n }\n if (!$insurge->check_reviewed($user->uid, $bnum_arr[0]) && $user->uid) {\n $rev_form = drupal_get_form('sopac_review_form', $bnum_arr[0]);\n }\n else {\n $rev_form = NULL;\n }\n if($machinetags = $insurge->get_machine_tags($bnum)){\n foreach($machinetags as $machinetag){\n $item['machinetags'][$machinetag['namespace']][] = $machinetag;\n }\n }\n if(($item['magnatune_url'] || $item['mat_code'] == 'z') && !$item['stream_filetype']){\n $result_page = theme('sopac_record_musicdownload', $item, $locum->locum_config, $rev_arr, $rev_form);\n }\n else if ($item['mat_code']) {\n $item['tracks'] = $locum->get_cd_tracks($bnum);\n $item['trackupc'] = $locum->get_upc($bnum);\n if($item['bnum']) {\n $item_status = $locum->get_item_status($bnum, TRUE);\n }\n // Grab Syndetics reviews, etc..\n $review_links = $locum->get_syndetics($item['stdnum'][0]);\n if (count($review_links)) {\n $item['review_links'] = $review_links;\n }\n $lists = $insurge->get_item_list_ids($item['bnum']);\n if(count($lists)){\n $sql = \"SELECT * FROM {sopac_lists} WHERE public = 1 and list_id IN (\".implode($lists,',').\") ORDER BY list_id DESC\";\n $res = db_query($sql);\n for ($i = 1; $i <= 10; $i++) {\n $record = db_fetch_array($res);\n $item['lists'][] = $record;\n }\n }\n // Build the page\n $result_page = theme('sopac_record', $item, $item_status, $locum->locum_config, $no_circ, &$locum, $rev_arr, $rev_form);\n }\n else {\n $result_page = t('This record does not exist.');\n }\n\n if ($output == \"rss\") {\n $item['status'] = $item_status;\n $item['type'] = 'bib';\n $cover_img_url = $item['cover_img'];\n return theme('sopac_results_hitlist_rss', 1, $cover_img_url, $item, $locum->locum_config, $no_circ);\n } else {\n return '<p>'. t($result_page) .'</p>';\n }\n}", "function add_assets($hook) {\n\t\t// only when adminbar is available\n\t\tif (!is_admin_bar_showing()) {\n\t\t\treturn;\n\t\t}\n\n\t\t$min = '.min';\n\t\t// @note load dev file when script_debug is on\n\t\t// $min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG === true ) ? '' : $min;\n\n\t\t// add css\n\t\twp_register_style($this->slug, plugin_dir_url(__FILE__).\"dist/app${min}.css\", array('admin-bar'), $this->version);\n\t\twp_enqueue_style($this->slug);\n\n\t\t// fetch post types and make them available for js\n\t\t$types = array('any' => array('name' => 'any', 'label' => __('Show all post types', 'mio-omnisearch')));\n\t\t// only use post types that aren't exluded from search are are in shown in rest\n\t\t$post_types = get_post_types(array('exclude_from_search' => false, 'show_in_rest' => true), 'objects');\n\t\tforeach ($post_types as $post_type) {\n\t\t\t// we only need the name and label\n\t\t\t$types[$post_type->name] = array('name' => $post_type->name, 'label' => $post_type->label);\n\t\t}\n\n\t\t// add localized data\n\t\t$js_data = array(\n\t\t\t\t'types' => apply_filters( 'mio_omnisearch_posttypes', $types),\n\t\t\t\t'ui' => array(\n\t\t\t\t\t'edit' => __('Edit', 'mio-omnisearch'),\n\t\t\t\t\t'view' => __('View', 'mio-omnisearch'),\n\t\t\t\t\t'search' => __('Search', 'mio-omnisearch'),\n\t\t\t\t\t'searchResults' => __('Search results', 'mio-omnisearch'),\n\t\t\t\t\t'nothingFound' => __('Nothing found', 'mio-omnisearch'),\n\t\t\t\t\t'openInfo' => __('edit selection ⏎', 'mio-omnisearch'),\n\t\t\t\t),\n\t\t\t);\n\n\t\t// load js\n\t\twp_register_script($this->slug, plugin_dir_url(__FILE__).\"dist/app${min}.js\", array(), $this->version, true);\n\t\twp_localize_script($this->slug, 'mio_omnisearch', $js_data);\n\t\twp_enqueue_script($this->slug);\n\t}", "function WriteAuditTrailOnAdd(&$rs) {\n\t\tglobal $mst_vendor;\n\t\t$table = 'mst_vendor';\n\n\t\t// Get key value\n\t\t$key = \"\";\n\t\tif ($key <> \"\") $key .= EW_COMPOSITE_KEY_SEPARATOR;\n\t\t$key .= $rs['kode'];\n\n\t\t// Write Audit Trail\n\t\t$filePfx = \"log\";\n\t\t$curDate = date(\"Y/m/d\");\n\t\t$curTime = date(\"H:i:s\");\n\t\t$id = ew_ScriptName();\n\t $curUser = CurrentUserName();\n\t\t$action = \"A\";\n\t\t$oldvalue = \"\";\n\t\tforeach (array_keys($rs) as $fldname) {\n\t\t\tif ($mst_vendor->fields[$fldname]->FldDataType <> EW_DATATYPE_BLOB) { // Ignore Blob Field\n\t\t\t\t$newvalue = ($mst_vendor->fields[$fldname]->FldDataType == EW_DATATYPE_MEMO) ? \"<MEMO>\" : $rs[$fldname]; // Memo Field\n\t\t\t\tew_WriteAuditTrail($filePfx, $curDate, $curTime, $id, $curUser, $action, $table, $fldname, $key, $oldvalue, $newvalue);\n\t\t\t}\n\t\t}\n\t}", "public function store(Request $request) {\n $user = Auth::user();\n if (!$user->can('asset-create')) {\n return response()->json(['error' => 'Unauthorised'], $this->unauthorized);\n }\n\n $this->validate($request, [\n 'name' => 'required',\n 'ticker' => 'required',\n 'holding' => 'required',\n 'marketValue' => 'required',\n 'delta' => 'required',\n 'profit' => 'required',\n 'returnCurrency' => 'required',\n 'returnPercent' => 'required',\n 'typeId' => 'required',\n 'sectorId' => 'required',\n 'tradingBlockId' => 'required',\n 'countryId' => 'required'\n ]);\n\n $type = Type::find($request->get('typeId'));\n $sector = Sector::find($request->get('sectorId'));\n $tradingBlock = TradingBlock::find($request->get('tradingBlockId'));\n $country = Country::find($request->get('countryId'));\n\n $asset = new Asset();\n $asset->name = $request->get('name');\n $asset->ticker = $request->get('ticker');\n $asset->holding = $request->get('holding');\n $asset->market_value = $request->get('marketValue');\n $asset->delta = $request->get('delta');\n $asset->profit = $request->get('profit');\n $asset->return_currency = $request->get('returnCurrency');\n $asset->return_percent = $request->get('returnPercent');\n\n $asset->type()->associate($type);\n $asset->sector()->associate($sector);\n $asset->trading_block()->associate($tradingBlock);\n $asset->country()->associate($country);\n $asset->save();\n\n return response()->json(['success' => 'created', 'record' => $asset], $this->sucessStatus);\n }", "public function styleAssets($collection, $key, $path, $web)\r\n {\r\n if (true === $collection['debug']) {\r\n $this->debugWriteAssets(CON_ROOT_PATH, DOCUMENT_ROOT, $web, $collection);\r\n return true;\r\n }\r\n \r\n $am = $this->setAssetsCollection($collection['assets'], $key, $path);\r\n $this->fm = null;\r\n $factory = new AssetFactory(DOCUMENT_ROOT . $web, $collection['debug']);\r\n $factory->setAssetManager($am);\r\n $filters = array();\r\n if (false === $collection['debug']) {\r\n if (isset($collection['includes'])) {\r\n $this->includeResources($collection['includes']);\r\n }\r\n \r\n if (isset($collection['filters'])) {\r\n foreach ($collection['filters'] as $alias => $filter) {\r\n $filters[] = '?' . $alias;\r\n $this->getFm()->set($alias, new $filter());\r\n }\r\n $factory->setFilterManager($this->getFm());\r\n $factory->addWorker(new CacheBustingWorker());\r\n }\r\n }\r\n $css = $factory->createAsset(array(\r\n '@' . $key\r\n ), $filters);\r\n $css->setTargetPath($key . '.css');\r\n $this->writeAssets($css, self::ASSETS_LASTMODIFIED . $key, DOCUMENT_ROOT . $web, '/' . $key . '.css');\r\n if (isset($collection['onload']) && true === $collection['onload']) {\r\n $this->onloadStyles($web . '/' . $key . '.css');\r\n } else {\r\n $this->setStylesheets($this->linkStylesheet($web . '/' . $key . '.css', $collection['attr']));\r\n }\r\n \r\n return true;\r\n }", "public function addAction() {\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}", "private function processAssets()\n {\n $js = $this->assetmanager->getAssetHandler('js');\n\n $afh = new \\Core\\Asset\\AssetFileHandler();\n $afh->setFilename($this->config->get('Core', 'dir.cache') . '/script.js');\n $afh->setTTL($this->config->get('Core', 'cache.ttl.js'));\n\n $js->setFileHandler($afh);\n\n $css = $this->assetmanager->getAssetHandler('css');\n\n $theme = $this->config->get('Core', 'style.theme.name');\n\n $css->addProcessor(new \\Core\\Asset\\Processor\\ReplaceProcessor('../fonts/', '../Themes/' . $theme . '/fonts/'));\n $css->addProcessor(new \\Core\\Asset\\Processor\\ReplaceProcessor('../img/', '../Themes/' . $theme . '/img/'));\n\n $afh = new \\Core\\Asset\\AssetFileHandler();\n $afh->setFilename($this->config->get('Core', 'dir.cache') . '/style.css');\n $afh->setTTL($this->config->get('Core', 'cache.ttl.css'));\n\n $css->setFileHandler($afh);\n\n foreach ($this->apps as $app) {\n foreach ($app->javascript as $aio) {\n $js->addObject($aio);\n }\n\n foreach ($app->css as $aio) {\n $css->addObject($aio);\n }\n }\n\n // Process assets\n $this->assetmanager->process();\n }", "private function _addResource()\n {\n //Add Resource\n $this->assets->collection('css_header')\n ->addCss('/plugins/bootstrap-modal/css/bootstrap-modal-bs3patch.css');\n\n $this->assets->collection('js_footer')\n ->addJs('/plugins/nestable/jquery.nestable.js')\n ->addJs('/plugins/nestable/ui-nestable.js')\n ->addJs('/plugins/bootstrap-modal/js/bootstrap-modal.js')\n ->addJs('/plugins/bootstrap-modal/js/bootstrap-modalmanager.js')\n ->addJs('/templates/backend/default/js/ui-modals.js');\n }", "public function addOrReplaceRecords(array $records = []): bool;", "public function permissions(Storable $storable, Acl $acl): void;", "protected function _afterLoad($record)\n\t{\n\t\tparent::_afterLoad($record);\n\n\t\t// Record was not found / not created, nothing to do\n\t\tif (!$record)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Convert field positions to an array\n\t\tif (!is_array($record->positions))\n\t\t{\n\t\t\t$record->positions = explode(\"\\n\", $record->positions);\n\t\t}\n\n\t\t// Load type assigments (an array of type IDs)\n\t\t$record->tid = $this->getFieldType($record->id);\n\t}", "public function handleManipulateAST(ManipulateAST $manipulateAST): void\n {\n ASTHelper::attachDirectiveToObjectTypeFields(\n $manipulateAST->documentAST,\n Parser::constDirective('@tracing')\n );\n }" ]
[ "0.5983292", "0.59673995", "0.5171399", "0.5171399", "0.48691416", "0.48545712", "0.4832955", "0.48314267", "0.47808412", "0.4565236", "0.45315292", "0.44944543", "0.44396025", "0.41933188", "0.418899", "0.41816735", "0.4172173", "0.41716185", "0.4140145", "0.41389728", "0.41211343", "0.41071048", "0.40909785", "0.40863654", "0.4053476", "0.40429926", "0.40125144", "0.40119672", "0.40007004", "0.40002528", "0.39874178", "0.3977743", "0.39710554", "0.39695638", "0.39672977", "0.39669845", "0.39466658", "0.39430737", "0.3930846", "0.393032", "0.39184955", "0.3884096", "0.38833255", "0.38828152", "0.3880205", "0.38782308", "0.38770697", "0.38574633", "0.38540348", "0.3849588", "0.38193542", "0.3811773", "0.379773", "0.37970912", "0.3781565", "0.37797886", "0.37688547", "0.37686905", "0.37678653", "0.37660939", "0.3764646", "0.37605184", "0.37597978", "0.37573034", "0.375464", "0.37546203", "0.3745337", "0.3732895", "0.37281886", "0.3727895", "0.37234682", "0.37218317", "0.37197924", "0.371945", "0.3718519", "0.37153327", "0.3710789", "0.37007794", "0.36964166", "0.3695786", "0.36900377", "0.36882302", "0.36815828", "0.36798486", "0.36759943", "0.3675461", "0.367514", "0.36741143", "0.36673167", "0.3663369", "0.36580363", "0.36562124", "0.36523217", "0.36436936", "0.36400858", "0.36351106", "0.3630721", "0.36303958", "0.36288494", "0.36276624" ]
0.77252924
0
Return a list of all tuples attached to this dataobject Note: Variants are excluded
protected function findAssets(DataObject $record) { // Search for dbfile instances $files = []; $fields = DataObject::getSchema()->fieldSpecs($record); foreach ($fields as $field => $db) { $fieldObj = $record->$field; if (!($fieldObj instanceof DBFile)) { continue; } // Omit variant and merge with set $next = $record->dbObject($field)->getValue(); unset($next['Variant']); if ($next) { $files[] = $next; } } // De-dupe return array_map("unserialize", array_unique(array_map("serialize", $files ?? []))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toTuple();", "public function getTuple()\n {\n return $this->tuple;\n }", "public function get_all(){\n return get_object_vars($this);\n }", "public function getValuesList() {\n return $this->_get(3);\n }", "public function getValuesList() {\n return $this->_get(2);\n }", "public function getData(): iterable;", "public function getTranslatableEntityObjectValues() {\n return get_object_vars($this);\n }", "public function values()\n {\n return array_values($this->_data);\n }", "public function getDatasList(){\n return $this->_get(5);\n }", "public function objectToArray()\n {\n return get_object_vars($this);\n }", "public function getValuesList(){\n return $this->_get(1);\n }", "public function getTaggedDataObjects(): ArrayList\n {\n $list = ArrayList::create();\n $classes = ClassInfo::subclassesFor(DataObject::class);\n $mmtMapping = self::getManyManyThroughMappingClasses();\n\n foreach ($classes as $class) {\n // Exclude TaxonomyTerm and its subclasses from being the candidates to checked ralations, for the cases\n // such as, terms are assigned to terms via hierarchy, etc\n if (is_a($class, self::class, true)) {\n continue;\n }\n\n foreach (['has_one', 'has_many', 'many_many'] as $relation) {\n $relationCandidates = (array) Config::inst()->get($class, $relation);\n\n foreach ($relationCandidates as $field => $fieldType) {\n if ($fieldType === self::class) {\n\n // db field to filter on — FieldNameID for has_one, or FieldName.ID for composite relations\n $filterField = $field . ($relation === 'has_one' ? '' : '.') . 'ID';\n\n $items = DataObject::get($class)->filter($filterField, $this->ID);\n\n // TODO: find out how to get the mapped class to match\n $items->each(function ($item) use ($list, $field, $relation, $mmtMapping) {\n // special treatment of relations that form many_many_through mappings\n if (array_key_exists($item->ClassName, $mmtMapping)) {\n $mmtMaps = $mmtMapping[$item->ClassName]; //[sprintf('%s.%s', $item->class, $field)];\n\n foreach ($mmtMaps as $mmtMap) {\n $owner = $item->{$mmtMap['ownerAccessor']}();\n if ($owner && $owner->exists() && $owner->ClassName === $mmtMap['ownerClass']) {\n $fieldName = $mmtMap['relation'];\n $relationName = 'many_many_through';\n\n break;\n }\n $owner = null;\n }\n } else {\n $owner = $item;\n $fieldName = $field;\n $relationName = $relation;\n }\n\n if ($owner && $owner->exists()) {\n $list->push(self::decorateTaggedDataObject($owner, $fieldName, $relationName));\n }\n });\n }\n }\n }\n }\n\n // Remove duplicates\n $list->removeDuplicates('AT_UniqueID');\n\n return $list;\n }", "public function get_all_data()\n\t{\n\t\treturn $this->_data;\n\t}", "function getValues()\n {\n return $this->type->getValues();\n }", "public static function tuples()\n {\n $seq = self::sequence(self::getArgs(func_get_args()));\n return $seq->bindGen(function ($roses) {\n return self::pureGen(RoseTree::zip(FP::args(), $roses));\n });\n }", "public function getPairListAttribute()\n {\n return $this->allpairs->pluck('id')->all();\n }", "public function __toArray(): array\n {\n return call_user_func('get_object_vars', $this);\n }", "public function pairs() { return $this->_m_pairs; }", "public function toArray() {\n return get_object_vars($this);\n }", "public function toArray() {\n return get_object_vars($this);\n }", "public function values() {\n\t\treturn array_values($this->toArray());\n\t}", "public function toArray() {\n return get_object_vars($this);\n }", "public function toArray() {\n return get_object_vars($this);\n }", "public function getValues()\n {\n return array_values($this->data);\n }", "public function toArray()\n {\n return get_object_vars($this);\n }", "public function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "public function generateArray()\n {\n return $this->getProperties();\n }", "public function toArray() {\n return get_object_vars($this);\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 getValues()\n {\n return $this->_values;\n }", "public function getObjects()\n {\n return get_object_vars($this);\n }", "public function getObjects()\n {\n return get_object_vars($this);\n }", "public function data()\n {\n return static::toArray($this);\n }", "public function getTrueMutationsList(){\n return $this->_get(4);\n }", "public function getValues()\n\t{\n\t\treturn $this->_values;\n\t}", "public function getAllData() {\n\t\treturn $this->_data;\n\t}", "public function vars()\n {\n \n return new ArrayWrapper(get_object_vars($this->object));\n \n }", "public function getValues();", "public function values() {\n\t\treturn array_values($this->_value);\n\t}", "public function toArray() :array {\n return get_object_vars($this);\n }", "public function getFields() : array\n {\n return get_object_vars($this);\n }", "public function values()\n {\n return $this->values;\n }", "public function values()\n {\n return $this->values;\n }", "public function values()\n {\n return $this->values;\n }", "public function values()\n {\n return $this->values;\n }", "public function __toArray ( )\n {\n return $this->toArray();\n }", "public function toArray() : array{\n return get_object_vars( $this );\n }", "public function toArray(): array\r\n {\r\n return get_object_vars($this);\r\n }", "public function iterable(): iterable\n {\n return $this->array;\n }", "public function getValues() {}", "public function getValues() {}", "public function getAllProperties(): array\n {\n return get_object_vars($this);\n }", "public function getData(){\n $values = array();\n $attributes = $this->defineAttributes();\n if(property_exists($this, 'handle') && property_exists($this, 'type')){\n $matrixAttributes = anu()->matrix->getMatrixByName($this->handle)->defineAttributes()[$this->type];\n $attributes = array_merge($attributes, $matrixAttributes);\n }\n\n foreach ($attributes as $k => $v){\n if(property_exists($this, $k)){\n $values[$k] = $this->$k;\n }\n }\n return $values;\n }", "public function get_all () {\r\n\t\treturn $this->_data;\r\n\t}", "public function items(): iterable;", "abstract public function values(): Seq;", "public function getValues()\n\t\t{\n\t\t\treturn $this->values;\n\t\t}", "public function getAttributes(): iterable;", "public function getMutationsList(){\n return $this->_get(3);\n }", "public function getMetaData(): iterable;", "public function values();", "public function values();", "public function values();", "public function values();", "public function values();", "final public function getValues()\n {\n return $this->values;\n }", "public function getDataList(){\n return $this->_get(1);\n }", "function getAllDataValues() {\n\t\t$conn = Doctrine_Manager::connection(); \n\t\t$resultvalues = $conn->fetchAll(\"SELECT * FROM lookuptypevalue WHERE lookuptypeid = '\".$this->getID().\"' order by lookupvaluedescription asc \");\n\t\treturn $resultvalues;\t\n\t}", "public function getTypedData();", "public function getValues()\n {\n return $this->values;\n }", "public function getValues()\n {\n return $this->values;\n }", "public function getValues()\n {\n return $this->values;\n }", "public function getValues()\n {\n return $this->values;\n }", "public function all()\n {\n return $this->values;\n }", "function all()\n\t{\n\t\treturn $this->_data;\n\t}", "public function getArrayCopy()\n {\n return get_object_vars($this);\n }", "public function getArrayCopy()\n {\n return get_object_vars($this);\n }", "public function getArrayCopy()\n {\n return get_object_vars($this);\n }", "public function getArrayCopy()\n {\n return get_object_vars($this);\n }", "public function getArrayCopy()\n {\n return get_object_vars($this);\n }", "public function getArrayCopy()\n {\n return get_object_vars($this);\n }", "public function getArrayCopy()\n {\n return get_object_vars($this);\n }", "public function getArrayCopy()\n {\n return get_object_vars($this);\n }", "public function getArrayCopy()\n {\n return get_object_vars($this);\n }", "public function getArrayCopy()\n {\n return get_object_vars($this);\n }", "public function getArrayCopy()\n {\n return get_object_vars($this);\n }", "public function getArrayCopy()\n {\n return get_object_vars($this);\n }", "public function getArrayCopy()\n {\n return get_object_vars($this);\n }", "public function getArrayCopy()\n {\n return get_object_vars($this);\n }", "public function getArrayCopy()\n {\n return get_object_vars($this);\n }", "public function getArrayCopy()\n {\n return get_object_vars($this);\n }" ]
[ "0.6198187", "0.6077092", "0.57596827", "0.57538587", "0.57482123", "0.5728062", "0.5667332", "0.566098", "0.56521875", "0.5603916", "0.55860615", "0.5580128", "0.5523734", "0.5517232", "0.5505672", "0.55034024", "0.54996634", "0.5460509", "0.54444206", "0.54403454", "0.5440207", "0.5428087", "0.5428087", "0.54247206", "0.5423992", "0.54211193", "0.5417799", "0.5417799", "0.5417799", "0.5417799", "0.5417799", "0.5417799", "0.5417799", "0.5417799", "0.5417799", "0.5416186", "0.54126006", "0.5401875", "0.5401875", "0.53991383", "0.5389515", "0.5389515", "0.53561103", "0.5342864", "0.53285813", "0.53234774", "0.5323378", "0.5319962", "0.5316574", "0.53078574", "0.5297251", "0.52905333", "0.52905333", "0.52905333", "0.52905333", "0.5286345", "0.52685195", "0.52676547", "0.52627105", "0.525078", "0.525078", "0.52482796", "0.5240909", "0.52358395", "0.52255917", "0.52145106", "0.5208474", "0.5208284", "0.5208187", "0.5190889", "0.5180399", "0.5180399", "0.5180399", "0.5180399", "0.5180399", "0.51739943", "0.51728094", "0.5171024", "0.5165756", "0.51612216", "0.51612216", "0.51612216", "0.51612216", "0.5158549", "0.5157521", "0.5154221", "0.5149709", "0.5149709", "0.5149709", "0.5149709", "0.5149709", "0.5149709", "0.5149709", "0.5149709", "0.5149709", "0.5149709", "0.5149709", "0.5149709", "0.5149709", "0.5149709", "0.5149709" ]
0.0
-1
Delete all assets in the tuple list
protected function deleteAll($assets) { if (empty($assets)) { return; } $store = $this->getAssetStore(); foreach ($assets as $asset) { $store->delete($asset['Filename'], $asset['Hash']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function deleteAssets() {\n // Fail due to invalid asset deletors \n assert(isset(self::$assetDeletors));\n\n // Remove assets \n foreach (self::$assetDeletors as $deletor) {\n $deletor->delete();\n }\n\n // Clear AssetDeletors cache\n self::$assetDeletors = array();\n }", "public function delall()\n {\n }", "abstract public function deleteAll();", "protected function entityDeleteMultiple($ids) {\n farm_asset_delete_multiple($ids);\n }", "public function remove(...$items);", "public function deleteAll(): void;", "public function purgeAll() {\n\t\tset_time_limit(300);\n\t\t$this->load->model(\"filehandlerbase\");\n\t\t$fileList = $this->filehandlerbase->findDeletedItems();\n\t\t$mfa = $this->input->post(\"mfa\");\n\t\t$serial = $this->input->post(\"arn\");\n\n\t\t/**\n\t\t * we need to cache this because MFA is only good once\n\t\t */\n\t\t$lastUsedToken = null;\n\t\tforeach($fileList as $fileEntry) {\n\t\t\t$fileHandler = $this->filehandler_router->getHandlerForObject($fileEntry->getFileObjectId());\n\t\t\tif(!$fileHandler) { \n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(!$fileHandler->loadFromObject($fileEntry)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($lastUsedToken)) {\n\t\t\t\t$fileHandler->s3model->sessionToken = $lastUsedToken;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif(!$fileHandler->deleteSource($serial,$mfa)) {\n\t\t\t\t\t$this->logging->logError(\"purgeAll\",\"Could not delete asset with key\" . $fileEntry->getFileObjectId());\n\t\t\t\t}\n\t\t\t\t$lastUsedToken = $fileHandler->s3model->sessionToken;\n\t\t\t}\n\t\t\tcatch (Exception $e) {\n\t\t\t\techo $e;\n\t\t\t\techo \"Deletion fail\";\n\t\t\t}\n\n\t\t}\n\n\t\tinstance_redirect(\"/admin\");\n\t}", "function imageAllDelete();", "function deleteTemp () : void {\n\tforeach(glob(_ROOT_PATH.'temp/*') as $file){\n\t\tunlink($file);\n\t}\n}", "public function multiDelete()\n {\n if(is_array(request()->item)){\n foreach (request()->item as $id) {\n $tradmark = Tradmark::findOrfail($id);\n Storage::delete($tradmark->logo);\n $tradmark->delete();\n }\n\n }else{\n $tradmark = Tradmark::findOrfail(request('item'));\n Storage::delete($tradmark->logo);\n $tradmark->delete();\n }\n\n session()->flash('success', trans('admin.deleted_successfully'));\n return redirect(route('admin.tradmarks.index'));\n }", "protected function deleteUnusedItems(){\n $items=Item::where('serial_number','')->get();\n foreach($items as $item){\n $item->delete();\n }\n }", "public function deleteAll();", "public function deleteAll();", "public function deleteAll();", "abstract public function mass_remove();", "public final function destroy_all()\n {\n }", "private static function toDelete(){\n $filesNotToDelete = [];\n $dir = public_path().'/images/';\n $filesInPublicFolder = scandir($dir);\n\n // izbacivanje assets foldera, .. i .\n $ignoreFiles = ['assets', '.', '..', 'pig.png', 'placeholder.png', 'logo.png', 'index.php'];\n foreach ($ignoreFiles as $toIgnore) {\n if (($key = array_search($toIgnore, $filesInPublicFolder)) !== false) {\n unset($filesInPublicFolder[$key]);\n }\n }\n // dd($filesInPublicFolder);\n $images = [];\n $collectionsOfObjectsWithImages = [Product::all(), ProductGroup::all(), Manufacturer::all(),\n Suggestion::all(), ImageSuggestion::all(), MainAd::all(),SecondAd::all()];\n\n foreach ($collectionsOfObjectsWithImages as $collection) {\n foreach ($collection as $object) {\n if($object->images->count()){\n foreach ($object->images as $image) {\n $images[] = $image->name;\n }\n }\n }\n }\n\n // dd($images);\n // dd(array_diff($filesInPublicFolder, $images));\n // dd($filesNotToDelete, $filesInPublicFolder);\n return $toDelete = array_diff($filesInPublicFolder, $images); //za fju array_dif vazan je redoslijed argumenata\n\n }", "public function removeUnfinishedGalleys() {\n\t\tif (!$this->galleysToUpdate or !count($this->galleysToUpdate)) {\n\t\t\treturn;\n\t\t}\n\t\t$galleyDao =& \\DAORegistry::getDAO('ArticleGalleyDAO');\n\t\tforeach ($this->galleysToUpdate as $galleyItem) {\n\t\t\tif (isset($galleyItem->dirty) and ($galleyItem->dirty === true)) {\n\t\t\t\t$id = $galleyItem->newGalley->getId();\n\t\t\t\t$galleyDao->deleteGalley($galleyItem->newGalley);\n\t\t\t\t$galleyItem->dirty = false;\n\t\t\t\t$this->log->warning('file could not be finished, temporary galley is removed: ' . $id);\n\t\t\t}\n\t\t}\n\t}", "public function deleteAllChunks(){\n\n $totalChunks = $this->getTotalChunks();\n\n for ($i = 1; $i <= $totalChunks; $i++) {\n $path = $this->getChunkPath($i);\n if (file_exists($path)) {\n unlink($path);\n }\n }\n }", "public function delete_all() {\n\t\t$this->_cache = array();\n\t\t$this->_collections = array();\n\t}", "public function delete(){\n foreach ( $this->playeractiveitems as $playeractiveitem ){\n $playeractiveitem->delete();\n }\n parent::delete();\n }", "public function delete_all()\n {\n }", "public function removeAll() {\r\n for ($i = 0; $i < $this->zip->numFiles; $i++) {\r\n $this->zip->deleteIndex($i);\r\n }\r\n }", "public function removeTemporary();", "public function actionDeleteMultiple()\n {\n $request = Yii::$app->request;\n Yii::$app->response->format = Response::FORMAT_JSON;\n $js = $request->post('js');\n $jk = $request->post('jk');\n\n $mata_kuliah_tayang = MataKuliahTayang::find()\n ->joinWith('refCpmks')\n ->where([MataKuliahTayang::tableName() . '.id' => $jk])\n ->all();\n // $count = count($mata_kuliah_tayang[0]['refCpmks']);\n\n foreach ($js as $id_mahasiswa) {\n foreach ($mata_kuliah_tayang as $key => $value) {\n foreach ($value['refCpmks'] as $key => $value) {\n CapaianMahasiswa::deleteAll(['id_ref_mahasiswa' => $id_mahasiswa, 'id_ref_cpmk' => $value->id]);\n }\n }\n }\n }", "function wp_cache_delete_multiple(array $keys, $group = '')\n {\n }", "public function cleanup()\n\t{\n\t\t$ArticlesLatest = Article::where('status', 'read')->where('star_ind', '0')->orderBy('created_at', 'desc')->select('id')->take(10000)->get();\n\t\t$ArticlesStar = Article::where('star_ind', '1')->select('id')->get();\n\t\t$ArticlesUnread = Article::where('status', 'unread')->select('id')->get();\n\n\t\t//create new empty array to store id's\n\t\t$cleanup_item_ids = [];\n\n\t\t//store id's from ArticlesStar in cleanup_item_ids\n\t\tif (!empty($ArticlesStar)) {\n\t\t\tforeach ($ArticlesStar as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//store id's from ArticlesLatest in cleanup_item_ids\n\t\tif (!empty($ArticlesLatest)) {\n\t\t\tforeach ($ArticlesLatest as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//store id's from ArticlesUnread in cleanup_item_ids\n\t\tif (!empty($ArticlesUnread)) {\n\t\t\tforeach ($ArticlesUnread as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//delete items that are not in cleanup_item_ids array\n\t\tArticle::whereNotIn('id', $cleanup_item_ids)->delete();\n\t}", "private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }", "public function clearItems();", "public function deleteUnused()\n\t{\n\t\t/*$file = Engine_Api::_()->getItem('storage_file', $this->file_id);\n\t\t if ($file) {\n\t\t $table = Engine_Api::_()->getDbtable('albumSongs', 'mp3music');\n\t\t $select = $table->select()\n\t\t ->where('file_id = ?', $file->getIdentity())\n\t\t ->limit(1);\n\t\t $count = count( $table->fetchAll($select) );\n\t\t if ($count >= 0)\n\t\t $file->delete();\n\t\t }\n\t\t $this->delete();*/\n\t\t$table = Engine_Api::_() -> getDbtable('albumSongs', 'mp3music');\n\t\t$data = array('is_delete' => 1, );\n\t\t$where = $table -> getAdapter() -> quoteInto('song_id = ?', $this -> song_id);\n\t\t$table -> update($data, $where);\n\t}", "function removeAll() ;", "function removeAll() ;", "public function removeList(array $list): void\n {\n foreach ($list as $id) {\n $this->remove($id);\n }\n }", "public function remove($ids);", "public function deleteUnusedFiles(){\n \n }", "static function deleteAll()\n {\n $GLOBALS['DB']->exec(\"DELETE FROM stores;\");\n $GLOBALS['DB']->exec(\"DELETE FROM stores_brands;\");\n }", "function deleteAttribute(){\n\n\t//Database connection\n\tglobal $mysqli;\n\t\n\t//Hrefs\n\tglobal $cms_continent;\n\tglobal $cms_deleteAttribute;\n\n\t//Selected continent and attribute\n\t$continent_id=$_GET[\"continent_id\"];\n\t$attribute_id=$_GET[\"attribute_id\"];\n\t\n\t//Selection of the paths of the files to delete\n\t$sql_itemFiles=\"SELECT * FROM items WHERE continent_id=\".d($mysqli, $continent_id).\" AND attribute_id=\".d($mysqli, $attribute_id).\"; \";\n\t$res_itemFiles=mysqli_query($mysqli, $sql_itemFiles);\n\t$sql_attributeFiles=\"SELECT * FROM attributes WHERE continent_id=\".d($mysqli, $continent_id).\" AND attribute_id=\".d($mysqli, $attribute_id).\" LIMIT 1;\";\n\t$res_attributeFiles=mysqli_query($mysqli, $sql_attributeFiles);\n\n\t//Deletion of the item files\n//\tif($res_itemFiles){\n\n\t//\twhile($itemFile=$res_itemFiles->fetch_assoc()){\n\n\t//\t\tunlink(\"\".$itemFile[\"image_path\"].\"\");\n\t//\t\tunlink(\"\".$itemFile[\"description_path\"].\"\");\n\n\t//\t}\n\n//\t}\n\n\t//Deletion of the attribute files\n//\tif($res_attributeFiles){\n\n//\t\twhile($attributeFile=$res_attributeFiles->fetch_assoc()){\n\n//\t\t\tunlink(\"\".$attributeFile[\"image_path\"].\"\");\n//\t\t\tunlink(\"\".$attributeFile[\"description_path\"].\"\");\n\n//\t\t}\n\n//\t}\n\n\n\t//Deletion of the associated rows from the database\n\t$sql_deleteAttributeItems=\"DELETE FROM items WHERE continent_id=\".d($mysqli, $continent_id).\" AND attribute_id=\".d($mysqli, $attribute_id).\";\";\n\t$res_deleteAttributeItems=mysqli_query($mysqli, $sql_deleteAttributeItems);\n\t$sql_deleteAttribute=\"DELETE FROM attributes WHERE continent_id=\".d($mysqli, $continent_id).\" AND attribute_id=\".d($mysqli, $attribute_id).\";\";\n\t$res_deleteAttribute=mysqli_query($mysqli, $sql_deleteAttribute);\n\n\tif($res_deleteAttributeItems && $res_deleteAttribute){\n\n\t\tpage_redirect(\"\".$cms_continent.\"?continent_id=\".$continent_id.\"\");\n\n\t}else{\n\n\t\tpage_redirect(\"\".$cms_deleteAttribute.\"?continent_id=\".$continent_id.\"&attribute_id=\".$attribute_id.\"\");\n\n\t}\n if($res_itemFiles){\n \n $res_itemFiles->close(); \n \n }\n\tif($res_attributeFiles){\n\t \n\t $res_attributeFiles->close(); \n\t \n\t}\n\t\n\tif($res_deleteAttributeItems){\n\t \n\t $res_deleteAttributeItems->close(); \n\t \n\t}\n\tif($res_deleteAttribute){\n\t \n\t $res_deleteAttribute->close(); \n\t \n\t}\n\t$mysqli->close();\n\n}", "public function actionCleartemp()\n {\n $uploadPath = '../web/web_mat/temp/';\n $file = scandir($uploadPath);\n foreach ($file as $key => $value) {\n if ($key >= 2) {\n unlink($uploadPath . $value);\n }\n }\n }", "public function purge()\n {\n $list = $this->listEntities();\n while ($list[\"total\"] != 0) {\n foreach ($list[\"data\"] as $entity) {\n $this->deleteEntity($entity[\"uuid\"]);\n }\n $list = $this->listEntities();\n }\n return $list;\n }", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function clear(): void\n {\n $app = App::get();\n $list = $app->data->getList()\n ->filterBy('key', '.temp/cache/', 'startWith');\n foreach ($list as $item) {\n $app->data->delete($item->key);\n };\n }", "private function doCleanup($unchecked)\n {\n $tracker = $this->tracker;\n /* @var \\PhpGuard\\Listen\\Resource\\TrackedObject $tracked */\n foreach($unchecked as $id=>$tracked){\n $origin = $tracked->getResource();\n if(!$origin->isExists()){\n $tracker->addChangeSet($tracked,FilesystemEvent::DELETE);\n $tracker->remove($tracked);\n }\n unset($unchecked[$id]);\n }\n }", "protected function entityDeleteMultiple($ids) {\n waywire_video_delete_multiple($ids);\n }", "abstract public function removeAll();", "public function fulldelete() {\n if ($this->id && !$this->elements) {\n $this->elements = self::get_instances(array('setid' => $this->id));\n }\n\n foreach ($this->elements as $elm) {\n $elm->delete();\n }\n\n parent::delete();\n }", "public function removeAssets()\n {\n // Base implementation does only know about log file.\n if ($this->logFile) {\n if (file_exists($this->logFile)) {\n unlink($this->logFile);\n }\n $this->logFile = null;\n $this->file->remove('log');\n }\n }", "public static function removeAll(){\n\n foreach(static::all() as $key => $value){\n static::remove($key);\n }\n }", "protected function entityDeleteMultiple($fids) {\n $files = file_load_multiple($fids);\n foreach ($files as $file) {\n file_delete($file);\n }\n }", "function deleteAllItems($db, $resource_pk) {\r\n\r\n// Delete any ratings\r\n deleteAllRatings($db, $resource_pk);\r\n\r\n// Delete the items\r\n $prefix = DB_TABLENAME_PREFIX;\r\n $sql = <<< EOD\r\nDELETE FROM {$prefix}item\r\nWHERE (resource_link_pk = :resource_pk)\r\nEOD;\r\n\r\n $query = $db->prepare($sql);\r\n $query->bindValue('resource_pk', $resource_pk, PDO::PARAM_STR);\r\n $ok = $query->execute();\r\n\r\n return $ok;\r\n\r\n }", "public function clearAll() {\n $list = scandir(self::ROOT_PATH . \"/public/{$this->storagePath}\");\n foreach ($list as $file) {\n if ($file == '.' || $file == '..') {\n continue;\n }\n $filePath = self::ROOT_PATH . \"/public/{$this->storagePath}/$file\";\n unlink($filePath);\n }\n $this->_tableGw->delete();\n }", "public function cleanAll()\n {\n $this->filesystem->remove(self::getFilesList());\n }", "function Clear() {\n\t\t\t$s3objects = $this->ListAlls3objects();\n\t\t\t/* delete each one */\n\t\t\tforeach($s3objects AS $s3object) {\n\t\t\t\t$s3object->Delete();\n\t\t\t\tunset($s3object);\n\t\t\t}\n\t\t}", "public function removeAll(): void;", "private function deleteTemporaryFiles()\n {\n foreach ($this->temp as $file) {\n if (file_exists($file)) {\n unlink($file);\n }\n }\n\n $this->temp = [];\n }", "protected function avantSuppression() {\n $passagers = $this->getListePassagers();\n foreach ($passagers as $passager) {\n $passager->supprimer();\n }\n }", "public function bulk_destroy(Request $request)\n {\n $banners = Banners::find($request->ids);\n\n foreach ($banners as $item) {\n //languages\n $languages = Language::all();\n if($languages->count()){\n foreach ($request->language as $language) {\n $banners_trans = BannersTrans::where('lang', '=', $language)->where('tid', '=', $item->id)->first();\n\n if($banners_trans) {\n $banners_trans->delete();\n }\n }\n $check_banners_trans = BannersTrans::where('tid', '=', $item->id)->first();\n if(!$check_banners_trans){\n $item->delete();\n }\n }\n // end languages\n }\n \n Flash::success(trans('backend.deleted_successfully'));\n $Currentlanguage = Lang::getLocale();\n return redirect(''.$Currentlanguage.'/admin/banners');\n }", "public function deleteToList(&$firstMultiTabMats){\n $index = array_search($this, $firstMultiTabMats);\n unset($firstMultiTabMats[$index]);\n}", "public function deleteTemp()\n {\n $list=collect(Storage::disk(config('lopsoft.temp_disk'))->listContents(config('lopsoft.temp_dir'), true))\n\t ->each(function($file) {\n\t\t if ($file['type'] == 'file' && $file['timestamp'] < now()->subDays(config('lopsoft.garbagecollection_days'))->getTimestamp()) {\n\t\t\t Storage::disk(config('lopsoft.temp_disk'))->delete($file['path']);\n\t\t }\n });\n }", "public function delete()\n {\n $sql = \"DELETE FROM \" . TB_USAGE . \" WHERE mix_id = {$this->db->sqltext($this->mix_id)}\";\n $this->db->exec($sql);\n\n //\tremove everything from cache\n $cache = VOCApp::getInstance()->getCache();\n if ($cache) {\n $cache->flush();\n }\n }", "public function deleteAll() {\n if (isset($this::$has)) {\n foreach ($this::$has as $key => $value) {\n if(isset($this->$key)) {\n foreach ($this->$key as $item) {\n $item->deleteAll();\n }\n }\n }\n }\n $this->delete();\n }", "public function rmFromListRemovesElementsFromCommaSeparatedListDataProvider() {}", "public function removeAll();", "public function removeAll();", "function delete_all()\r\n\t{\r\n\t\tif ( ! empty($this->all))\r\n\t\t{\r\n\t\t\tforeach ($this->all as $item)\r\n\t\t\t{\r\n\t\t\t\tif ( ! empty($item->id))\r\n\t\t\t\t{\r\n\t\t\t\t\t$item->delete();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$this->clear();\r\n\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\r\n\t\treturn FALSE;\r\n\t}", "function RemoveLayout($layout_id){\n\t//Making a query to get the location of the file\t\n\t$stringBuilder = \"SELECT l.default_background, fdb.location AS backgroundLocation, l.logo, flogo.location AS logoLocation \";\n\t$stringBuilder .= \"FROM layout l \";\n\t$stringBuilder .= \"INNER JOIN `file` fdb ON fdb.file_id=l.default_background \";\n\t$stringBuilder .= \"INNER JOIN `file` flogo ON flogo.file_id=l.logo \";\n\t$stringBuilder .= \"WHERE l.layout_id=? \";\n\t\n\t// Preparing query\n\t$query = GetDatabaseConnection()->prepare($stringBuilder);\n\t$query->execute(array($layout_id)); //Putting in the parameters\n\t$result = $query->fetchAll(); //Fetching it\n\n\tforeach ($result as $row) {\n\t\t//Putting the name together\n\t\t$default_background = $row[\"default_background\"];\n\t\t$default_background_location = $_SERVER[\"DOCUMENT_ROOT\"] . $row[\"backgroundLocation\"];\n\t\t$logo = $row[\"logo\"];\n\t\t$logo_location = $_SERVER[\"DOCUMENT_ROOT\"] . $row[\"logoLocation\"];\n\n\t\tif (unlink($default_background_location) && unlink($logo_location)){ //Removing the files\n\t\t\t//Making the delete query\n\t\t\t$stringBuilder = \"DELETE FROM layout WHERE layout_id=? \";\n\t\t\t//preparing the query\n\t\t\t$query = GetDatabaseConnection()->prepare($stringBuilder);\n\t\t\tif($query->execute(array($layout_id))){\n\n\t\t\t\t$stringBuilder = \"DELETE FROM `file` WHERE file_id=? \";\n\t\t\t\t//preparing the query\n\t\t\t\t$query = GetDatabaseConnection()->prepare($stringBuilder);\n\n\t\t\t\tif($query->execute(array($default_background)) && $query->execute(array($logo))){\n\t\t\t\t\techo \"<div class=\\\"alert alert-success alert-dismissible fade show\\\" role=\\\"alert\\\"><button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\" aria-label=\\\"Close\\\"><span aria-hidden=\\\"true\\\">&times;</span></button>De opmaak is verwijderd</div>\";\n\t\t\t\t} else {\n\t\t\t\t\techo \"<div class=\\\"alert alert-danger\\\" role=\\\"alert\\\">Er is iets fout gegaan</div>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\techo \"<div class=\\\"alert alert-danger\\\" role=\\\"alert\\\">Er is iets fout gegaan</div>\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"<div class=\\\"container-fluid\\\"><div class=\\\"alert alert-danger\\\" role=\\\"alert\\\">Er is iets fout gegaan</div></div>\";\n\t\t}\n\t}\n}", "function delete_all()\n\t\t{\n\t\t\tif($this->input->post('checkbox_value'))\n\t\t\t{\n\t\t\t\t$id = $this->input->post('checkbox_value');\n\t\t\t/*$imgpic = $this->db->get_where('users' , array('ID' => $id))->result();\n\t\t\tforeach ($imgpic as $img_delete)\n\t\t\t{\n\n\t\t\t\t$path = './uploads/admin/'.$img_delete->image;\n\t\t\t\tunlink($path);\n\t\t\t}*/\n\t\t\tfor($count = 0; $count < count($id); $count++)\n\t\t\t{\n\t\t\t\t$this->AboutModel->delete($id[$count]);\n\t\t\t}\n\t\t}\n\t}", "public function destroy($ids)\n {\n //\n $ids = explode(',', $ids);\n if ($ids[0] == 'on') {\n unset($ids[0]);\n }\n foreach ($ids as $id) {\n $slider = Slider::findOrFail($id);\n $img_path = base_path() . '/uploads/slider/';\n\n if ($slider->image != null) {\n unlink(sprintf($img_path . '%s', $slider->image));\n }\n $slider->delete();\n }\n }", "public function invalidateAll() : void\n {\n $files = glob($this->path . \"/*\"); // get all file names\n foreach ($files as $file) { // iterate files\n if (is_file($file)) {\n unlink($file); // delete file\n }\n }\n }", "function supp_element_list($supp, $list){\n $lid = get_id($list);\n //supprimer\n if ($lid!=-1){\n \t$SQL = \"DELETE FROM element_list WHERE element = '$supp' and list='$lid'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n }\n}", "public function destroy($ids)\n {\n //\n $ids = explode(',', $ids);\n if ($ids[0] == 'on') {\n unset($ids[0]);\n }\n foreach ($ids as $id) {\n $setting = Setting::findOrFail($id);\n $img_path = base_path() . '/uploads/setting/source/';\n $img_path200 = base_path() . '/uploads/setting/resize200/';\n $img_path800 = base_path() . '/uploads/setting/resize800/';\n $path = base_path('/uploads/setting/video/');\n\n\n if ($setting->logo && $setting->video != null) {\n unlink(sprintf($img_path . '%s', $setting->logo));\n unlink(sprintf($img_path200 . '%s', $setting->logo));\n unlink(sprintf($img_path800 . '%s', $setting->logo));\n unlink(sprintf($path . '%s', $setting->video));\n }\n $setting->delete();\n }\n }", "public function deleteAllResources() {\n\t\t$this->resources = array();\n\t}", "public function destroy($id)\n {\n $action=Action::find($id);\n $existingInPivot=Action::with('getResources')->where('id',$action->id)->get();\n foreach ($existingInPivot as $e) {\n $existingResources=[];\n foreach ($e->getResources as $existingResource) {\n $existingResources[]=$existingResource->id;\n }\n }\n\n try {\n DB::transaction(function () use ($action,$existingResources) {\n $action->delete();\n for ($i=0; $i <count($existingResources) ; $i++) { \n $action->getResources()->detach($existingResources[$i]);\n }\n });\n } catch (Exception $exc) {\n session()->flash('message.type', 'danger');\n session()->flash('message.content', 'Erreur lors de la suppression');\n// echo $exc->getTraceAsString();\n }\n session()->flash('message.type', 'success');\n session()->flash('message.content', 'Action supprimer avec succès!');\n return redirect()->route('actions.index');\n}", "function remove_uploaded_asset(string $name) {\n\t\t$this->readychk();\n\t\tfor ($i = 0; $i < count($this->assets); $i++) {\n\t\t\tif ($this->assets[$i]->get_filename() === $name) {\n\t\t\t\t$this->assets[$i]->remove();\n\t\t\t\tunset($this->assets[$i]);\n\t\t\t\t$this->assets = array_values($this->assets);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tthrow new ArgException(\"Asset '$name' doesn't exist.\");\n\t}", "public function undelete(array $ids);", "protected function cleanup()\n {\n foreach ($this->temp_files as $file) {\n $this->filesystem->remove($file);\n }\n $this->temp_files = [];\n }", "private function deleteRecords(){\r\n\t\r\n\t\t$fileNames = explode(',', $this->collection['images']);\r\n\t\t// remove imagerecords which are not used anymore\r\n\t\tforeach($this->images as $filename => $image){\r\n\t\t\tif(array_search($filename, $fileNames) === false){\r\n\t\t\r\n\t\t\t\t$this->db->exec_DELETEquery('tx_gorillary_images', \"image='$filename' AND collection='\".$this->collection['uid'].\"'\");\r\n\t\t\t\t//unset ($this->images[$filename]);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function actionDeleteAll() {\n SupItemsSync::model()->deleteAll();\n\n $this->redirect(array('index'));\n }", "public static function massdelete($items) {\r\n\t\t$retval = Doctrine_Query::create ()->delete ()->from ( 'Wiki w' )->whereIn ( 'w.wiki_id', $items )->execute ();\r\n\t\treturn $retval;\r\n\t}", "public static function cleanAllLists() {\r\n \tself::$list=array();\r\n }", "public function clearAll();", "public function clearAll();", "public function cleanTmpFolder() {\n\t\tarray_map('unlink', glob($this->settings->tmp_path . '/*'));\n\t}", "public static function delAll () {\n\t\tself::$timeArray = Array ();\n\t}", "static public function deleteMultiple($ids) {\n return entity_delete_multiple('nuntius_room', $ids);\n }", "public function deleteTagMaps()\n {\n foreach ($this->tags as $tag) {\n $tag->tagObjectMap->delete();\n }\n }", "public function destroy()\n {\n $this->items = array();\n }", "function cleanup_files() {\n\t$files = glob(\"./*.{mp4,mp3,zip}\", GLOB_BRACE);\n\tforeach ($files as $file) {\n\t\tunlink($file);\n\t}\n}", "public function delete_multipleimage() \n {\n \n $fullpath = './assets/uploads/fashion_prod/';\n $bigpath = './assets/uploads/fashion_prod/mainimage/';\n $thumbpath = './assets/uploads/fashion_prod/thumbs/';\n $picture=$_POST[\"key\"];\n \n unlink($fullpath.$picture);\n unlink($bigpath.$picture);\n unlink($thumbpath.$picture);\n $this->db->delete('productimages', array('imagename' => $picture));\n echo true;\n \n }", "public function deleteAllExpired()\n {\n $repository = $this->doctrine->getRepository(Report::class);\n $deleteList = $repository->findAllExpired();\n\n foreach ($deleteList as $report){\n\n if($report->getPictRef()!== null){\n unlink(\"../public/userImages/{$report->getPictRef()}\");\n }\n\n $this->doctrine->remove($report);\n }\n\n $this->doctrine->flush();\n }", "private function purgeExisting() {\n $paths = array('tax/calculation', 'tax/calculation_rate', 'tax/calculation_rule');\n\n foreach( $paths as $path ) {\n $existingRecords = Mage::getModel($path)->getCollection();\n\n foreach( $existingRecords as $record ) {\n\n try {\n $record->delete();\n }\n catch (Exception $e) {\n Mage::getSingleton('core/session')->addError(\"There was an error deleting from Magento model \" . $path);\n }\n\n }\n\n }\n\n }", "function deleteAllRatings($db, $resource_pk) {\r\n\r\n $prefix = DB_TABLENAME_PREFIX;\r\n $sql = <<< EOD\r\nDELETE FROM {$prefix}rating\r\nWHERE resource_link_pk = :resource_pk\r\nEOD;\r\n\r\n $query = $db->prepare($sql);\r\n $query->bindValue('resource_pk', $resource_pk, PDO::PARAM_INT);\r\n $query->execute();\r\n\r\n }", "public function clearRootAssetMappings();", "public function __destruct() {\n\t\t$filesystem = $this->filesystem;\n\t\t$this->tmpFiles->each(function($filePath) use($filesystem){\n\t\t\t$filesystem->delete($filePath);\n\t\t});\n\t}", "function supp_list($list){\n $lid = get_id($list);\n //supp\n if ($lid!=-1){\n //supprimer element de la liste\n\t$SQL = \"DELETE FROM element_list WHERE list='$lid'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n //supprimer list\n \t$SQL = \"DELETE FROM list_list WHERE list='$list'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute(); }\n}", "function deleteall() {\n\t\t$this->_query( \"DELETE FROM $0\" );\n\t}" ]
[ "0.7267726", "0.6095042", "0.6054584", "0.60033196", "0.5995054", "0.59788436", "0.59439737", "0.59067565", "0.5851085", "0.58148855", "0.58003813", "0.57591504", "0.57591504", "0.57591504", "0.5752122", "0.57368726", "0.5729381", "0.5710298", "0.5706146", "0.5694879", "0.5694416", "0.56679577", "0.5652457", "0.5644479", "0.5616437", "0.5615955", "0.5614651", "0.56139773", "0.56124115", "0.55911773", "0.557492", "0.557492", "0.5568502", "0.55568296", "0.5548153", "0.55358636", "0.5515072", "0.5508456", "0.55072963", "0.5502507", "0.5502507", "0.5502507", "0.5502507", "0.55019337", "0.55019337", "0.54999435", "0.54917055", "0.5484889", "0.5481374", "0.5476075", "0.5474975", "0.54711443", "0.54681134", "0.54669225", "0.54588073", "0.5448377", "0.54429257", "0.54422843", "0.5404255", "0.5396845", "0.53967035", "0.53960586", "0.5391892", "0.53905183", "0.5384636", "0.5378647", "0.5374893", "0.5374893", "0.5369385", "0.53683996", "0.536468", "0.5359408", "0.5353452", "0.53493327", "0.5349091", "0.5348665", "0.5337081", "0.5336313", "0.5323958", "0.5323957", "0.5319967", "0.531722", "0.5316086", "0.5316051", "0.5295073", "0.5295073", "0.52915233", "0.5289907", "0.52885133", "0.52831924", "0.52820706", "0.52816826", "0.52815276", "0.5276026", "0.52751863", "0.52733797", "0.52705514", "0.5269072", "0.5265834", "0.5259566" ]
0.54032046
59
Move all assets in the list to the public store
protected function swapAll($assets) { if (empty($assets)) { return; } $store = $this->getAssetStore(); // The `swap` method was introduced in the 1.4 release. It wasn't added to the interface to avoid breaking // custom implementations. If it's not available on our store, we fall back to a publish/protect if (method_exists($store, 'swapPublish')) { foreach ($assets as $asset) { $store->swapPublish($asset['Filename'], $asset['Hash']); } } else { foreach ($assets as $asset) { $store->publish($asset['Filename'], $asset['Hash']); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function moveAssets()\n {\n foreach ($this->reports as $report) {\n $old_file = config('import.import_assets_reports_path') . DIRECTORY_SEPARATOR . $report->file;\n $new_file = config('momentum.reports_path') . DIRECTORY_SEPARATOR . $report->file;\n\n $this->moveFile($old_file, $new_file);\n }\n\n foreach ($this->organizations as $organization) {\n // not every organization has a logo\n if (!$organization->logo) {\n continue;\n }\n\n $old_file = config('import.import_assets_logos_path') . DIRECTORY_SEPARATOR . $organization->logo;\n $new_file = config('momentum.logos_path') . DIRECTORY_SEPARATOR . $organization->logo;\n\n $this->moveFile($old_file, $new_file);\n }\n }", "public function purgeAll() {\n\t\tset_time_limit(300);\n\t\t$this->load->model(\"filehandlerbase\");\n\t\t$fileList = $this->filehandlerbase->findDeletedItems();\n\t\t$mfa = $this->input->post(\"mfa\");\n\t\t$serial = $this->input->post(\"arn\");\n\n\t\t/**\n\t\t * we need to cache this because MFA is only good once\n\t\t */\n\t\t$lastUsedToken = null;\n\t\tforeach($fileList as $fileEntry) {\n\t\t\t$fileHandler = $this->filehandler_router->getHandlerForObject($fileEntry->getFileObjectId());\n\t\t\tif(!$fileHandler) { \n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(!$fileHandler->loadFromObject($fileEntry)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($lastUsedToken)) {\n\t\t\t\t$fileHandler->s3model->sessionToken = $lastUsedToken;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif(!$fileHandler->deleteSource($serial,$mfa)) {\n\t\t\t\t\t$this->logging->logError(\"purgeAll\",\"Could not delete asset with key\" . $fileEntry->getFileObjectId());\n\t\t\t\t}\n\t\t\t\t$lastUsedToken = $fileHandler->s3model->sessionToken;\n\t\t\t}\n\t\t\tcatch (Exception $e) {\n\t\t\t\techo $e;\n\t\t\t\techo \"Deletion fail\";\n\t\t\t}\n\n\t\t}\n\n\t\tinstance_redirect(\"/admin\");\n\t}", "public function flushAssets()\n\t{\n\t\t(new Version)->refreshMediaVersion();\n\t}", "function __reimportPhotos(){\n\t\t$this->Asset->disablePermissionable();\n\t\t$this->Asset->recursive=0;\n\t\t$json = $this->Asset->find('all', array('fields'=>'json_src'));\n\t\t$json =Set::extract($json, '/Asset/json_src');\n\t\tforeach ($json as $row) {\n\t\t\t$imgSrc = json_decode($row);\n\t\t\t$src = \"Summer2009/\".basename($imgSrc->orig);\n\t\t\t$dest = $imgSrc->preview;\n\t\t\t$src_baseurl = Configure::read('path.local.preview');\n\t\t\t$dest_baseurl = Configure::read('stageroot.basepath');\n\t\t\t$shell_cmd[] =\"cp {$src_baseurl}/{$src} {$dest_baseurl}/{$dest}\";\n\t\t\t//\t\t\tmkdir(dirname(Configure::read('stageroot.basepath').\"/{$dest}\"), 0777, $recursive=true);\n\t\t\t//\t\t\tcopy( Configure::read('path.local.preview').\"/{$src}\", Configure::read('stageroot.basepath').\"/{$dest}\");\n\t\t}\n\t\tdebug($shell_cmd);\n\t}", "public function moveItems2DownloadList($cartlist = array())\n {\n \n $insert_item = array();\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction(); \n $l_table = Engine_Api::_()->getDbTable('lists', 'mp3music'); \n foreach($cartlist as $key=>$value)\n {\n if ($value['type'] == 'song') \n {\n $insert_item = array($value['item_id'],0,Engine_Api::_()->user()->getViewer()->getIdentity());\n }\n if ($value['type'] == 'album') \n {\n $insert_item = array(0,$value['item_id'],Engine_Api::_()->user()->getViewer()->getIdentity());\n }\n $list = $l_table->createRow();\n $list->dl_song_id = $insert_item[0];\n $list->dl_album_id = $insert_item[1];\n $list->user_id = $insert_item[2];\n $list->save();\n }\n try {\n $db->commit();\n } catch (Exception $ex) {\n $db->rollback();\n break;\n } \n }", "private function saveItems()\n {\n $this->storage->save($this->items);\n }", "public function archiveObjects()\n {\n $randProbability = mt_rand(1, 1000);\n \n if ($randProbability < 750) {\n return;\n }\n \n $this->session->set('RKDownLoadModuleAutomaticArchiving', true);\n \n // perform update for files becoming archived\n $logArgs = ['app' => 'RKDownLoadModule', 'entity' => 'file'];\n $this->logger->notice('{app}: Automatic archiving for the {entity} entity started.', $logArgs);\n $repository = $this->entityFactory->getRepository('file');\n $repository->archiveObjects($this->permissionApi, $this->session, $this->translator, $this->workflowHelper, $this->hookHelper);\n $this->logger->notice('{app}: Automatic archiving for the {entity} entity completed.', $logArgs);\n \n $this->session->del('RKDownLoadModuleAutomaticArchiving');\n }", "function moveAssignmentFilters() {\n try {\n $assignment_filters_table = TABLE_PREFIX . 'assignment_filters';\n $data_filters_table = TABLE_PREFIX . 'data_filters';\n $homescreen_tabs_table = TABLE_PREFIX . 'homescreen_tabs';\n\n DB::beginWork('Move assignment filters to the new storage @ ' . __CLASS__);\n\n $assignment_filters = DB::execute(\"SELECT * FROM $assignment_filters_table\");\n if($assignment_filters) {\n $assignment_filter_tabs_map = $this->getTabsThatUseAssignmentFilters();\n\n foreach($assignment_filters as $filter) {\n $old_assignment_filter_id = (integer) $filter['id'];\n\n DB::execute(\"INSERT INTO $data_filters_table (type, name, raw_additional_properties, created_on, created_by_id, created_by_name, created_by_email, is_private) VALUES ('AssignmentFilter', ?, ?, ?, ?, ?, ?, ?)\", $filter['name'], $filter['raw_additional_properties'], $filter['created_on'], $filter['created_by_id'], $filter['created_by_name'], $filter['created_by_email'], $filter['is_private']);\n\n $new_assignmnet_filter_id = DB::lastInsertId();\n\n if(isset($assignment_filter_tabs_map[$old_assignment_filter_id]) && count($assignment_filter_tabs_map[$old_assignment_filter_id])) {\n DB::execute(\"UPDATE $homescreen_tabs_table SET raw_additional_properties = ? WHERE id IN (?)\", serialize(array('assignment_filter_id' => $new_assignmnet_filter_id)), $assignment_filter_tabs_map[$old_assignment_filter_id]);\n } // if\n } // foreach\n } // if\n\n DB::commit('Assignment filters moved to the new storage @ ' . __CLASS__);\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n try {\n $table_list = DB::listTables(TABLE_PREFIX);\n\n if(in_array($assignment_filters_table, $table_list)) {\n DB::execute(\"DROP TABLE $assignment_filters_table\");\n } // if\n\n if(in_array(TABLE_PREFIX . 'milestone_filters', $table_list)) {\n DB::execute('DROP TABLE ' . TABLE_PREFIX . 'milestone_filters');\n } // if\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function reset()\n {\n $db = Zend_Registry::get('dbAdapter');\n $dbname = Zend_Registry::get('configDatabase')->database->params->dbname;\n\n $stmt = $db->query(\"SELECT * FROM INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = '\".$dbname.\"'\");\n while ($row = $stmt->fetch()) {\n $db->query('DELETE FROM `'.$row['TABLE_NAME'].'`');\n }\n\n $path = UtilityComponent::getDataDirectory('assetstore');\n $dir = opendir($path);\n while ($entry = readdir($dir)) {\n if (is_dir($path.'/'.$entry) && !in_array($entry, array('.', '..'))\n ) {\n $this->_rrmdir($path.'/'.$entry);\n }\n }\n\n $path = UtilityComponent::getDataDirectory('thumbnail');\n $dir = opendir($path);\n while ($entry = readdir($dir)) {\n if (is_dir($path.'/'.$entry) && !in_array($entry, array('.', '..'))\n ) {\n $this->_rrmdir($path.'/'.$entry);\n }\n }\n\n if (file_exists(LOCAL_CONFIGS_PATH.'/ldap.local.ini')) {\n unlink(LOCAL_CONFIGS_PATH.'/ldap.local.ini');\n }\n\n /** @var UserModel $userModel */\n $userModel = MidasLoader::loadModel('User');\n\n $admin = $userModel->createUser(MIDAS_DEMO_ADMIN_EMAIL, MIDAS_DEMO_ADMIN_PASSWORD, 'Demo', 'Administrator', 1);\n $userModel->createUser(MIDAS_DEMO_USER_EMAIL, MIDAS_DEMO_USER_PASSWORD, 'Demo', 'User', 0);\n\n /** @var CommunityModel $communityModel */\n $communityModel = MidasLoader::loadModel('Community');\n $communityDao = $communityModel->createCommunity(\n 'Demo',\n 'This is a demo community',\n MIDAS_COMMUNITY_PUBLIC,\n $admin,\n MIDAS_COMMUNITY_CAN_JOIN\n );\n\n /** @var AssetstoreModel $assetstoreModel */\n $assetstoreModel = MidasLoader::loadModel('Assetstore');\n $assetstoreDao = new AssetstoreDao();\n $assetstoreDao->setName('Default');\n $assetstoreDao->setPath(UtilityComponent::getDataDirectory('assetstore'));\n $assetstoreDao->setType(MIDAS_ASSETSTORE_LOCAL);\n $assetstoreModel->save($assetstoreDao);\n\n /** @var SettingModel $settingModel */\n $settingModel = MidasLoader::loadModel('Setting');\n $settingModel->setConfig('default_assetstore', $assetstoreDao->getKey());\n\n $options = array('allowModifications' => true);\n $config = new Zend_Config_Ini(CORE_CONFIGS_PATH.'/application.ini', null, $options);\n $config->global->dynamichelp = 1;\n $config->global->environment = 'production';\n $config->global->application->name = 'Midas Platform - Demo';\n $description = 'Midas Platform is an open-source toolkit that enables the\n rapid creation of tailored, web-enabled data storage. Designed to meet\n the needs of advanced data-centric computing, Midas Platform addresses\n the growing challenge of large data by providing a flexible, intelligent\n data storage system. The system integrates multimedia server technology\n with other open-source data analysis and visualization tools to enable\n data-intensive applications that easily interface with existing\n workflows.';\n $config->global->application->description = $description;\n\n $enabledModules = array(\n 'api',\n 'metadataextractor',\n 'oai',\n 'statistics',\n 'scheduler',\n 'thumbnailcreator',\n 'visualize',\n );\n foreach ($enabledModules as $module) {\n if (file_exists(LOCAL_CONFIGS_PATH.'/'.$module.'.demo.local.ini')) {\n copy(\n LOCAL_CONFIGS_PATH.'/'.$module.'.demo.local.ini',\n LOCAL_CONFIGS_PATH.'/'.$module.'.local.ini'\n );\n $config->module->$module = 1;\n } else {\n unlink(LOCAL_CONFIGS_PATH.'/'.$module.'.local.ini');\n }\n }\n\n $writer = new Zend_Config_Writer_Ini();\n $writer->setConfig($config);\n $writer->setFilename((LOCAL_CONFIGS_PATH.'/application.local.ini'));\n $writer->write();\n\n $configGlobal = new Zend_Config_Ini(APPLICATION_CONFIG, 'global', true);\n Zend_Registry::set('configGlobal', $configGlobal);\n\n /** @var UploadComponent $uploadComponent */\n $uploadComponent = MidasLoader::loadComponent('Upload');\n $uploadComponent->createUploadedItem(\n $admin,\n 'midasLogo.gif',\n BASE_PATH.'/core/public/images/midasLogo.gif',\n $communityDao->getPublicFolder(),\n null,\n '',\n true\n );\n $uploadComponent->createUploadedItem(\n $admin,\n 'cow.vtp',\n BASE_PATH.'/modules/demo/public/'.$this->moduleName.'/cow.vtp',\n $communityDao->getPublicFolder(),\n null,\n '',\n true\n );\n }", "public function onPostDispatch()\n {\n /** @var Shipperhq_Shipper_Model_Storage[] $storageList */\n $storageList = Mage::helper('shipperhq_shipper')->storageManager()->getStorageObjects();\n foreach ($storageList as $storage) {\n if ($storage->hasDataChanges() && $storage->getId()) {\n $this->_saveStorageInstance($storage);\n }\n }\n }", "public function addAdminAssets() {}", "private static function deleteAssets() {\n // Fail due to invalid asset deletors \n assert(isset(self::$assetDeletors));\n\n // Remove assets \n foreach (self::$assetDeletors as $deletor) {\n $deletor->delete();\n }\n\n // Clear AssetDeletors cache\n self::$assetDeletors = array();\n }", "protected function publishAll($assets)\n {\n if (empty($assets)) {\n return;\n }\n\n $store = $this->getAssetStore();\n foreach ($assets as $asset) {\n $store->publish($asset['Filename'], $asset['Hash']);\n }\n }", "public static function downloadFromStorage(): void\n {\n $files = Storage::disk(config('translation-manager.storage.disk'))\n ->allFiles(config('translation-manager.storage.path'));\n\n collect($files)\n ->each(static function ($file): void {\n Storage::disk('local')->put(\n self::STORAGE_PREFIX . $file,\n Storage::disk(config('translation-manager.storage.disk'))->get($file),\n );\n });\n }", "public function onBeforeWrite()\n {\n if (!$this->hasAssets()) {\n return;\n }\n\n // Prepare blank manipulation\n $manipulations = new AssetManipulationList();\n\n // Mark overwritten object as deleted\n if ($this->owner->isInDB()) {\n $priorRecord = DataObject::get(get_class($this->owner))->byID($this->owner->ID);\n if ($priorRecord) {\n $this->addAssetsFromRecord($manipulations, $priorRecord, AssetManipulationList::STATE_DELETED);\n }\n }\n\n // Add assets from new record with the correct visibility rules\n $state = $this->getRecordState($this->owner);\n $this->addAssetsFromRecord($manipulations, $this->owner, $state);\n\n // Whitelist assets that exist in other stages\n $this->addAssetsFromOtherStages($manipulations);\n\n // Apply visibility rules based on the final manipulation\n $this->processManipulation($manipulations);\n }", "public function onAfterDelete()\n {\n if (!$this->hasAssets()) {\n return;\n }\n\n // Prepare blank manipulation\n $manipulations = new AssetManipulationList();\n\n // Add all assets for deletion\n $this->addAssetsFromRecord($manipulations, $this->owner, AssetManipulationList::STATE_DELETED);\n\n // Whitelist assets that exist in other stages\n $this->addAssetsFromOtherStages($manipulations);\n\n // Apply visibility rules based on the final manipulation\n $this->processManipulation($manipulations);\n }", "private function assetPublisher() {\n $assetOrigin = $this->getDir().$this->getPathConfig().'/assets';\n if ($this->fs->exists($assetOrigin)) {\n $assetDest = $this->getPublicPath($this->getPathConfig());\n $this->fs->copyDirectory($assetOrigin,$assetDest);\n }\n }", "protected function publishAssets()\n {\n $assets = [];\n\n foreach ($this->assets as $location => $asset) {\n $assets[$this->basePath($location)] = base_path($asset);\n }\n\n $this->publishes($assets);\n }", "public function addAssets() {}", "public function addAssets() {}", "public function storeOriginals()\n {\n $this->originals = $this->toArray();\n }", "protected function persistObjects() {}", "function shiftList() {\n\t\t$rest = array_splice($this->galleysToUpdate, \\dfm\\processor::maxUpdatesAtOnce);\n\t\t$ids = array_map(function($item) {\n\t\t\treturn $item->galley->getId();\n\t\t}, $rest);\n\t\t$this->continue = array(\n\t\t\t'galleyIds' => $ids,\n\t\t\t'updateFrontpages' => $this->updateFrontpages\n\t\t);\n\t}", "private function exportFilesAndClear()\n {\n foreach (File::allFiles(Auth()->user()->getPublicPath()) as $file) {\n if (strpos($file, \".jpg\") !== false || strpos($file, \".png\") !== false) {\n $name = $this->reformatName($file);\n File::move($file, Auth()->user()->getPublicPath() . '/' . $name);\n }\n }\n $files = scandir(Auth()->user()->getPublicPath());\n foreach ($files as $key => $file) {\n if (is_dir(Auth()->user()->getPublicPath() . '/' . $file)) {\n if ($file[0] != '.') {\n File::deleteDirectory(Auth()->user()->getPublicPath() . '/' . $file);\n }\n } else {\n if (strpos($file, \".jpg\") === false && strpos($file, \".png\") === false) {\n File::delete(Auth()->user()->getPublicPath() . '/' . $file);\n }\n }\n }\n return null;\n }", "protected function all() : void\n {\n File::ensureDirectoryExists(Path::storage('app/public'));\n File::ensureDirectoryExists(Path::storage('app/private'));\n\n File::ensureDirectoryExists(Path::storage('framework/logs'));\n File::ensureDirectoryExists(Path::storage('framework/views'));\n\n File::put(Path::storage('framework/logs/laravel.log'), '');\n\n Artisan::call('storage:link --force');\n }", "function persistAll() ;", "public function backUp()\n {\n $inventory = $this->inventory;\n $this->oldInventory = $inventory;\n return;\n }", "protected function storeFiles()\n {\n $this->log(sprintf('%s', __METHOD__), 'debug');\n\n $this->log(sprintf('Playlist - Writing file list to temporary file. (%s)', basename($this->tempFilesFromFilename)), 'info');\n $stream = new Stream(fopen($this->tempFilesFromFilename, 'w'));\n\n try {\n $stream->write($this->filesToString());\n } catch (\\Exception $e) {\n $this->log(sprintf('Playlist - Error while writing to file %s. (%s)', basename($this->tempFilesFromFilename), $e->getMessage()), 'error');\n }\n\n $stream->close();\n }", "public function flushItems()\n\t{\n\t\t$this->items = array();\n\t}", "public function storeAll(iterable $snapshots): void;", "public static function storeAll()\n {\n foreach (self::$_activeFilters as $target => $filter) {\n $filter->store();\n }\n }", "function damopen_assets_library_post_update_change_public_files_to_private() {\n $connection = Database::getConnection();\n // Select the uri from the database.\n $query = $connection\n ->select('file_managed', 'fm')\n ->fields('fm', ['fid', 'uri']);\n $result = $query->execute();\n\n $fileStorage = Drupal::entityTypeManager()->getStorage('file');\n $fileSystem = Drupal::service('file_system');\n $priv_path = $fileSystem->realpath('private://');\n\n foreach ($result as $row) {\n $uri = str_replace('public://', '', $row->uri);\n $file_name = substr(strrchr($uri, '/'), 1);\n $folder = str_replace($file_name, '', $uri);\n // Check if the directory already exists.\n // Directory does not exist, so lets create it.\n if (\n !is_dir($priv_path . '/' . $folder)\n && !mkdir($concurrentDirectory = $priv_path . '/' . $folder, 0775, TRUE)\n && !is_dir($concurrentDirectory)\n ) {\n throw new RuntimeException(sprintf('Directory \"%s\" was not created', $concurrentDirectory));\n }\n\n // Move the file to the private folder.\n $new_uri = $fileSystem->move('public://' . $uri, 'private://' . $uri, FileSystemInterface::EXISTS_REPLACE);\n\n if ($new_uri !== NULL) {\n // Replace the uri with the new private schema's uri.\n /** @var \\Drupal\\file\\FileInterface $file */\n $file = $fileStorage->load($row->fid);\n $file->setFileUri($new_uri);\n $file->save();\n }\n }\n}", "public function archiver()\n {\n if(\\Request::ajax())\n {\n $numbers = substr( \\Input::get('boxesarchives'),0,-1);\n $ids = explode(',',$numbers);\n $ids = array_unique($ids);\n foreach($ids as $id)\n {\n $child = Child::findOrFail($id);\n $child->bills()->delete();\n $child->attendances()->delete();\n $child->delete();\n if($child->trashed())\n {\n echo 'oui';\n }\n }\n }\n }", "private function store() {\n\n\t\tforeach ($this->filesToStore as $fileToStore) {\n\t\t\t$storedFile = null;\n\n\t\t\t$title = strtoupper($fileToStore['type']) . \"-\" . $fileToStore['host'] . \"-\" . $fileToStore['file_name'];\n\t\t\t$name = strtoupper($fileToStore['type']) . \"-\" . $fileToStore['host'] . \"-\" . $fileToStore['backup_name'];\n\t\t\t$description = strtoupper($fileToStore['type']) . \" on \" . $fileToStore['host'] . \" backup file\";\n\n\t\t\t//store files to remote storage or local\n\t\t\tforeach ($this->storages as $storage) {\n\n\t\t\t\t//store it to google drive\n\t\t\t\tif (isset($storage['type']) && $storage['type'] == strtolower('gdrive')) {\n\n\t\t\t\t\t$drive = new MaratusGoogleDrive($storage);\n\n\t\t\t\t\t$storedFile = $drive->store($fileToStore['file_path'], $title, $description);\n\n\t\t\t\t}\n\t\t\t\t//store it to dropbox\n\t\t\t\telse if (isset($storage['type']) && $storage['type'] == strtolower('dropbox')) {\n\n\t\t\t\t\t$dBox = new MaratusDropbox($storage);\n\n\t\t\t\t\t$storedFile = $dBox->store($fileToStore['file_path'], $title);\n\n\t\t\t\t}\n\t\t\t\t//store it to copy.com\n\t\t\t\telse if (isset($storage['type']) && $storage['type'] == strtolower('copy')) {\n\n\t\t\t\t\t$copy = new MaratusCopy($storage);\n\n\t\t\t\t\t$storedFile = $copy->store($fileToStore['file_path'], $title);\n\n\t\t\t\t}\n\t\t\t\t//store it to local place\n\t\t\t\telse if (isset($storage['type']) && $storage['type'] == strtolower('local')) {\n\n\t\t\t\t\t$localStorage = new MaratusLocalStorage($storage);\n\n\t\t\t\t\t$storedFile = $localStorage->store($fileToStore['file_path'], $title);\n\n\t\t\t\t}\n\t\t\t\t//store it on ftp server\n\t\t\t\telse if (isset($storage['type']) && $storage['type'] == strtolower('ftp')) {\n\n\t\t\t\t\t$localStorage = new MaratusFtp($storage);\n\n\t\t\t\t\t$storedFile = $localStorage->store($fileToStore['file_path'], $title);\n\n\t\t\t\t}\n\n\t\t\t\t//add result\n\t\t\t\t$this->filesStored[] = array(\n\t\t\t\t\t'type' => $storage['type'],\n\t\t\t\t\t'name' => $name,\n\t\t\t\t\t'file_name' => $title,\n\t\t\t\t\t'description' => $description,\n\t\t\t\t\t'storege_result' => is_object($storedFile) ? (array) $storedFile : $storedFile,\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Remove backup file from disk\n\t\t\t */\n\t\t\t$filesystem = new Filesystem();\n\t\t\t$filesystem->remove($fileToStore['file_path']);\n\t\t}\n\t}", "public function actionDeleteAll() {\n SupItemsSync::model()->deleteAll();\n\n $this->redirect(array('index'));\n }", "public function flushSource()\n {\n if (is_file($this->getStoragePath())) {\n @unlink($this->getStoragePath());\n }\n }", "public function clearStorage(): void\n {\n// foreach ($this->remoteFilesystems as $filesystem) {\n// $contents = $filesystem->listContents('/', true);\n// foreach ($contents as $contentItem) {\n// if ('file' !== $contentItem['type']) {\n// continue;\n// }\n// $filesystem->delete($contentItem['path']);\n// }\n// }\n }", "protected function protectAll($assets)\n {\n if (empty($assets)) {\n return;\n }\n $store = $this->getAssetStore();\n foreach ($assets as $asset) {\n $store->protect($asset['Filename'], $asset['Hash']);\n }\n }", "public function clearItems()\n\t{\n\t\t$this->storage->clear();\n\t}", "public function cleanUpFolder()\r\n {\r\n $fs = new Filesystem();\r\n\r\n foreach($this->file_list as $file) :\r\n if ( preg_match('#^'.$this->destination_dir.'/#', $file))\r\n $fs->remove($file);\r\n endforeach;\r\n }", "public function clearAll() {\n $list = scandir(self::ROOT_PATH . \"/public/{$this->storagePath}\");\n foreach ($list as $file) {\n if ($file == '.' || $file == '..') {\n continue;\n }\n $filePath = self::ROOT_PATH . \"/public/{$this->storagePath}/$file\";\n unlink($filePath);\n }\n $this->_tableGw->delete();\n }", "protected function performActionList()\n\t{\n\t\t// copy order\n\t\t$this->performActionCopyOrder();\n\n\t\t// some other ...\n\t}", "public function clearRootAssetMappings();", "public function update(): void\n {\n $content = $this->getOriginalContent();\n\n $parsed = $this->parseContent($content);\n\n $this->storeList($parsed);\n }", "private static function toDelete(){\n $filesNotToDelete = [];\n $dir = public_path().'/images/';\n $filesInPublicFolder = scandir($dir);\n\n // izbacivanje assets foldera, .. i .\n $ignoreFiles = ['assets', '.', '..', 'pig.png', 'placeholder.png', 'logo.png', 'index.php'];\n foreach ($ignoreFiles as $toIgnore) {\n if (($key = array_search($toIgnore, $filesInPublicFolder)) !== false) {\n unset($filesInPublicFolder[$key]);\n }\n }\n // dd($filesInPublicFolder);\n $images = [];\n $collectionsOfObjectsWithImages = [Product::all(), ProductGroup::all(), Manufacturer::all(),\n Suggestion::all(), ImageSuggestion::all(), MainAd::all(),SecondAd::all()];\n\n foreach ($collectionsOfObjectsWithImages as $collection) {\n foreach ($collection as $object) {\n if($object->images->count()){\n foreach ($object->images as $image) {\n $images[] = $image->name;\n }\n }\n }\n }\n\n // dd($images);\n // dd(array_diff($filesInPublicFolder, $images));\n // dd($filesNotToDelete, $filesInPublicFolder);\n return $toDelete = array_diff($filesInPublicFolder, $images); //za fju array_dif vazan je redoslijed argumenata\n\n }", "public static function remove_all_stores()\n {\n }", "public function prepare_deployment() {\n if ( wpsho_fr()->is__premium_only() ) {\n\n $this->clear_file_list();\n\n $this->create_s3_deployment_list(\n $this->_archiveName,\n $this->_archiveName,\n $this->_remotePath\n );\n\n echo 'SUCCESS';\n }\n }", "public function actionUnpublishItems()\n {\n $civ = CatalogItemVariant::find()\n ->where(['published' => 0])\n ->asArray()\n ->all();\n\n if (!empty($civ)) {\n foreach ($civ as $ci) {\n $oCi = CatalogItem::findOne(['id' => $ci['product_id'], 'published' => 1]);\n if (!empty($oCi)) {\n $oCi->published = 0;\n $oCi->save();\n echo 'Unpublished catalog item id: ' . $ci['product_id'] . PHP_EOL;\n }\n }\n \n }\n }", "protected function tidyUpFiles() {\n\t\t/* load valid ids */\n\t\t$validIds = array();\n\t\t$result = $this->db->query('SELECT id FROM image');\n\t\tif ($result) {\n\t\t\twhile ($entry = $result->fetchArray(SQLITE3_NUM)) {\n\t\t\t\t$validIds[] = $entry[0];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* remove entries with missing file */\n\t\tforeach ($validIds as $id) {\n\t\t\tif (!is_file(self::getPath($id))) {\n\t\t\t\t$this->delete($id);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* delete from list what is not in the database */\n\t\tif ($dh = opendir(self::FILES_DIR)) {\n\t\t\twhile (($id = readdir($dh)) !== false) {\n\t\t\t\tif (preg_match('#^[0-9a-zA-Z]+$#', $id) && !in_array($id, $validIds) && $id != self::DATABASE_FILE) {\n\t\t\t\t\t$this->delete($id);\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($dh);\n\t\t}\n\t}", "public function importAll($force = false)\n {\n $siteConfig = SiteConfig::current_site_config();\n\n $this->getAllUploads();\n\n // Save the time the update was performed\n $siteConfig->VimeoFeed_LastSaved = SS_Datetime::now()->value;\n $siteConfig->write();\n }", "public function restore()\n\t{\n\t\t$this->files = array();\n\t}", "public function flush(): void\n {\n $this->list = [];\n }", "public static function moveDistResources(): void\n {\n $filesystem = new Filesystem();\n $rootDir = getcwd();\n\n $distSourceDir = sprintf('%s/vendor/backbee/toolbar-dist/dist', $rootDir);\n\n if (!is_dir($distSourceDir)) {\n return;\n }\n\n $destDir = sprintf('%s/web/static/back', $rootDir);\n $filesystem->mkdir($destDir);\n $filesystem->mirror(\n $distSourceDir,\n $destDir,\n null, [\n 'override' => true,\n 'delete' => true\n ]\n );\n }", "private function moveParts()\n {\n $filename = $this->substream->getFilename();\n for ($i = 1; $i <= $this->index; ++$i) {\n $indexed_filename = $this->getIndexPartFilename($filename, $i);\n $source = sys_get_temp_dir().'/'.$indexed_filename;\n $target = dirname($this->filename).'/'.$indexed_filename;\n if (!rename($source, $target)) {\n throw FileAccessException::failedOverwrite($source, $target);\n }\n }\n }", "public function unchangeAll(): void\n {\n $this->entries = [];\n\n if ($this->sourceContainer !== null) {\n foreach ($this->sourceContainer->getEntries() as $entry) {\n $this->entries[$entry->getName()] = clone $entry;\n }\n }\n $this->unchangeArchiveComment();\n }", "private function publishAssets()\n {\n $this->call('vendor:publish', [\n '--provider' => 'A17\\Twill\\TwillServiceProvider',\n '--tag' => 'assets',\n '--force' => true,\n ]);\n }", "public function UpdateStorageLocations()\r\n\t{\r\n\t\tself::$_tables[$this->_dbCatalog] = $this->GetStorageLocations();\r\n\t}", "public function persistAll() {}", "function storeImages()\n {\n }", "public static function upload_all(){\n $attachments = new \\CFCDN_Attachments();\n $attachments->upload_all();\n }", "public function resetExtensionCopyStorage() {}", "public function delete_all() {\n\t\t$this->_cache = array();\n\t\t$this->_collections = array();\n\t}", "function storeFiles()\n {\n }", "function execute()\r\n\t\t{\r\n\t\t\tforeach($this->data as $actionType => $action)\r\n\t\t\t{\r\n\t\t\t\tif(isset($actionType)) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tswitch($actionType)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcase \"destroy\":\r\n\t\t\t\t\t\t\t\t$this->remove($action);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}catch(Exception $e) {\r\n\t\t\t\t\t\tdump('item module error', 'item module error');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "function import($files) {\n\t\tforeach ($files as $file) {\n\t\t\t$dest_dir = $this->destDir($file);\n\t\t\t$src_path = JOURNALS_FILES . $file;\n\t\t\t$dest_path = DOWNLOAD_PATH . $this->destDir($file);\n\t\t\t$this->unzip($src_path, $dest_path);\n\t\t\t$res[] = $dest_path . \"/journals.xml\";\n\t\t}\n\t\treturn $res;\n\t}", "public function cleanImagesAction()\n {\n parent::cleanImagesAction();\n $this->clearRespizrImageCache();\n }", "public function importStore()\n {\n if(!empty(Request::input('member_id'))){\n\n foreach(Request::input('member_id') as $member_id){\n $member = Member::find($member_id)->load('idcard');\n if($member->idcard->isEmpty()){\n $idcard = PrintList::create(['member_id' => $member->id]);\n }else{\n $idcard = $member->idcard[0];\n }\n $idcard->reprint();\n $idcard->printed();\n }\n\n flash()->success('Added ' . count(Request::input('member_id')) . ' ID Cards successfully!');\n }\n\n return redirect(url('idcard/import'));\n }", "public static function cleanAllLists() {\r\n \tself::$list=array();\r\n }", "public function getFileStorages() {}", "private function loadItems()\n {\n if ($this->items === null) {\n $this->items = $this->storage->load();\n }\n }", "public function upload(iterable $items, Language $originalLang, Language $translationLang, WordGroup $group = null): void;", "public function actionArchiveList()\n {\n $ids = Yii::$app->request->post('ids');\n $success = false;\n\n if (! empty($ids)) {\n foreach ($ids as $id) {\n $model = $this->findModel($id);\n $model->archive();\n $success = true;\n }\n }\n\n Yii::$app->response->format = Response::FORMAT_JSON;\n\n return [\n 'success' => $success,\n ];\n }", "public function assets(): void\n {\n $count = count($this->grav['assets']['assets_css']) + count($this->grav['assets']['assets_js']);\n $this->handle->writeln('');\n $this->handle->writeln('<white>Processing Asset(s): ' . $count . '</white>');\n $this->progressBar = new ProgressBar(\n $this->handle,\n $count\n );\n $this->buildAssets();\n $this->teardown('Finished ' . $count . ' Asset(s)');\n }", "function movesiteimages()\n\t{\n\t\n\t\tglobal $option, $mainframe;\n\n\t\t//we'll need access to the file system and we'll use the Joomla way to be all safe.\n\t\tjimport('joomla.filesystem.file');\n\t\n\t\t// define where the images are and where we want to put them\n\n\t\t$searchpath = JPATH_ROOT . DS . \"images\". DS .\"content\" . DS .\"arts_curriculum\". DS . \"masters\" ;\n\t\t$destpath = JPATH_ROOT . DS . \"images\". DS .\"content\" . DS .\"arts_cirriculum\". DS . \"tmp\" ;\n\n\t\t//read all the image files and put them in an array.\n\t\t$img_files = JFolder::files($searchpath, '.*');\n\n\t\t//Now we need some stuff from the JFile:: class to move all files into the new folder\n\t\tforeach ($img_files as $file) {\n\t\t\tJFile::move($searchpath. DS . $file, $destpath . DS. $file);\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=' . $option, 'All images have moved into the site folder' );\n\t\n\t}", "private function cleanupFiles() {\n\t\t$this -> loadModel('Archivo');\n\t\t$items = $this -> Archivo -> find('all');\n\t\t$db_files = array();\n\t\tforeach ($items as $key => $item) {\n\t\t\t$db_files[] = $item['Archivo']['ruta'];\n\t\t}\n\t\t$dir_files = array();\n\t\t$dir_path = APP . 'webroot/files/uploads/solicitudesTitulacion';\n\t\tif ($handle = opendir($dir_path)) {\n\t\t\twhile (false !== ($entry = readdir($handle))) {\n\t\t\t\tif ($entry != 'empty' && is_file($dir_path . DS . $entry))\n\t\t\t\t\t$dir_files[] = 'files/uploads/solicitudesTitulacion/' . $entry;\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\tforeach ($dir_files as $file) {\n\t\t\tif (!in_array($file, $db_files)) {\n\t\t\t\t$file = explode('/', $file);\n\t\t\t\t$file = $file[count($file) - 1];\n\t\t\t\t$tmp_file_path = $dir_path . DS . $file;\n\t\t\t\tunlink($tmp_file_path);\n\t\t\t}\n\t\t}\n\t}", "function Assets() {\r\n\t\t\treturn $this->QueryPublic( 'Assets' );\r\n\t\t}", "public function unarchive()\n {\n if ($this->canArchive()) {\n\n $this->archived = 0;\n $this->save();\n }\n }", "function updateShares(array $add, array $remove);", "public static function indexAction(){\n\t\tob_start();\n\t\t\t\n\t\t\t$collection = self::_getCollection();\n\t\t\t$children = $collection->getChildren();\n\t\t\t// $children = $x->getChildren();\n\t\t\t// CunddTools::pd($children);\n\t\t\t\n\t\t\t/*\n\t\t\t * SETTINGS\n\t\t\t * $config['flash_maxCols'] = 5;\n\t\t\t * $config['flash_maxRows'] = NULL;\n\t\t\t * $config['flash_spaceBetweenAlbums'] = 8;\n\t\t\t * $config['flash_albumWidth'] = 200;\n\t\t\t * $config['flash_albumHeight'] = 200;\n\t\t\t * $config['flash_objectType'] = 'Cundd.GraphicObjects.UrlLoading.Cundd_GraphicObjects_UrlLoading_Rect';\n\t\t\t */\n\t\t\t\n\t\t\t$xOffset = 0;\n\t\t\t$colCounter = 0;\n\t\t\t$row = 0;\n\t\t\t$allFlashObjects = array();\n\t\t\t\n\t\t\tif($children){\n\t\t\t\tforeach($children as $key => $child){\n\t\t\t\t\t$args = array();\n\t\t\t\t\t$args['asin'] = $child->getValue('_asin');\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif($args['asin']){\n\t\t\t\t\t\tif($colCounter > CunddConfig::__('Music/flash_maxCols')){\n\t\t\t\t\t\t\t$row++;\n\t\t\t\t\t\t\t$xOffset = 0;\n\t\t\t\t\t\t\t$colCounter = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'x' => $xOffset,\n\t\t\t\t\t\t'y' => $row * ( CunddConfig::__('Music/flash_albumHeight') + CunddConfig::__('Music/flash_spaceBetweenAlbums') ),\n\t\t\t\t\t\t'width' => CunddConfig::__('Music/flash_albumWidth'),\n\t\t\t\t\t\t'height' => CunddConfig::__('Music/flash_albumHeight'),\n\t\t\t\t\t\t'type' => CunddConfig::__('Music/flash_objectType'),\n\t\t\t\t\t\t'url' => CunddConfig::__('Music/image_base_url') . $args['asin'],\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$allFlashObjects[] = Cundd::getModel('Flash',$data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$xOffset = $xOffset + CunddConfig::__('Music/flash_albumWidth') + CunddConfig::__('Music/flash_spaceBetweenAlbums');\n\t\t\t\t\t\t$colCounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// die(\"No children\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$lastObject = $allFlashObjects[count($allFlashObjects) - 1];\n\t\t\t\n\t\t\t// CunddTools::pd($allFlashObjects);\n\t\t\t\n\t\t\t\n\t\t\t//$collection = $lastObject->getCollection();\n\t\t\t$collection = Cundd::getCollection('Flash');\n\t\t\t\n\t\t\t\n\t\t\t$collection->objects=$allFlashObjects;\n\t\t\t$reference = self::_getReference();\n\t\t\t$statusString = $reference->getValue('_artist').\" - \".$reference->getValue('_title').' - '.$reference->getValue('_label').' - '.$reference->getValue('_date');\n\t\t\t\n\t\t\t\n\t\t\t$nameString = Cundd_Session::get('nameString') + 1;\n\t\t\tCundd_Session::set('nameString',$nameString);\n\t\t\t$statusString .= $nameString.\" \".$GLOBALS['search'];\n\t\t\t// $collection->setup = array(\"statusString\" => $statusString,\"phpSessionId\" => session_name().\"=\".session_id());\n\t\t\t$collection->setup = array(\"statusString\" => $statusString,\"phpSessionId\" => SID);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$collection->render();\n\t\t\t\n\t\t$output = ob_get_contents();\n\t\tob_end_clean();\n\t\t\n\t\theader(\"Content-Type:application/xml\");\n//\t\theader('Content-Type: text/html; charset=utf-8');\n//\t\theader(\"Content-Type:text/xhtml\");\n\t\t\n\t\t$output = CunddTools::xmlCleanup($output);\n\t\techo $output;\n\t\treturn $output;\n\t}", "public function cleanFiles()\n { \n $this->zip();\n // $this->unzip();\n\n if (!empty($this->files)) {\n foreach ($files as $file) {\n $this->clean($file);\n }\n }\n }", "protected function cleanupChunks(){\n\t\tforeach (scandir($this->chunksFolder) as $item){\n\t\t\tif ($item == \".\" || $item == \"..\")\n\t\t\t\tcontinue;\n\n\t\t\t$path = $this->chunksFolder.DIRECTORY_SEPARATOR.$item;\n\n\t\t\tif (!is_dir($path))\n\t\t\t\tcontinue;\n\n\t\t\tif (time() - filemtime($path) > $this->chunksExpireIn){\n\t\t\t\t$this->removeDir($path);\n\t\t\t}\n\t\t}\n\t}", "public\n function copyAssets() {\n $this->info('Clearing webroot and copying assets...');\n// if ($this->_clear($this->_assetDir, '^(?!cover)(?!dashboard)(?!signin)(?!baked-with-cakephp.svg).*$')) {\n// $this->success('All files cleared...');\n// }\n\n $files = [];\n $folders = [];\n $folders[] = new Folder($this->_nodeDir->path . DS . 'bootstrap/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'bootstrap-duration-picker/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'bootstrap-markdown-editor/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'bootstrap-toggle');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'checkboxes.js/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'datepair.js/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'flatpickr/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'jquery/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'jquery-awesome-cursor/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'jquery-mask-plugin/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'markitup/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'popper.js/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'select2/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'vue/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'signature_pad/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'sticky-sidebar/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'timepicker/dist');\n\n foreach ($folders as $folder) {\n foreach ($folder->findRecursive() as $file) {\n $files[] = new File($file);\n }\n }\n try {\n $this->_copy($files);\n } catch (\\Exception $exception) {\n $this->info('Some did not copy. Exception: ' . $exception->getMessage(), 1, ConsoleIo::VERBOSE);\n }\n\n }", "public function clear(): void\n {\n $app = App::get();\n $list = $app->data->getList()\n ->filterBy('key', '.temp/cache/', 'startWith');\n foreach ($list as $item) {\n $app->data->delete($item->key);\n };\n }", "public function moveContentAndCopyLivePage() {}", "public function run()\n {\n $paths = Storage::disk('public')->allFiles('images');\n Storage::disk('public')->delete($paths);\n \n factory(Item::class, 20)->create()->each(static function (Item $item) {\n $item->entities()->save(factory(Itementity::class)->make());\n $item->image_id = factory(Image::class)->create()->id;\n $item->save();\n });\n\n $tags = Tag::all();\n Itementity::all()->each(static function (Itementity $entity) use ($tags) {\n $nbTags = random_int(0, 5);\n $entity->tags()->saveMany($tags->random($nbTags));\n });\n }", "public function saveAllPlayers(): void;", "public function archiveAction(){\n $articles = Article::find([\n 'order' => 'creationDate DESC'\n ]);\n $this->view->setVar(\"articles\", $articles);\n }", "protected function getAssets() { return array(); }", "public static function merge()\n {\n $mongo = Mage::getModel('hackathon_ordertransaction/mongo');\n $quotes = $mongo->getQuotes();\n foreach ($quotes as $quote) {\n try {\n $mongo->setToDelete($quote['quote_id']);\n $persistentOrder = Mage::getResourceModel('sales/order');\n $persistentOrder->setData($quote['order']);\n $persistentOrder->save();\n unset($persistentOrder);\n } catch (Exception $e) {\n $mongo->revertToOrder($quote['quote_id']);\n Mage::logException($e);\n }\n }\n unset($quotes, $mongo);\n }", "protected function exportAssets()\n {\n if ($this->option('interactive')) {\n if (! $this->confirm('Install the basic package assets?')) {\n return;\n }\n }\n\n foreach ($this->assets as $asset_key => $asset) {\n $this->copyAssets($asset_key, $this->option('force'));\n }\n\n $this->comment('Basic Assets Installation complete.');\n }", "public function saveContainers()\n {\n $this->toContainer->saveBook();\n $this->fromContainer->saveBook();\n }", "public function execute() {\n GatewayFactory::getInstance()->startTransaction(true);\n $itemsGtw = GatewayFactory::getInstance()->getItemsGateway();\n $item = $itemsGtw->findItem($this->itemId);\n $item->removeItem();\n GatewayFactory::getInstance()->commit();\n $this->result = null;\n $this->status = IApiOutputter::HTTP_OK;\n }", "protected function deleteStore() {\n $keys = ['community', 'address', 'state', 'city', 'country','attention_to','company','promocode','is_student','payment_type','name_card','card_number'];\n foreach ($keys as $key) {\n $this->store->delete($key);\n }\n }", "public function update(){\n parent::update();\n $this->collection = null;\n $this->files = null;\n $this->dublinCore = null;\n }", "public function moveAction(){\r\n // get variables from request\r\n $query = $this->getRequest()->getQuery()->toArray();\r\n $blockId = $query['block_id'];\r\n $navId = $query['id'];\r\n $position = $query['position'];\r\n // get navigation block model\r\n $navBlockModel = $this->getServiceLocator()->get('DotsNavBlock\\Db\\Model\\NavigationBlock');\r\n // get an instance of the item that changes position and set the new position\r\n $nav = $navBlockModel->getById($navId);\r\n $nav->position = $position;\r\n // get all other items from the navigation\r\n $items = $navBlockModel->getAllByColumnsOrderByPosition(array(\r\n 'block_id = ?' => $blockId,\r\n 'id != ?' => $navId\r\n ));\r\n\r\n // update positions for all items\r\n $pos = 1;\r\n if ($items){\r\n foreach ($items as $itm){\r\n if ($pos==$position){\r\n $pos++;\r\n }\r\n $itm->position = $pos++;\r\n $navBlockModel->persist($itm);\r\n }\r\n }\r\n $navBlockModel->persist($nav);\r\n // save everything in the DB\r\n $navBlockModel->flush();\r\n\r\n return $this->jsonResponse(array('success' => true));\r\n }", "public function cleanup()\n\t{\n\t\t$ArticlesLatest = Article::where('status', 'read')->where('star_ind', '0')->orderBy('created_at', 'desc')->select('id')->take(10000)->get();\n\t\t$ArticlesStar = Article::where('star_ind', '1')->select('id')->get();\n\t\t$ArticlesUnread = Article::where('status', 'unread')->select('id')->get();\n\n\t\t//create new empty array to store id's\n\t\t$cleanup_item_ids = [];\n\n\t\t//store id's from ArticlesStar in cleanup_item_ids\n\t\tif (!empty($ArticlesStar)) {\n\t\t\tforeach ($ArticlesStar as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//store id's from ArticlesLatest in cleanup_item_ids\n\t\tif (!empty($ArticlesLatest)) {\n\t\t\tforeach ($ArticlesLatest as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//store id's from ArticlesUnread in cleanup_item_ids\n\t\tif (!empty($ArticlesUnread)) {\n\t\t\tforeach ($ArticlesUnread as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//delete items that are not in cleanup_item_ids array\n\t\tArticle::whereNotIn('id', $cleanup_item_ids)->delete();\n\t}", "function ag_clean_wm_cache() {\n\trequire_once(AG_DIR . '/functions.php');\n\t\n\t$wp_dirs = wp_upload_dir();\n\t$cache_dir = trailingslashit($wp_dirs['basedir']) . 'ag_watermarked';\n\t\n\t// folder exists?\n\tif(!@file_exists($cache_dir)) {\n\t\tdie('success');\t\n\t}\n\t\n\t// clean\n\tforeach(scandir($cache_dir) as $file) {\n\t\t$ext = ag_stringToExt($file);\n\t\t$accepted = array('.jpg', '.jpeg', '.gif', '.png');\n\t\t\n\t\tif(in_array($ext, $accepted) && file_exists($cache_dir.'/'.$file)) {\n\t\t\tunlink($cache_dir.'/'.$file);\n\t\t}\t\n\t}\n\n\tdie('success');\n}", "public function cleanAll()\n {\n $this->filesystem->remove(self::getFilesList());\n }", "public function get_assets_all()\n {\n return $this->assets;\n }", "public function run()\n {\n\n $json = File::get(\"database/data/brands.json\");\n $data = json_decode($json);\n foreach ($data as $obj){\n Cloudder::upload(storage_path(\"images/brand/\".$obj->banner),null, array(\"folder\"=>\"Stonk/Brands/\"));\n $banner = Cloudder::getResult();\n Cloudder::upload(storage_path(\"images/brand/\".$obj->image),null,array(\"folder\"=>\"Stonk/Brands/\"));\n $image = Cloudder::getResult();\n $brand = new Brand();\n $brand->name = $obj->name;\n $brand->description = $obj->description;\n $brand->banner = $banner['url'];\n $brand->image = $image['url'];\n $brand->save();\n }\n }" ]
[ "0.63853717", "0.56475693", "0.56206787", "0.54758507", "0.5433083", "0.5412192", "0.5293561", "0.51931614", "0.5176156", "0.5174548", "0.5152773", "0.5148324", "0.5120564", "0.509165", "0.5081713", "0.507259", "0.5056157", "0.5045812", "0.50258976", "0.50258976", "0.50230664", "0.5021496", "0.4961029", "0.49592203", "0.4955392", "0.49501473", "0.49447188", "0.49332878", "0.4927404", "0.4926844", "0.49198407", "0.4909308", "0.49021325", "0.48766568", "0.48714706", "0.48686412", "0.48493364", "0.4840232", "0.48396286", "0.48360276", "0.48209944", "0.48138103", "0.48129112", "0.48008725", "0.47675446", "0.4754898", "0.47539276", "0.47440544", "0.47434384", "0.4740833", "0.47341567", "0.47307608", "0.471913", "0.47174117", "0.47004372", "0.46984836", "0.46982488", "0.4691678", "0.468624", "0.46837425", "0.46798703", "0.46788955", "0.46700183", "0.46685222", "0.46682847", "0.46609232", "0.4650595", "0.46491703", "0.4645204", "0.46441057", "0.46393967", "0.46367654", "0.46327803", "0.46322304", "0.46247151", "0.46185505", "0.4618102", "0.46081868", "0.46041948", "0.46017587", "0.46015203", "0.4596357", "0.45931914", "0.45843416", "0.45720822", "0.45720753", "0.45700505", "0.45688006", "0.45662835", "0.4564676", "0.45621368", "0.45620936", "0.45584092", "0.45556915", "0.45547098", "0.4554038", "0.45528162", "0.45519936", "0.45423532", "0.45330796" ]
0.5157739
10
Move all assets in the list to the public store
protected function publishAll($assets) { if (empty($assets)) { return; } $store = $this->getAssetStore(); foreach ($assets as $asset) { $store->publish($asset['Filename'], $asset['Hash']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function moveAssets()\n {\n foreach ($this->reports as $report) {\n $old_file = config('import.import_assets_reports_path') . DIRECTORY_SEPARATOR . $report->file;\n $new_file = config('momentum.reports_path') . DIRECTORY_SEPARATOR . $report->file;\n\n $this->moveFile($old_file, $new_file);\n }\n\n foreach ($this->organizations as $organization) {\n // not every organization has a logo\n if (!$organization->logo) {\n continue;\n }\n\n $old_file = config('import.import_assets_logos_path') . DIRECTORY_SEPARATOR . $organization->logo;\n $new_file = config('momentum.logos_path') . DIRECTORY_SEPARATOR . $organization->logo;\n\n $this->moveFile($old_file, $new_file);\n }\n }", "public function purgeAll() {\n\t\tset_time_limit(300);\n\t\t$this->load->model(\"filehandlerbase\");\n\t\t$fileList = $this->filehandlerbase->findDeletedItems();\n\t\t$mfa = $this->input->post(\"mfa\");\n\t\t$serial = $this->input->post(\"arn\");\n\n\t\t/**\n\t\t * we need to cache this because MFA is only good once\n\t\t */\n\t\t$lastUsedToken = null;\n\t\tforeach($fileList as $fileEntry) {\n\t\t\t$fileHandler = $this->filehandler_router->getHandlerForObject($fileEntry->getFileObjectId());\n\t\t\tif(!$fileHandler) { \n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(!$fileHandler->loadFromObject($fileEntry)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($lastUsedToken)) {\n\t\t\t\t$fileHandler->s3model->sessionToken = $lastUsedToken;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif(!$fileHandler->deleteSource($serial,$mfa)) {\n\t\t\t\t\t$this->logging->logError(\"purgeAll\",\"Could not delete asset with key\" . $fileEntry->getFileObjectId());\n\t\t\t\t}\n\t\t\t\t$lastUsedToken = $fileHandler->s3model->sessionToken;\n\t\t\t}\n\t\t\tcatch (Exception $e) {\n\t\t\t\techo $e;\n\t\t\t\techo \"Deletion fail\";\n\t\t\t}\n\n\t\t}\n\n\t\tinstance_redirect(\"/admin\");\n\t}", "public function flushAssets()\n\t{\n\t\t(new Version)->refreshMediaVersion();\n\t}", "function __reimportPhotos(){\n\t\t$this->Asset->disablePermissionable();\n\t\t$this->Asset->recursive=0;\n\t\t$json = $this->Asset->find('all', array('fields'=>'json_src'));\n\t\t$json =Set::extract($json, '/Asset/json_src');\n\t\tforeach ($json as $row) {\n\t\t\t$imgSrc = json_decode($row);\n\t\t\t$src = \"Summer2009/\".basename($imgSrc->orig);\n\t\t\t$dest = $imgSrc->preview;\n\t\t\t$src_baseurl = Configure::read('path.local.preview');\n\t\t\t$dest_baseurl = Configure::read('stageroot.basepath');\n\t\t\t$shell_cmd[] =\"cp {$src_baseurl}/{$src} {$dest_baseurl}/{$dest}\";\n\t\t\t//\t\t\tmkdir(dirname(Configure::read('stageroot.basepath').\"/{$dest}\"), 0777, $recursive=true);\n\t\t\t//\t\t\tcopy( Configure::read('path.local.preview').\"/{$src}\", Configure::read('stageroot.basepath').\"/{$dest}\");\n\t\t}\n\t\tdebug($shell_cmd);\n\t}", "public function moveItems2DownloadList($cartlist = array())\n {\n \n $insert_item = array();\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction(); \n $l_table = Engine_Api::_()->getDbTable('lists', 'mp3music'); \n foreach($cartlist as $key=>$value)\n {\n if ($value['type'] == 'song') \n {\n $insert_item = array($value['item_id'],0,Engine_Api::_()->user()->getViewer()->getIdentity());\n }\n if ($value['type'] == 'album') \n {\n $insert_item = array(0,$value['item_id'],Engine_Api::_()->user()->getViewer()->getIdentity());\n }\n $list = $l_table->createRow();\n $list->dl_song_id = $insert_item[0];\n $list->dl_album_id = $insert_item[1];\n $list->user_id = $insert_item[2];\n $list->save();\n }\n try {\n $db->commit();\n } catch (Exception $ex) {\n $db->rollback();\n break;\n } \n }", "private function saveItems()\n {\n $this->storage->save($this->items);\n }", "public function archiveObjects()\n {\n $randProbability = mt_rand(1, 1000);\n \n if ($randProbability < 750) {\n return;\n }\n \n $this->session->set('RKDownLoadModuleAutomaticArchiving', true);\n \n // perform update for files becoming archived\n $logArgs = ['app' => 'RKDownLoadModule', 'entity' => 'file'];\n $this->logger->notice('{app}: Automatic archiving for the {entity} entity started.', $logArgs);\n $repository = $this->entityFactory->getRepository('file');\n $repository->archiveObjects($this->permissionApi, $this->session, $this->translator, $this->workflowHelper, $this->hookHelper);\n $this->logger->notice('{app}: Automatic archiving for the {entity} entity completed.', $logArgs);\n \n $this->session->del('RKDownLoadModuleAutomaticArchiving');\n }", "function moveAssignmentFilters() {\n try {\n $assignment_filters_table = TABLE_PREFIX . 'assignment_filters';\n $data_filters_table = TABLE_PREFIX . 'data_filters';\n $homescreen_tabs_table = TABLE_PREFIX . 'homescreen_tabs';\n\n DB::beginWork('Move assignment filters to the new storage @ ' . __CLASS__);\n\n $assignment_filters = DB::execute(\"SELECT * FROM $assignment_filters_table\");\n if($assignment_filters) {\n $assignment_filter_tabs_map = $this->getTabsThatUseAssignmentFilters();\n\n foreach($assignment_filters as $filter) {\n $old_assignment_filter_id = (integer) $filter['id'];\n\n DB::execute(\"INSERT INTO $data_filters_table (type, name, raw_additional_properties, created_on, created_by_id, created_by_name, created_by_email, is_private) VALUES ('AssignmentFilter', ?, ?, ?, ?, ?, ?, ?)\", $filter['name'], $filter['raw_additional_properties'], $filter['created_on'], $filter['created_by_id'], $filter['created_by_name'], $filter['created_by_email'], $filter['is_private']);\n\n $new_assignmnet_filter_id = DB::lastInsertId();\n\n if(isset($assignment_filter_tabs_map[$old_assignment_filter_id]) && count($assignment_filter_tabs_map[$old_assignment_filter_id])) {\n DB::execute(\"UPDATE $homescreen_tabs_table SET raw_additional_properties = ? WHERE id IN (?)\", serialize(array('assignment_filter_id' => $new_assignmnet_filter_id)), $assignment_filter_tabs_map[$old_assignment_filter_id]);\n } // if\n } // foreach\n } // if\n\n DB::commit('Assignment filters moved to the new storage @ ' . __CLASS__);\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n try {\n $table_list = DB::listTables(TABLE_PREFIX);\n\n if(in_array($assignment_filters_table, $table_list)) {\n DB::execute(\"DROP TABLE $assignment_filters_table\");\n } // if\n\n if(in_array(TABLE_PREFIX . 'milestone_filters', $table_list)) {\n DB::execute('DROP TABLE ' . TABLE_PREFIX . 'milestone_filters');\n } // if\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function reset()\n {\n $db = Zend_Registry::get('dbAdapter');\n $dbname = Zend_Registry::get('configDatabase')->database->params->dbname;\n\n $stmt = $db->query(\"SELECT * FROM INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = '\".$dbname.\"'\");\n while ($row = $stmt->fetch()) {\n $db->query('DELETE FROM `'.$row['TABLE_NAME'].'`');\n }\n\n $path = UtilityComponent::getDataDirectory('assetstore');\n $dir = opendir($path);\n while ($entry = readdir($dir)) {\n if (is_dir($path.'/'.$entry) && !in_array($entry, array('.', '..'))\n ) {\n $this->_rrmdir($path.'/'.$entry);\n }\n }\n\n $path = UtilityComponent::getDataDirectory('thumbnail');\n $dir = opendir($path);\n while ($entry = readdir($dir)) {\n if (is_dir($path.'/'.$entry) && !in_array($entry, array('.', '..'))\n ) {\n $this->_rrmdir($path.'/'.$entry);\n }\n }\n\n if (file_exists(LOCAL_CONFIGS_PATH.'/ldap.local.ini')) {\n unlink(LOCAL_CONFIGS_PATH.'/ldap.local.ini');\n }\n\n /** @var UserModel $userModel */\n $userModel = MidasLoader::loadModel('User');\n\n $admin = $userModel->createUser(MIDAS_DEMO_ADMIN_EMAIL, MIDAS_DEMO_ADMIN_PASSWORD, 'Demo', 'Administrator', 1);\n $userModel->createUser(MIDAS_DEMO_USER_EMAIL, MIDAS_DEMO_USER_PASSWORD, 'Demo', 'User', 0);\n\n /** @var CommunityModel $communityModel */\n $communityModel = MidasLoader::loadModel('Community');\n $communityDao = $communityModel->createCommunity(\n 'Demo',\n 'This is a demo community',\n MIDAS_COMMUNITY_PUBLIC,\n $admin,\n MIDAS_COMMUNITY_CAN_JOIN\n );\n\n /** @var AssetstoreModel $assetstoreModel */\n $assetstoreModel = MidasLoader::loadModel('Assetstore');\n $assetstoreDao = new AssetstoreDao();\n $assetstoreDao->setName('Default');\n $assetstoreDao->setPath(UtilityComponent::getDataDirectory('assetstore'));\n $assetstoreDao->setType(MIDAS_ASSETSTORE_LOCAL);\n $assetstoreModel->save($assetstoreDao);\n\n /** @var SettingModel $settingModel */\n $settingModel = MidasLoader::loadModel('Setting');\n $settingModel->setConfig('default_assetstore', $assetstoreDao->getKey());\n\n $options = array('allowModifications' => true);\n $config = new Zend_Config_Ini(CORE_CONFIGS_PATH.'/application.ini', null, $options);\n $config->global->dynamichelp = 1;\n $config->global->environment = 'production';\n $config->global->application->name = 'Midas Platform - Demo';\n $description = 'Midas Platform is an open-source toolkit that enables the\n rapid creation of tailored, web-enabled data storage. Designed to meet\n the needs of advanced data-centric computing, Midas Platform addresses\n the growing challenge of large data by providing a flexible, intelligent\n data storage system. The system integrates multimedia server technology\n with other open-source data analysis and visualization tools to enable\n data-intensive applications that easily interface with existing\n workflows.';\n $config->global->application->description = $description;\n\n $enabledModules = array(\n 'api',\n 'metadataextractor',\n 'oai',\n 'statistics',\n 'scheduler',\n 'thumbnailcreator',\n 'visualize',\n );\n foreach ($enabledModules as $module) {\n if (file_exists(LOCAL_CONFIGS_PATH.'/'.$module.'.demo.local.ini')) {\n copy(\n LOCAL_CONFIGS_PATH.'/'.$module.'.demo.local.ini',\n LOCAL_CONFIGS_PATH.'/'.$module.'.local.ini'\n );\n $config->module->$module = 1;\n } else {\n unlink(LOCAL_CONFIGS_PATH.'/'.$module.'.local.ini');\n }\n }\n\n $writer = new Zend_Config_Writer_Ini();\n $writer->setConfig($config);\n $writer->setFilename((LOCAL_CONFIGS_PATH.'/application.local.ini'));\n $writer->write();\n\n $configGlobal = new Zend_Config_Ini(APPLICATION_CONFIG, 'global', true);\n Zend_Registry::set('configGlobal', $configGlobal);\n\n /** @var UploadComponent $uploadComponent */\n $uploadComponent = MidasLoader::loadComponent('Upload');\n $uploadComponent->createUploadedItem(\n $admin,\n 'midasLogo.gif',\n BASE_PATH.'/core/public/images/midasLogo.gif',\n $communityDao->getPublicFolder(),\n null,\n '',\n true\n );\n $uploadComponent->createUploadedItem(\n $admin,\n 'cow.vtp',\n BASE_PATH.'/modules/demo/public/'.$this->moduleName.'/cow.vtp',\n $communityDao->getPublicFolder(),\n null,\n '',\n true\n );\n }", "public function onPostDispatch()\n {\n /** @var Shipperhq_Shipper_Model_Storage[] $storageList */\n $storageList = Mage::helper('shipperhq_shipper')->storageManager()->getStorageObjects();\n foreach ($storageList as $storage) {\n if ($storage->hasDataChanges() && $storage->getId()) {\n $this->_saveStorageInstance($storage);\n }\n }\n }", "protected function swapAll($assets)\n {\n if (empty($assets)) {\n return;\n }\n\n $store = $this->getAssetStore();\n\n // The `swap` method was introduced in the 1.4 release. It wasn't added to the interface to avoid breaking\n // custom implementations. If it's not available on our store, we fall back to a publish/protect\n if (method_exists($store, 'swapPublish')) {\n foreach ($assets as $asset) {\n $store->swapPublish($asset['Filename'], $asset['Hash']);\n }\n } else {\n foreach ($assets as $asset) {\n $store->publish($asset['Filename'], $asset['Hash']);\n }\n }\n }", "public function addAdminAssets() {}", "private static function deleteAssets() {\n // Fail due to invalid asset deletors \n assert(isset(self::$assetDeletors));\n\n // Remove assets \n foreach (self::$assetDeletors as $deletor) {\n $deletor->delete();\n }\n\n // Clear AssetDeletors cache\n self::$assetDeletors = array();\n }", "public static function downloadFromStorage(): void\n {\n $files = Storage::disk(config('translation-manager.storage.disk'))\n ->allFiles(config('translation-manager.storage.path'));\n\n collect($files)\n ->each(static function ($file): void {\n Storage::disk('local')->put(\n self::STORAGE_PREFIX . $file,\n Storage::disk(config('translation-manager.storage.disk'))->get($file),\n );\n });\n }", "public function onBeforeWrite()\n {\n if (!$this->hasAssets()) {\n return;\n }\n\n // Prepare blank manipulation\n $manipulations = new AssetManipulationList();\n\n // Mark overwritten object as deleted\n if ($this->owner->isInDB()) {\n $priorRecord = DataObject::get(get_class($this->owner))->byID($this->owner->ID);\n if ($priorRecord) {\n $this->addAssetsFromRecord($manipulations, $priorRecord, AssetManipulationList::STATE_DELETED);\n }\n }\n\n // Add assets from new record with the correct visibility rules\n $state = $this->getRecordState($this->owner);\n $this->addAssetsFromRecord($manipulations, $this->owner, $state);\n\n // Whitelist assets that exist in other stages\n $this->addAssetsFromOtherStages($manipulations);\n\n // Apply visibility rules based on the final manipulation\n $this->processManipulation($manipulations);\n }", "public function onAfterDelete()\n {\n if (!$this->hasAssets()) {\n return;\n }\n\n // Prepare blank manipulation\n $manipulations = new AssetManipulationList();\n\n // Add all assets for deletion\n $this->addAssetsFromRecord($manipulations, $this->owner, AssetManipulationList::STATE_DELETED);\n\n // Whitelist assets that exist in other stages\n $this->addAssetsFromOtherStages($manipulations);\n\n // Apply visibility rules based on the final manipulation\n $this->processManipulation($manipulations);\n }", "private function assetPublisher() {\n $assetOrigin = $this->getDir().$this->getPathConfig().'/assets';\n if ($this->fs->exists($assetOrigin)) {\n $assetDest = $this->getPublicPath($this->getPathConfig());\n $this->fs->copyDirectory($assetOrigin,$assetDest);\n }\n }", "protected function publishAssets()\n {\n $assets = [];\n\n foreach ($this->assets as $location => $asset) {\n $assets[$this->basePath($location)] = base_path($asset);\n }\n\n $this->publishes($assets);\n }", "public function addAssets() {}", "public function addAssets() {}", "public function storeOriginals()\n {\n $this->originals = $this->toArray();\n }", "protected function persistObjects() {}", "function shiftList() {\n\t\t$rest = array_splice($this->galleysToUpdate, \\dfm\\processor::maxUpdatesAtOnce);\n\t\t$ids = array_map(function($item) {\n\t\t\treturn $item->galley->getId();\n\t\t}, $rest);\n\t\t$this->continue = array(\n\t\t\t'galleyIds' => $ids,\n\t\t\t'updateFrontpages' => $this->updateFrontpages\n\t\t);\n\t}", "private function exportFilesAndClear()\n {\n foreach (File::allFiles(Auth()->user()->getPublicPath()) as $file) {\n if (strpos($file, \".jpg\") !== false || strpos($file, \".png\") !== false) {\n $name = $this->reformatName($file);\n File::move($file, Auth()->user()->getPublicPath() . '/' . $name);\n }\n }\n $files = scandir(Auth()->user()->getPublicPath());\n foreach ($files as $key => $file) {\n if (is_dir(Auth()->user()->getPublicPath() . '/' . $file)) {\n if ($file[0] != '.') {\n File::deleteDirectory(Auth()->user()->getPublicPath() . '/' . $file);\n }\n } else {\n if (strpos($file, \".jpg\") === false && strpos($file, \".png\") === false) {\n File::delete(Auth()->user()->getPublicPath() . '/' . $file);\n }\n }\n }\n return null;\n }", "protected function all() : void\n {\n File::ensureDirectoryExists(Path::storage('app/public'));\n File::ensureDirectoryExists(Path::storage('app/private'));\n\n File::ensureDirectoryExists(Path::storage('framework/logs'));\n File::ensureDirectoryExists(Path::storage('framework/views'));\n\n File::put(Path::storage('framework/logs/laravel.log'), '');\n\n Artisan::call('storage:link --force');\n }", "function persistAll() ;", "public function backUp()\n {\n $inventory = $this->inventory;\n $this->oldInventory = $inventory;\n return;\n }", "protected function storeFiles()\n {\n $this->log(sprintf('%s', __METHOD__), 'debug');\n\n $this->log(sprintf('Playlist - Writing file list to temporary file. (%s)', basename($this->tempFilesFromFilename)), 'info');\n $stream = new Stream(fopen($this->tempFilesFromFilename, 'w'));\n\n try {\n $stream->write($this->filesToString());\n } catch (\\Exception $e) {\n $this->log(sprintf('Playlist - Error while writing to file %s. (%s)', basename($this->tempFilesFromFilename), $e->getMessage()), 'error');\n }\n\n $stream->close();\n }", "public function flushItems()\n\t{\n\t\t$this->items = array();\n\t}", "public function storeAll(iterable $snapshots): void;", "public static function storeAll()\n {\n foreach (self::$_activeFilters as $target => $filter) {\n $filter->store();\n }\n }", "function damopen_assets_library_post_update_change_public_files_to_private() {\n $connection = Database::getConnection();\n // Select the uri from the database.\n $query = $connection\n ->select('file_managed', 'fm')\n ->fields('fm', ['fid', 'uri']);\n $result = $query->execute();\n\n $fileStorage = Drupal::entityTypeManager()->getStorage('file');\n $fileSystem = Drupal::service('file_system');\n $priv_path = $fileSystem->realpath('private://');\n\n foreach ($result as $row) {\n $uri = str_replace('public://', '', $row->uri);\n $file_name = substr(strrchr($uri, '/'), 1);\n $folder = str_replace($file_name, '', $uri);\n // Check if the directory already exists.\n // Directory does not exist, so lets create it.\n if (\n !is_dir($priv_path . '/' . $folder)\n && !mkdir($concurrentDirectory = $priv_path . '/' . $folder, 0775, TRUE)\n && !is_dir($concurrentDirectory)\n ) {\n throw new RuntimeException(sprintf('Directory \"%s\" was not created', $concurrentDirectory));\n }\n\n // Move the file to the private folder.\n $new_uri = $fileSystem->move('public://' . $uri, 'private://' . $uri, FileSystemInterface::EXISTS_REPLACE);\n\n if ($new_uri !== NULL) {\n // Replace the uri with the new private schema's uri.\n /** @var \\Drupal\\file\\FileInterface $file */\n $file = $fileStorage->load($row->fid);\n $file->setFileUri($new_uri);\n $file->save();\n }\n }\n}", "public function archiver()\n {\n if(\\Request::ajax())\n {\n $numbers = substr( \\Input::get('boxesarchives'),0,-1);\n $ids = explode(',',$numbers);\n $ids = array_unique($ids);\n foreach($ids as $id)\n {\n $child = Child::findOrFail($id);\n $child->bills()->delete();\n $child->attendances()->delete();\n $child->delete();\n if($child->trashed())\n {\n echo 'oui';\n }\n }\n }\n }", "private function store() {\n\n\t\tforeach ($this->filesToStore as $fileToStore) {\n\t\t\t$storedFile = null;\n\n\t\t\t$title = strtoupper($fileToStore['type']) . \"-\" . $fileToStore['host'] . \"-\" . $fileToStore['file_name'];\n\t\t\t$name = strtoupper($fileToStore['type']) . \"-\" . $fileToStore['host'] . \"-\" . $fileToStore['backup_name'];\n\t\t\t$description = strtoupper($fileToStore['type']) . \" on \" . $fileToStore['host'] . \" backup file\";\n\n\t\t\t//store files to remote storage or local\n\t\t\tforeach ($this->storages as $storage) {\n\n\t\t\t\t//store it to google drive\n\t\t\t\tif (isset($storage['type']) && $storage['type'] == strtolower('gdrive')) {\n\n\t\t\t\t\t$drive = new MaratusGoogleDrive($storage);\n\n\t\t\t\t\t$storedFile = $drive->store($fileToStore['file_path'], $title, $description);\n\n\t\t\t\t}\n\t\t\t\t//store it to dropbox\n\t\t\t\telse if (isset($storage['type']) && $storage['type'] == strtolower('dropbox')) {\n\n\t\t\t\t\t$dBox = new MaratusDropbox($storage);\n\n\t\t\t\t\t$storedFile = $dBox->store($fileToStore['file_path'], $title);\n\n\t\t\t\t}\n\t\t\t\t//store it to copy.com\n\t\t\t\telse if (isset($storage['type']) && $storage['type'] == strtolower('copy')) {\n\n\t\t\t\t\t$copy = new MaratusCopy($storage);\n\n\t\t\t\t\t$storedFile = $copy->store($fileToStore['file_path'], $title);\n\n\t\t\t\t}\n\t\t\t\t//store it to local place\n\t\t\t\telse if (isset($storage['type']) && $storage['type'] == strtolower('local')) {\n\n\t\t\t\t\t$localStorage = new MaratusLocalStorage($storage);\n\n\t\t\t\t\t$storedFile = $localStorage->store($fileToStore['file_path'], $title);\n\n\t\t\t\t}\n\t\t\t\t//store it on ftp server\n\t\t\t\telse if (isset($storage['type']) && $storage['type'] == strtolower('ftp')) {\n\n\t\t\t\t\t$localStorage = new MaratusFtp($storage);\n\n\t\t\t\t\t$storedFile = $localStorage->store($fileToStore['file_path'], $title);\n\n\t\t\t\t}\n\n\t\t\t\t//add result\n\t\t\t\t$this->filesStored[] = array(\n\t\t\t\t\t'type' => $storage['type'],\n\t\t\t\t\t'name' => $name,\n\t\t\t\t\t'file_name' => $title,\n\t\t\t\t\t'description' => $description,\n\t\t\t\t\t'storege_result' => is_object($storedFile) ? (array) $storedFile : $storedFile,\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Remove backup file from disk\n\t\t\t */\n\t\t\t$filesystem = new Filesystem();\n\t\t\t$filesystem->remove($fileToStore['file_path']);\n\t\t}\n\t}", "public function actionDeleteAll() {\n SupItemsSync::model()->deleteAll();\n\n $this->redirect(array('index'));\n }", "public function flushSource()\n {\n if (is_file($this->getStoragePath())) {\n @unlink($this->getStoragePath());\n }\n }", "public function clearStorage(): void\n {\n// foreach ($this->remoteFilesystems as $filesystem) {\n// $contents = $filesystem->listContents('/', true);\n// foreach ($contents as $contentItem) {\n// if ('file' !== $contentItem['type']) {\n// continue;\n// }\n// $filesystem->delete($contentItem['path']);\n// }\n// }\n }", "protected function protectAll($assets)\n {\n if (empty($assets)) {\n return;\n }\n $store = $this->getAssetStore();\n foreach ($assets as $asset) {\n $store->protect($asset['Filename'], $asset['Hash']);\n }\n }", "public function clearItems()\n\t{\n\t\t$this->storage->clear();\n\t}", "public function cleanUpFolder()\r\n {\r\n $fs = new Filesystem();\r\n\r\n foreach($this->file_list as $file) :\r\n if ( preg_match('#^'.$this->destination_dir.'/#', $file))\r\n $fs->remove($file);\r\n endforeach;\r\n }", "public function clearAll() {\n $list = scandir(self::ROOT_PATH . \"/public/{$this->storagePath}\");\n foreach ($list as $file) {\n if ($file == '.' || $file == '..') {\n continue;\n }\n $filePath = self::ROOT_PATH . \"/public/{$this->storagePath}/$file\";\n unlink($filePath);\n }\n $this->_tableGw->delete();\n }", "protected function performActionList()\n\t{\n\t\t// copy order\n\t\t$this->performActionCopyOrder();\n\n\t\t// some other ...\n\t}", "public function clearRootAssetMappings();", "public function update(): void\n {\n $content = $this->getOriginalContent();\n\n $parsed = $this->parseContent($content);\n\n $this->storeList($parsed);\n }", "private static function toDelete(){\n $filesNotToDelete = [];\n $dir = public_path().'/images/';\n $filesInPublicFolder = scandir($dir);\n\n // izbacivanje assets foldera, .. i .\n $ignoreFiles = ['assets', '.', '..', 'pig.png', 'placeholder.png', 'logo.png', 'index.php'];\n foreach ($ignoreFiles as $toIgnore) {\n if (($key = array_search($toIgnore, $filesInPublicFolder)) !== false) {\n unset($filesInPublicFolder[$key]);\n }\n }\n // dd($filesInPublicFolder);\n $images = [];\n $collectionsOfObjectsWithImages = [Product::all(), ProductGroup::all(), Manufacturer::all(),\n Suggestion::all(), ImageSuggestion::all(), MainAd::all(),SecondAd::all()];\n\n foreach ($collectionsOfObjectsWithImages as $collection) {\n foreach ($collection as $object) {\n if($object->images->count()){\n foreach ($object->images as $image) {\n $images[] = $image->name;\n }\n }\n }\n }\n\n // dd($images);\n // dd(array_diff($filesInPublicFolder, $images));\n // dd($filesNotToDelete, $filesInPublicFolder);\n return $toDelete = array_diff($filesInPublicFolder, $images); //za fju array_dif vazan je redoslijed argumenata\n\n }", "public static function remove_all_stores()\n {\n }", "public function prepare_deployment() {\n if ( wpsho_fr()->is__premium_only() ) {\n\n $this->clear_file_list();\n\n $this->create_s3_deployment_list(\n $this->_archiveName,\n $this->_archiveName,\n $this->_remotePath\n );\n\n echo 'SUCCESS';\n }\n }", "public function actionUnpublishItems()\n {\n $civ = CatalogItemVariant::find()\n ->where(['published' => 0])\n ->asArray()\n ->all();\n\n if (!empty($civ)) {\n foreach ($civ as $ci) {\n $oCi = CatalogItem::findOne(['id' => $ci['product_id'], 'published' => 1]);\n if (!empty($oCi)) {\n $oCi->published = 0;\n $oCi->save();\n echo 'Unpublished catalog item id: ' . $ci['product_id'] . PHP_EOL;\n }\n }\n \n }\n }", "protected function tidyUpFiles() {\n\t\t/* load valid ids */\n\t\t$validIds = array();\n\t\t$result = $this->db->query('SELECT id FROM image');\n\t\tif ($result) {\n\t\t\twhile ($entry = $result->fetchArray(SQLITE3_NUM)) {\n\t\t\t\t$validIds[] = $entry[0];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* remove entries with missing file */\n\t\tforeach ($validIds as $id) {\n\t\t\tif (!is_file(self::getPath($id))) {\n\t\t\t\t$this->delete($id);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* delete from list what is not in the database */\n\t\tif ($dh = opendir(self::FILES_DIR)) {\n\t\t\twhile (($id = readdir($dh)) !== false) {\n\t\t\t\tif (preg_match('#^[0-9a-zA-Z]+$#', $id) && !in_array($id, $validIds) && $id != self::DATABASE_FILE) {\n\t\t\t\t\t$this->delete($id);\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($dh);\n\t\t}\n\t}", "public function importAll($force = false)\n {\n $siteConfig = SiteConfig::current_site_config();\n\n $this->getAllUploads();\n\n // Save the time the update was performed\n $siteConfig->VimeoFeed_LastSaved = SS_Datetime::now()->value;\n $siteConfig->write();\n }", "public function restore()\n\t{\n\t\t$this->files = array();\n\t}", "public function flush(): void\n {\n $this->list = [];\n }", "public static function moveDistResources(): void\n {\n $filesystem = new Filesystem();\n $rootDir = getcwd();\n\n $distSourceDir = sprintf('%s/vendor/backbee/toolbar-dist/dist', $rootDir);\n\n if (!is_dir($distSourceDir)) {\n return;\n }\n\n $destDir = sprintf('%s/web/static/back', $rootDir);\n $filesystem->mkdir($destDir);\n $filesystem->mirror(\n $distSourceDir,\n $destDir,\n null, [\n 'override' => true,\n 'delete' => true\n ]\n );\n }", "private function moveParts()\n {\n $filename = $this->substream->getFilename();\n for ($i = 1; $i <= $this->index; ++$i) {\n $indexed_filename = $this->getIndexPartFilename($filename, $i);\n $source = sys_get_temp_dir().'/'.$indexed_filename;\n $target = dirname($this->filename).'/'.$indexed_filename;\n if (!rename($source, $target)) {\n throw FileAccessException::failedOverwrite($source, $target);\n }\n }\n }", "public function unchangeAll(): void\n {\n $this->entries = [];\n\n if ($this->sourceContainer !== null) {\n foreach ($this->sourceContainer->getEntries() as $entry) {\n $this->entries[$entry->getName()] = clone $entry;\n }\n }\n $this->unchangeArchiveComment();\n }", "private function publishAssets()\n {\n $this->call('vendor:publish', [\n '--provider' => 'A17\\Twill\\TwillServiceProvider',\n '--tag' => 'assets',\n '--force' => true,\n ]);\n }", "public function UpdateStorageLocations()\r\n\t{\r\n\t\tself::$_tables[$this->_dbCatalog] = $this->GetStorageLocations();\r\n\t}", "public function persistAll() {}", "function storeImages()\n {\n }", "public static function upload_all(){\n $attachments = new \\CFCDN_Attachments();\n $attachments->upload_all();\n }", "public function resetExtensionCopyStorage() {}", "public function delete_all() {\n\t\t$this->_cache = array();\n\t\t$this->_collections = array();\n\t}", "function storeFiles()\n {\n }", "function execute()\r\n\t\t{\r\n\t\t\tforeach($this->data as $actionType => $action)\r\n\t\t\t{\r\n\t\t\t\tif(isset($actionType)) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tswitch($actionType)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcase \"destroy\":\r\n\t\t\t\t\t\t\t\t$this->remove($action);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}catch(Exception $e) {\r\n\t\t\t\t\t\tdump('item module error', 'item module error');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "function import($files) {\n\t\tforeach ($files as $file) {\n\t\t\t$dest_dir = $this->destDir($file);\n\t\t\t$src_path = JOURNALS_FILES . $file;\n\t\t\t$dest_path = DOWNLOAD_PATH . $this->destDir($file);\n\t\t\t$this->unzip($src_path, $dest_path);\n\t\t\t$res[] = $dest_path . \"/journals.xml\";\n\t\t}\n\t\treturn $res;\n\t}", "public function cleanImagesAction()\n {\n parent::cleanImagesAction();\n $this->clearRespizrImageCache();\n }", "public function importStore()\n {\n if(!empty(Request::input('member_id'))){\n\n foreach(Request::input('member_id') as $member_id){\n $member = Member::find($member_id)->load('idcard');\n if($member->idcard->isEmpty()){\n $idcard = PrintList::create(['member_id' => $member->id]);\n }else{\n $idcard = $member->idcard[0];\n }\n $idcard->reprint();\n $idcard->printed();\n }\n\n flash()->success('Added ' . count(Request::input('member_id')) . ' ID Cards successfully!');\n }\n\n return redirect(url('idcard/import'));\n }", "public static function cleanAllLists() {\r\n \tself::$list=array();\r\n }", "public function getFileStorages() {}", "private function loadItems()\n {\n if ($this->items === null) {\n $this->items = $this->storage->load();\n }\n }", "public function upload(iterable $items, Language $originalLang, Language $translationLang, WordGroup $group = null): void;", "public function actionArchiveList()\n {\n $ids = Yii::$app->request->post('ids');\n $success = false;\n\n if (! empty($ids)) {\n foreach ($ids as $id) {\n $model = $this->findModel($id);\n $model->archive();\n $success = true;\n }\n }\n\n Yii::$app->response->format = Response::FORMAT_JSON;\n\n return [\n 'success' => $success,\n ];\n }", "public function assets(): void\n {\n $count = count($this->grav['assets']['assets_css']) + count($this->grav['assets']['assets_js']);\n $this->handle->writeln('');\n $this->handle->writeln('<white>Processing Asset(s): ' . $count . '</white>');\n $this->progressBar = new ProgressBar(\n $this->handle,\n $count\n );\n $this->buildAssets();\n $this->teardown('Finished ' . $count . ' Asset(s)');\n }", "function movesiteimages()\n\t{\n\t\n\t\tglobal $option, $mainframe;\n\n\t\t//we'll need access to the file system and we'll use the Joomla way to be all safe.\n\t\tjimport('joomla.filesystem.file');\n\t\n\t\t// define where the images are and where we want to put them\n\n\t\t$searchpath = JPATH_ROOT . DS . \"images\". DS .\"content\" . DS .\"arts_curriculum\". DS . \"masters\" ;\n\t\t$destpath = JPATH_ROOT . DS . \"images\". DS .\"content\" . DS .\"arts_cirriculum\". DS . \"tmp\" ;\n\n\t\t//read all the image files and put them in an array.\n\t\t$img_files = JFolder::files($searchpath, '.*');\n\n\t\t//Now we need some stuff from the JFile:: class to move all files into the new folder\n\t\tforeach ($img_files as $file) {\n\t\t\tJFile::move($searchpath. DS . $file, $destpath . DS. $file);\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=' . $option, 'All images have moved into the site folder' );\n\t\n\t}", "private function cleanupFiles() {\n\t\t$this -> loadModel('Archivo');\n\t\t$items = $this -> Archivo -> find('all');\n\t\t$db_files = array();\n\t\tforeach ($items as $key => $item) {\n\t\t\t$db_files[] = $item['Archivo']['ruta'];\n\t\t}\n\t\t$dir_files = array();\n\t\t$dir_path = APP . 'webroot/files/uploads/solicitudesTitulacion';\n\t\tif ($handle = opendir($dir_path)) {\n\t\t\twhile (false !== ($entry = readdir($handle))) {\n\t\t\t\tif ($entry != 'empty' && is_file($dir_path . DS . $entry))\n\t\t\t\t\t$dir_files[] = 'files/uploads/solicitudesTitulacion/' . $entry;\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\tforeach ($dir_files as $file) {\n\t\t\tif (!in_array($file, $db_files)) {\n\t\t\t\t$file = explode('/', $file);\n\t\t\t\t$file = $file[count($file) - 1];\n\t\t\t\t$tmp_file_path = $dir_path . DS . $file;\n\t\t\t\tunlink($tmp_file_path);\n\t\t\t}\n\t\t}\n\t}", "function Assets() {\r\n\t\t\treturn $this->QueryPublic( 'Assets' );\r\n\t\t}", "public function unarchive()\n {\n if ($this->canArchive()) {\n\n $this->archived = 0;\n $this->save();\n }\n }", "function updateShares(array $add, array $remove);", "public static function indexAction(){\n\t\tob_start();\n\t\t\t\n\t\t\t$collection = self::_getCollection();\n\t\t\t$children = $collection->getChildren();\n\t\t\t// $children = $x->getChildren();\n\t\t\t// CunddTools::pd($children);\n\t\t\t\n\t\t\t/*\n\t\t\t * SETTINGS\n\t\t\t * $config['flash_maxCols'] = 5;\n\t\t\t * $config['flash_maxRows'] = NULL;\n\t\t\t * $config['flash_spaceBetweenAlbums'] = 8;\n\t\t\t * $config['flash_albumWidth'] = 200;\n\t\t\t * $config['flash_albumHeight'] = 200;\n\t\t\t * $config['flash_objectType'] = 'Cundd.GraphicObjects.UrlLoading.Cundd_GraphicObjects_UrlLoading_Rect';\n\t\t\t */\n\t\t\t\n\t\t\t$xOffset = 0;\n\t\t\t$colCounter = 0;\n\t\t\t$row = 0;\n\t\t\t$allFlashObjects = array();\n\t\t\t\n\t\t\tif($children){\n\t\t\t\tforeach($children as $key => $child){\n\t\t\t\t\t$args = array();\n\t\t\t\t\t$args['asin'] = $child->getValue('_asin');\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif($args['asin']){\n\t\t\t\t\t\tif($colCounter > CunddConfig::__('Music/flash_maxCols')){\n\t\t\t\t\t\t\t$row++;\n\t\t\t\t\t\t\t$xOffset = 0;\n\t\t\t\t\t\t\t$colCounter = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'x' => $xOffset,\n\t\t\t\t\t\t'y' => $row * ( CunddConfig::__('Music/flash_albumHeight') + CunddConfig::__('Music/flash_spaceBetweenAlbums') ),\n\t\t\t\t\t\t'width' => CunddConfig::__('Music/flash_albumWidth'),\n\t\t\t\t\t\t'height' => CunddConfig::__('Music/flash_albumHeight'),\n\t\t\t\t\t\t'type' => CunddConfig::__('Music/flash_objectType'),\n\t\t\t\t\t\t'url' => CunddConfig::__('Music/image_base_url') . $args['asin'],\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$allFlashObjects[] = Cundd::getModel('Flash',$data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$xOffset = $xOffset + CunddConfig::__('Music/flash_albumWidth') + CunddConfig::__('Music/flash_spaceBetweenAlbums');\n\t\t\t\t\t\t$colCounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// die(\"No children\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$lastObject = $allFlashObjects[count($allFlashObjects) - 1];\n\t\t\t\n\t\t\t// CunddTools::pd($allFlashObjects);\n\t\t\t\n\t\t\t\n\t\t\t//$collection = $lastObject->getCollection();\n\t\t\t$collection = Cundd::getCollection('Flash');\n\t\t\t\n\t\t\t\n\t\t\t$collection->objects=$allFlashObjects;\n\t\t\t$reference = self::_getReference();\n\t\t\t$statusString = $reference->getValue('_artist').\" - \".$reference->getValue('_title').' - '.$reference->getValue('_label').' - '.$reference->getValue('_date');\n\t\t\t\n\t\t\t\n\t\t\t$nameString = Cundd_Session::get('nameString') + 1;\n\t\t\tCundd_Session::set('nameString',$nameString);\n\t\t\t$statusString .= $nameString.\" \".$GLOBALS['search'];\n\t\t\t// $collection->setup = array(\"statusString\" => $statusString,\"phpSessionId\" => session_name().\"=\".session_id());\n\t\t\t$collection->setup = array(\"statusString\" => $statusString,\"phpSessionId\" => SID);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$collection->render();\n\t\t\t\n\t\t$output = ob_get_contents();\n\t\tob_end_clean();\n\t\t\n\t\theader(\"Content-Type:application/xml\");\n//\t\theader('Content-Type: text/html; charset=utf-8');\n//\t\theader(\"Content-Type:text/xhtml\");\n\t\t\n\t\t$output = CunddTools::xmlCleanup($output);\n\t\techo $output;\n\t\treturn $output;\n\t}", "public function cleanFiles()\n { \n $this->zip();\n // $this->unzip();\n\n if (!empty($this->files)) {\n foreach ($files as $file) {\n $this->clean($file);\n }\n }\n }", "protected function cleanupChunks(){\n\t\tforeach (scandir($this->chunksFolder) as $item){\n\t\t\tif ($item == \".\" || $item == \"..\")\n\t\t\t\tcontinue;\n\n\t\t\t$path = $this->chunksFolder.DIRECTORY_SEPARATOR.$item;\n\n\t\t\tif (!is_dir($path))\n\t\t\t\tcontinue;\n\n\t\t\tif (time() - filemtime($path) > $this->chunksExpireIn){\n\t\t\t\t$this->removeDir($path);\n\t\t\t}\n\t\t}\n\t}", "public\n function copyAssets() {\n $this->info('Clearing webroot and copying assets...');\n// if ($this->_clear($this->_assetDir, '^(?!cover)(?!dashboard)(?!signin)(?!baked-with-cakephp.svg).*$')) {\n// $this->success('All files cleared...');\n// }\n\n $files = [];\n $folders = [];\n $folders[] = new Folder($this->_nodeDir->path . DS . 'bootstrap/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'bootstrap-duration-picker/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'bootstrap-markdown-editor/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'bootstrap-toggle');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'checkboxes.js/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'datepair.js/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'flatpickr/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'jquery/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'jquery-awesome-cursor/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'jquery-mask-plugin/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'markitup/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'popper.js/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'select2/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'vue/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'signature_pad/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'sticky-sidebar/dist');\n $folders[] = new Folder($this->_nodeDir->path . DS . 'timepicker/dist');\n\n foreach ($folders as $folder) {\n foreach ($folder->findRecursive() as $file) {\n $files[] = new File($file);\n }\n }\n try {\n $this->_copy($files);\n } catch (\\Exception $exception) {\n $this->info('Some did not copy. Exception: ' . $exception->getMessage(), 1, ConsoleIo::VERBOSE);\n }\n\n }", "public function clear(): void\n {\n $app = App::get();\n $list = $app->data->getList()\n ->filterBy('key', '.temp/cache/', 'startWith');\n foreach ($list as $item) {\n $app->data->delete($item->key);\n };\n }", "public function moveContentAndCopyLivePage() {}", "public function run()\n {\n $paths = Storage::disk('public')->allFiles('images');\n Storage::disk('public')->delete($paths);\n \n factory(Item::class, 20)->create()->each(static function (Item $item) {\n $item->entities()->save(factory(Itementity::class)->make());\n $item->image_id = factory(Image::class)->create()->id;\n $item->save();\n });\n\n $tags = Tag::all();\n Itementity::all()->each(static function (Itementity $entity) use ($tags) {\n $nbTags = random_int(0, 5);\n $entity->tags()->saveMany($tags->random($nbTags));\n });\n }", "public function saveAllPlayers(): void;", "public function archiveAction(){\n $articles = Article::find([\n 'order' => 'creationDate DESC'\n ]);\n $this->view->setVar(\"articles\", $articles);\n }", "protected function getAssets() { return array(); }", "public static function merge()\n {\n $mongo = Mage::getModel('hackathon_ordertransaction/mongo');\n $quotes = $mongo->getQuotes();\n foreach ($quotes as $quote) {\n try {\n $mongo->setToDelete($quote['quote_id']);\n $persistentOrder = Mage::getResourceModel('sales/order');\n $persistentOrder->setData($quote['order']);\n $persistentOrder->save();\n unset($persistentOrder);\n } catch (Exception $e) {\n $mongo->revertToOrder($quote['quote_id']);\n Mage::logException($e);\n }\n }\n unset($quotes, $mongo);\n }", "protected function exportAssets()\n {\n if ($this->option('interactive')) {\n if (! $this->confirm('Install the basic package assets?')) {\n return;\n }\n }\n\n foreach ($this->assets as $asset_key => $asset) {\n $this->copyAssets($asset_key, $this->option('force'));\n }\n\n $this->comment('Basic Assets Installation complete.');\n }", "public function saveContainers()\n {\n $this->toContainer->saveBook();\n $this->fromContainer->saveBook();\n }", "public function execute() {\n GatewayFactory::getInstance()->startTransaction(true);\n $itemsGtw = GatewayFactory::getInstance()->getItemsGateway();\n $item = $itemsGtw->findItem($this->itemId);\n $item->removeItem();\n GatewayFactory::getInstance()->commit();\n $this->result = null;\n $this->status = IApiOutputter::HTTP_OK;\n }", "protected function deleteStore() {\n $keys = ['community', 'address', 'state', 'city', 'country','attention_to','company','promocode','is_student','payment_type','name_card','card_number'];\n foreach ($keys as $key) {\n $this->store->delete($key);\n }\n }", "public function update(){\n parent::update();\n $this->collection = null;\n $this->files = null;\n $this->dublinCore = null;\n }", "public function moveAction(){\r\n // get variables from request\r\n $query = $this->getRequest()->getQuery()->toArray();\r\n $blockId = $query['block_id'];\r\n $navId = $query['id'];\r\n $position = $query['position'];\r\n // get navigation block model\r\n $navBlockModel = $this->getServiceLocator()->get('DotsNavBlock\\Db\\Model\\NavigationBlock');\r\n // get an instance of the item that changes position and set the new position\r\n $nav = $navBlockModel->getById($navId);\r\n $nav->position = $position;\r\n // get all other items from the navigation\r\n $items = $navBlockModel->getAllByColumnsOrderByPosition(array(\r\n 'block_id = ?' => $blockId,\r\n 'id != ?' => $navId\r\n ));\r\n\r\n // update positions for all items\r\n $pos = 1;\r\n if ($items){\r\n foreach ($items as $itm){\r\n if ($pos==$position){\r\n $pos++;\r\n }\r\n $itm->position = $pos++;\r\n $navBlockModel->persist($itm);\r\n }\r\n }\r\n $navBlockModel->persist($nav);\r\n // save everything in the DB\r\n $navBlockModel->flush();\r\n\r\n return $this->jsonResponse(array('success' => true));\r\n }", "public function cleanup()\n\t{\n\t\t$ArticlesLatest = Article::where('status', 'read')->where('star_ind', '0')->orderBy('created_at', 'desc')->select('id')->take(10000)->get();\n\t\t$ArticlesStar = Article::where('star_ind', '1')->select('id')->get();\n\t\t$ArticlesUnread = Article::where('status', 'unread')->select('id')->get();\n\n\t\t//create new empty array to store id's\n\t\t$cleanup_item_ids = [];\n\n\t\t//store id's from ArticlesStar in cleanup_item_ids\n\t\tif (!empty($ArticlesStar)) {\n\t\t\tforeach ($ArticlesStar as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//store id's from ArticlesLatest in cleanup_item_ids\n\t\tif (!empty($ArticlesLatest)) {\n\t\t\tforeach ($ArticlesLatest as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//store id's from ArticlesUnread in cleanup_item_ids\n\t\tif (!empty($ArticlesUnread)) {\n\t\t\tforeach ($ArticlesUnread as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//delete items that are not in cleanup_item_ids array\n\t\tArticle::whereNotIn('id', $cleanup_item_ids)->delete();\n\t}", "function ag_clean_wm_cache() {\n\trequire_once(AG_DIR . '/functions.php');\n\t\n\t$wp_dirs = wp_upload_dir();\n\t$cache_dir = trailingslashit($wp_dirs['basedir']) . 'ag_watermarked';\n\t\n\t// folder exists?\n\tif(!@file_exists($cache_dir)) {\n\t\tdie('success');\t\n\t}\n\t\n\t// clean\n\tforeach(scandir($cache_dir) as $file) {\n\t\t$ext = ag_stringToExt($file);\n\t\t$accepted = array('.jpg', '.jpeg', '.gif', '.png');\n\t\t\n\t\tif(in_array($ext, $accepted) && file_exists($cache_dir.'/'.$file)) {\n\t\t\tunlink($cache_dir.'/'.$file);\n\t\t}\t\n\t}\n\n\tdie('success');\n}", "public function cleanAll()\n {\n $this->filesystem->remove(self::getFilesList());\n }", "public function get_assets_all()\n {\n return $this->assets;\n }", "public function run()\n {\n\n $json = File::get(\"database/data/brands.json\");\n $data = json_decode($json);\n foreach ($data as $obj){\n Cloudder::upload(storage_path(\"images/brand/\".$obj->banner),null, array(\"folder\"=>\"Stonk/Brands/\"));\n $banner = Cloudder::getResult();\n Cloudder::upload(storage_path(\"images/brand/\".$obj->image),null,array(\"folder\"=>\"Stonk/Brands/\"));\n $image = Cloudder::getResult();\n $brand = new Brand();\n $brand->name = $obj->name;\n $brand->description = $obj->description;\n $brand->banner = $banner['url'];\n $brand->image = $image['url'];\n $brand->save();\n }\n }" ]
[ "0.63853717", "0.56475693", "0.56206787", "0.54758507", "0.5433083", "0.5412192", "0.5293561", "0.51931614", "0.5176156", "0.5174548", "0.5157739", "0.5152773", "0.5148324", "0.509165", "0.5081713", "0.507259", "0.5056157", "0.5045812", "0.50258976", "0.50258976", "0.50230664", "0.5021496", "0.4961029", "0.49592203", "0.4955392", "0.49501473", "0.49447188", "0.49332878", "0.4927404", "0.4926844", "0.49198407", "0.4909308", "0.49021325", "0.48766568", "0.48714706", "0.48686412", "0.48493364", "0.4840232", "0.48396286", "0.48360276", "0.48209944", "0.48138103", "0.48129112", "0.48008725", "0.47675446", "0.4754898", "0.47539276", "0.47440544", "0.47434384", "0.4740833", "0.47341567", "0.47307608", "0.471913", "0.47174117", "0.47004372", "0.46984836", "0.46982488", "0.4691678", "0.468624", "0.46837425", "0.46798703", "0.46788955", "0.46700183", "0.46685222", "0.46682847", "0.46609232", "0.4650595", "0.46491703", "0.4645204", "0.46441057", "0.46393967", "0.46367654", "0.46327803", "0.46322304", "0.46247151", "0.46185505", "0.4618102", "0.46081868", "0.46041948", "0.46017587", "0.46015203", "0.4596357", "0.45931914", "0.45843416", "0.45720822", "0.45720753", "0.45700505", "0.45688006", "0.45662835", "0.4564676", "0.45621368", "0.45620936", "0.45584092", "0.45556915", "0.45547098", "0.4554038", "0.45528162", "0.45519936", "0.45423532", "0.45330796" ]
0.5120564
13
Move all assets in the list to the protected store
protected function protectAll($assets) { if (empty($assets)) { return; } $store = $this->getAssetStore(); foreach ($assets as $asset) { $store->protect($asset['Filename'], $asset['Hash']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function moveAssets()\n {\n foreach ($this->reports as $report) {\n $old_file = config('import.import_assets_reports_path') . DIRECTORY_SEPARATOR . $report->file;\n $new_file = config('momentum.reports_path') . DIRECTORY_SEPARATOR . $report->file;\n\n $this->moveFile($old_file, $new_file);\n }\n\n foreach ($this->organizations as $organization) {\n // not every organization has a logo\n if (!$organization->logo) {\n continue;\n }\n\n $old_file = config('import.import_assets_logos_path') . DIRECTORY_SEPARATOR . $organization->logo;\n $new_file = config('momentum.logos_path') . DIRECTORY_SEPARATOR . $organization->logo;\n\n $this->moveFile($old_file, $new_file);\n }\n }", "public function purgeAll() {\n\t\tset_time_limit(300);\n\t\t$this->load->model(\"filehandlerbase\");\n\t\t$fileList = $this->filehandlerbase->findDeletedItems();\n\t\t$mfa = $this->input->post(\"mfa\");\n\t\t$serial = $this->input->post(\"arn\");\n\n\t\t/**\n\t\t * we need to cache this because MFA is only good once\n\t\t */\n\t\t$lastUsedToken = null;\n\t\tforeach($fileList as $fileEntry) {\n\t\t\t$fileHandler = $this->filehandler_router->getHandlerForObject($fileEntry->getFileObjectId());\n\t\t\tif(!$fileHandler) { \n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(!$fileHandler->loadFromObject($fileEntry)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($lastUsedToken)) {\n\t\t\t\t$fileHandler->s3model->sessionToken = $lastUsedToken;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif(!$fileHandler->deleteSource($serial,$mfa)) {\n\t\t\t\t\t$this->logging->logError(\"purgeAll\",\"Could not delete asset with key\" . $fileEntry->getFileObjectId());\n\t\t\t\t}\n\t\t\t\t$lastUsedToken = $fileHandler->s3model->sessionToken;\n\t\t\t}\n\t\t\tcatch (Exception $e) {\n\t\t\t\techo $e;\n\t\t\t\techo \"Deletion fail\";\n\t\t\t}\n\n\t\t}\n\n\t\tinstance_redirect(\"/admin\");\n\t}", "private function saveItems()\n {\n $this->storage->save($this->items);\n }", "public function moveItems2DownloadList($cartlist = array())\n {\n \n $insert_item = array();\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction(); \n $l_table = Engine_Api::_()->getDbTable('lists', 'mp3music'); \n foreach($cartlist as $key=>$value)\n {\n if ($value['type'] == 'song') \n {\n $insert_item = array($value['item_id'],0,Engine_Api::_()->user()->getViewer()->getIdentity());\n }\n if ($value['type'] == 'album') \n {\n $insert_item = array(0,$value['item_id'],Engine_Api::_()->user()->getViewer()->getIdentity());\n }\n $list = $l_table->createRow();\n $list->dl_song_id = $insert_item[0];\n $list->dl_album_id = $insert_item[1];\n $list->user_id = $insert_item[2];\n $list->save();\n }\n try {\n $db->commit();\n } catch (Exception $ex) {\n $db->rollback();\n break;\n } \n }", "public function onAfterDelete()\n {\n if (!$this->hasAssets()) {\n return;\n }\n\n // Prepare blank manipulation\n $manipulations = new AssetManipulationList();\n\n // Add all assets for deletion\n $this->addAssetsFromRecord($manipulations, $this->owner, AssetManipulationList::STATE_DELETED);\n\n // Whitelist assets that exist in other stages\n $this->addAssetsFromOtherStages($manipulations);\n\n // Apply visibility rules based on the final manipulation\n $this->processManipulation($manipulations);\n }", "public function onPostDispatch()\n {\n /** @var Shipperhq_Shipper_Model_Storage[] $storageList */\n $storageList = Mage::helper('shipperhq_shipper')->storageManager()->getStorageObjects();\n foreach ($storageList as $storage) {\n if ($storage->hasDataChanges() && $storage->getId()) {\n $this->_saveStorageInstance($storage);\n }\n }\n }", "protected function persistObjects() {}", "public function onBeforeWrite()\n {\n if (!$this->hasAssets()) {\n return;\n }\n\n // Prepare blank manipulation\n $manipulations = new AssetManipulationList();\n\n // Mark overwritten object as deleted\n if ($this->owner->isInDB()) {\n $priorRecord = DataObject::get(get_class($this->owner))->byID($this->owner->ID);\n if ($priorRecord) {\n $this->addAssetsFromRecord($manipulations, $priorRecord, AssetManipulationList::STATE_DELETED);\n }\n }\n\n // Add assets from new record with the correct visibility rules\n $state = $this->getRecordState($this->owner);\n $this->addAssetsFromRecord($manipulations, $this->owner, $state);\n\n // Whitelist assets that exist in other stages\n $this->addAssetsFromOtherStages($manipulations);\n\n // Apply visibility rules based on the final manipulation\n $this->processManipulation($manipulations);\n }", "function moveAssignmentFilters() {\n try {\n $assignment_filters_table = TABLE_PREFIX . 'assignment_filters';\n $data_filters_table = TABLE_PREFIX . 'data_filters';\n $homescreen_tabs_table = TABLE_PREFIX . 'homescreen_tabs';\n\n DB::beginWork('Move assignment filters to the new storage @ ' . __CLASS__);\n\n $assignment_filters = DB::execute(\"SELECT * FROM $assignment_filters_table\");\n if($assignment_filters) {\n $assignment_filter_tabs_map = $this->getTabsThatUseAssignmentFilters();\n\n foreach($assignment_filters as $filter) {\n $old_assignment_filter_id = (integer) $filter['id'];\n\n DB::execute(\"INSERT INTO $data_filters_table (type, name, raw_additional_properties, created_on, created_by_id, created_by_name, created_by_email, is_private) VALUES ('AssignmentFilter', ?, ?, ?, ?, ?, ?, ?)\", $filter['name'], $filter['raw_additional_properties'], $filter['created_on'], $filter['created_by_id'], $filter['created_by_name'], $filter['created_by_email'], $filter['is_private']);\n\n $new_assignmnet_filter_id = DB::lastInsertId();\n\n if(isset($assignment_filter_tabs_map[$old_assignment_filter_id]) && count($assignment_filter_tabs_map[$old_assignment_filter_id])) {\n DB::execute(\"UPDATE $homescreen_tabs_table SET raw_additional_properties = ? WHERE id IN (?)\", serialize(array('assignment_filter_id' => $new_assignmnet_filter_id)), $assignment_filter_tabs_map[$old_assignment_filter_id]);\n } // if\n } // foreach\n } // if\n\n DB::commit('Assignment filters moved to the new storage @ ' . __CLASS__);\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n try {\n $table_list = DB::listTables(TABLE_PREFIX);\n\n if(in_array($assignment_filters_table, $table_list)) {\n DB::execute(\"DROP TABLE $assignment_filters_table\");\n } // if\n\n if(in_array(TABLE_PREFIX . 'milestone_filters', $table_list)) {\n DB::execute('DROP TABLE ' . TABLE_PREFIX . 'milestone_filters');\n } // if\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function reset()\n {\n $db = Zend_Registry::get('dbAdapter');\n $dbname = Zend_Registry::get('configDatabase')->database->params->dbname;\n\n $stmt = $db->query(\"SELECT * FROM INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = '\".$dbname.\"'\");\n while ($row = $stmt->fetch()) {\n $db->query('DELETE FROM `'.$row['TABLE_NAME'].'`');\n }\n\n $path = UtilityComponent::getDataDirectory('assetstore');\n $dir = opendir($path);\n while ($entry = readdir($dir)) {\n if (is_dir($path.'/'.$entry) && !in_array($entry, array('.', '..'))\n ) {\n $this->_rrmdir($path.'/'.$entry);\n }\n }\n\n $path = UtilityComponent::getDataDirectory('thumbnail');\n $dir = opendir($path);\n while ($entry = readdir($dir)) {\n if (is_dir($path.'/'.$entry) && !in_array($entry, array('.', '..'))\n ) {\n $this->_rrmdir($path.'/'.$entry);\n }\n }\n\n if (file_exists(LOCAL_CONFIGS_PATH.'/ldap.local.ini')) {\n unlink(LOCAL_CONFIGS_PATH.'/ldap.local.ini');\n }\n\n /** @var UserModel $userModel */\n $userModel = MidasLoader::loadModel('User');\n\n $admin = $userModel->createUser(MIDAS_DEMO_ADMIN_EMAIL, MIDAS_DEMO_ADMIN_PASSWORD, 'Demo', 'Administrator', 1);\n $userModel->createUser(MIDAS_DEMO_USER_EMAIL, MIDAS_DEMO_USER_PASSWORD, 'Demo', 'User', 0);\n\n /** @var CommunityModel $communityModel */\n $communityModel = MidasLoader::loadModel('Community');\n $communityDao = $communityModel->createCommunity(\n 'Demo',\n 'This is a demo community',\n MIDAS_COMMUNITY_PUBLIC,\n $admin,\n MIDAS_COMMUNITY_CAN_JOIN\n );\n\n /** @var AssetstoreModel $assetstoreModel */\n $assetstoreModel = MidasLoader::loadModel('Assetstore');\n $assetstoreDao = new AssetstoreDao();\n $assetstoreDao->setName('Default');\n $assetstoreDao->setPath(UtilityComponent::getDataDirectory('assetstore'));\n $assetstoreDao->setType(MIDAS_ASSETSTORE_LOCAL);\n $assetstoreModel->save($assetstoreDao);\n\n /** @var SettingModel $settingModel */\n $settingModel = MidasLoader::loadModel('Setting');\n $settingModel->setConfig('default_assetstore', $assetstoreDao->getKey());\n\n $options = array('allowModifications' => true);\n $config = new Zend_Config_Ini(CORE_CONFIGS_PATH.'/application.ini', null, $options);\n $config->global->dynamichelp = 1;\n $config->global->environment = 'production';\n $config->global->application->name = 'Midas Platform - Demo';\n $description = 'Midas Platform is an open-source toolkit that enables the\n rapid creation of tailored, web-enabled data storage. Designed to meet\n the needs of advanced data-centric computing, Midas Platform addresses\n the growing challenge of large data by providing a flexible, intelligent\n data storage system. The system integrates multimedia server technology\n with other open-source data analysis and visualization tools to enable\n data-intensive applications that easily interface with existing\n workflows.';\n $config->global->application->description = $description;\n\n $enabledModules = array(\n 'api',\n 'metadataextractor',\n 'oai',\n 'statistics',\n 'scheduler',\n 'thumbnailcreator',\n 'visualize',\n );\n foreach ($enabledModules as $module) {\n if (file_exists(LOCAL_CONFIGS_PATH.'/'.$module.'.demo.local.ini')) {\n copy(\n LOCAL_CONFIGS_PATH.'/'.$module.'.demo.local.ini',\n LOCAL_CONFIGS_PATH.'/'.$module.'.local.ini'\n );\n $config->module->$module = 1;\n } else {\n unlink(LOCAL_CONFIGS_PATH.'/'.$module.'.local.ini');\n }\n }\n\n $writer = new Zend_Config_Writer_Ini();\n $writer->setConfig($config);\n $writer->setFilename((LOCAL_CONFIGS_PATH.'/application.local.ini'));\n $writer->write();\n\n $configGlobal = new Zend_Config_Ini(APPLICATION_CONFIG, 'global', true);\n Zend_Registry::set('configGlobal', $configGlobal);\n\n /** @var UploadComponent $uploadComponent */\n $uploadComponent = MidasLoader::loadComponent('Upload');\n $uploadComponent->createUploadedItem(\n $admin,\n 'midasLogo.gif',\n BASE_PATH.'/core/public/images/midasLogo.gif',\n $communityDao->getPublicFolder(),\n null,\n '',\n true\n );\n $uploadComponent->createUploadedItem(\n $admin,\n 'cow.vtp',\n BASE_PATH.'/modules/demo/public/'.$this->moduleName.'/cow.vtp',\n $communityDao->getPublicFolder(),\n null,\n '',\n true\n );\n }", "public function flushAssets()\n\t{\n\t\t(new Version)->refreshMediaVersion();\n\t}", "function shiftList() {\n\t\t$rest = array_splice($this->galleysToUpdate, \\dfm\\processor::maxUpdatesAtOnce);\n\t\t$ids = array_map(function($item) {\n\t\t\treturn $item->galley->getId();\n\t\t}, $rest);\n\t\t$this->continue = array(\n\t\t\t'galleyIds' => $ids,\n\t\t\t'updateFrontpages' => $this->updateFrontpages\n\t\t);\n\t}", "function __reimportPhotos(){\n\t\t$this->Asset->disablePermissionable();\n\t\t$this->Asset->recursive=0;\n\t\t$json = $this->Asset->find('all', array('fields'=>'json_src'));\n\t\t$json =Set::extract($json, '/Asset/json_src');\n\t\tforeach ($json as $row) {\n\t\t\t$imgSrc = json_decode($row);\n\t\t\t$src = \"Summer2009/\".basename($imgSrc->orig);\n\t\t\t$dest = $imgSrc->preview;\n\t\t\t$src_baseurl = Configure::read('path.local.preview');\n\t\t\t$dest_baseurl = Configure::read('stageroot.basepath');\n\t\t\t$shell_cmd[] =\"cp {$src_baseurl}/{$src} {$dest_baseurl}/{$dest}\";\n\t\t\t//\t\t\tmkdir(dirname(Configure::read('stageroot.basepath').\"/{$dest}\"), 0777, $recursive=true);\n\t\t\t//\t\t\tcopy( Configure::read('path.local.preview').\"/{$src}\", Configure::read('stageroot.basepath').\"/{$dest}\");\n\t\t}\n\t\tdebug($shell_cmd);\n\t}", "function persistAll() ;", "public function storeOriginals()\n {\n $this->originals = $this->toArray();\n }", "private static function deleteAssets() {\n // Fail due to invalid asset deletors \n assert(isset(self::$assetDeletors));\n\n // Remove assets \n foreach (self::$assetDeletors as $deletor) {\n $deletor->delete();\n }\n\n // Clear AssetDeletors cache\n self::$assetDeletors = array();\n }", "public function addAdminAssets() {}", "public function restore()\n\t{\n\t\t$this->files = array();\n\t}", "public function archiveObjects()\n {\n $randProbability = mt_rand(1, 1000);\n \n if ($randProbability < 750) {\n return;\n }\n \n $this->session->set('RKDownLoadModuleAutomaticArchiving', true);\n \n // perform update for files becoming archived\n $logArgs = ['app' => 'RKDownLoadModule', 'entity' => 'file'];\n $this->logger->notice('{app}: Automatic archiving for the {entity} entity started.', $logArgs);\n $repository = $this->entityFactory->getRepository('file');\n $repository->archiveObjects($this->permissionApi, $this->session, $this->translator, $this->workflowHelper, $this->hookHelper);\n $this->logger->notice('{app}: Automatic archiving for the {entity} entity completed.', $logArgs);\n \n $this->session->del('RKDownLoadModuleAutomaticArchiving');\n }", "protected function tidyUpFiles() {\n\t\t/* load valid ids */\n\t\t$validIds = array();\n\t\t$result = $this->db->query('SELECT id FROM image');\n\t\tif ($result) {\n\t\t\twhile ($entry = $result->fetchArray(SQLITE3_NUM)) {\n\t\t\t\t$validIds[] = $entry[0];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* remove entries with missing file */\n\t\tforeach ($validIds as $id) {\n\t\t\tif (!is_file(self::getPath($id))) {\n\t\t\t\t$this->delete($id);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* delete from list what is not in the database */\n\t\tif ($dh = opendir(self::FILES_DIR)) {\n\t\t\twhile (($id = readdir($dh)) !== false) {\n\t\t\t\tif (preg_match('#^[0-9a-zA-Z]+$#', $id) && !in_array($id, $validIds) && $id != self::DATABASE_FILE) {\n\t\t\t\t\t$this->delete($id);\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($dh);\n\t\t}\n\t}", "public function backUp()\n {\n $inventory = $this->inventory;\n $this->oldInventory = $inventory;\n return;\n }", "public function flushItems()\n\t{\n\t\t$this->items = array();\n\t}", "public function persistAll() {}", "public function restoretrash() {\n $pages = Page::onlyTrashed()->get(); \n foreach($pages as $page) {\n $page->restore();\n }\n return redirect()->route('admin.pages');\n }", "protected function deleteStore() {\n $keys = ['community', 'address', 'state', 'city', 'country','attention_to','company','promocode','is_student','payment_type','name_card','card_number'];\n foreach ($keys as $key) {\n $this->store->delete($key);\n }\n }", "public function flushSource()\n {\n if (is_file($this->getStoragePath())) {\n @unlink($this->getStoragePath());\n }\n }", "public static function remove_all_stores()\n {\n }", "protected function performActionList()\n\t{\n\t\t// copy order\n\t\t$this->performActionCopyOrder();\n\n\t\t// some other ...\n\t}", "public function resetItems()\n {\n Yii::$app->session->set('cart', []);\n }", "private function moveParts()\n {\n $filename = $this->substream->getFilename();\n for ($i = 1; $i <= $this->index; ++$i) {\n $indexed_filename = $this->getIndexPartFilename($filename, $i);\n $source = sys_get_temp_dir().'/'.$indexed_filename;\n $target = dirname($this->filename).'/'.$indexed_filename;\n if (!rename($source, $target)) {\n throw FileAccessException::failedOverwrite($source, $target);\n }\n }\n }", "protected function storeFiles()\n {\n $this->log(sprintf('%s', __METHOD__), 'debug');\n\n $this->log(sprintf('Playlist - Writing file list to temporary file. (%s)', basename($this->tempFilesFromFilename)), 'info');\n $stream = new Stream(fopen($this->tempFilesFromFilename, 'w'));\n\n try {\n $stream->write($this->filesToString());\n } catch (\\Exception $e) {\n $this->log(sprintf('Playlist - Error while writing to file %s. (%s)', basename($this->tempFilesFromFilename), $e->getMessage()), 'error');\n }\n\n $stream->close();\n }", "public static function storeAll()\n {\n foreach (self::$_activeFilters as $target => $filter) {\n $filter->store();\n }\n }", "public function importStore()\n {\n if(!empty(Request::input('member_id'))){\n\n foreach(Request::input('member_id') as $member_id){\n $member = Member::find($member_id)->load('idcard');\n if($member->idcard->isEmpty()){\n $idcard = PrintList::create(['member_id' => $member->id]);\n }else{\n $idcard = $member->idcard[0];\n }\n $idcard->reprint();\n $idcard->printed();\n }\n\n flash()->success('Added ' . count(Request::input('member_id')) . ' ID Cards successfully!');\n }\n\n return redirect(url('idcard/import'));\n }", "public function actionDeleteAll() {\n SupItemsSync::model()->deleteAll();\n\n $this->redirect(array('index'));\n }", "public function process_bulk_action()\n {\n if ('update' === $this->current_action()) {\n wp_die('Items deleted (or they would be if we had items to delete)!');\n }\n }", "public function archiver()\n {\n if(\\Request::ajax())\n {\n $numbers = substr( \\Input::get('boxesarchives'),0,-1);\n $ids = explode(',',$numbers);\n $ids = array_unique($ids);\n foreach($ids as $id)\n {\n $child = Child::findOrFail($id);\n $child->bills()->delete();\n $child->attendances()->delete();\n $child->delete();\n if($child->trashed())\n {\n echo 'oui';\n }\n }\n }\n }", "protected function _afterLoad()\n {\n foreach ($this->_items as $item) {\n $this->getResource()->unserializeFields($item);\n }\n return parent::_afterLoad();\n }", "abstract protected function saveItems();", "private function restorePagesets() {\n foreach ($this->oldPagesetMappingDatabase as $pageSet) {\n if ($pageSet['page_set_id'] < CP_FIRST_CUSTOM_PAGESET_ID && !($pageSet['attr'] & UA_ATTR_ENABLED)) {\n // since the page set was previously NOT enabled, update the database without the enabled flag\n \\RightNow\\Api::cp_ua_mapping_update(array(\n 'page_set_id' => $pageSet['page_set_id'],\n 'attr' => $pageSet['attr'] | !UA_ATTR_ENABLED\n ));\n }\n }\n if(!$this->skipDeploy) {\n if ($this->oldPagesetMapping !== false) {\n try {\n FileSystem::filePutContentsOrThrowExceptionOnFailure($pageSetMappingPath, $pageSetMapping);\n }\n catch (\\Exception $e) {\n //Don't throw error during unit tests\n }\n }\n else {\n @unlink($pageSetMappingPath);\n }\n }\n }", "public function clearItems()\n\t{\n\t\t$this->storage->clear();\n\t}", "public function UpdateStorageLocations()\r\n\t{\r\n\t\tself::$_tables[$this->_dbCatalog] = $this->GetStorageLocations();\r\n\t}", "public static function merge()\n {\n $mongo = Mage::getModel('hackathon_ordertransaction/mongo');\n $quotes = $mongo->getQuotes();\n foreach ($quotes as $quote) {\n try {\n $mongo->setToDelete($quote['quote_id']);\n $persistentOrder = Mage::getResourceModel('sales/order');\n $persistentOrder->setData($quote['order']);\n $persistentOrder->save();\n unset($persistentOrder);\n } catch (Exception $e) {\n $mongo->revertToOrder($quote['quote_id']);\n Mage::logException($e);\n }\n }\n unset($quotes, $mongo);\n }", "public function storeAll(iterable $snapshots): void;", "public function unarchive()\n {\n if ($this->canArchive()) {\n\n $this->archived = 0;\n $this->save();\n }\n }", "public function RemoveArtworkList(): void{\n\n if(!Session::isLogin())\n exit;\n\n if(!ArtworkVerifier::removeList($_POST))\n exit;\n\n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id))\n UserList::where('user_id', Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->delete();\n }", "function execute()\r\n\t\t{\r\n\t\t\tforeach($this->data as $actionType => $action)\r\n\t\t\t{\r\n\t\t\t\tif(isset($actionType)) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tswitch($actionType)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcase \"destroy\":\r\n\t\t\t\t\t\t\t\t$this->remove($action);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}catch(Exception $e) {\r\n\t\t\t\t\t\tdump('item module error', 'item module error');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public function cleanImagesAction()\n {\n parent::cleanImagesAction();\n $this->clearRespizrImageCache();\n }", "protected function all() : void\n {\n File::ensureDirectoryExists(Path::storage('app/public'));\n File::ensureDirectoryExists(Path::storage('app/private'));\n\n File::ensureDirectoryExists(Path::storage('framework/logs'));\n File::ensureDirectoryExists(Path::storage('framework/views'));\n\n File::put(Path::storage('framework/logs/laravel.log'), '');\n\n Artisan::call('storage:link --force');\n }", "protected function deleteStore() {\n $keys = ['entity_type', 'entity_id', 'export_type'];\n foreach ($keys as $key) {\n $this->store->delete($key);\n }\n }", "private function loadItems()\n {\n if ($this->items === null) {\n $this->items = $this->storage->load();\n }\n }", "public function resetExtensionCopyStorage() {}", "protected function swapAll($assets)\n {\n if (empty($assets)) {\n return;\n }\n\n $store = $this->getAssetStore();\n\n // The `swap` method was introduced in the 1.4 release. It wasn't added to the interface to avoid breaking\n // custom implementations. If it's not available on our store, we fall back to a publish/protect\n if (method_exists($store, 'swapPublish')) {\n foreach ($assets as $asset) {\n $store->swapPublish($asset['Filename'], $asset['Hash']);\n }\n } else {\n foreach ($assets as $asset) {\n $store->publish($asset['Filename'], $asset['Hash']);\n }\n }\n }", "protected function restoreTrashedItems()\n {\n $trashedItems = Item::onlyTrashed()->get();\n foreach ($trashedItems as $item) {\n $item->restore();\n }\n\n }", "public function store(Request $request)\n {\n if($request->hasFile('preview_image')){\n $preview_image = $request->file('preview_image');\n $preview_image_name = uniqid().'.'.strtolower($preview_image->getClientOriginalExtension());\n $preview_image_path = 'relocation-store-images/';\n $preview_image_url = $preview_image_path.$preview_image_name;\n $preview_image->move($preview_image_path,$preview_image_name);\n }else{\n $preview_image_url = null;\n }\n\n if($request->hasFile('multiple_images')){\n $multi_images = $request->file('multiple_images');\n\n foreach($multi_images as $image)\n {\n $multi_image_name = uniqid().'.'.strtolower($image->getClientOriginalExtension());\n $multi_image_path = 'relocation-store-images/';\n $multi_image_url = $multi_image_path.$multi_image_name;\n $image->move($multi_image_path, $multi_image_name);\n $data[] = $multi_image_url; \n }\n }else{\n $data[] = null;\n }\n\n $relocationstore = new RelocationStore();\n $relocationstore->module_id = $request->module_id;\n $relocationstore->name = $request->name;\n $relocationstore->name_arabic = $request->name_arabic;\n $relocationstore->description = $request->description;\n $relocationstore->arabic_description = $request->arabic_description;\n $relocationstore->lat = $request->lat;\n $relocationstore->lng = $request->lng;\n $relocationstore->status = $request->status;\n $relocationstore->store_owner_id = Auth::user()->id;\n $relocationstore->preview_image = $preview_image_url;\n if($data[0] == null){\n $data_img = null;\n }else{\n $data_img = implode(',', $data);\n }\n // dd($data_img);\n $relocationstore->multiple_images = $data_img;\n $relocationstore->location = $request->location;\n $relocationstore->arabic_location = $request->arabic_location;\n $relocationstore->save();\n\n\n return redirect('relocation-stores')->with('success', 'RelocationStore added!');\n }", "protected function avantSuppression() {\n $passagers = $this->getListePassagers();\n foreach ($passagers as $passager) {\n $passager->supprimer();\n }\n }", "protected function processManipulation(AssetManipulationList $manipulations)\n {\n // When deleting from stage then check if we should archive assets\n $archive = $this->owner->config()->get('keep_archived_assets');\n\n // Check deletion policy\n $deletedAssets = $manipulations->getDeletedAssets();\n if ($archive && $this->isVersioned()) {\n // Publish assets\n $this->swapAll($manipulations->getPublicAssets());\n // Archived assets are kept protected\n $this->protectAll($deletedAssets);\n } else {\n // Remove old version\n $this->deleteAll($deletedAssets);\n // Publish assets\n $this->publishAll($manipulations->getPublicAssets());\n }\n\n // Protect assets\n $this->protectAll($manipulations->getProtectedAssets());\n }", "public function delete_all() {\n\t\t$this->_cache = array();\n\t\t$this->_collections = array();\n\t}", "protected function deleteStore()\n {\n $keys = ['name', 'email'];\n foreach ($keys as $key) {\n $this->store->delete($key);\n }\n }", "public function absorb(LinkManager $ls){\n\t\tforeach($ls->list as $k => $v)\n\t\t\t$this->add($k, $v);\n\t}", "public function update(Request $request, $id)\n {\n $relocationstore = RelocationStore::findOrFail($id);\n if($request->hasFile('preview_image')){\n $preview_image = $request->file('preview_image');\n $preview_image_name = uniqid().'.'.strtolower($preview_image->getClientOriginalExtension());\n $preview_image_path = 'relocation-store-images/';\n $preview_image_url = $preview_image_path.$preview_image_name;\n $preview_image->move($preview_image_path,$preview_image_name);\n if($relocationstore->preview_image != null){\n unlink($relocationstore->preview_image);\n }\n }else{\n $preview_image_url = $relocationstore->preview_image;\n }\n\n if($request->hasFile('multiple_images')){\n $multi_images = $request->file('multiple_images');\n\n foreach($multi_images as $image)\n {\n $multi_image_name = uniqid().'.'.strtolower($image->getClientOriginalExtension());\n $multi_image_path = 'relocation-store-images/';\n $multi_image_url = $multi_image_path.$multi_image_name;\n $image->move($multi_image_path, $multi_image_name);\n $data[] = $multi_image_url; \n }\n if($relocationstore->multiple_images != null){\n $multiple_img = explode(',', $relocationstore->multiple_images);\n foreach($multiple_img as $img)\n {\n unlink($img);\n }\n }\n }else{\n $data[] = $relocationstore->multiple_images;\n }\n \n \n $relocationstore->module_id = $request->module_id;\n $relocationstore->name = $request->name;\n $relocationstore->name_arabic = $request->name_arabic;\n $relocationstore->description = $request->description;\n $relocationstore->arabic_description = $request->arabic_description;\n $relocationstore->lat = $request->lat;\n $relocationstore->lng = $request->lng;\n $relocationstore->status = $request->status;\n $relocationstore->store_owner_id = Auth::user()->id;\n $relocationstore->preview_image = $preview_image_url;\n if($data[0] == null){\n $data_img = null;\n }else{\n $data_img = implode(',', $data);\n }\n // dd($data_img);\n $relocationstore->multiple_images = $data_img;\n $relocationstore->location = $request->location;\n $relocationstore->arabic_location = $request->arabic_location;\n $relocationstore->save();\n\n return redirect('relocation-stores')->with('success', 'RelocationStore updated!');\n }", "public function addAssets() {}", "public function addAssets() {}", "public function cleanup()\n\t{\n\t\t$ArticlesLatest = Article::where('status', 'read')->where('star_ind', '0')->orderBy('created_at', 'desc')->select('id')->take(10000)->get();\n\t\t$ArticlesStar = Article::where('star_ind', '1')->select('id')->get();\n\t\t$ArticlesUnread = Article::where('status', 'unread')->select('id')->get();\n\n\t\t//create new empty array to store id's\n\t\t$cleanup_item_ids = [];\n\n\t\t//store id's from ArticlesStar in cleanup_item_ids\n\t\tif (!empty($ArticlesStar)) {\n\t\t\tforeach ($ArticlesStar as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//store id's from ArticlesLatest in cleanup_item_ids\n\t\tif (!empty($ArticlesLatest)) {\n\t\t\tforeach ($ArticlesLatest as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//store id's from ArticlesUnread in cleanup_item_ids\n\t\tif (!empty($ArticlesUnread)) {\n\t\t\tforeach ($ArticlesUnread as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//delete items that are not in cleanup_item_ids array\n\t\tArticle::whereNotIn('id', $cleanup_item_ids)->delete();\n\t}", "public static function cleanAllLists() {\r\n \tself::$list=array();\r\n }", "public function actionBulkTrash() {\n\n if (Yii::$app->request->post('selection')) {\n\n $where = ['id' => Yii::$app->request->post('selection', [])];\n $this->modelViaClass::updateAll(['status_del' => $this->modelClass::STATUS_DEL_TRASH, 'deleted_at' => time()], $where);\n }\n }", "public function flush(): void\n {\n $this->list = [];\n }", "public function saveUnsortedPages()\n {\n switch (Input::get('action')) {\n case 'remove':\n if(count(Input::get('page')) > 0) {\n Content::whereIn(\"page_id\", Input::get('page'))->delete();\n Page::whereIn(\"id\", Input::get('page'))->delete();\n }\n break;\n }\n return Redirect::route('unsortedPages');\n }", "public function execute()\r\n {\r\n $pool = $this->_initObject();\r\n\r\n if (!$pool->getId()) {\r\n $this->_forward('noroute');\r\n }\r\n\r\n $codesIds = $this->getRequest()->getParam('ids');\r\n\r\n if (is_array($codesIds)) {\r\n $collection = $this->_objectManager->create('Bdcrops\\GiftCard\\Model\\ResourceModel\\GiftCard\\Collection')\r\n ->addFieldToFilter('giftcard_id', ['in' => $codesIds])\r\n ->addFieldToFilter('pool_id', $pool->getId());\r\n\r\n foreach ($collection as $giftCard) {\r\n $giftCard->delete();\r\n }\r\n }\r\n }", "function process_bulk_action() {\n \n //Detect when a bulk action is being triggered...\n if( 'delete'===$this->current_action() ) {\n wp_die('Items deleted (or they would be if we had items to delete)!');\n }\n \n }", "function storeImages()\n {\n }", "public function loadPreviousItems()\n {\n //first get it out of db.\n if ($orderId = $this->_order->check_cart($this->_auth->id)) {\n $order = $this->_order->get_order($orderId);\n $this->_items = unserialize($order['items']); \n $this->_shipping = array();\n $this->_shippingCost = array();\n $this->_salesTax = array();\n $this->_total = 0;\n $this->persist();\n }\n }", "public function update(): void\n {\n $content = $this->getOriginalContent();\n\n $parsed = $this->parseContent($content);\n\n $this->storeList($parsed);\n }", "public function clearStorage(): void\n {\n// foreach ($this->remoteFilesystems as $filesystem) {\n// $contents = $filesystem->listContents('/', true);\n// foreach ($contents as $contentItem) {\n// if ('file' !== $contentItem['type']) {\n// continue;\n// }\n// $filesystem->delete($contentItem['path']);\n// }\n// }\n }", "public function tearDown()\n {\n foreach ($this->storeName as $store) {\n if (in_array($store, $this->skippedStores)) {\n continue;\n }\n $tmp = explode(\"/\", $store);\n $filter['store_title'] = end($tmp);\n $this->storeIndex->open();\n $this->storeIndex->getStoreGrid()->searchAndOpen($filter);\n $this->storeNew->getFormPageActions()->delete();\n $this->storeDelete->getStoreForm()->fillForm(['create_backup' => 'No']);\n $this->storeDelete->getFormPageActions()->delete();\n }\n }", "public function store()\n {\n // dd($this->request->all());\n Asset::create(\n $this->request->except('_token')\n );\n return Redirect::route('asset.index')->with('success','Asset successfully added.');\n }", "public function resetCollectionsForPersist()\n {\n $this->containers = new ArrayCollection();\n $this->functions = new ArrayCollection();\n $this->constants = new ArrayCollection();\n }", "abstract public function prepareToStore();", "private function undo_cleanup_actions() {\n global $db;\n $elements_locked = array();\n $undo_nodes = $db->fetch_table(\"SELECT * FROM `\".$this->table.\"_undo` ORDER BY ID_UNDO DESC\");\n for ($i = 0; $i < count($undo_nodes); $i++) {\n $node = $undo_nodes[$i];\n foreach ($elements_locked as $id => $lock) {\n if (($node[\"FK_PARENT\"] == $id) ||\n (!$this->element_read($id)) ||\n ($this->element_is_child($node[\"FK_PARENT\"], $id)) ||\n ($this->element_is_child($node[\"FK_PARENT_PREV\"], $id))) {\n $db->querynow(\"DELETE FROM `\".$this->table.\"_undo` WHERE ID_UNDO=\".$node[\"ID_UNDO\"]);\n }\n }\n if ($node[\"ACTION\"] == \"MOVE\") {\n // Element wurde verschoben\n $elements_locked[$node[\"FK_PARENT\"]] = true;\n $elements_locked[$node[\"FK_PARENT_PREV\"]] = true;\n }\n }\n }", "public function delete(){\n foreach ( $this->playeractiveitems as $playeractiveitem ){\n $playeractiveitem->delete();\n }\n parent::delete();\n }", "public function upload(iterable $items, Language $originalLang, Language $translationLang, WordGroup $group = null): void;", "function restoreItems($store, $folderentryid, $entryidlist, $action){\n\t\t\t$binEntryIdList = Array();\n\t\t\t\n\t\t\tforeach($entryidlist as $key => $value){\n\t\t\t\t$binEntryIdList[] = hex2bin($entryidlist[$key][\"entryid\"]);\n\t\t\t}\n\n\t\t\t$sfolder = mapi_msgstore_openentry($store, $folderentryid);\n\t\t\tmapi_folder_copymessages($sfolder, $binEntryIdList, $sfolder, MESSAGE_MOVE);\n\t\t\t$result = (mapi_last_hresult()==NOERROR);\n\t\t\t\n\t\t\t// as after moving the message/s the entryid gets changed, so need to notify about the folder\n\t\t\t// so that we can update the folder on parent page.\n\t\t\t$folderProps = mapi_getprops($sfolder, array(PR_ENTRYID, PR_STORE_ENTRYID, PR_PARENT_ENTRYID));\n\t\t\t$GLOBALS[\"bus\"]->notify(bin2hex($folderentryid), TABLE_SAVE, $folderProps);\n\n\t\t\treturn $result;\n\t\t}", "function process_bulk_action() {\n\t\t\n\t\t//Detect when a bulk action is being triggered...\n\t\tif( 'delete'=== $this->current_action() ) {\n\t\t\twp_die( 'Items deleted (or they would be if we had items to delete)!' );\n\t\t}\n\t\t\n\t}", "public function saveList()\n {\n JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n $ordering = $this->input->get('ordering', array(), 'array');\n\n // Get the model.\n $model = $this->getModel();\n\n // Change the state of the records.\n if (!$model->savelist($ordering))\n {\n JError::raiseWarning(500, $model->getError());\n }\n\n $this->setRedirect('index.php?option=com_dmnd_team&view=team');\n }", "function storeFiles()\n {\n }", "public function cleanFiles()\n { \n $this->zip();\n // $this->unzip();\n\n if (!empty($this->files)) {\n foreach ($files as $file) {\n $this->clean($file);\n }\n }\n }", "private function cleanupFiles() {\n\t\t$this -> loadModel('Archivo');\n\t\t$items = $this -> Archivo -> find('all');\n\t\t$db_files = array();\n\t\tforeach ($items as $key => $item) {\n\t\t\t$db_files[] = $item['Archivo']['ruta'];\n\t\t}\n\t\t$dir_files = array();\n\t\t$dir_path = APP . 'webroot/files/uploads/solicitudesTitulacion';\n\t\tif ($handle = opendir($dir_path)) {\n\t\t\twhile (false !== ($entry = readdir($handle))) {\n\t\t\t\tif ($entry != 'empty' && is_file($dir_path . DS . $entry))\n\t\t\t\t\t$dir_files[] = 'files/uploads/solicitudesTitulacion/' . $entry;\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\tforeach ($dir_files as $file) {\n\t\t\tif (!in_array($file, $db_files)) {\n\t\t\t\t$file = explode('/', $file);\n\t\t\t\t$file = $file[count($file) - 1];\n\t\t\t\t$tmp_file_path = $dir_path . DS . $file;\n\t\t\t\tunlink($tmp_file_path);\n\t\t\t}\n\t\t}\n\t}", "public function rebuild()\r\n {\r\n $aclKey = 'acl-' . $this->config->uniqueId;\r\n\r\n // Get all constant of this class\r\n $groupList = array_keys($this->permission);\r\n\r\n $acl = new \\Phalcon\\Acl\\Adapter\\Memory();\r\n $acl->setDefaultAction(\\Phalcon\\Acl::DENY);\r\n\r\n foreach ($groupList as $groupConst => $groupValue) {\r\n // Add Role\r\n $acl->addRole(new \\Phalcon\\Acl\\Role($groupValue));\r\n\r\n if (isset($this->permission[$groupValue]) && is_array($this->permission[$groupValue]) == true) {\r\n foreach ($this->permission[$groupValue] as $group => $controller) {\r\n foreach ($controller as $action) {\r\n $actionArr = explode(':', $action);\r\n $resource = 'Controller\\\\' . $group . '-' . $actionArr[0];\r\n\r\n // Add Resource\r\n $acl->addResource($resource, $actionArr[1]);\r\n\r\n // Grant role to resource\r\n $acl->allow($groupValue, $resource, $actionArr[1]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Store in APC\r\n /*if (extension_loaded('apc') && ini_get('apc.enabled')) {\r\n if (apc_exists($aclKey)) {\r\n if (apc_delete($aclKey)) {\r\n echo 'Delete old ACL in APC storage. <br/>';\r\n }\r\n }\r\n\r\n if (apc_store($aclKey, $acl, 0)) {\r\n echo 'Store new ACL in APC storage SUCCESS. <hr/>';\r\n }\r\n }*/\r\n }", "public function saveRoles()\n {\n Yii::$app->authManager->revokeAll($this->getId()); \n\n if (is_array($this->roles)) {\n foreach ($this->roles as $roleName) {\n if ($role = Yii::$app->authManager->getRole($roleName)) {\n Yii::$app->authManager->assign($role, $this->getId());\n }\n }\n }\n }", "public function moveart()\n {\n\n DB::insert('insert into workDB (position, userPK, artPK, checkCredit)\n values (?, ?, ?, ?)',array($_GET['art'][3],$_SESSION['userPK'],$_GET['art'][2],1));\n\n $Sentence3 = \"delete from TagNotUser where tagPK = \".$_GET['art'][0];\n $users3 = DB::delete(DB::raw($Sentence3));\n }", "public function AddArtworkList(): void{\n\n if(!Session::isLogin())\n exit;\n\n if(!ArtworkVerifier::removeList($_POST))\n exit;\n\n if(!isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id))\n UserList::values([\n 'user_id' => Session::getUser()['id'],\n 'artwork_id' => $_POST['artwork_id']\n ])->insert();\n }", "public function syncUserList()\n {\n // If no internal cache exists yet, get its value from LazyJsonMapper.\n if ($this->_userList === null) {\n $this->getUserList(); // Builds our \"_userList\" variable. Throws.\n }\n\n // Now, we need to create a new, internal LazyJsonMapper data array for\n // our object. In undefined (unmapped) properties, you are ONLY allowed\n // to store basic data types. Not objects. So we will need to convert\n // all User objects to real array data. Otherwise OTHER calls would fail\n // due to invalid internal data when we try things like `printJson()`.\n $newObjectData = [];\n foreach ($this->_userList as $k => $v) {\n $newObjectData[$k] = is_object($v) && $v instanceof LazyJsonMapper\n ? $v->asArray() // Throws.\n : $v; // Is already a valid value.\n }\n\n // Now give the new object data to LazyJsonMapper, which ensures that it\n // contains all of the same values as our updated cache! This replaces\n // the ENTIRE internal JSON property storage, so be aware of that!\n $this->assignObjectData($newObjectData); // Throws.\n }", "protected function initializeStorageObjects() {}", "protected function initStorageObjects() {}", "protected function initStorageObjects() {}", "protected function initStorageObjects() {}", "public function cleanUpFolder()\r\n {\r\n $fs = new Filesystem();\r\n\r\n foreach($this->file_list as $file) :\r\n if ( preg_match('#^'.$this->destination_dir.'/#', $file))\r\n $fs->remove($file);\r\n endforeach;\r\n }", "public function clearRootAssetMappings();", "public function flush()\n\t{\n\t\t$this->items = array();\n\t\t$this->properties = array();\n\t}", "function process_admin_transients() {\n $license = $this->_set_license_transient();\n\n if($license['valid']) {\n $this->_set_location_transient($license['key']);\n }\n }", "private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }" ]
[ "0.58997625", "0.5654946", "0.54312396", "0.5421908", "0.5395475", "0.5380937", "0.5306818", "0.52920246", "0.5279645", "0.5212913", "0.5197335", "0.5192536", "0.51516384", "0.5144705", "0.51177275", "0.51092696", "0.5081766", "0.5001659", "0.50009835", "0.49468723", "0.49309275", "0.48916122", "0.48908153", "0.48894963", "0.48716587", "0.4836163", "0.4831894", "0.48315212", "0.4823951", "0.48148978", "0.48143888", "0.48087668", "0.48084232", "0.48083127", "0.4807051", "0.47971815", "0.47967726", "0.47784474", "0.4769378", "0.47600198", "0.47577223", "0.47541592", "0.4741336", "0.47375864", "0.4728098", "0.4716191", "0.4691753", "0.46903193", "0.46836585", "0.46735132", "0.46604988", "0.46568754", "0.46484315", "0.46439666", "0.46393216", "0.4636468", "0.46329054", "0.4630618", "0.46207988", "0.46175826", "0.46169746", "0.46169746", "0.46120876", "0.46079716", "0.46035242", "0.4601205", "0.45927456", "0.45838943", "0.45816776", "0.45815116", "0.45809674", "0.4575475", "0.45714268", "0.45704472", "0.45681778", "0.45679933", "0.45654315", "0.45630836", "0.4561215", "0.45596874", "0.4554014", "0.455327", "0.4552166", "0.45470342", "0.45397747", "0.45393053", "0.45368525", "0.4527439", "0.45244718", "0.45242393", "0.45211738", "0.45147", "0.45140487", "0.45140487", "0.45127422", "0.4507524", "0.4502206", "0.44964132", "0.44958195", "0.44926232" ]
0.54681784
2
A basic feature test example.
public function testCheckProduct() { $response = $this->get('product'); $response->assertStatus(200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testBasicFeatures()\n {\n return $this->doTheRealTest(false);\n }", "public function testExample()\n {\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('TROLOLOLO');\n }", "function test_sample() {\n\n\t\t$this->assertTrue( true );\n\n\t}", "public function testBasicExample()\n {\n $this->assertTrue(true);\n }", "public function test() {\n \t\n\t\tprint_r('hello stef');\n \t\n }", "public function testExample()\n {\n //this test is empty as we have not yet decided if we want to use dusk\n\n // $this->get('/')\n // ->click('About')\n // ->seePageIs('/about');\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('API tester');\n }", "function testSample() {\n\t\t$this->assertTrue( true );\n\t}", "public function testExample()\n\t{\n\t\t$this->assertTrue(true);\n\t}", "function test_basic_example()\n {\n $user = factory(App\\Entities\\User::class)->create([\n 'name' => 'Valentin Plechuc',\n ]);\n\n $this->actingAs($user, 'api');\n\n $this->visit('/api/user')\n ->see('Valentin Plechuc');\n\n }", "public function testExample()\n {\n $this->assertTrue(true);\n \n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/news/create')\n ->type('title', '123')\n ->type('text', 'test123')\n ->press('Добавить новость')\n\n ->assertSee('Мало букв в поле Заголовок');\n });\n }", "public function testExample()\n {\n $this->visit('ticket')\n ->see('Listado de Tickets')\n ->seeLink('Ver Ticket') \n ->visit('ticket/1')\n ->see('Quod et autem sed')\n ->seeLink('Ver todos los tickets')\n ->click('Ver todos los tickets')\n ->see('Listado de Tickets')\n ->seeLink('Agregar un ticket', 'ticket/crear');\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Login to Airtel Sales Force System');\n });\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('html');\n }", "public function testGetFeatureDetailsUsingGET()\n {\n }", "function test_sample() {\n\t\t$this->assertTrue( true );\n\t}", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('React JS examples');\n });\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('URL Notes');\n }", "public function testBasicTest()\n {\n\n }", "public function testExample()\n {\n dump(\"testExample\");\n $this->assertTrue(true);\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Laravel')\n ->see('Login')\n ->see('Register');\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Laravel');\n });\n }", "public function testExample()\n {\n $this->visit('/')\n ->see('WELCOME');\n }", "function test_sampleme() {\n\t\t// Replace this with some actual testing code.\n\t\t$this->assertTrue( true );\n\t}", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Laravel');\n }", "public function testExample()\n {\n\n \n $this->assertTrue(true);\n \n return true;\n }", "public function testExample()\n {\n $this->actingAs( \\App\\User::first() )\n ->visit('/city')\n ->see('City List');\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->with('.special-text', function ($text) {\n $text->assertSee('title1');\n });\n\n // 確認商品數量\n $browser->click('.check_product')\n ->waitForDialog(5)\n ->assertDialogOpened('商品數量充足')\n ->acceptDialog();\n\n // 設定中斷點\n eval(\\Psy\\sh());\n });\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(User::find(1))\n ->visitRoute('subscription', ['id' => '1'])\n ->radio('gender', 'L')\n ->type('fullName', 'GHF')\n ->type('birthdate', '04/24/1999')\n ->type('phone', '088177552')\n ->type('address', 'Bandung')\n ->press('Submit');\n });\n }", "public function test()\n {\n $this->executeScenario();\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Laravel 5');\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Laravel 5');\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Laravel 5');\n }", "public function testExample(): void\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/login')\n ->assertSee('SIGN IN')\n ->type('email', '[email protected]')\n ->type('password', '123456')\n ->press('LOGIN')\n ->assertPathIs('/home')\n ->visit('/addProduct')\n ->type('nama_product', 'air jordan')\n ->type('harga_product', '100000')\n ->type('stock_product', '100000')\n ->type('deskripsi', 'haip bis parah ngga sih')\n ->select('kategori_product', 'Lainnya')\n ->select('nama_marketplace', 'Shopee')\n ->attach('img_path', __DIR__.'\\test.jpg')\n ->press('Submit');\n });\n }", "public function testBasicExample()\n {\n $user = User::first();\n $this->be($user);\n $this->visit('/')\n ->see('Welcome Back');\n\n }", "public function testBasicExample()\n {\n $this->assertEquals(1, 1);\n }", "public function testExample()\n {\n // lets make it risky to destroy the green\n }", "public function test() {\n\n\t}", "public function testExample()\n {\n $this->visit('/')\n ->type('[email protected]', 'email')\n ->type('7encoeaz', 'password')\n ->press('submit')\n ->see('You\\'ve logged into your online dashboard');\n }" ]
[ "0.75703996", "0.7326855", "0.7060016", "0.70380056", "0.69854325", "0.69819707", "0.6968778", "0.69384074", "0.6893094", "0.6865566", "0.6839218", "0.6836121", "0.68062127", "0.6803488", "0.68033314", "0.67734396", "0.6747173", "0.67426485", "0.67172587", "0.67116183", "0.670938", "0.6702531", "0.6689865", "0.6679145", "0.66718197", "0.66691923", "0.6653451", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.6640096", "0.66365665", "0.6623849", "0.662012", "0.66165954", "0.6614679", "0.6604926", "0.65999097", "0.65999097", "0.65999097", "0.6595679", "0.6585578", "0.6569086", "0.65643984", "0.65440404", "0.65173525", "0.65039146" ]
0.0
-1
Constructor method for FindMeetingTimeCandidatesResponseMessageType
public function __construct(\ArrayType\EwsArrayOfMeetingTimeCandidate $meetingTimeCandidates) { $this ->setMeetingTimeCandidates($meetingTimeCandidates); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function setMeetingReminders($meeting_id,$chosen_time=false) {\n $mtg = Meeting::findOne($meeting_id);\n if ($chosen_time ===false) {\n $chosen_time = Meeting::getChosenTime($meeting_id);\n }\n // create attendees list for organizer and participants\n $attendees = array();\n $attendees[0]=$mtg->owner_id;\n $cnt =1;\n foreach ($mtg->participants as $p) {\n if ($p->status ==Participant::STATUS_DEFAULT) {\n $attendees[$cnt]=$p->participant_id;\n $cnt+=1;\n }\n }\n // for each attendee\n foreach ($attendees as $a) {\n // for their reminders\n $rems = Reminder::find()->where(['user_id'=>$a])->all();\n foreach ($rems as $rem) {\n // create a meeting reminder for that reminder at that time\n MeetingReminder::create($meeting_id,$a,$rem->id,$rem->duration);\n }\n }\n }", "public function __construct($_tzFrom = null, $_tzTo = null){\n $this->_resultFormatNames = array_keys(self::$_resultFormats);\n $this->setInstanceTimezones($_tzFrom, $_tzTo);\n }", "public function __construct(\n $in_results_per_page = 0, ///< An integer that defines how many results per page you want to see. 0 (default) is all in one page.\n c_comdef_meeting_search_manager &$in_parent = null, ///< A reference to an existing c_comdef_meeting_search_manager object.\n c_comdef_meetings &$in_search_results = null, ///< A reference to some pre-parsed search results.\n $in_pageno = 0 ///< An integer. The page of the main search this is from.\n ) {\n // If this is a page of results, we set up the object to reference the root.\n if ($in_parent instanceof c_comdef_meeting_search_manager) {\n $this->_my_root = $in_parent;\n // These all reference the root object's values.\n $this->_formats = $in_parent->_formats;\n $this->_formats_comparison_operator = $in_parent->_formats_comparison_operator;\n $this->_service_bodies = $in_parent->_service_bodies;\n $this->_languages = $in_parent->_languages;\n $this->_weekdays = $in_parent->_weekdays;\n $this->_venue_types = $in_parent->_venue_types;\n $this->_start_after = $in_parent->_start_after;\n $this->_start_before = $in_parent->_start_before;\n $this->_end_before = $in_parent->_end_before;\n $this->_min_duration = $in_parent->_min_duration;\n $this->_max_duration = $in_parent->_max_duration;\n $this->_search_radius = $in_parent->_search_radius;\n $this->_search_center_long = $in_parent->_search_center_long;\n $this->_search_center_lat = $in_parent->_search_center_lat;\n $this->_search_string = $in_parent->_search_string;\n $this->_meeting_id_array = $in_parent->_meeting_id_array;\n $this->_published_search = $in_parent->_published_search;\n \n $this->_my_server = $in_parent->_my_server;\n \n // These may get changed by this instance.\n $this->sort_array = $in_parent->sort_array;\n $this->sort_desc = $in_parent->sort_desc;\n \n // These are passed in and set at construction\n $this->_pageno = $in_pageno;\n $this->_search_results = $in_search_results;\n } else // If we are the root object, we start clean.\n {\n // See if the caller has requested a number of results per page.\n if ($in_results_per_page) {\n $this->_results_per_page = $in_results_per_page;\n }\n \n $this->_my_server = c_comdef_server::MakeServer(); // We initialize the server.\n \n $this->SetUpFormats(); // We set the formats array.\n $this->SetUpServiceBodies(); // We set the Service Bodies array.\n $this->SetUpLanguages(); // We set the Languages array.\n \n // Set up the weekday array (1 = Sunday, 7 = Saturday ).\n $this->_weekdays = null;\n for ($wd = 1; $wd < 8; $wd++) {\n $this->_weekdays[$wd] = 0;\n }\n\n $this->_venue_types = null;\n $this->_venue_types[VenueType::IN_PERSON] = 0;\n $this->_venue_types[VenueType::VIRTUAL] = 0;\n $this->_venue_types[VenueType::HYBRID] = 0;\n\n // This is the default sort.\n $this->sort_array = array ( \"lang_enum\", \"weekday_tinyint\", \"start_time\", \"id_bigint\" );\n \n // We have no search parameters or results at this point.\n }\n }", "public function __construct($type, $message, $user_id = null, $datetime = null, $remote_ip = null) {\t\t\n\t\t$this->eventType = $type;\n\t\t$this->message = $message;\n\t\t$this->user_id = $user_id;\n\t\t$this->datetime = $datetime;\n\t\t$this->remote_ip = $remote_ip;\n\t}", "public function __construct($column)\n {\n $this -> hourMeeting = $column;\n }", "public function __construct() {\n parent::__construct();\n\t\t$this->defineName(\"candidates\");\n }", "public function __construct($timeslots)\n {\n $this->timeslots = $timeslots;\n }", "public function createRoom(Request $request)\n {\n $user = Auth::user();\n $user_type = 0;\n $invited_user = 0;\n $user_id = 0;\n $topic_id = $request->topic_id;\n if (empty($topic_id)) {\n $topic_id = 0;\n }\n $client_time_zone = UserHelper::getTimeZone($user->id);\n $current_time = Carbon::now($client_time_zone);\n $get_partner_info = UserHelper::getPartnerInfo($request->partner_id);\n if ($get_partner_info[0] == 1) {\n return response()->json([\n 'success' => false,\n 'message' => __('messages.provider_in_call_message')\n ]);\n }\n if ($get_partner_info[1] == 1) {\n $client_id = UserHelper::getClientId($user->id);\n if (UserHelper::userMoney($user->id) != 1) {\n return response()->json([\n 'success' => false,\n 'message' => __('messages.user_have_money_message')\n ]);\n }\n $carbon_after = new Carbon($current_time);\n $after_time = $carbon_after->addMinutes(15);\n $carbon_befor = new Carbon($current_time);\n $befor_time = $carbon_befor->subMinutes(15);\n\n //check if the service provider has another booking in same time\n $provider_Appointments = Appointment::where('service_provider_id', $request->partner_id)\n ->where('start_time', '=', $current_time)\n ->where('client_id', '!=', $client_id)\n ->first();\n\n //check if ther is an appointment at this time\n $provider_Appointments_after_time = Appointment::where('service_provider_id', $request->partner_id)\n ->where('start_time', '<=', $after_time)\n ->where('start_time', '>=', $befor_time)\n ->where('client_id', '!=', $client_id)\n ->first();\n $provider_Appointments_befor_time = Appointment::where('service_provider_id', $request->partner_id)\n ->where('end_time', '<=', $after_time)\n ->where('end_time', '>=', $befor_time)\n ->where('client_id', '!=', $client_id)\n ->first();\n // check if the appointment is reserved\n if (!empty($provider_Appointments) ||\n (!empty($provider_Appointments_befor_time)) ||\n (!empty($provider_Appointments_after_time))) {\n\n // return false response\n return response()->json([\n 'success' => false,\n 'message' => __('messages.provider_in_call_message')\n ]);\n }\n\n $invited_user = ServiceProvider::findOrFail($request->partner_id);\n $user_id = $invited_user->user_id;\n if (empty($request->room_name)) {\n $room_name = str_random(6);\n } else {\n $room_name = $request->room_name;\n }\n Cache::put($user_id, $room_name, 10);\n Cache::put(\n $room_name,\n [$client_id,\n $request->partner_id,\n $request->call_type,\n $topic_id\n ],\n 20\n );\n $client = new Client($this->sid, $this->token);\n \n $exists = $client->video->rooms->read([\n 'uniqueName' => $room_name\n ]);\n\n if (empty($exists)) {\n $client->video->rooms->create([\n 'uniqueName' => $room_name,\n 'type' => 'group',\n 'recordParticipantsOnConnect' => false,\n ]);\n }\n $this->sendPushNotification(\n $user_id,\n $room_name,\n $request->call_type,\n $user->id//caller id\n );\n\n return response()->json([\n 'room_name' => $room_name\n ]);\n } else {\n $appointment = Appointment::where('start_time', '<=', $current_time)\n ->where('end_time', '>=', $current_time)\n ->where('call_type', '=', $request->call_type)\n ->where('status', '=', Appointment::APPOINTMENT_APPROVED)\n ->get();\n\n if ($user->user_type == 1) {\n $client_id = UserHelper::getClientId($user->id);\n $appointment = $appointment->where('client_id', '=', $client_id)\n ->where('service_provider_id', '=', $request->partner_id)\n ->first();\n // check if the appointment is empty\n if (empty($appointment)) {\n return response()->json([\n 'success' => false,\n 'message' => __('messages.no_appotment_message')\n ]);\n }\n if (UserHelper::userMoney($user->id) != 1) {\n return response()->json([\n 'success' => false,\n 'message' => __('messages.user_have_money_message')\n ]);\n }\n $invited_user = ServiceProvider::findOrFail($appointment->service_provider_id);\n $user_id = $invited_user->user_id;\n } elseif ($user->user_type == 2) {\n $service_provider_id = UserHelper::getServiceProviderId($user->id);\n $appointment = $appointment\n ->where('service_provider_id', '=', $service_provider_id)\n ->where('client_id', '=', $request->partner_id)\n ->first();\n // check if the appointment is empty\n if (empty($appointment)) {\n return response()->json([\n 'success' => false,\n 'message' => __('messages.no_appotment_message')\n ]);\n }\n $user_type = 2;\n $invited_user = UserHelper::getClientInfo($appointment->client_id);\n $user_id = $invited_user->user_id;\n\n if (UserHelper::userMoney($user_id) != 1) {\n return response()->json([\n 'success' => false,\n 'message' => __('messages.user_have_money_message')\n ]);\n }\n }\n\n \n if (!empty($appointment)) {\n if (empty($request->room_name)) {\n $room_name = \"Room no \".$appointment->id;\n } else {\n $room_name = $request->room_name;\n }\n Cache::put($user_id, $room_name, 10);\n Cache::put(\n $room_name,\n [$appointment->client_id,\n $appointment->service_provider_id,\n $appointment->call_type,\n $topic_id\n ],\n 20\n );\n $client = new Client($this->sid, $this->token);\n \n $exists = $client->video->rooms->read([\n 'uniqueName' => $room_name\n ]);\n \n if (empty($exists)) {\n $client->video->rooms->create([\n 'uniqueName' => $room_name,\n 'type' => 'group',\n 'recordParticipantsOnConnect' => false,\n ]);\n }\n $this->sendPushNotification(\n $user_id,\n $room_name,\n $appointment->call_type,\n $user->id//caller id\n );\n\n return response()->json([\n 'room_name' => $room_name\n ]);\n } else {\n return response()->json([\n 'success' => false,\n 'message' => __('messages.no_appotment_message')\n ]);\n }\n }\n }", "public function __construct()\n {\n $this->inbox_arr = array();\t\t\t# Initialize array\n $this->outbox_arr = array();\t\t\t# Initialize array\n $this->visible_box = SHOPTALK_INBOX;\t# Inbox displayed by default\n $this->time_zone = 0;\t\t\t\t\t# Default to Greenwich Mean Time\n }", "public function __construct($timetable)\n {\n $this->timetable = $timetable;\n }", "public function __construct() {\n parent::__construct();\n $this->setOdataType('#microsoft.graph.offerShiftRequest');\n }", "public function __construct($type = 0, $time = null) {\n \n $this->setType($type);\n $this->startedAt = false;\n $this->stoppedAt = false;\n \n parent::__construct($time);\n }", "public function __construct() {\n parent::__construct();\n $this->setOdataType('#microsoft.graph.trainingReminderNotification');\n }", "public function __construct(?\\StructType\\EwsFindMessageTrackingSearchResultType $messageTrackingSearchResult = null)\n {\n $this\n ->setMessageTrackingSearchResult($messageTrackingSearchResult);\n }", "public function __construct(ConferenceToAffiliateMeeting $conferenceToAffiliateMeeting)\n {\n $this->conferenceToAffiliateMeeting = $conferenceToAffiliateMeeting;\n }", "public function __construct(\n public string $dateTime ,\n public string $timezone ,\n )\n {\n }", "public function __construct() {\n parent::__construct();\n $this->setOdataType('#microsoft.graph.callStartedEventMessageDetail');\n }", "public function __construct($time, $date, $numberOfParticipants, $sessionName){\n $this->groupsArray = array(new Group());\n $this->setSessionName($sessionName);\n $this->setSessionTime($time);\n $this->setSessionDate($date);\n $this->setNumberOfParticipants($numberOfParticipants);\n \n }", "public function __construct(array $attendeeAvailability = array())\n {\n $this\n ->setAttendeeAvailability($attendeeAvailability);\n }", "public function __construct(\\Fincallorca\\HitchHikerApi\\Wsdl\\v3_1_388_1\\StructType\\AllotmentResponse $allotment = null, $arrival = null, $arrivalDateTime = null, $bookingClass = null, $cabinClass = null, $cabinClassName = null, $carrierCode = null, $codeShare = null, \\Fincallorca\\HitchHikerApi\\Wsdl\\v3_1_388_1\\ArrayType\\ArrayOfFareResponseDatePair $datePairs = null, $departure = null, $departureDateTime = null, $equipmentCode = null, $equipmentName = null, $fareBase = null, $flightNumber = null, $freeBaggageAllowance = null, $freeSeats = null, $mealCode = null, $numberOfStops = null, $segmentID = null, $segmentMileage = null, \\Fincallorca\\HitchHikerApi\\Wsdl\\v3_1_388_1\\StructType\\SharedPrice $surcharge = null, $travelTime = null)\n {\n $this\n ->setAllotment($allotment)\n ->setArrival($arrival)\n ->setArrivalDateTime($arrivalDateTime)\n ->setBookingClass($bookingClass)\n ->setCabinClass($cabinClass)\n ->setCabinClassName($cabinClassName)\n ->setCarrierCode($carrierCode)\n ->setCodeShare($codeShare)\n ->setDatePairs($datePairs)\n ->setDeparture($departure)\n ->setDepartureDateTime($departureDateTime)\n ->setEquipmentCode($equipmentCode)\n ->setEquipmentName($equipmentName)\n ->setFareBase($fareBase)\n ->setFlightNumber($flightNumber)\n ->setFreeBaggageAllowance($freeBaggageAllowance)\n ->setFreeSeats($freeSeats)\n ->setMealCode($mealCode)\n ->setNumberOfStops($numberOfStops)\n ->setSegmentID($segmentID)\n ->setSegmentMileage($segmentMileage)\n ->setSurcharge($surcharge)\n ->setTravelTime($travelTime);\n }", "public function auEssShiftMatchingClockOffRosterShiftRequest($local_time, $employee_id, string $contentType = self::contentTypes['auEssShiftMatchingClockOffRosterShift'][0])\n {\n\n // verify the required parameter 'local_time' is set\n if ($local_time === null || (is_array($local_time) && count($local_time) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $local_time when calling auEssShiftMatchingClockOffRosterShift'\n );\n }\n\n // verify the required parameter 'employee_id' is set\n if ($employee_id === null || (is_array($employee_id) && count($employee_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $employee_id when calling auEssShiftMatchingClockOffRosterShift'\n );\n }\n\n\n $resourcePath = '/api/v2/ess/{employeeId}/shift/matchingclockoff';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $local_time,\n 'localTime', // param base name\n 'string', // openApiType\n '', // style\n false, // explode\n true // required\n ) ?? []);\n\n\n // path params\n if ($employee_id !== null) {\n $resourcePath = str_replace(\n '{' . 'employeeId' . '}',\n ObjectSerializer::toPathValue($employee_id),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('apiKey');\n if ($apiKey !== null) {\n $headers['apiKey'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'GET',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function __construct(\\Ews\\ArrayType\\EwsArrayOfFreeBusyResponse $freeBusyResponseArray = null, \\Ews\\StructType\\EwsSuggestionsResponseType $suggestionsResponse = null)\n {\n $this\n ->setFreeBusyResponseArray($freeBusyResponseArray)\n ->setSuggestionsResponse($suggestionsResponse);\n }", "public function getMeetings(): CacheableJsonResponse {\n\n // Initialize the response.\n $response = [];\n\n // Wrap Query in render context.\n $context = new RenderContext();\n $meeting_nids = \\Drupal::service('renderer')->executeInRenderContext($context, function () {\n $meeting_query = \\Drupal::entityQuery('node')\n ->condition('type', 'cfo_meeting')\n ->condition('status', 1)\n ->sort('created');\n return $meeting_query->execute();\n });\n\n if (!empty($meeting_nids)) {\n\n // Loop through all meetings.\n foreach ($meeting_nids as $meeting_nid) {\n\n // Load the meeting node.\n if ($meeting_node = $this->nodeStorage->load($meeting_nid)) {\n\n // Prepare the meeting date for the url \"slug\".\n $meeting_date = $meeting_node->get('field_meeting_date')->getValue()[0]['value'];\n $meeting_slug = date('F-j-Y', strtotime($meeting_date));\n\n // Contents of this meeting.\n $meeting = [\n 'meeting_nid' => $meeting_nid,\n 'meeting_title' => $meeting_node->label(),\n 'meeting_updated' => $meeting_node->changed->value,\n 'meeting_slug' => $meeting_slug,\n ];\n\n // Add this meeting into the response.\n $response[] = $meeting;\n\n }\n\n }\n\n }\n\n // Set up the Cache Meta.\n $cacheMeta = (new CacheableMetadata())\n ->setCacheTags(['node_list:cfo_meeting'])\n ->setCacheMaxAge(Cache::PERMANENT);\n\n // Set the JSON response to the response of meetings.\n $json_response = new CacheableJsonResponse($response);\n\n // Add in the cache dependencies.\n $json_response->addCacheableDependency($cacheMeta);\n\n // Handle any bubbled cacheability metadata.\n if (!$context->isEmpty()) {\n $bubbleable_metadata = $context->pop();\n BubbleableMetadata::createFromObject($meeting_nids)\n ->merge($bubbleable_metadata);\n }\n\n // Return JSON Response.\n return $json_response;\n\n }", "function __construct($result)\n {\n $this->_from = isset($result['from']) ? trim($result['from']) : null;\n $this->_to = isset($result['to']) ? trim($result['to']) : null;\n }", "public function testConstructor()\n {\n // no params\n $result = new ExperimentRecruitingTokenResponse();\n $this->assertEquals('Sizzle\\Bacon\\Database\\ExperimentRecruitingTokenResponse', get_class($result));\n }", "protected function init( $data )\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t/** @var Sequence */\r\n\t\t\t$this->_tlv = ( new \\lyquidity\\Asn1\\Der\\Decoder() )->decodeElement( $data );\r\n\r\n\t\t\t$tbsResponseData = $this->_tlv->first()->asSequence();\r\n\t\t\t$dateTime = \\lyquidity\\Asn1\\asGeneralizedTime( $tbsResponseData->getFirstChildOfType( UniversalTagID::GENERALIZEDTIME ) );\r\n\t\t\t// $this->producedAt = $this->DateTimefromString( $dateTime );\r\n\t\t\t$this->producedAt = $dateTime->getValue();\r\n\r\n\t\t\t$this->responses = asSequence( $tbsResponseData->getFirstChildOfType( UniversalTagID::SEQUENCE ) );\r\n\r\n\t\t\t/* We care only about the first SingleResponse */\r\n\t\t\t$this->singleResponse = new SingleResponse( $this->responses->first() );\r\n\t\t}\r\n\t\tcatch (\\lyquidity\\Asn1\\Exception\\Asn1DecodingException $e) \r\n\t\t{\r\n\t\t\tthrow new ResponseException (\"Malformed request\", \\lyquidity\\OCSP\\Ocsp::ERR_MALFORMED_ASN1);\r\n\t\t} \r\n\t\tcatch (\\lyquidity\\Asn1\\Exception\\InvalidAsn1Value $e)\r\n\t\t{\r\n\t\t\tthrow new ResponseException (\"Malformed request\", \\lyquidity\\OCSP\\Ocsp::ERR_MALFORMED_ASN1);\r\n\t\t}\r\n\t}", "public function userMeetings()\n\t{\n\t\t//get user session\n\t\t$currenttime = time();\n\t\t$extra_time = Configure::read('extra_meetingtime'); //done in bootstrap\n\t\t$user = $this->Session->read('UserData.userName');\n\t\t$userCourse = $this->Session->read('UserData.usersCourses');\n\t\t$user_course_section = $userCourse[0];\n\n\t\t//get Course and section name\n\t\t$course_info = $this->getCourseNameOfUser($user_course_section);\n\t\t$course_name = $course_info->course_name;\n\t\t$course_section = $course_info->section_name;\n\t\t\n\t\t//get allsection setting sections for same course\n\t\t$sections_list = $this->__allSections();\n\t\t$options['conditions'][] = array(\n\t\t\t\t'MeetingInfo.chat_from_course'=>$course_name,\n\t\t\t\t'MeetingInfo.chat_from_section'=>$sections_list,\n\t\t\t\t'OR'=>array('MeetingInfo.is_active' => '1', 'MeetingInfo.chat_meeting_startdate >='=> $currenttime-$extra_time)\n\t\t);\t\t\n\t\t$options['joins'][] = array(\n\t\t\t\t'table' => 'chat_meeting_users',\n\t\t\t\t'alias' => 'Meetingusers',\n\t\t\t\t'type' => 'INNER',\n\t\t\t\t'conditions'=> array('Meetingusers.chat_meeting_name = MeetingInfo.chat_meeting_name',\n\t\t\t\t\t\t'Meetingusers.to_user' => $user,\n\t\t\t\t\t\t'Meetingusers.is_accept !=' => 2)\n\t\t);\n\t\t$options['fields'] = array( 'MeetingInfo.*', 'Meetingusers.id', 'Meetingusers.is_accept' );\n\t\t$options['order'] = array('MeetingInfo.chat_meeting_startdate ASC');\n\t\t$meeting_list = $this->MeetingInfo->find('all', $options);\n\t\t$join_group_img= $this->webroot.\"img/join.png\";\n\t\t$accept_imgsrc= $this->webroot.\"img/accept.png\";\n\t\t$reject_imgsrc= $this->webroot.\"img/reject.png\";\n\t\t$detail_imgsrc= $this->webroot.\"img/meeting_detail.png\";\n\t\t$msgstr = '';\n\t\tif (count($meeting_list))\n\t\t foreach ($meeting_list as $mettings) {\n\t\t \t$meetinguser_id = $mettings['Meetingusers']['id'];\n\t\t \t$meeting_tilte = $mettings['MeetingInfo']['chat_meeting_title'];\n\t\t \t$meeting_name = $mettings['MeetingInfo']['chat_meeting_name'];\n\t\t \t$meeting_date = $mettings['MeetingInfo']['chat_meeting_startdate'];\n\t\t \t$meeting_active = $mettings['MeetingInfo']['is_active'];\n\t\t \t$is_accept = \t$mettings['Meetingusers']['is_accept'];\n\t\t \t@$meetingDetails = $this->__mettingDetail($meeting_name);\n\t\t \t$meetingUserNames = implode(', ', $meetingDetails['users']);\n\t\t\t $msgstr .= \"<li id='meeting_\".$meetinguser_id.\"'><span class='meeting_title'>\".ucfirst($meeting_tilte).\"</span>\";\n\t\t\t //if meeting is not accepted or/denied then showing the buttons for action.\n// \t\t\t if(!$is_accept)\n// \t\t\t \t$msgstr .= \"<span class='prq_icon_meeting' id='meetingaction_\".$meetinguser_id.\"'><input type='image' src='\".$accept_imgsrc.\"' title='accept invitation' onClick=acceptMeetingInvitaion('$meetinguser_id','$meeting_name') />\n// \t\t\t \t&nbsp;&nbsp;&nbsp;<input type='image' src='\".$reject_imgsrc.\"' title='reject invitation' onClick=rejectMeetingInvitaion('$meetinguser_id') /></span>\n// \t\t\t \t\";\n\t\t\t //showing the join meeting from the start date time of the meeting date till 30 minuteslater.\n\t\t\t if (($meeting_date <= $currenttime || $meeting_active) && $is_accept == 1) {\n\t\t\t \t$msgstr .= \"<span class='meeting-detail' id='meeting_detail_\".$meetinguser_id.\"'>\n\t\t\t \t <span class='meeting-date' style='display:none;'> Meeting @ \".date('m/d/Y h:i A', $meetingDetails['date'][0]).\"</span>\n\t\t\t\t <input type='image' class='detail-image' id='detail_meeting_\".$meetinguser_id.\"' onclick=detailMeeting('\".$meetinguser_id.\"') src='\".$detail_imgsrc.\"' title='meeting detail' alt='Detail'/></span>\n\t\t\t \t<span class='join_meeting_area'><input type='image' title='start meeting' id='joinmetting_\".$meeting_name.\"' onclick=joinmeeting('\".$meetinguser_id.\"','\".$meeting_name.\"') src='\".$join_group_img.\"' /></span>\";\n\t\t\t \tif(!$is_accept)\n\t\t\t \t\t$msgstr .= \"<span class='prq_icon_meeting' id='meetingaction_\".$meetinguser_id.\"'><input type='image' src='\".$accept_imgsrc.\"' title='accept invitation' onClick=acceptMeetingInvitaion('$meetinguser_id','$meeting_name') />\n\t\t\t \t\t&nbsp;&nbsp;&nbsp;<input type='image' src='\".$reject_imgsrc.\"' title='reject invitation' onClick=rejectMeetingInvitaion('$meetinguser_id') /></span>\n\t\t\t \t\t\";\n\t\t\t\t$msgstr .= \"<div class='meeting-detail-area' id='below_meeting_detail_\".$meetinguser_id.\"'>\n\t\t\t\t <span class='meeting-users'><b>Participants:</b> $meetingUserNames</span>\n\t\t\t \t</div>\n\t\t\t \t</li>\";\n\t\t\t } else {\n\t\t\t \t$msgstr .= \" <span class='meeting-detail' id='meeting_detail_\".$meetinguser_id.\"'>\n\t\t\t \t<span class='meeting-date'> Meeting @ \".date('m/d/Y h:i A', $meetingDetails['date'][0]).\"</span>\n\t\t\t \t<input type='image' class='detail-image' id='detail_meeting_\".$meetinguser_id.\"' onclick=detailMeeting('\".$meetinguser_id.\"') src='\".$detail_imgsrc.\"' title='meeting detail' alt='Detail'/></span>\";\n\t\t\t \tif(!$is_accept)\n\t\t\t \t\t$msgstr .= \"<span class='prq_icon_meeting' id='meetingaction_\".$meetinguser_id.\"'><input type='image' src='\".$accept_imgsrc.\"' title='accept invitation' onClick=acceptMeetingInvitaion('$meetinguser_id','$meeting_name') />\n\t\t\t \t\t&nbsp;&nbsp;&nbsp;<input type='image' src='\".$reject_imgsrc.\"' title='reject invitation' onClick=rejectMeetingInvitaion('$meetinguser_id') /></span>\n\t\t\t \t\t\";\n\t\t\t \t$msgstr .= \"<div class='meeting-detail-area' id='below_meeting_detail_\".$meetinguser_id.\"'>\n\t\t\t \t<span class='meeting-users'>Participants: $meetingUserNames</span>\n\t\t\t \t</div>\n\t\t\t \t</li>\";\n\t\t\t }\n\t\t }\n\t\t \n\t\t //get current login user\n\t\t //updating the mark read for meeting users as read \n\t\t $user = $this->Session->read('UserData.userName');\n\t\t $this->MeetingUser->updateAll(\n\t\t \t\tarray('MeetingUser.is_read' => 1),\n\t\t \t\tarray('MeetingUser.to_user' => $user)\n\t\t );\n\t\t \n\t\t if ($msgstr == \"\") {\n\t\t \techo \"<span class='noresultfound'>No result found</span>\";\n\t\t \texit;\n\t\t }\n\t\t echo $msgstr;\n\t\t exit;\n\t}", "public function __construct() {\n $this->startup= new Date('2018-06-02 14:12:11+0200');\n $this->responsible= new Person(1549, 'Timm');\n }", "public function __construct() { $this->_competitions = [new Competition(0, 'unknow', 0)]; }", "public function __construct($surveyID = null, $startTime = null, $taskID = null, $status = null, $responseRateValue = null, $calcMethod = null, $mailToInstructor = null, $mailToDean = null)\n {\n $this\n ->setSurveyID($surveyID)\n ->setStartTime($startTime)\n ->setTaskID($taskID)\n ->setStatus($status)\n ->setResponseRateValue($responseRateValue)\n ->setCalcMethod($calcMethod)\n ->setMailToInstructor($mailToInstructor)\n ->setMailToDean($mailToDean);\n }", "public function show_qualified_candidate(){\r\n\t\tif(function_exists('date_default_timezone_set')) {\r\n\t\t\tdate_default_timezone_set(\"Asia/Kolkata\");\r\n\t\t}\r\n\t\t$date = date(\"Y-m-d\");\r\n\t\t$query = $this->conn->query(\"select candidate.cnum, candidate.name, candidate.department, candidate.profile, candidate.register_time from candidate\r\n\t\tinner join interview\r\n\t\ton (candidate.cnum=interview.cnum and interview.recomendation = 'proceed' and candidate.register_date = '$date')\");\r\n\t\t\r\n\t\twhile($row = $query->fetch_array(MYSQLI_ASSOC)){\r\n\t\t\t$this->candidate[] = $row;\r\n\t\t\t\r\n\t\t}\r\n\t\treturn $this->candidate;\r\n\t\t\r\n\t}", "public function __construct()\n {\n $this->dateTime = new Time('now', 'Asia/Jakarta', 'id_ID');\n }", "public function __construct($_personInfo = NULL,$_regDt = NULL,$_politicalParty = NULL,$_voterStatus = NULL,$_lastVoteDt = NULL)\n {\n MicrobiltWsdlClass::__construct(array('PersonInfo'=>$_personInfo,'RegDt'=>$_regDt,'PoliticalParty'=>$_politicalParty,'VoterStatus'=>$_voterStatus,'LastVoteDt'=>$_lastVoteDt),false);\n }", "public function getBusySchedules($date,$activity_type,$engineer_id)\n {\n $this->db->where('start_date',$date);\n if($activity_type!='')\n $this->db->where('activity_type', $activity_type); \n if($engineer_id!='')\n $this->db->where('engineer_id', $engineer_id); \n\n $query = $this->db->get('job');\n\n $busy_slots = array();\n\n foreach ($query->result() as $key => $book_detail)\n {\n $busy_slots[] = array(\n \"begin\"=>new DateTime($book_detail->start_time),\n \"end\"=>new DateTime($book_detail->end_time),\n \"engineer_id\"=>$book_detail->engineer_id,\n \"customer_id\"=>$book_detail->customer_id,\n \"req_id\"=>$book_detail->id,\n \"status\"=>$book_detail->status,\n );\n }\n return $busy_slots;\n }", "function __construct(&$msgs, $paramName = \"sadm\") {\n $this->paramName = $paramName;\n $this->msgs = $msgs;\n $this->status = array(\n '0' => $this->_gt('Created'),\n '2' => $this->_gt('Confirmed'),\n '1' => $this->_gt('Valid'),\n '3' => $this->_gt('Locked'),\n '4' => $this->_gt('Blocked')\n );\n }", "function __construct() {\n $this->requestParameter['Request']['Language'] = 'en';\n $this->requestParameter['Request']['Credential']['ChannelManagerUsername'] = 'pms';\n $this->requestParameter['Request']['Credential']['ChannelManagerPassword'] = 'pms';\n $this->requestParameter['Request']['Credential']['HotelId']= '5994c2db-cd76-401c-ba2e-e178ae118a8d';\n $this->requestParameter['Request']['Credential']['HotelAuthenticationChannelKey'] = '7fd41009bbaa5c0464720b07f531d721';\n $this->contentServiceSoapClient = new SoapClient('http://hbe-api.whl-staging.com/services/content/soap?wsdl',array ('trace' => 1 ,'exceptions' => 0 ));\n $this->bookingServiceSoapClient = new SoapClient('http://hbe-api.whl-staging.com/services/booking/soap?wsdl',array ('trace' => 1 ,'exceptions' => 0 ));\n $this->inventoryServiceSoapClient = new SoapClient('http://hbe-api.whl-staging.com/services/inventory/soap?wsdl',array ('trace' => 1 ,'exceptions' => 0 ));\n }", "public function __construct() {\n\n parent::__construct(\n 'jobcareer_opening_hours', // Base ID\n esc_html__('CS : Opening Hours', 'jobcareer'), // Name\n array('classname' => 'widget_timing', 'description' => esc_html__('Footer Opening Hours Information', 'jobcareer'),) // Args\n );\n }", "public function getByChallenge (){\n\t\t\n\t\t$challenge = array();\n\t\t\n\t\t$tmp = Util::groupMultiArray($this->data, 'choice');\n\t\t\n\t\tforeach ($tmp as $choice_id => $choicedata){\n\t\t\t\n\t\t\tif(empty($choice_id)){\n\t\t\t\tcontinue;\t\n\t\t\t}\n\t\t\t\n\t\t\t$open_email_count = '0';\n $link_visit_open = '0';\n\t\t\t\n\t\t\tforeach ($choicedata as $choiceid => $choices){\n\t\t\t\t\n\t\t\t if(($choices['email_open'] == '1')) {\n\t\t\t\t\t $open_email_count++;\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\tif(($choices['link_visit_open'] == '1')) {\n\t\t\t\t\t $link_visit_open++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$challenge[$choice_id][4] = $open_email_count;\n\t\t\t$challenge[$choice_id][5] = $link_visit_open;\n\t\t\t\t\t\t\n\t\t\t$activities = Util::groupMultiArray( $choicedata, 'type');\n\t\t\t/*echo '<pre>';\n\t\t\tprint_r($choicedata);\n\t\t\tprint_r($activities );\n\t\t\techo '</pre>';*/\n\t\t\t$challenge[$choice_id][0] = count($choicedata);\n\t\t\t\n\t\t\tforeach ($activities as $typeid => $typedata){\n\t\t\t\t \n\t\t\t\t$challenge[$choice_id][$typeid] = count($typedata);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $challenge; //uasort($challenge,'sortByActivity');\n\t\t\n\t}", "public static function init(): self\n {\n return new self(new RetrieveBusinessBookingProfileResponse());\n }", "protected function initializeTimeTracker() {}", "protected function getPendingAppointments($args) {\n\n if ($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// $curr_date = date('Y-m-d H:i:s', time());\n// $curr_date_bfr_30min = date('Y-m-d H:i:s', time() - 1800);\n// $curr_date_bfr_1hr = date('Y-m-d H:i:s', time() - 3600);\n\n\n $selectAppntsQry = \"select p.profile_pic,p.first_name,p.phone,p.email,a.appt_lat,a.appt_long,a.appointment_dt,a.extra_notes,a.address_line1,a.address_line2,a.status,a.booking_type from appointment a, slave p \";\n $selectAppntsQry .= \" where p.slave_id = a.slave_id and a.status = 1 and a.mas_id = '\" . $this->User['entityId'] . \"' order by a.appointment_dt DESC\"; // and a.appointment_dt >= '\" . $curr_date_bfr_1hr . \"'\n\n $selectAppntsRes = mysql_query($selectAppntsQry, $this->db->conn);\n\n if (mysql_num_rows($selectAppntsRes) <= 0)\n return $this->_getStatusMessage(30, $selectAppntsQry);\n\n $pending_appt = array();\n\n while ($appnt = mysql_fetch_assoc($selectAppntsRes)) {\n\n if ($appnt['profile_pic'] == '')\n $appnt['profile_pic'] = $this->default_profile_pic;\n\n $pending_appt[] = array('apntDt' => $appnt['appointment_dt'], 'pPic' => $appnt['profile_pic'], 'email' => $appnt['email'],\n 'fname' => $appnt['first_name'], 'phone' => $appnt['phone'], 'apntTime' => date('H:i', strtotime($appnt['appointment_dt'])),\n 'apntDate' => date('Y-m-d', strtotime($appnt['appointment_dt'])), 'apptLat' => (double) $appnt['appt_lat'], 'apptLong' => (double) $appnt['appt_long'],\n 'addrLine1' => urldecode($appnt['address_line1']), 'addrLine2' => urldecode($appnt['address_line2']), 'notes' => $appnt['extra_notes'], 'bookType' => $appnt['booking_type']);\n }\n\n\n $errMsgArr = $this->_getStatusMessage(31, 2);\n\n return array('errNum' => $errMsgArr['errNum'], 'errFlag' => $errMsgArr['errFlag'], 'errMsg' => $errMsgArr['errMsg'], 'appointments' => $pending_appt); //,'test'=>$selectAppntsQry,'test1'=>$appointments);\n }", "public function __construct(?\\ArrayType\\EwsArrayOfServiceConfigurationResponseMessageType $responseMessages = null)\n {\n $this\n ->setResponseMessages($responseMessages);\n }", "public function __construct($date_of_Birth = null, \\WorkdayWsdl\\\\StructType\\CountryObjectType $birth_Country_Reference = null, \\WorkdayWsdl\\\\StructType\\Country_RegionObjectType $birth_Region_Reference = null, \\WorkdayWsdl\\\\StructType\\GenderObjectType $gender_Reference = null, \\WorkdayWsdl\\\\StructType\\Disability_Information_DataType $disability_Information_Data = null, \\WorkdayWsdl\\\\StructType\\Marital_StatusObjectType $marital_Status_Reference = null, array $citizenship_Reference = array(), \\WorkdayWsdl\\\\StructType\\CountryObjectType $primary_Nationality_Reference = null, array $additional_Nationality_Reference = array(), array $ethnicity_Reference = array(), $hispanic_or_Latino = null, array $visual_Survey_Ethnicity_Reference = array(), $hispanic_or_Latino_for_Visual_Survey = null, \\WorkdayWsdl\\\\StructType\\ReligionObjectType $religion_Reference = null, \\WorkdayWsdl\\\\StructType\\Country_RegionObjectType $hukou_Region_Reference = null, \\WorkdayWsdl\\\\StructType\\Country_SubregionObjectType $hukou_Subregion_Reference = null, $hukou_Locality = null, $hukou_Postal_Code = null, \\WorkdayWsdl\\\\StructType\\Hukou_TypeObjectType $hukou_Type_Reference = null, \\WorkdayWsdl\\\\StructType\\Country_RegionObjectType $native_Region_Reference = null, $personnel_File_Agency = null, \\WorkdayWsdl\\\\StructType\\Military_Information_DataType $military_Information_Data = null, \\WorkdayWsdl\\\\StructType\\Political_AffiliationObjectType $political_Affiliation_Reference = null, $date_of_Death = null, $city_of_Birth = null, \\WorkdayWsdl\\\\StructType\\Country_CityObjectType $city_of_Birth_Reference = null, $marital_Status_Date = null, $last_Medical_Exam_Date = null, $last_Medical_Exam_Valid_To = null, $medical_Exam_Notes = null, \\WorkdayWsdl\\\\StructType\\Blood_TypeObjectType $blood_Type_Reference = null, $uses_Tobacco = null, \\WorkdayWsdl\\\\StructType\\Social_Benefits_LocalityObjectType $social_Benefits_Locality_Reference = null, array $lGBT_Identification_Reference = array(), \\WorkdayWsdl\\\\StructType\\Sexual_OrientationObjectType $sexual_Orientation_Reference = null, \\WorkdayWsdl\\\\StructType\\Gender_IdentityObjectType $gender_Identity_Reference = null, \\WorkdayWsdl\\\\StructType\\PronounObjectType $pronoun_Reference = null, \\WorkdayWsdl\\\\StructType\\Relative_Name_Information_DataType $relative_Name_Information_Data = null)\n {\n $this\n ->setDate_of_Birth($date_of_Birth)\n ->setBirth_Country_Reference($birth_Country_Reference)\n ->setBirth_Region_Reference($birth_Region_Reference)\n ->setGender_Reference($gender_Reference)\n ->setDisability_Information_Data($disability_Information_Data)\n ->setMarital_Status_Reference($marital_Status_Reference)\n ->setCitizenship_Reference($citizenship_Reference)\n ->setPrimary_Nationality_Reference($primary_Nationality_Reference)\n ->setAdditional_Nationality_Reference($additional_Nationality_Reference)\n ->setEthnicity_Reference($ethnicity_Reference)\n ->setHispanic_or_Latino($hispanic_or_Latino)\n ->setVisual_Survey_Ethnicity_Reference($visual_Survey_Ethnicity_Reference)\n ->setHispanic_or_Latino_for_Visual_Survey($hispanic_or_Latino_for_Visual_Survey)\n ->setReligion_Reference($religion_Reference)\n ->setHukou_Region_Reference($hukou_Region_Reference)\n ->setHukou_Subregion_Reference($hukou_Subregion_Reference)\n ->setHukou_Locality($hukou_Locality)\n ->setHukou_Postal_Code($hukou_Postal_Code)\n ->setHukou_Type_Reference($hukou_Type_Reference)\n ->setNative_Region_Reference($native_Region_Reference)\n ->setPersonnel_File_Agency($personnel_File_Agency)\n ->setMilitary_Information_Data($military_Information_Data)\n ->setPolitical_Affiliation_Reference($political_Affiliation_Reference)\n ->setDate_of_Death($date_of_Death)\n ->setCity_of_Birth($city_of_Birth)\n ->setCity_of_Birth_Reference($city_of_Birth_Reference)\n ->setMarital_Status_Date($marital_Status_Date)\n ->setLast_Medical_Exam_Date($last_Medical_Exam_Date)\n ->setLast_Medical_Exam_Valid_To($last_Medical_Exam_Valid_To)\n ->setMedical_Exam_Notes($medical_Exam_Notes)\n ->setBlood_Type_Reference($blood_Type_Reference)\n ->setUses_Tobacco($uses_Tobacco)\n ->setSocial_Benefits_Locality_Reference($social_Benefits_Locality_Reference)\n ->setLGBT_Identification_Reference($lGBT_Identification_Reference)\n ->setSexual_Orientation_Reference($sexual_Orientation_Reference)\n ->setGender_Identity_Reference($gender_Identity_Reference)\n ->setPronoun_Reference($pronoun_Reference)\n ->setRelative_Name_Information_Data($relative_Name_Information_Data);\n }", "public function auEssShiftMatchingClockOnRosterShiftRequest($local_time, $employee_id, string $contentType = self::contentTypes['auEssShiftMatchingClockOnRosterShift'][0])\n {\n\n // verify the required parameter 'local_time' is set\n if ($local_time === null || (is_array($local_time) && count($local_time) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $local_time when calling auEssShiftMatchingClockOnRosterShift'\n );\n }\n\n // verify the required parameter 'employee_id' is set\n if ($employee_id === null || (is_array($employee_id) && count($employee_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $employee_id when calling auEssShiftMatchingClockOnRosterShift'\n );\n }\n\n\n $resourcePath = '/api/v2/ess/{employeeId}/shift/matchingclockon';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $local_time,\n 'localTime', // param base name\n 'string', // openApiType\n '', // style\n false, // explode\n true // required\n ) ?? []);\n\n\n // path params\n if ($employee_id !== null) {\n $resourcePath = str_replace(\n '{' . 'employeeId' . '}',\n ObjectSerializer::toPathValue($employee_id),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('apiKey');\n if ($apiKey !== null) {\n $headers['apiKey'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'GET',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function getMeetingRequestsCount()\n\t{\n\t\t//get initial value for old and new count\n\t\t$oldMeetingCount = $this->Session->read('oldMeetingCount');\n\t\t$newMeetingCount = $this->Session->read('newMeetingCount');\n\n\t\t//initialise the str\n\t\t$str = \"\";\n\t\t//get current login user\n\t\t$user = $this->Session->read('UserData.userName');\n\t\t//get the user course name.\n\t\t$userCourse = $this->Session->read('UserData.usersCourses');\n\t\t$user_course_section = $userCourse[0];\n\n\t\t//get Course and section name\n\t\t$course_info = $this->getCourseNameOfUser($user_course_section);\n\t\t$course_name = $course_info->course_name;\n\t\t$course_section = $course_info->section_name;\n\t\t$requests = array();\n\t\t//get allsection setting sections for same course\n\t\t$sections_list = $this->__allSections();\n\t\t$postoptions[] = array('Meetinginfo.chat_from_course'=>$course_name,\n\t\t\t\t'Meetinginfo.chat_from_section'=>$sections_list, 'MeetingUser.chat_meeting_name = Meetinginfo.chat_meeting_name'\n\t\t);\t\n\t\t$options['conditions'][] = array('MeetingUser.to_user' => $user, 'MeetingUser.is_read = '=> 0);\n\t\t$options['joins'][] = array(\n\t\t\t\t'table' => 'chat_meeting_info',\n\t\t\t\t'alias' => 'Meetinginfo',\n\t\t\t\t'type' => 'INNER',\n\t\t\t\t'conditions'=> $postoptions\n\t\t);\n\t\t$meeting_count = $this->MeetingUser->find('count', $options);\n\t\t//check to show alert notification\n\t\t$newMeetingCount = $meeting_count;\n\t\tif ($oldMeetingCount < $newMeetingCount ) {\n\t\t\t$showAlert = 1;\n\t\t} else {\n\t\t\t$showAlert = 0;\n\t\t}\n\t\t$oldMeetingCount = $newMeetingCount;\n\t\t$this->Session->write('oldMeetingCount', $oldMeetingCount);\n\t\t$this->Session->write('newMeetingCount', $newMeetingCount);\n\t\t$data = array('count'=>$meeting_count, 'showAlert'=>$showAlert);\n\t\techo json_encode($data);\n\t\texit;\n\t}", "function __construct($stdClassResultCourierServiceExt) {\n parent::__construct($stdClassResultCourierServiceExt);\n $this->_deliveryDeadline = isset($stdClassResultCourierServiceExt->deliveryDeadline) ? $stdClassResultCourierServiceExt->deliveryDeadline : null;\n $this->_allowanceDeliveryToFloor = isset($stdClassResultCourierServiceExt->allowanceDeliveryToFloor) ? $stdClassResultCourierServiceExt->allowanceDeliveryToFloor : null;\n }", "public function __construct(&$events, $rangeLowerBound, $rangeUpperBound, $workdayLowerBound = 0, $workdayUpperBound = 24, $length, $topSlots = 5){\n\n\t\tif($workdayLowerBound > $workdayUpperBound || $workdayUpperBound > 1440)\n\t\t\tdie(\"ERROR: Invalid workday interval.\");\n\t\t\n\t\telse{\n\t\t\t$this->workdayLowerBound = $workdayLowerBound;\n\t\t\t$this->workdayUpperBound = $workdayUpperBound;\n\t\t\t$this->rangeLowerBound = $rangeLowerBound;\n\t\t\t$this->rangeUpperBound = $rangeUpperBound;\n\t\t\t$this->topSlots = $topSlots;\n\n\t\t\t$this->root = new IntervalObject(0, 1E9, 'ROOT');\n\t\t\t\n\t\t\tself::$length = $length;\n\n //echo json_encode($rangeLowerBound);\n\n // $workdayLowerBound += $rangeLowerBound;\n // $workdayUpperBound += $rangeLowerBound;\n\n\n foreach($events as $email => $intervals) {\n for($j = 0; $j < count($events[$email]); $j++) {\n $events[$email][$j]['startTime'] += $rangeLowerBound;\n $events[$email][$j]['endTime'] += $rangeLowerBound;\n }\n }\n\n\t\t\tforeach($events as $email => $intervals) {\n $a = new ArrayIterator($intervals);\n\t\t\t\tforeach($a as $interval){\n\n // echo json_encode(\"BEFORE -> \").json_encode($interval).\"\\n\";\n\n if( ($interval['startTime'] % 1440) > $workdayUpperBound){\n $interval['startTime'] = 1440*(floor($interval['startTime']/1440)+1) + $workdayLowerBound;\n }\n else if( ($interval['startTime'] % 1440) < $workdayLowerBound ){\n $interval['startTime'] = 1440*floor($interval['startTime']/1440) + $workdayLowerBound;\n }\n\n //if( ($interval['endTime'] % 1440) < $workdayLowerBound){\n // $interval['endTime'] = 1440*(floor($interval['startTime']/1440)-1) + $workdayLowerBound;\n //}\n //else\n if( ($interval['endTime'] % 1440) > $workdayUpperBound ){\n $interval['endTime'] = 1440*floor($interval['endTime']/1440) + $workdayUpperBound;\n }\n\n //echo json_encode(\"AFTER -> \").json_encode($interval).\"\\n\";\n\n\t\t\t\t\tif( $interval['endTime'] - $interval['startTime'] < $length) {\n // echo json_encode(\"INVALID RANGE => \").json_encode($interval).\"\\n\";\n continue;\n }\n\n\t\t\t\t\t// instead of more than a day apart, divide by 1440 and see if the day matches\n\t\t\t\t\tif(floor($interval['startTime']/1440) < floor($interval['endTime']/1440)){\n //$c = 0;\n\t\t\t\t\t\tdo {\n // var_dump($interval);\n $tempEnd = 1440*floor($interval['startTime']/1440) + $workdayUpperBound;\n\n if($tempEnd > $interval['endTime'])\n $tempEnd = $interval['endTime'];\n\n $a->append(array('startTime' => $interval['startTime'],\n 'endTime' => $tempEnd));\n\n $interval['startTime'] = 1440*(floor($interval['startTime']/1440)+1) + $workdayLowerBound;\n\n //if($c >= 5)\n // break;\n //$c++;\n }\n\t\t\t\t\t\twhile ($interval['startTime'] / 1440 < $interval['endTime'] / 1440);\n\n //die();\n\n\t\t\t\t\t\t// insert the final range\n\t\t\t\t\t\t$a->append(array('startTime' => $interval['startTime'], 'endTime' => $interval['endTime']));\n\t\t\t\t\t}\n else{\n // echo json_encode(\"Inserting: $email -> \").\"\\n\";\n // echo json_encode($interval).\"\\n\";\n $this->root->insertInterval($email, $interval['startTime'], $interval['endTime']);\n }\n\n\n /*\n if( $interval['endTime'] - $interval['startTime'] < 1440 ) {\n echo json_encode(\"Inserting: $email -> \").\"\\n\";\n echo json_encode($interval).\"\\n\";\n $this->root->insertInterval($email, $interval['startTime'], $interval['endTime']);\n }\n else{\n echo json_encode(\"TOO LARGE RANGE => \").json_encode($interval).\"\\n\";\n\n \n }*/\n\n\t\t\t\t}\n\n\t\t\t}\n\n // echo json_encode($events);\n\t\t}\n\n\t}", "public static function init(): self\n {\n return new self(new ListTeamMemberWagesResponse());\n }", "public function __toString(): string\n {\n $options = \\http_build_query(Values::of($this->options), '', ' ');\n return '[Twilio.Conversations.V1.CreateParticipantOptions ' . $options . ']';\n }", "public function __construct($_personName = NULL,$_contactInfo = NULL,$_tINInfo = NULL,$_birthDt = NULL,$_birthState = NULL,$_birthCountry = NULL,$_deathDt = NULL,$_driversLicense = NULL,$_mothersMaidenName = NULL,$_spouseInfo = NULL,$_employmentHistory = NULL,$_schoolInfo = NULL,$_physicalCharacteristics = NULL,$_citizenship = NULL,$_languageSpoken = NULL,$_message = NULL,$_quality = NULL,$_birthCity = NULL,$_nationality = NULL,$_affiliation = NULL,$_validationInfo = NULL,$_recordID = NULL,$_militaryIdInfo = NULL,$_passportInfo = NULL,$_childrenInfo = NULL,$_hometownArea = NULL,$_relationshipStatus = NULL,$_orientation = NULL,$_aKAInfo = NULL,$_zodiac = NULL,$_birthYear = NULL,$_ownershipPercentage = NULL)\n {\n MicrobiltCriminalReportWsdlClass::__construct(array('PersonName'=>$_personName,'ContactInfo'=>$_contactInfo,'TINInfo'=>$_tINInfo,'BirthDt'=>$_birthDt,'BirthState'=>$_birthState,'BirthCountry'=>$_birthCountry,'DeathDt'=>$_deathDt,'DriversLicense'=>$_driversLicense,'MothersMaidenName'=>$_mothersMaidenName,'SpouseInfo'=>$_spouseInfo,'EmploymentHistory'=>$_employmentHistory,'SchoolInfo'=>$_schoolInfo,'PhysicalCharacteristics'=>$_physicalCharacteristics,'Citizenship'=>$_citizenship,'LanguageSpoken'=>$_languageSpoken,'Message'=>$_message,'Quality'=>$_quality,'BirthCity'=>$_birthCity,'Nationality'=>$_nationality,'Affiliation'=>$_affiliation,'ValidationInfo'=>$_validationInfo,'RecordID'=>$_recordID,'MilitaryIdInfo'=>$_militaryIdInfo,'PassportInfo'=>$_passportInfo,'ChildrenInfo'=>$_childrenInfo,'HometownArea'=>$_hometownArea,'RelationshipStatus'=>$_relationshipStatus,'Orientation'=>$_orientation,'AKAInfo'=>$_aKAInfo,'Zodiac'=>$_zodiac,'BirthYear'=>$_birthYear,'OwnershipPercentage'=>$_ownershipPercentage),false);\n }", "public function __construct()\n {\n $this->tickets = new ArrayCollection();\n }", "public function __construct($invitation_notification_arr)\n {\n $this->invitation_notification_arr = $invitation_notification_arr;\n }", "public function __construct(unavailablePeriodsCancelledAppointment $details)\n {\n $this->details = $details;\n }", "public function __construct() {\n parent::__construct();\n $this->setOdataType('#microsoft.graph.subjectRightsRequestEnumeratedSiteLocation');\n }", "public function action_get_conversation() {\n\n\t\t$sender = ORM::factory('User', $this->request->param(\"id\"));\n\t\t$conversations =array();// ORM::factory('Message')->get_conversations($this->_current_user->id, $sender);\n\t\t$post = $this->request->post();\n\t\t$to = \"\";\n\t\t$from = \"\";\n\t\tif($post) {\n\t\t\t$from = date('Y-m-d',strtotime($post['from']));\n\t\t\t$to = date('Y-m-d',strtotime($post['to']));\n\t\t\tif($to == '1969-12-31') {\n\t\t\t\t$to = date('Y-m-d',strtotime('2030-01-01'));\n\t\t\t}\n\t\t\tif($from == '1969-12-31') {\n\t\t\t\t$from = date('Y-m-d',strtotime('2030-01-01'));\n\t\t\t}\n\t\t\t$conversations = ORM::factory('Message')->get_conversations($this->_current_user->id, $sender, $from, $to);\n\t\t}else {\n\t\t\t$conversations = ORM::factory('Message')->get_conversations($this->_current_user->id, $sender);\n\t\t}\n\t\t$this->_template->set(\"conversation_info\", $sender);\n\n\t\t$this->_template->set(\"filters\", array(\"from\"=>$from,\"to\"=>$to,\"results\"=>$this->_count_all_messages_in_conversation($conversations)));\n\t\t$this->_template->set(\"conversations\", $conversations);\n\t\t$this->_set_content('conversation');\n\t}", "public function sortByStartTime(): self\n {\n /** @var array|TimeSlot[] $collection **/\n $collection = $this->collection;\n\n usort($collection, function (TimeSlot $slot1, TimeSlot $slot2) {\n if (DT::compareTime($slot1->getStartTime(), $slot2->getStartTime()) === 0\n && $slot1->getType() === TimeSlot::CANDIDATE_TYPE\n ) {\n return 1;\n }\n\n return (-1) * DT::compareTime($slot1->getStartTime(), $slot2->getStartTime());\n });\n\n return new static(...$collection);\n }", "public function meetings()\n {\n return $this->belongsToMany('Modules\\Meeting\\Entities\\Meeting')->withTimestamps();\n }", "public function __construct($message='1111222333',$type='2222')\n {\n $this->type = $type;\n $this->message = $message;\n }", "public function __construct(appointment $appointment)\n {\n //\n $this->appointment = $appointment;\n }", "public function _construct(){\n $this->KcsPoll = new ArrayCollection();\n }", "public function getActives(): self\n {\n return $this->filterByTypes([\n TimeSlot::BUSY_TYPE, TimeSlot::CANDIDATE_TYPE\n ]);\n }", "public function __construct(\\Ews\\StructType\\EwsItemType $item = null, \\Ews\\StructType\\EwsMessageType $message = null, \\Ews\\StructType\\EwsCalendarItemType $calendarItem = null, \\Ews\\StructType\\EwsContactItemType $contact = null, \\Ews\\StructType\\EwsMeetingMessageType $meetingMessage = null, \\Ews\\StructType\\EwsMeetingRequestMessageType $meetingRequest = null, \\Ews\\StructType\\EwsMeetingResponseMessageType $meetingResponse = null, \\Ews\\StructType\\EwsMeetingCancellationMessageType $meetingCancellation = null, \\Ews\\StructType\\EwsTaskType $task = null, \\Ews\\StructType\\EwsPostItemType $postItem = null, \\Ews\\StructType\\EwsRoleMemberItemType $roleMember = null, \\Ews\\StructType\\EwsNetworkItemType $network = null, \\Ews\\StructType\\EwsAbchPersonItemType $person = null, \\Ews\\StructType\\EwsBookingItemType $booking = null)\n {\n $this\n ->setItem($item)\n ->setMessage($message)\n ->setCalendarItem($calendarItem)\n ->setContact($contact)\n ->setMeetingMessage($meetingMessage)\n ->setMeetingRequest($meetingRequest)\n ->setMeetingResponse($meetingResponse)\n ->setMeetingCancellation($meetingCancellation)\n ->setTask($task)\n ->setPostItem($postItem)\n ->setRoleMember($roleMember)\n ->setNetwork($network)\n ->setPerson($person)\n ->setBooking($booking);\n }", "public function getAllIBCMeetings() {\n\t\t$dao = $this->getDao(new IBCMeeting());\n return $dao->getAll();\n\t}", "public function __construct($response)\n {\n if (isset($response)) {\n // Check to make sure that there is an ExecuteResult\n if (isset($response->ExecuteResult)) {\n $response = $response->ExecuteResult;\n\n // Get Success Value\n if (isset($response->Success)) {\n $this->Success = $response->Success;\n }\n // Get Message Value\n if (isset($response->Message)) {\n $this->Message = $response->Message;\n }\n if (isset($response->Addresses->ArrayOfAddressResponse->AddressResponse)) {\n $addresess = $response->Addresses->ArrayOfAddressResponse->AddressResponse;\n if (is_array($addresess) && count($addresess) > 0) {\n foreach ($addresess as $key => $val) {\n $addresess[$key] = (array)$val;\n }\n $this->addresess = $addresess;\n }\n }\n }\n }\n parent::__construct();\n }", "public function getAppointments ($id){\n $appointmentRequest = AppointmentRequest::where('id',$id)->first();\n $appointmentRequestId=$id;\n $parentId = $appointmentRequest->parent_id;\n //Retrieve parent and student details corresponding to the appointment request\n $parentDetails = UserDetails::where('user_id',$parentId)->first();\n $parentName = $parentDetails->name;\n $parentContact = $appointmentRequest->parentContact;\n $studentDetails = Student::where('parent_id',$parentId)->first();\n $studentId = $studentDetails->id;\n $studentName = $studentDetails->name;\n $gradeId = $studentDetails->grade_id;\n $gradeDetails = Grade::where('id',$gradeId)->first();\n $gradeName = $gradeDetails->grade_name;\n $reasonOfAppointment = $appointmentRequest->reasonOfAppointment;\n $cancellationReason = $appointmentRequest->cancellationReason;\n $requestType = $appointmentRequest->requestType;\n if($requestType == \"Parent Request\")\n $requestedBy = \"Parent\";\n else\n $requestedBy = \"You\";\n //Retrieve appointment slot corresponding to the appointment request\n $slotId=$appointmentRequest->teacherAppointmentsSlot_id;\n $slot = TeacherAppointmentSlots::where('id',$slotId)->first();\n $booked= $slot->isBooked;\n $awaited = $appointmentRequest->isAwaited;\n $confirmed = $appointmentRequest->isApproved;\n $cancelled = $appointmentRequest->isCancel;\n if ($awaited==1 && $confirmed==0 && $cancelled==0){\n $status = \"Awaited\";\n }\n elseif ($awaited==0 && $confirmed==1 && $cancelled==0){\n $status = \"Confirmed\";\n }\n elseif($awaited==0 && $confirmed==0 && $cancelled==1) {\n $status=\"Cancelled\";\n }\n else{\n $status = \"Invalid Status\";\n }\n //Retrieve appointment event corresponding to the appointment slot\n $eventId = $slot->calendarEventsId;\n $event = CalendarEvent::where('id',$eventId)->first();\n $title=$event->title;\n $start=$event->start;\n $end=$event->end;\n $teacherId = $appointmentRequest->teacher_id;\n $contactNo = $appointmentRequest->contactNo;\n $appointmentDetails= array(\n 'requestId' => $appointmentRequestId,\n 'parentName'=>$parentName,\n 'parentContact'=>$parentContact,\n 'studentId'=>$studentId,\n 'studentName'=>$studentName,\n 'grade'=>$gradeName,\n 'eventId'=>$eventId,\n 'title'=>$title,\n 'reasonOfAppointment'=>$reasonOfAppointment,\n 'cancellationReason'=>$cancellationReason,\n 'start'=>$start,\n 'end'=>$end,\n 'requestedBy'=>$requestedBy,\n 'status'=>$status,\n 'contact'=>$contactNo,\n 'teacherId'=>$teacherId\n );\n return $appointmentDetails;\n }", "public function show()\n {\n\n\n\n\n $myMeetings = MeetingAttendee::where('phonebook','=',0)\n ->where('attendee','=',\\Auth::user()->id)\n ->select('meeting')\n ->get();\n\n $myMeetingIds = array();\n\n foreach ($myMeetings as $myMeeting) {\n\n $myMeetingIds[] = $myMeeting->meeting;\n\n }\n\n $calendarMeetingsEvents = \\DB::table('calendar_events')\n ->join('calendar_events_type', 'calendar_events.event_type_id', '=', 'calendar_events_type.id')\n ->select(\n \\DB::raw(\"\n calendar_events.id,\n calendar_events.name,\n calendar_events.start_date,\n calendar_events.start_time,\n calendar_events.end_date,\n calendar_events.end_time,\n calendar_events_type.name as event_type\n \"\n\n )\n )\n ->where('calendar_events.event_type_id','=',1)\n ->whereIn('meeting_id',$myMeetingIds)\n ->groupBy('calendar_events.id')\n ->get();\n\n\n\n $calendarEventArray = array();\n $response = array();\n\n foreach ($calendarMeetingsEvents as $calendarMeetingEvent) {\n\n $calendarEventArray['title'] = $calendarMeetingEvent->start_time.'-'.$calendarMeetingEvent->name;\n $calendarEventArray['start'] = $calendarMeetingEvent->start_date.' '.$calendarMeetingEvent->start_time;\n $calendarEventArray['end'] = $calendarMeetingEvent->end_date.' '.$calendarMeetingEvent->end_time;\n $response[] = $calendarEventArray;\n\n\n }\n\n return \\Response::json($response);\n\n }", "public function testMessageThreadsV2GetMessages0()\n {\n }", "function __construct() \n\t{\n\t\t$this->obj = \"ResultMessage\";\n\t}", "public function __construct(string $message, array $response) {\n parent::__construct(\n $message . '(response : ' . json_encode($response) . ')'\n ) ;\n }", "public function __construct($type, $message, $from_id)\n {\n $this->type = $type;\n $this->message = $message;\n $this->fromId = $from_id;\n }", "public function __construct($data = [])\n {\n if (isset($data['ReasonNoTimeframes']) &&\n isset($data['ReasonNoTimeframes']['ReasonNoTimeframe']) &&\n is_array($data['ReasonNoTimeframes']['ReasonNoTimeframe'])\n ) {\n // single value ? or multiple\n if (isset($data['ReasonNoTimeframes']['ReasonNoTimeframe'][0])) {\n // multiple\n foreach ($data['ReasonNoTimeframes']['ReasonNoTimeframe'] as $item) {\n $this->addNoTimeframe(new NoTimeframe($item));\n }\n } else {\n $this->addNoTimeframe(new NoTimeframe($data['ReasonNoTimeframes']['ReasonNoTimeframe']));\n }\n }\n if (isset($data['Timeframes']) &&\n isset($data['Timeframes']['Timeframe']) &&\n is_array($data['Timeframes']['Timeframe'])\n ) {\n if (isset($data['Timeframes']['Timeframe'][0])) {\n foreach ($data['Timeframes']['Timeframe'] as $item) {\n $timeframe = new Timeframe($item);\n $this->add($timeframe);\n }\n } else {\n $timeframe = new Timeframe($data['Timeframes']['Timeframe']);\n $this->add($timeframe);\n }\n }\n }", "public function __construct(PodcastInvitationModel $invitation)\n {\n $this->invitation = $invitation;\n }", "public function parse(){\n\t\t$this->_data = array();\n\t\n\t\ttry{\n\t\t\tparent::parse();\n\t\t\t\n\t\t\tif(!empty($this->_response)){\n\t\t\t\tif($this->_request['method'] == 'GetEvents'){\n\t\t\t\t\tif(is_array($this->_response->GetEventsResult->Event)){\n\t\t\t\t\t\tforeach($this->_response->GetEventsResult->Event as $event){\n\t\t\t\t\t\t\t$this->_data[] = $event;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(is_object($this->_response->GetEventsResult->Event)){\n\t\t\t\t\t\t$this->_data = $this->_response->GetEventsResult->Event;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->_data = null;\n\t\t\t\t\t}\n\t\t\t\t}else if($this->_request['method'] == 'SearchEvents'){\n\t\t\t\t\tif(is_array($this->_response->SearchEventsResult->Event)){\n\t\t\t\t\t\tforeach($this->_response->SearchEventsResult->Event as $event){\n\t\t\t\t\t\t\t$this->_data[] = $event;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(is_object($this->_response->SearchEventsResult->Event)){\n\t\t\t\t\t\t$this->_data = $this->_response->SearchEventsResult->Event;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->_data = null;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(!empty($this->_response->GetCountryByIDResult)){\n\t\t\t\t\t\t$this->_data = $this->_response->GetCountryByIDResult;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->_data = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t}catch(TNException $e){\n\t\t\t$err = $this->debug($e->getMessage());\n\t\t\techo $err;\n\t\t}\n\t\n\t\treturn $this;\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->challenges = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n }", "public function initAnswerOffensives()\n\t{\n\t\t$this->collAnswerOffensives = array();\n\t}", "public function __construct()\n {\n $this->types = array(self::TYPE_EMISSION, self::TYPE_TRANSFER);\n }", "public function __construct(?\\StructType\\EwsSearchMailboxesResultType $searchMailboxesResult = null)\n {\n $this\n ->setSearchMailboxesResult($searchMailboxesResult);\n }", "public function __construct() {\n\n parent::__construct();\n $this->allowedTypes = array(\n CultureFeed_Activity::CONTENT_TYPE_EVENT,\n CultureFeed_Activity::CONTENT_TYPE_PRODUCTION,\n CultureFeed_Activity::CONTENT_TYPE_ACTOR,\n CultureFeed_Activity::CONTENT_TYPE_ACTIVITY,\n CultureFeed_Activity::CONTENT_TYPE_BOOK,\n CultureFeed_Activity::CONTENT_TYPE_NODE,\n CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE,\n );\n\n $this->subject = t('More info requested by');\n $this->viewPrefix = t('has requested more info on');\n $this->viewSuffix = t('');\n $this->label = t('More info requested');\n\n }", "public function __construct($responses)\n {\n foreach ($responses as $response) {\n $this->responses[] = [\n 'field' => $response->field,\n 'type' => $response->type,\n 'value' => $response->response\n ];\n }\n }", "public function participants2Attendees() : static\n {\n if( ! in_array( $this->getCompType(), Vcalendar::$VCOMBS, true )) {\n return $this;\n }\n [ $participants, $lcArr ] = $this->getSubCompsDetailType(\n self::PARTICIPANT,\n self::CALENDAR_ADDRESS,\n self::X_PARTICIPANTID,\n self::PARTICIPANT_TYPE,\n [ self::X_PARTICIPANT_TYPE, self::ROLE ]\n );\n if( ! empty( $participants )) {\n $this->comPropUpdFromSub( self::ATTENDEE, true, $participants, $lcArr );\n }\n return $this;\n }", "public function __construct() {\n\n\t\t\tparent::__construct(\n\t\t\t\t'zthemename_business_hours',\n\t\t\t\tesc_html__( 'Business Hours', 'zthemename' ),\n\t\t\t\tarray(\n\t\t\t\t\t'description' => esc_html__( \"Displays the business' hours\", 'zthemename' ),\n\t\t\t\t\t'customize_selective_refresh' => true,\n\t\t\t\t)\n\t\t\t);\n\t\t\t// get opening hours from db.\n\t\t\t$this->opening_hours = $this->generate_hours();\n\t\t}", "protected function __construct($banner_campaign_id)\n {\n $this->banner_campaign_id = (int) $banner_campaign_id;\n\n $result = self::$db->fetchOne(\n 'SELECT * FROM website.banner_campaign WHERE banner_campaign_id=$1',\n [$banner_campaign_id]\n );\n if (empty($result)) {\n throw new MyRadioException('Banner Campaign '.$banner_campaign_id.' does not exist!');\n }\n\n $this->banner = MyRadio_Banner::getInstance($result['banner_id']);\n $this->created_by = MyRadio_User::getInstance($result['memberid']);\n $this->approved_by = empty($result['approvedid']) ? null : MyRadio_User::getInstance($result['approvedid']);\n $this->effective_from = strtotime($result['effective_from']);\n $this->effective_to = empty($result['effective_to']) ? null : strtotime($result['effective_to']);\n $this->banner_location_id = (int) $result['banner_location_id'];\n\n //Make times be in seconds since midnight\n $this->timeslots = array_map(\n function ($x) {\n return [\n 'id' => $x['id'], 'day' => $x['day'],\n 'start_time' => strtotime($x['start_time'], 0),\n 'end_time' => strtotime($x['end_time'], 0),\n ];\n },\n self::$db->fetchAll(\n 'SELECT id, day, start_time, end_time, \\'order\\' FROM website.banner_timeslot\n WHERE banner_campaign_id=$1',\n [$this->banner_campaign_id]\n )\n );\n }", "public function __construct()\n {\n $possibleStatuses = $this->getPossibleStatuses();\n $this->courseStatus = $possibleStatuses[0];\n }", "public function actionGetAvailableTime()\n {\n if (empty($_GET['doctorId'])) {\n $this->errorResponse('Not all parameters provided (doctorId)');\n }\n\n if (empty($_GET['date'])) {\n $this->errorResponse('Not all parameters provided (date)');\n }\n\n $doctorId = $_GET['doctorId'];\n\n $dateStr = $_GET['date'];\n\n if (!DateTime::createFromFormat('Y-m-d', $dateStr)) {\n $this->errorResponse('Date invalid format');\n }\n\n $startDay = DateTime::createFromFormat('Y-m-d H:i:s', (new DateTime($dateStr))->format('Y-m-d 00:00:00'))->getTimestamp();\n $endDay = DateTime::createFromFormat('Y-m-d H:i:s', (new DateTime($dateStr))->format('Y-m-d 23:59:59'))->getTimestamp();\n\n $doctor = Doctor::model()->find()->where('code', '=', $doctorId)->execute();\n if ($doctor == null) {\n $this->errorResponse(\"Doctor with ID $doctorId not found\");\n }\n\n if (count($doctor->sessionsInfo) == 0) {\n $this->successResponse(array());\n }\n\n $sessions = SessionsInfo::findSessionsInPeriod($startDay, $endDay, $doctor);\n\n $result = [];\n\n foreach ($sessions as $session) {\n\n $begin = max($startDay, (int)$session->startTime);\n $end = min($endDay, (int)$session->endTime);\n\n $visits = $session->getVisits($begin, $end);\n $counter = 0;\n\n while ($begin < $end) {\n\n $interval = null;\n\n if ($counter == count($visits)) {\n\n //this is last interval\n $interval = [\n 'begin' => $begin,\n 'end' => $end,\n 'beginISO' => date('Y-m-d H:i:s', $begin),\n 'endISO' => date('Y-m-d H:i:s', $end),\n ];\n\n $begin = $end;\n\n } else {\n\n $visit = $visits[$counter];\n $startVisit = (int)$visit->startTime;\n $endVisit = (int)$visit->endTime;\n\n if ($startVisit != $begin && $begin < $startVisit) {\n\n $interval = [\n 'begin' => $begin,\n 'end' => $startVisit,\n 'beginISO' => date('Y-m-d H:i:s', $begin),\n 'endISO' => date('Y-m-d H:i:s', $startVisit),\n ];\n }\n\n $begin = $endVisit;\n $counter++;\n }\n\n if ($interval) {\n $result[] = $interval;\n }\n }\n }\n\n $this->successResponse($result);\n }", "public function __construct(string $searchSessionId, int $searchRequestId, $resultType, ?\\ArrayType\\EwsArrayOfItemsType $items = null, ?\\ArrayType\\EwsArrayOfConversationsType $conversations = null, ?\\ArrayType\\EwsArrayOfCalendarItemsType $calendarItems = null)\n {\n $this\n ->setSearchSessionId($searchSessionId)\n ->setSearchRequestId($searchRequestId)\n ->setResultType($resultType)\n ->setItems($items)\n ->setConversations($conversations)\n ->setCalendarItems($calendarItems);\n }", "public function getProvidersNextDayAppointments($notificationType)\n {\n $couponsTable = CouponsTable::getTableName();\n $customerBookingsExtrasTable = CustomerBookingsToExtrasTable::getTableName();\n $paymentsTable = PaymentsTable::getTableName();\n\n $startCurrentDate = \"STR_TO_DATE('\" .\n DateTimeService::getCustomDateTimeObjectInUtc(\n DateTimeService::getNowDateTimeObject()->setTime(0, 0, 0)->format('Y-m-d H:i:s')\n )->modify('+1 day')->format('Y-m-d H:i:s') . \"', '%Y-%m-%d %H:%i:%s')\";\n\n $endCurrentDate = \"STR_TO_DATE('\" .\n DateTimeService::getCustomDateTimeObjectInUtc(\n DateTimeService::getNowDateTimeObject()->setTime(23, 59, 59)->format('Y-m-d H:i:s')\n )->modify('+1 day')->format('Y-m-d H:i:s') . \"', '%Y-%m-%d %H:%i:%s')\";\n\n try {\n $statement = $this->connection->query(\n \"SELECT\n a.id AS appointment_id,\n a.bookingStart AS appointment_bookingStart,\n a.bookingEnd AS appointment_bookingEnd,\n a.notifyParticipants AS appointment_notifyParticipants,\n a.serviceId AS appointment_serviceId,\n a.providerId AS appointment_providerId,\n a.locationId AS appointment_locationId,\n a.internalNotes AS appointment_internalNotes,\n a.status AS appointment_status,\n a.zoomMeeting AS appointment_zoom_meeting,\n \n cb.id AS booking_id,\n cb.customerId AS booking_customerId,\n cb.status AS booking_status,\n cb.price AS booking_price,\n cb.customFields AS booking_customFields,\n cb.persons AS booking_persons, \n \n p.id AS payment_id,\n p.amount AS payment_amount,\n p.dateTime AS payment_dateTime,\n p.status AS payment_status,\n p.gateway AS payment_gateway,\n p.gatewayTitle AS payment_gatewayTitle,\n p.data AS payment_data,\n \n cbe.id AS bookingExtra_id,\n cbe.extraId AS bookingExtra_extraId,\n cbe.customerBookingId AS bookingExtra_customerBookingId,\n cbe.quantity AS bookingExtra_quantity,\n cbe.price AS bookingExtra_price,\n cbe.aggregatedPrice AS bookingExtra_aggregatedPrice,\n \n c.id AS coupon_id,\n c.code AS coupon_code,\n c.discount AS coupon_discount,\n c.deduction AS coupon_deduction,\n c.limit AS coupon_limit,\n c.customerLimit AS coupon_customerLimit,\n c.status AS coupon_status\n FROM {$this->appointmentsTable} a\n INNER JOIN {$this->bookingsTable} cb ON cb.appointmentId = a.id\n LEFT JOIN {$paymentsTable} p ON p.customerBookingId = cb.id\n LEFT JOIN {$customerBookingsExtrasTable} cbe ON cbe.customerBookingId = cb.id\n LEFT JOIN {$couponsTable} c ON c.id = cb.couponId\n WHERE a.bookingStart BETWEEN $startCurrentDate AND $endCurrentDate\n AND cb.status = 'approved' \n AND a.id NOT IN (\n SELECT nl.appointmentId \n FROM {$this->table} nl \n INNER JOIN {$this->notificationsTable} n ON nl.notificationId = n.id \n WHERE n.name = 'provider_appointment_next_day_reminder' AND n.type = '{$notificationType}'\n )\"\n );\n\n $rows = $statement->fetchAll();\n } catch (\\Exception $e) {\n throw new QueryExecutionException('Unable to find appointments in ' . __CLASS__, $e->getCode(), $e);\n }\n\n return AppointmentFactory::createCollection($rows);\n }", "function get_time_conflicts($room_id,$room_section,$user_id,$date,$start_time,$end_time,$otf,$reschedule_reservation_id=null)\n{\n\tglobal $db;\n\n\t$conflicts = array();\n\n\t$rooms = load_rooms(null,array('id'=>$room_id));\n\tforeach($rooms as $room)\n\t\tbreak;\n\n\t$hours = load_hours($db,$date);\n\n\t// check to make sure there aren't any conflicts for the room\n\t$select_conflicts = \"select * from reservations where room_id like '$room_id' and room_section like '$room_section' and ((sched_end_time > '\".date('Y-m-d H:i:s',strtotime($start_time)).\"' AND sched_start_time <= '\".date('Y-m-d H:i:s',strtotime($start_time)).\"') OR (sched_end_time >= '\".date('Y-m-d H:i:s',strtotime($end_time)).\"' AND sched_start_time < '\".date('Y-m-d H:i:s',strtotime($end_time)).\"') OR (sched_start_time >= '\".date('Y-m-d H:i:s',strtotime($start_time)).\"' AND sched_end_time <= '\".date('Y-m-d H:i:s',strtotime($end_time)).\"')) AND cancelled like '0' AND key_checkin_time is null and active like '1'\";\n\tif($reschedule_reservation_id && $reschedule_reservation_id > 0)\n\t\t$select_conflicts .= \" AND id not like '$reschedule_reservation_id'\";\n\t//print(\"select: $select_conflicts<br>\\n\");\n\t$res_conflicts = $db->query($select_conflicts);\n\t$num_conflicts = $res_conflicts->numRows();\n\tif($num_conflicts > 0)\n\t{\n\t\tunset($conflict);\n\t\tif($num_conflicts == 1)\n\t\t\t$conflict->message = \"The room reservation you selected conflicts with an existing room reservation.\";\n\t\telse\n\t\t\t$conflict->message = \"The room reservation you selected conflicts with multiple existing room reservations.\";\n\t\twhile($res_conflicts->fetchInto($res))\n\t\t\t$conflict->data[] = $res;\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// check to make sure there aren't any conflicts for the patron\n\t$select_conflicts = \"select * from reservations where user_id like '$user_id' and (sched_end_time > '\".date('Y-m-d H:i:s',strtotime($start_time)).\"' AND sched_start_time < '\".date('Y-m-d H:i:s',strtotime($end_time)).\"') AND cancelled like '0' AND status not like 'Cancelled' AND status not like 'Completed' AND active like '1'\";\n\tif($reschedule_reservation_id && $reschedule_reservation_id > 0)\n\t\t$select_conflicts .= \" AND id not like '$reschedule_reservation_id'\";\n\t//print(\"select: $select_conflicts<br>\\n\");\n\t$res_conflicts = $db->query($select_conflicts);\n\t$num_conflicts = $res_conflicts->numRows();\n\tif($num_conflicts > 0)\n\t{\n\t\tunset($conflict);\n\t\tif($num_conflicts == 1)\n\t\t\t$conflict->message = \"An existing reservation overlaps with this reservation.\";\n\t\telse\n\t\t\t$conflict->message = \"Multiple existing reservations overlap with this reservation.\";\n\t\twhile($res_conflicts->fetchInto($res))\n\t\t\t$conflict->data[] = $res;\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check the libary is not closed\n\tif(strtotime($start_time) < strtotime($hours->open_time) || strtotime($end_time) > strtotime($hours->close_time))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected a reservation that falls outside of the available hours for \" . date('m/d/Y',strtotime($date)) . \".\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check the reservation is not for a time too far in the future\n\t$max_date_hours = load_hours($db,date('Y-m-d',strtotime(\"+\".(MAX_FUTURE_RES_DAYS-1).\" days\",strtotime('now'))));\n\tif(strtotime($start_time) > strtotime($max_date_hours->close_time))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected a reservation that is too far in the future. Reservations may only be made as far as \".MAX_FUTURE_RES_DAYS.\" days in advance.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check to make sure the reservation length is not greater than the max allowed\n\t$res_length = round((strtotime($end_time) - strtotime($start_time))/60);\n\tif($res_length > DEFAULT_MAX_RES_LEN && strcmp($otf,\"1\"))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected a reservation that exceeds the maximum allowed duration of \".DEFAULT_MAX_RES_LEN.\" minutes.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check to make sure the reservation length is not shorter than the min allowed\n\tif($res_length < DEFAULT_MIN_RES_LEN)\n\t{\n\t\tif((in_array('Staff',$_SESSION['LibRooms']['Roles']) || in_array('Admin',$_SESSION['LibRooms']['Roles'])) && !strcmp($otf,\"1\"))\n\t\t{\n\t\t\t// on the fly checkouts are allowed to be shorter than the minimum reservation length\n\t\t}\n\t\telse\n\t\t{\n\t\t\tunset($conflict);\n\t\t\t$conflict->message = \"You have selected a reservation that is shorter than the minimum allowed duration of \".DEFAULT_MIN_RES_LEN.\" minutes.\";\n\t\t\t$conflicts[] = $conflict;\n\t\t}\n\t}\n\n\t// double-check that the end time comes after the start time\n\tif($res_length <= 0)\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected an invalid start time or end time for your reservation.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check reservation start time is for a time in the future (if staff/admin -> minus 1 res_precision)\n\tif(isset($_SESSION['LibRooms']['Roles']) && (in_array('Staff',$_SESSION['LibRooms']['Roles']) || in_array('Admin',$_SESSION['LibRooms']['Roles'])))\n\t\t$min_start_time = strtotime(RES_PRECISION . \" minutes ago\",strtotime('now'));\n\telse\n\t\t$min_start_time = strtotime('now');\n\tif(strtotime($start_time) < $min_start_time)\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected a start time in the past.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\n\t// double-check room is not out-of-order\n\tif(!strcmp($room->out_of_order,'Yes'))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"The room you selected is currently out of order.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// confirm user has a staff or admin role before allowing first come first serve reservations\n\tif(isset($_SESSION['LibRooms']['Roles']) && !in_array('Staff',$_SESSION['LibRooms']['Roles']) && !in_array('Admin',$_SESSION['LibRooms']['Roles']) && !strcmp($room->fcfs,'Yes'))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You do not have permission to reserve first come first serve rooms.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// if back-to-back reservations are not allowed, check to make sure this is not a back-to-back\n\tif(!strcmp(BACK_TO_BACK_RESERVATIONS,\"No\"))\n\t{\n\t\t$select_conflicts = \"select * from reservations where user_id like '$user_id' and room_id like '$room_id' and (sched_end_time like '\".date('Y-m-d H:i:s',strtotime($start_time)).\"' OR sched_start_time like '\".date('Y-m-d H:i:s',strtotime($end_time)).\"') AND cancelled like '0' and active like '1'\";\n\t\tif($reschedule_reservation_id && $reschedule_reservation_id > 0)\n\t\t\t$select_conflicts .= \" AND id not like '$reschedule_reservation_id'\";\n\t\t//print(\"select: $select_conflicts<br>\\n\");\n\t\t$res_conflicts = $db->query($select_conflicts);\n\t\t$num_conflicts = $res_conflicts->numRows();\n\t\tif($num_conflicts > 0)\n\t\t{\n\t\t\tunset($conflict);\n\t\t\t$conflict->message = \"Back to back reservations by the same patron for the same room are not allowed.\";\n\t\t\twhile($res_conflicts->fetchInto($res))\n\t\t\t\t$conflict->data[] = $res;\n\t\t\t$conflicts[] = $conflict;\n\t\t}\n\t}\n\n\treturn($conflicts);\n}", "protected function __construct() {\n $this->state = State::PENDING;\n $date = date('Y-m-d H:i:s');\n $this->createTime = new \\DateTime();\n $this->updateTime = new \\DateTime();\n $this->appt = null;\n $this->invoiceId = -1;\n }", "function getPendingScheduleRequests($tchid)\n\t{\n\t\t\n\t\t// Demo\n\t\t$qry = \"select sr.*, first_name, fullname from schedulerequests sr \n\t\t\t\tinner join tbl_users u on u.slno=sr.studentid \n\t\t\t\twhere sr.teacherid=\".intval($tchid).\" and sr.req_sch_date >= CURRENT_DATE() \n\t\t\t\tand sr.scheduleid=0 and sr.slotid=0 and sr.status is null and sr.std_req_confirm='Y'\";\n\t\t$res1=$this->runQuery($qry);\n\t\t\n\t\t// Paid\n\t\t$qry = \"select sr.*, s.slot_from, s.slot_to, first_name, fullname from schedulerequests sr \n\t\t\t\tinner join tbl_users u on u.slno=sr.studentid \n\t\t\t\tinner join tbl_slotmaster s on s.slno=sr.slotid \n\t\t\t\twhere sr.teacherid=\".intval($tchid).\" and sr.req_sch_date >= CURRENT_DATE() \n\t\t\t\tand sr.scheduleid=0 and sr.slotid > 0 and sr.status is null and sr.std_req_confirm='Y'\";\n\t\t$res2=$this->runQuery($qry);\t\t\n\t\t\n\t\treturn array($res1,$res2);\n\t}", "public function __construct() {\n $this->subject_id = false;\n \n // attributes to return for subjects\n $attributes = array('description');\n $this->subjectAttributeNames = array('subjectAttributeNames' => $attributes);\n \n // set this properties from the abstract parent class\n $this->servicePath = 'subjects';\n $this->expectedResponseType = 'SAS\\IRAD\\PennGroupsBundle\\Response\\WsGetGroupsResultsResponse';\n }", "public function __construct() {\r\n $this->_input = new PartnerAPIMessageGetCertificate();\r\n $this->_output = new PartnerAPIMessageGetCertificateResponse();\r\n }", "public function appointment_exists_block_calendar($data = array()) {\n\n //get the appointment list if exists in the date blocked by the doctor\n $get_appointment_list_sql = \" SELECT \n appointment_id \n FROM \n \" . TBL_APPOINTMENTS . \" \n WHERE \n appointment_status = 1\n AND\n appointment_doctor_user_id = '\" . $data['doctor_id'] . \"' \n AND \";\n\n if ($data['block_type'] == 1) {\n $get_appointment_list_sql .= \" \n (\n appointment_date >= '\" . $data['start_date'] . \"' AND\n appointment_date <= '\" . $data['end_date'] . \"'\n ) \n \";\n } else {\n $get_appointment_list_sql .= \"\n ( \n (\n appointment_from_time <= '\" . $data['start_time'] . \"' AND\n appointment_to_time >= '\" . $data['start_time'] . \"'\n )\n OR\n (\n appointment_from_time <= '\" . $data['end_time'] . \"' AND\n appointment_to_time >= '\" . $data['end_time'] . \"'\n )\n )\n AND appointment_date = '\" . $data['block_slot_date'] . \"' \";\n }\n\n $get_appointment_data = $this->Common_model->get_all_rows_by_query($get_appointment_list_sql);\n\n return $get_appointment_data;\n }", "public function __construct(\\Sabre\\UpdateReservation\\StructType\\RequestorID_PNRB $requestorID = null, \\Sabre\\UpdateReservation\\StructType\\BookingChannel_PNRB $bookingChannel = null, array $tTYRecordLocator = array(), \\Sabre\\UpdateReservation\\StructType\\OACType $oAC = null, $bookingSource = null, $agentSine = null, $pseudoCityCode = null, $iSOCountry = null, $iSOCurrency = null, $agentDutyCode = null, $airlineVendorID = null, $airportCode = null, $firstDepartPoint = null, $sourceSystem = null, $terminalID = null, $homePseudoCityCode = null, $primeHostID = null)\n {\n $this\n ->setRequestorID($requestorID)\n ->setBookingChannel($bookingChannel)\n ->setTTYRecordLocator($tTYRecordLocator)\n ->setOAC($oAC)\n ->setBookingSource($bookingSource)\n ->setAgentSine($agentSine)\n ->setPseudoCityCode($pseudoCityCode)\n ->setISOCountry($iSOCountry)\n ->setISOCurrency($iSOCurrency)\n ->setAgentDutyCode($agentDutyCode)\n ->setAirlineVendorID($airlineVendorID)\n ->setAirportCode($airportCode)\n ->setFirstDepartPoint($firstDepartPoint)\n ->setSourceSystem($sourceSystem)\n ->setTerminalID($terminalID)\n ->setHomePseudoCityCode($homePseudoCityCode)\n ->setPrimeHostID($primeHostID);\n }", "function getEventAttendeeCountOrientation($id,$time){\r\n $response = array('ok' => false, 'msg' => \"Undefined error\");\r\n\r\n $sqlCon = openDatabase();\r\n $query = sprintf(\"SELECT count(orientation_group) AS countChecked FROM view_Count WHERE event_id='%s'\", SQLE($id));\r\n\t$createDate_Start = new DateTime($time);\r\n\t$eventDate_Start = $createDate_Start->format('Y-m-d');\t\r\n\t$eventHour_Start = 0;//$createDate_Start->format('H');\r\n\t\r\n\t$whereGroup =\" and orientation_group ='\";\r\n\t$whereTime = \" and time_checked_in < '\";//need \"';\"\r\n $list = array();\r\n\t$result_arrayA = array();\r\n\t$result_arrayB = array();\r\n\t$result_arrayC = array();\r\n\r\n\t\tfor ($i=$eventHour_Start; $i<=($eventHour_Start+9); $i++){\r\n\t\t\t\t if ($i < 10 & $i>$eventHour_Start){ $h = '0'.$i;} else {$h = $i;}\r\n\t\t\t\t$result = mysql_query($query.$whereGroup.\"0'\".$whereTime.\"2013-11-25 \".$h.\":59'\");\r\n\t\t\t\t$row = mysql_fetch_array($result, MYSQL_ASSOC);\r\n\t\t\t\t$result_arrayA[] = $row;\t\r\n\t\t}\r\n\t\t\r\n\t\tfor ($j=$eventHour_Start; $j<=($eventHour_Start+9); $j++){\r\n\t\t\t\tif ($j < 10 & $j>$eventHour_Start){ $h = '0'.$j;} else {$h = $j;}\r\n\t\t\t\t$result = mysql_query($query.$whereGroup.\"0'\".$whereTime.$eventDate_Start.\" \".$h.\":59'\");\r\n\t\t\t\t$row = mysql_fetch_array($result, MYSQL_ASSOC);\r\n\t\t\t\t$result_arrayB[] = $row;\t\r\n\t\t}\r\n\t\tfor ($k=$eventHour_Start; $k<=($eventHour_Start+9); $k++){\r\n\t\t\t\tif ($k < 10 & $k>$eventHour_Start){ $h = '0'.$k;} else {$h = $k;}\r\n\t\t\t\t$result = mysql_query($query.$whereGroup.\"0'\".$whereTime.$eventDate_Start.\" \".$h.\":59'\");\r\n\t\t\t\t$row = mysql_fetch_array($result, MYSQL_ASSOC);\r\n\t\t\t\t$result_arrayC[] = $row;\t\r\n\t\t}\t\r\n\t\t$list['GroupA'] = $result_arrayA;\r\n\t\t$list['GroupB'] = $result_arrayB;\r\n\t\t$list['GroupC'] = $result_arrayC;\r\n\t\t \r\n $response = array('ok' => true, 'msg' => \"OK\", 'list' => $list);\r\n\r\n closeDatabase();\r\n return $response;\r\n}", "public function __construct(){\n $this->create_at = new DateTime();\n $this->options = new ArrayCollection();\n }", "public function __construct($_pickupDate = NULL,$_readyByTime = NULL,$_closingTime = NULL,$_remark = NULL,$_pickupLocation = NULL)\n {\n parent::__construct(array('PickupDate'=>$_pickupDate,'ReadyByTime'=>$_readyByTime,'ClosingTime'=>$_closingTime,'Remark'=>$_remark,'PickupLocation'=>$_pickupLocation),false);\n }", "public function __construct($response)\n {\n $this->response = $response;\n\n $this->suggestions = [];\n foreach ($response['suggestions'] as $suggestion) {\n $this->suggestions[] = new Suggestion($suggestion);\n }\n }", "public function testMessageThreadsV2GetMessages()\n {\n }", "public function __construct(Participant $participant)\n {\n $fields = collect($participant)->except(['id', 'created_at', 'updated_at']);\n $this->fields = $fields->keyBy(function($item, $key) {\n return ucwords(str_replace('_',' ',$key));\n });\n }", "public function __construct($startTime, $totalHours, $maxHours) {\n\t\t$this->startTime = $startTime;\n\t\t$this->totalHours = $totalHours;\n\t\t$this->maxHours = $this->calculateMaxHours($maxHours);\n\t}" ]
[ "0.48409176", "0.46415326", "0.46238506", "0.46189728", "0.459876", "0.45932695", "0.44249666", "0.44214097", "0.44142398", "0.4409216", "0.43712234", "0.4356641", "0.43558082", "0.43494785", "0.4341607", "0.43356425", "0.4291168", "0.42818493", "0.4280207", "0.42656127", "0.4258343", "0.42493552", "0.42476523", "0.4241894", "0.42280406", "0.4227108", "0.42266765", "0.42201313", "0.42198262", "0.41887197", "0.4178754", "0.41697642", "0.4167505", "0.41559517", "0.4153049", "0.41514033", "0.41496137", "0.41437173", "0.41403538", "0.41382185", "0.41367996", "0.41361895", "0.41236436", "0.41217577", "0.4121674", "0.41172174", "0.41153473", "0.41127536", "0.41118953", "0.41114116", "0.41077963", "0.41065836", "0.4097404", "0.40952206", "0.4084693", "0.4079479", "0.4077176", "0.4073241", "0.40722024", "0.40708318", "0.40693268", "0.40635145", "0.4062253", "0.40561604", "0.40559632", "0.40539393", "0.40504083", "0.40465188", "0.40457436", "0.40440232", "0.40408167", "0.40345815", "0.40327197", "0.40276256", "0.4027482", "0.4026228", "0.40224865", "0.40213174", "0.40209997", "0.4020304", "0.4018671", "0.4018621", "0.40173852", "0.40140784", "0.40026662", "0.40000197", "0.3999822", "0.3993632", "0.39924178", "0.39904633", "0.39896604", "0.39846882", "0.3975624", "0.39746803", "0.39690077", "0.39645138", "0.3961242", "0.39600146", "0.3955582", "0.3955237" ]
0.6646118
0
Enqueue scripts and styles
function calvero_scripts() { wp_enqueue_style( 'style', get_stylesheet_uri() ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } wp_enqueue_script( 'navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true ); if ( is_singular() && wp_attachment_is_image() ) { wp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' ); } wp_enqueue_script( 'jquery', get_template_directory_uri() . '/js/jquery-1.11.3.min.js' , false , false , true ); wp_enqueue_script( 'menu', get_template_directory_uri() . '/js/menu-funcao.js' , 'jquery' , false , true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function enqueue_scripts() {\n\t\t$this->styles();\n\t\t$this->scripts();\n\t}", "public function enqueueScripts() {\n\t\t\twp_enqueue_script('jquery');\n//\t\t\twp_enqueue_script('owl', self::asset(\"node_modules/owl.carousel/dist/owl.carousel.min.js\"), ['jquery'], '1.0.0', ' all');\n// wp_enqueue_script('headroom', self::asset(\"node_modules/headroom.js/dist/headroom.min.js\"), ['jquery'], '1.0.0', ' all');\n// wp_enqueue_script('prettyPhoto', self::asset(\"js/vendor/jquery.prettyPhoto.js\"), ['jquery'], '1.0.0', ' all');\n//\t\t\twp_enqueue_script('navigo', self::asset(\"node_modules/navigo/lib/navigo.min.js\"), ['jquery'], '1.0.0', ' all')\\;\n\t\t\twp_enqueue_script('app', self::asset(\"js/app.min.js\"), ['jquery'], '1.0.0', ' all');\n\t\t}", "public function enqueueScripts(){}", "static function enqueue_scripts(){\n\t\tself::include_css();\n\t\tself::include_js();\n\t}", "public function frontEndStyleScripts(): void\n {\n wp_enqueue_style('users-data-bootstrap', plugin_dir_url(dirname(__FILE__)) . 'assets/css/bootstrap.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-fontawsome', plugin_dir_url(dirname(__FILE__)) . 'assets/css/font-awesome.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-styles', plugin_dir_url(dirname(__FILE__)) . 'assets/css/users-data.css', [], UsersListing::getVersion());\n //\n wp_enqueue_script('jquery-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/jquery.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('jquery-popper', plugin_dir_url(dirname(__FILE__)) . 'assets/js/popper.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('bootstrap-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/bootstrap.min.js', ['jquery'], UsersListing::getVersion(), false);\n }", "public function enqueueScripts() {\n wp_register_style('rrze-faq-style', plugins_url('assets/css/rrze-faq.css', plugin_basename($this->pluginFile)));\n wp_enqueue_style('rrze-faq-style');\n }", "public function enqueue_scripts() {\n\t\twp_enqueue_style( 'pt-style', plugins_url( 'assets/css/style.css', __FILE__ ), array(), '1.0.0', false );\n\n\t\twp_enqueue_script( 'pt-script', plugins_url( 'assets/js/script.js', __FILE__ ), array(), '1.0.0', true );\n\t}", "public function enqueueScripts()\n {\n wp_enqueue_style('gfbitpay-admin', $this->plugin->urlBase . 'style-admin.css', false, GFBITPAY_PLUGIN_VERSION);\n }", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "public function setup_scripts_and_styles() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_css' ), 50 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_js' ), 10 );\n\t}", "function mandiberg_scripts() {\n\n\t\t//include bootstrap:\n\t\twp_register_style( 'bootstrap-style', get_template_directory_uri() . '/css/bootstrap.min.css' );\n\t\twp_enqueue_style( 'bootstrap-style');\n\n\n\n\t\t// Register the style like this for a theme:\n\t wp_register_style( 'mandiberg-style', get_template_directory_uri() . '/style.css', array(), '20120208', 'all' );\n\t\twp_enqueue_style( 'mandiberg-style');\n\n\t\t//barba js for transitions\n\n\t\t wp_register_script('barba', get_template_directory_uri() . '/build/barba.min.js', array ( 'jquery' ),'1.1', true);\n\t\t wp_enqueue_script('barba');\n\n\t\t//js\n\t\twp_register_script('js-file', get_template_directory_uri() . '/build/script.js', array ( 'jquery' ),'1.1', true);\n\t\t wp_enqueue_script('js-file');\n\n\t}", "public function enqueue_scripts() {\n wp_enqueue_style( $this->name, plugins_url( '/assets/css/admin.css', IMFILE ), '', $this->version, 'all' );\n \n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( $this->name, plugins_url( '/assets/js/admin.js', IMFILE ), array( 'jquery' ), $this->version, true );\n }", "public function enqueue_scripts() {\n wp_enqueue_script(\n 'moment',\n plugins_url('includes/moment.min.js', __FILE__),\n array(),\n VSPI_VERSION,\n false\n );\n wp_enqueue_script(\n 'minidaemon',\n plugins_url('includes/mdn-minidaemon.js', __FILE__),\n array(),\n VSPI_VERSION,\n false\n );\n wp_enqueue_script(\n 'vspi-admin',\n plugins_url('includes/vspi-admin.js', __FILE__),\n array('jquery'),\n VSPI_VERSION,\n false\n );\n }", "public function add_scripts_and_styles()\n {\n // Estilos css \n wp_register_style( 'wiAjustesStyles', WI_PLUGIN_URL . '/style.css', null, WI_VERSION );\n wp_enqueue_style( 'wiAjustesStyles' );\n\n // Scripts de javascript\n wp_enqueue_script('wiAjustesStylesJs', WI_PLUGIN_URL . '/script.js' , array('jquery'));\n }", "public function enqueue_scripts() {\n\t\twp_add_inline_style( 'at-main', $this->inline_css() );\n\t}", "public function enqueue_scripts() {\r\n\r\n\t\t}", "function assets(){\n\t\t\twp_enqueue_style( 'sp-2020-styles', get_template_directory_uri() .'/assets/css/main.css', array(), SPUTZNIK_2020_THEME_VERSION );\n\t\t\twp_enqueue_script( 'sp-2020-js', get_template_directory_uri() . '/assets/js/main.js', array('jquery'), SPUTZNIK_2020_THEME_VERSION, true );\n\n\t\t}", "function innelyz_scripts() {\n wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.js', array('jquery'), '3.3.7', false);\n wp_enqueue_style( 'bootstrap', get_template_directory_uri() .'/assets/css/bootstrap.css', array(), false, 'all' );\n wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lora|Pacifico|Roboto');\n wp_enqueue_style( 'innelyz-style', get_stylesheet_uri() );\n }", "public function register_scripts()\n {\n wp_register_style(\n 'fau-oembed-style',\n plugins_url('assets/css/fau-oembed.css', plugin()->getBasename()),\n [],\n plugin()->getVersion()\n ); \n }", "function starkers_script_enqueuer() {\n\t\twp_register_script( 'site', get_template_directory_uri().'/js/scripts.min.js', array( 'jquery' ) );\n\t\twp_enqueue_script( 'site' );\n\n\t\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\n\t\twp_enqueue_style( 'screen' );\n\t}", "public function enqueue_scripts() {\n\n\t\twp_enqueue_style( 'kirki-field-dimensions', URL::get_from_path( dirname( __DIR__ ) . '/dist/control.css' ), array(), '1.0' );\n\n\t}", "public function enqueue_front_end_scripts() {}", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts()\n {\n }", "function hugomitoire_scripts() {\n wp_enqueue_style( 'appStyles', get_template_directory_uri() . '/dist/css/style.min.css' );\n wp_enqueue_script( 'Js', get_template_directory_uri() . '/dist/js/all.js', array(), '1.0.0', true );\n wp_enqueue_script( 'Swiper', get_template_directory_uri() . '/dis/js/all.js', array(), '4.4.2', true);\n}", "function berry_scripts() {\n\n\twp_dequeue_style( 'seed-style');\n\twp_enqueue_style( 'berry-style', get_stylesheet_uri() );\n\twp_enqueue_script( 'berry-main', get_stylesheet_directory_uri() . '/js/main.js', array(), '2016-1', true );\n\n}", "public function scripts(){\n //Enqueue scripts\n /**\n * wp_enqueue_script('sample-script',$this->directory_uri . '/sample.min.js',array('jquery'),false,false);\n * ...\n * ....\n */\n }", "public function enqueue_scripts() {\n\t\t// wp_enqueue_style( 'simple-grams', plugins_url( '/assets/css/simple-grams.css', __FILE__ ) );\n\t}", "public static function wp_enqueue_scripts() {\n\t\t\t\n\t\t\tWPPFrontendUI::_register_styles();\n\t\t\t\n\t\t}", "function cs_style_and_scripts() {\n \n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/vendor.css' );\n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/app.css' );\n wp_enqueue_style( 'main-css', get_stylesheet_uri() );\n\n /*wp_enqueue_script( 'myscripts', get_stylesheet_directory_uri() . '/assets/js/app.js', '', '1.0.0', true );\n wp_localize_script('myscripts', 'cs_obj', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n ));*/\n\n }", "public function enqueue_scripts() {\n\n\t}", "function wpdocs_theme_name_scripts() {\n wp_enqueue_style('pva-style', get_stylesheet_uri());\n wp_enqueue_style('pva-bootstrap', get_stylesheet_directory_uri() . '/css/bootstrap.min.css', array(), '1.0.0', 'all');\n wp_enqueue_script('pva-script', get_template_directory_uri() . '/js/sitescript.js', array(), '1.0.0', true);\n}", "function krypton_scripts() {\n\twp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css');\n\twp_enqueue_style( 'style', get_template_directory_uri() . '/css/style.css' );\n\t//wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/modernizr.js');\n}", "public function wp_enqueue_scripts() {\n wp_enqueue_style('normalize', get_template_directory_uri() .\n '/normalize.css', array(), '8.0.1');\n wp_enqueue_style('theme-css', get_stylesheet_uri(),\n array(), '1.0');\n wp_enqueue_script('jquery');\n }", "function enqueue_scripts() {\n\t\tinclude $this->dir_path . 'scripts.php';\n\t}", "function aurum_wp_enqueue_scripts() {\n\t// Styles\n\t$rtl_include = '';\n\n\twp_enqueue_style( 'icons-entypo' );\n\twp_enqueue_style( 'icons-fontawesome' );\n\twp_enqueue_style( 'bootstrap' );\n\twp_enqueue_style( 'aurum-main' );\n\t\n\tif ( ! is_child_theme() ) {\n\t\twp_enqueue_style( 'style' );\n\t}\n\n\t// Right to left bootstrap\n\tif ( is_rtl() ) {\n\t\twp_enqueue_style( array( 'bootstrap-rtl' ) );\n\t}\t\n\n\t// Custom Skin\n\tif ( get_data( 'use_custom_skin' ) ) {\n\t\tif ( false == apply_filters( 'aurum_use_filebased_custom_skin', aurum_use_filebased_custom_skin() ) ) {\n\t\t\twp_enqueue_style( 'custom-skin', site_url( '?custom-skin=1' ), null, null );\n\t\t}\n\t}\n\n\t// Scripts\n\twp_enqueue_script( array( 'jquery', 'bootstrap', 'tweenmax' ) );\n}", "function wpstarter_scripts() {\n\n\t// Set a dynamic version for cache busting\n\t$theme = wp_get_theme();\n\t$version = $theme['Version'];\n\n\twp_enqueue_style( 'wpstarter-style', get_template_directory_uri() . '/dist/css/main.css' );\n\n\twp_enqueue_script( 'wpstarter-vendorjs', get_template_directory_uri() . '/dist/js/vendor.min.js', array(), $version, true );\n\n wp_enqueue_script( 'wpstarter-customjs', get_template_directory_uri() . '/dist/js/main.js', array(), $version, true );\n\n}", "public function enqueue_scripts() {\n\t\tif ( is_singular() ) wp_enqueue_script( 'comment-reply' );\n\n\t\twp_enqueue_style( 'app', get_template_directory_uri().'/assets/css/app.css', false, '1.0.0', 'all' );\n\t\twp_enqueue_script( 'foundation-modernizr', get_template_directory_uri().'/bower_components/foundation/js/vendor/modernizr.js', false, '', false );\n\t\twp_enqueue_script( 'foundation-fastclick', get_template_directory_uri().'/bower_components/foundation/js/vendor/fastclick.js', false, '', true );\n\t\twp_enqueue_script( 'foundation', get_template_directory_uri().'/bower_components/foundation/js/foundation.min.js', array('jquery'), '', true );\n\t\twp_enqueue_script( 'main', get_template_directory_uri().'/assets/js/main.js', array('jquery', 'foundation'), '1.0.0', true );\n\t}", "function artistpress_scripts() {\n\t\twp_enqueue_style( 'reset', get_template_directory_uri() . '/css/reset.css', array(), '2.0' );\n\t\twp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '3.3.7' );\n\t\twp_enqueue_style( 'main_style', get_template_directory_uri() . '/style.css' );\n\t\twp_enqueue_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', array(), '1.11.3', true );\n\t\twp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), '3.3.6', true );\n\t\twp_register_script( 'load', get_template_directory_uri() . '/js/load.js' );\n\n\t\t//localize params for use in load.js\n\t\t$theme_params = array(\n\t\t 'backround_image' => get_option('backround_image'),\n\t\t 'action_url' => get_option('action_url'),\n\t\t);\n\n\t\twp_localize_script( 'load', 'themeParams', $theme_params );\n\n\t\twp_enqueue_script( 'load', get_template_directory_uri() . '/js/load.js', array( 'jquery' ,'bootstrap'), '1', true );\n\t}", "public function admin_enqueue_scripts()\n\t\t{\n\t\t\tglobal $pagenow; \n\t\t\tif (is_admin() || $pagenow === 'wc_prd_vendor') { \n\t\t\t\twp_register_script( 'bootstrap-tooltip', $this->assets_url . 'js/bootstrap-tooltip.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_script( 'select2', $this->assets_url . 'js/select2/select2.min.js', array( 'jquery' ), '3.5.2' );\n\t\t\t\twp_register_script( 'topgroupshops-media', $this->assets_url . 'js/topgroupshops-media.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_script( 'sf-scripts', $this->assets_url . 'js/sf-jquery.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_style( 'select2', $this->assets_url . 'js/select2/select2.css' );\n\t\t\t\twp_register_style( 'sf-styles', $this->assets_url . 'css/sf-styles.css' );\n\t\t\t}\n\t\t}", "public function adminThemeStylesAndScripts()\n {\n wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.admin.min.css', array());\n wp_enqueue_style('my-admin-theme', get_template_directory_uri() . '/includes/snv/Theme/admin/style.css');\n wp_enqueue_script('my-admin-script', get_template_directory_uri() . '/includes/snv/Theme/admin/script.js', array('jquery'), '1.0', true);\n\n // for the contactonfo page\n wp_enqueue_script('media-upload');\n wp_enqueue_script('thickbox');\n wp_enqueue_style('thickbox');\n }", "function accvent_scripts() {\n\t wp_enqueue_style( 'main', get_stylesheet_uri() );\n\t wp_enqueue_script( 'bundle', get_template_directory_uri() . '/js/build.min.js', array(), '1.0.0', true );\n\t}", "function aitEnqueueScriptsAndStyles(){\r\n\tif(!is_admin()){\r\n\t\t// just shortcuts\r\n\t\t$s = THEME_CSS_URL;\r\n\t\t$j = THEME_JS_URL;\r\n\r\n\t\taitAddStyles(array(\r\n\t\t\t'ait-colorbox' => array('file' => \"$s/libs/colorbox.css\"),\r\n\t\t\t'ait-fancybox' => array('file' => \"$s/libs/fancybox.css\"),\r\n\t\t\t'jquery-ui' \t => array('file' => \"$s/libs/jquery-ui.css\"),\r\n\t\t\t'prettysociable' => array('file' => \"$s/libs/prettySociable.css\"),\r\n\t\t\t'hoverzoom' \t => array('file' => \"$s/libs/hoverZoom.css\"),\r\n\t\t));\r\n\r\n\t\taitAddScripts(array(\r\n\t\t\t'jquery-ui-tabs' \t\t\t=> true,\r\n\t\t\t'jquery-ui-accordion' \t\t\t=> true,\r\n\t\t\t'jquery-infieldlabel' \t\t\t=> array('file' => \"$j/libs/jquery-infieldlabel.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-iconmenu' \t\t\t\t=> array('file' => \"$j/libs/jquery-iconmenu.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-plugins'\t \t\t\t=> array('file' => \"$j/libs/jquery-plugins.js\", 'deps' => array('jquery')),\r\n\t\t\t'modernizr'\t\t\t\t\t\t=> array('file' => \"$j/libs/modernizr-2.6.1-custom.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\r\n\t\t\t'ait-gridgallery' \t\t\t=> array('file' => \"$j/gridgallery.js\", 'deps' => array('jquery', 'jquery-plugins'), 'inFooter' => true),\r\n\t\t\t'ait-testimonials' \t\t\t=> array('file' => \"$j/testimonials.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'ait-script' \t\t\t=> array('file' => \"$j/script.js\", 'deps' => array('jquery', 'jquery-infieldlabel', 'jquery-iconmenu', 'jquery-plugins', 'modernizr'), 'inFooter' => true),\r\n\t\t));\r\n\t}\r\n}", "final public function wp_enqueue_scripts()\n {\n // Bypass\n if (!self::tFyAppConfig('enqueue_scripts')) {\n return;\n }\n\n if (self::tFyAppConfig('modal')) :\n wp_enqueue_style('tiFyComponentsPdfViewerModal');\n wp_enqueue_script('tiFyComponentsPdfViewerModal');\n else :\n wp_enqueue_style('tiFyComponentsPdfViewer');\n wp_enqueue_script('tiFyComponentsPdfViewer');\n endif;\n }", "function scripts(){\n wp_register_style('style',get_template_directory_uri() . '/assets/css/style.css',[],1,'all');\n wp_enqueue_style('style');\n wp_enqueue_style('custom-google-font','//fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');\n wp_register_script('app',get_template_directory_uri() . '/assets/js/app.js',[],1,true);\n wp_enqueue_script('app');\n}", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Fastnetmarketing_Admin_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Fastnetmarketing_Admin_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/fastnetmarketing-admin-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "public function load_admin_scripts()\n {\n // Enqueue styles\n wp_enqueue_style('soccerpress', plugins_url('assets/css/soccerpress.css', __FILE__), array(), '1.0.0', false);\n wp_enqueue_style('bootstrap-css', plugins_url('assets/css/bootstrap.min.css', __FILE__), array(), '4.3.1', false);\n\n // Enqueue scripts\n wp_register_script('bootstrap-js', plugins_url('assets/js/bootstrap.min.js', __FILE__), array(), '4.3.1', false);\n }", "function register_scripts() {\n\t\t\t$id = get_the_ID();\n\t\t\t// Only continue if current page is home\n\t\t\tif ( !is_home() ) return;\n\n\t\t\twp_enqueue_script( 'jquery' );\n\t\t\twp_enqueue_script( 'kevinw-sf-react', plugins_url( 'assets/react.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\twp_enqueue_script( 'kevinw-sf-react-app', plugins_url( 'assets/scripts.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\n\t\t\t$this->register_scripts_css();\n\t\t}", "public function onEnqueueScripts()\n {\n $this->enqueue('front');\n }", "function aitAdminEnqueueScriptsAndStyles()\n{\n\t$mapLanguage = get_locale();\n\taitAddScripts(array(\n\t\t'ait-googlemaps-api' => array(\n\t\t\t\t\t\t\t\t\t //'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyC62AaIu5cD1nwSCmyO4-33o3DjkFCH4KE&sensor=false&amp;language='.$mapLanguage,\n\t\t\t\t\t\t\t\t\t 'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyBL0QWiORKMYd585E4qvcsHcAR1R7wmdiY&sensor=false&amp;language='.$mapLanguage,\n\t\t\t\t\t\t\t\t\t 'deps' => array('jquery')\n\t\t\t\t\t\t\t\t\t ),\n\t\t'ait-jquery-gmap3' => array('file' => THEME_JS_URL . '/libs/gmap3.min.js', 'deps' => array('jquery', 'ait-googlemaps-api')),\n\t));\n}", "function grd_scripts() {\n\twp_enqueue_style( 'main-style', get_stylesheet_uri() );\n\tif( !is_admin() ) {\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script( 'modernizr', get_template_directory_uri() . '/bower_components/modernizr/modernizr.js', array('jquery'), NULL, true );\n\t\twp_enqueue_script( 'plugins', get_template_directory_uri() . '/assets/scripts/plugins.min.js', array('jquery'), NULL, true );\n\t\twp_enqueue_script( 'scripts', get_template_directory_uri() . '/assets/scripts/main.min.js', array('jquery'), NULL, true );\n\t\tif( DEV ) {\n\t\t\twp_enqueue_script( 'livereload', '//localhost:35729/livereload.js', NULL, NULL, true);\n\t\t}\n\t}\n}", "function kinectiv_start_scripts() {\n\twp_enqueue_style('kinectiv-start-style', get_stylesheet_directory_uri() . '/style.min.css', array(), '0.1.0');\n//\twp_enqueue_style('kinectiv-start-vendor-style', get_stylesheet_directory_uri() . '/css/vendor.min.css', array(), '1.0.0');\n \n wp_deregister_script('wp-embed');\n wp_deregister_script('jquery');\n wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery-3.6.2.min.js', array(), null, true);\n\twp_enqueue_script('kinectiv-start-script', get_template_directory_uri() . '/js/script.min.js', array('jquery'), '0.1.0', true);\n}", "public function enqueue_assets() {\n\t\twp_enqueue_script( 'satispress-admin' );\n\t\twp_enqueue_style( 'satispress-admin' );\n\t}", "public function action_wp_enqueue_scripts() {\n\n\t\twp_enqueue_style( 'bootstrap', get_stylesheet_directory_uri() . '/lib/bootstrap/dist/css/bootstrap.css' );\n\t\twp_enqueue_style( 'core-style', get_stylesheet_directory_uri() . '/assets/stylesheets/core.css' );\n\n\t}", "function ajout_scripts() {\n wp_enqueue_style('bootstrap', get_template_directory_uri() . '/assets/bootstrap/css/bootstrap.min.css');\n wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/fonts/font-awesome.min.css');\n wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/css/styles.min.css');\n wp_enqueue_style('font-1', 'https://fonts.googleapis.com/css?family=Open+Sans');\n wp_enqueue_style('font-2', 'https://fonts.googleapis.com/css?family=Roboto');\n\n wp_enqueue_script('messcripts', get_template_directory_uri() . '/assets/js/jquery.min.js');\n wp_enqueue_script('messcripts2', get_template_directory_uri() . '/assets/js/script.js');\n wp_enqueue_style('crdStyles', get_stylesheet_uri());\n\n\n}", "public function scripts()\n\t{\n\n\t\twp_enqueue_script('jquery');\n\n\t\t// If using the regular comments of wordpress\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t\t//put modernizr as late as possible\n\t\twp_enqueue_script('bootstrap',DION_THEME_URL.'/assets/js/bootstrap.min.js');\n\t\twp_enqueue_script('owl-carousel',DION_THEME_URL.'/assets/js/owl.carousel.min.js');\n\t\twp_enqueue_script('darkmode','https://cdn.jsdelivr.net/npm/[email protected]/lib/darkmode-js.min.js');\n\t\twp_enqueue_script('main',DION_THEME_URL.'/assets/js/main.min.js');\n\t}", "function _s_scripts() {\n\twp_enqueue_style( 'main.css', get_stylesheet_directory_uri() . '/dist/src/style.css', false, '6.9' );\n\twp_enqueue_script( 'main.js', get_stylesheet_directory_uri() . '/dist/main.js', false, false, true );\n}", "public function enqueueAssets()\n {\n wp_enqueue_style( WPADW_DOMAIN . '-admin-style', WPADW_URL . '/assets/style.css' );\n }", "public function enqueue_scripts() {\n\n\t\tif ($this->js) {\n\t\t\tforeach ($this->js as $js) {\n\t\t\t\t$fileTitle = basename($js['link']);\n\t\t\t\t$fileTitle = str_replace('.js', '', $fileTitle);\n\t\t\t\t$fileTitle = preg_replace(\n\t\t\t\t\t'/[^0-9a-zA-Z]/',\n\t\t\t\t\t\"-\",\n\t\t\t\t\tstr_replace('@', '', $js['package']) . '-' . $fileTitle\n\t\t\t\t);\n\t\t\t\twp_enqueue_script($fileTitle, $js['link'], array(), $js['version']);\n\t\t\t}\n\t\t}\n\t}", "protected function enqueue_scripts()\n {\n\n }", "function theme_scripts() {\n\t\twp_enqueue_style('bootstrap-css', get_template_directory_uri().'/styles/bootstrap/css/bootstrap.min.css');\n\t\twp_enqueue_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js');\n\t\twp_enqueue_script('bootstrap-js', get_template_directory_uri().'/styles/bootstrap/js/bootstrap.min.js');\n\t\twp_enqueue_script('custom-js', get_template_directory_uri().'/js/functions.js');\n\t}", "function cam_enqueue_related_pages_scripts_and_styles(){\n // wp_enqueue_style('related-styles', plugins_url('/css/bootstrap.min.css', __FILE__));\n wp_enqueue_script('releated-script', plugins_url( '/js/custom.js' , __FILE__ ), array('jquery','jquery-ui-droppable','jquery-ui-draggable', 'jquery-ui-sortable'));\n }", "public function admin_scripts() {\n\t\twp_enqueue_style( 'wpex-font-awesome', WPEX_CSS_DIR_URI .'font-awesome.min.css' );\n\t}", "public function scripts() {\n\t\tif ( get_post_type() == 'agenda' && ! is_single() ) {\n\t\t\twp_enqueue_script( 'jquery' );\n\t\t\twp_enqueue_script( 'events-calendar', plugins_url( 'assets/js/calendar.js', plugin_dir_path( __FILE__ ) ), array( 'jquery' ), '', true );\n\t\t\twp_enqueue_style( 'events-calendar-styles', plugins_url( 'assets/css/calendar.css', plugin_dir_path( __FILE__ ) ), array(), '' );\n\t\t}\n\n\t\twp_enqueue_style( 'timeline-styles', plugins_url( 'assets/css/timeline.css', plugin_dir_path( __FILE__ ) ), array(), '' );\n\t}", "public function wcufd_load_styles_scripts() {\n //main script file of the plugin\n wp_register_script( 'wcufd-front-end-js', plugins_url( 'js/wcufd-script.js',__FILE__ ), array('jquery'), '', true );\n wp_localize_script( 'wcufd-front-end-js', 'wcufd_vars', array(\n 'ajaxurl' => admin_url('admin-ajax.php'),\n 'current_user_can' => current_user_can('administrator')\n )\n );\n wp_register_style( 'wcufd-front-end-style', plugins_url( 'css/wcufd-style.css',__FILE__ ) );\n }", "protected function enqueue_scripts()\n {\n \\wp_enqueue_style('tify_control-progress');\n \\wp_enqueue_script('tify_control-progress');\n }", "public function admin_print_scripts()\n\t\t{\n\t\t\tglobal $wp_version;\n\n\t\t\t//Check wp version and load appropriate scripts for colorpicker.\n\t\t\tif ( 3.5 <= $wp_version ) {\n\t\t\t\twp_enqueue_style( 'wp-color-picker' );\n\t\t\t\twp_enqueue_script( 'wp-color-picker' );\n\t\t\t} else {\n\t\t\t\twp_enqueue_style( 'farbtastic' );\n\t\t\t\twp_enqueue_script( 'farbtastic' );\n\t\t\t}\n\n\t\t\twp_enqueue_script( 'bootstrap-tooltip' );\n\t\t\twp_enqueue_script( 'select2' );\n\t\t\twp_enqueue_script( 'topgroupshops-media' );\n\t\t\twp_enqueue_script( 'sf-scripts' );\n\n\t\t\twp_enqueue_style( 'wp-color-picker' );\n\t\t\twp_enqueue_style( 'select2' );\n\t\t\twp_enqueue_style( 'sf-styles' );\n\t\t}", "function bfc_add_scripts() {\n\twp_register_script('principal', get_template_directory_uri() . '/js/vendor/jquery.js', array(), 'null', true);\n\twp_enqueue_script('principal');\n\twp_register_script('foundation', get_template_directory_uri() . '/js/vendor/foundation.js', array(), 'null', true);\n\twp_enqueue_script('foundation');\n\twp_register_script('modernizr', get_template_directory_uri() . '/js/modernizr.js', array(), 'null', true);\n\twp_enqueue_script('modernizr');\n\twp_register_script('app', get_template_directory_uri() . '/js/app.js', array(), 'null', true);\n\twp_enqueue_script('app');\n\twp_register_script('slick', get_template_directory_uri() . '/js/slick.js', array(), 'null', true);\n\twp_enqueue_script('slick');\n}", "public function enqueue_scripts() {\n\t\twp_enqueue_script( 'slick-js', plugin_dir_url( dirname( __FILE__, 2 ) ) . '/assets/js/slick.min.js', array( 'jquery' ), '1.8.1', false );\n\t\twp_enqueue_script( 'index-js', plugin_dir_url( dirname( __FILE__, 2 ) ) . '/assets/js/index.js', array( 'jquery', 'slick-js' ), '1.0.0', true );\n\t}", "function alpha_scripts() {\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\n\t\t// Register scripts\n\t\twp_register_script( 'bootstrap-js', 'http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js', array( 'jquery' ), false, true );\n\t\twp_register_script( 'alpha-custom', SCRIPTS . '/scripts.js', array( 'jquery' ), false, true );\n\n\t\t// Load the custom scripts\n\t\twp_enqueue_script( 'bootstrap-js' );\n\t\twp_enqueue_script( 'alpha-custom' );\n\n\t\t// Load the stylesheets\n\t\twp_enqueue_style( 'font-awesome', THEMEROOT . '/css/font-awesome.min.css' );\n\t\twp_enqueue_style( 'alpha-master', THEMEROOT . '/css/master.css' );\n\t}", "public function enqueue_scripts()\n {\n if (is_singular($this->token)) {\n wp_register_style($this->token, esc_url($this->assets_url . 'css/chiroquiz.css'), [], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_register_style('animate', esc_url($this->assets_url . 'css/animate.css'), [], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_register_style('roboto', 'https://fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,900,900italic,300italic,300');\n wp_register_style('robo-slab', 'https://fonts.googleapis.com/css?family=Roboto+Slab:400,700,300,100');\n wp_enqueue_style($this->token);\n wp_enqueue_style('animate');\n wp_enqueue_style('roboto');\n wp_enqueue_style('roboto-slab');\n\n wp_register_script('icheck', esc_url($this->assets_url . 'js/icheck.js'), ['jquery']);\n wp_register_script($this->token . '-js', esc_url($this->assets_url . 'js/scripts.js'), [\n 'jquery',\n 'icheck'\n ]);\n wp_enqueue_script('icheck');\n wp_enqueue_script($this->token . '-js');\n wp_register_script('platform-email-validator', esc_url($this->assets_url . 'js/platform-email-validator.js'), [\n 'jquery'\n ], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_enqueue_script('platform-email-validator');\n\n $localize = [\n 'ajaxurl' => admin_url('admin-ajax.php'),\n ];\n wp_localize_script($this->token . '-js', 'ChiroQuiz', $localize);\n }\n }", "public function enqueue_scripts() {\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/deeppress-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "function mk_resources() {\t\t\n\twp_enqueue_style('style', get_stylesheet_uri());\n\twp_enqueue_script( 'jquery', get_template_directory_uri() . '/js/jquery-3.1.1.min.js', array(), '20120206', true );\n\twp_enqueue_script( 'custom-script', get_template_directory_uri() . '/js/script.js', array( 'jquery'), '1.1', true );\n}", "private function register_scripts()\n\t{\n\t\tif (is_admin()) {\n\t\t\t// Load our main stylesheet.\n\t\t\twp_enqueue_style('kd-letters', plugin_dir_url( __FILE__ ) . '/templates/style/kd-letters.css');\n\t\t}\n\t}", "public function enqueue_scripts(){\n\t\t\t// Add the color picker JS & CSS files\n\t\t\twp_enqueue_style( 'wp-color-picker' );\n\t\t\twp_enqueue_script( 'wp-color-picker' );\n\t\t}", "public function myScripts()\n {\n //wp_register_script('angularjs',plugins_url('bower_components/angular/angular.min.js', __FILE__));\n wp_enqueue_style('grimagecss', plugins_url('style.css', __FILE__));\n //wp_enqueue_script('grimagescripts',plugins_url('/app.js',__FILE__));\n }", "function enqueue_scripts() {\n\n\t\t//$the_theme = wp_get_theme();\n\t\t// Get the custom theme data.\n\t\twp_enqueue_style( 'styles', get_stylesheet_directory_uri() . '/css/screen.css', array(), '2.2.2' );\n\t\twp_enqueue_style( 'webfonts' , 'https://fonts.googleapis.com/css2?family=Open+Sans+Condensed:ital,wght@0,300;0,700;1,300&family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,300;1,400;1,600;1,700;1,800&display=swap', array(), false);\n\n\t\t//wp_enqueue_script( 'jquery-last', get_template_directory_uri() . '/vendor/js/jquery-3.2.1.min.js', array(), '', true);\n\t\twp_enqueue_script( 'jquery-fancybox', get_template_directory_uri() . '/vendor/js/jquery.fancybox.min.js', array(), '', true);\n\t\twp_enqueue_script( 'swiper', get_template_directory_uri() . '/vendor/js/swiper.min.js', array(), '', true);\n\n\t\twp_enqueue_script( 'theme-scripts', get_template_directory_uri() . '/js/app.min.js', array('jquery', 'jquery-fancybox', 'swiper'), '2.0.1', true );\n\n\t\twp_localize_script( 'theme-scripts', 'config', array(\n\t\t\t'ajax_url'\t=>\tadmin_url('admin-ajax.php'),\n\t\t\t'site_url'\t=>\tget_bloginfo( 'url' ),\n\t\t\t'theme_url'\t=>\tget_bloginfo( 'template_url' ),\n\t\t));\n\n\t}", "public function enqueue_assets()\n\t{\n\t\twp_enqueue_script( 'automatic-link-title', plugins_url( '/script.js', __FILE__ ), array(), false, true );\n\t}", "function awesome_script_enqueue() {\r\n\t//css\r\n\twp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '3.3.4', 'all');\r\n\twp_enqueue_style('customstyle', get_template_directory_uri() . '/css/katayam.css', array(), '1.0.0', 'all');\r\n\t//js\r\n\twp_enqueue_script('jquery');\r\n\twp_enqueue_script('bootstrapjs', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '3.3.4', true);\r\n\twp_enqueue_script('customjs', get_template_directory_uri() . '/js/katayam.js', array(), '1.0.0', true);\r\n\t\r\n}", "public function enqueue_scripts() {\n\t\t/**\n\t\t * Filters the path to the admin JS script.\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @param string $path The path to the admin JS script.\n\t\t */\n\t\t$script_path = apply_filters( 'stellarwp/telemetry/' . Config::get_hook_prefix() . 'script_path', $this->get_asset_path() . 'resources/js/scripts.js' );\n\n\t\twp_enqueue_script(\n\t\t\tself::SCRIPT_HANDLE,\n\t\t\t$script_path,\n\t\t\t[ 'jquery' ],\n\t\t\tself::SCRIPT_VERSION,\n\t\t\ttrue\n\t\t);\n\t}", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array('jquery'), BRAND_VER );\n\t\t\twp_enqueue_style('jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css');\n\t\t\twp_enqueue_style('jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css');\n\n\t\t}", "function scripts() {\n\n\t\t// Foundation core\n\t\twp_register_style( 'maera_zf', MAERA_FOUNDATION_SHELL_URL . '/assets/css/foundation.css' );\n\t\twp_enqueue_style( 'maera_zf' );\n\n\t\t// Foundation icons\n\t\twp_register_style( 'maera_foundation_icons', MAERA_FOUNDATION_SHELL_URL . '/assets/foundation-icons/foundation-icons.css' );\n\t\twp_enqueue_style( 'maera_foundation_icons' );\n\n\t\t// Add Foundation required scripts\n\t\twp_enqueue_script( 'fastclick', MAERA_FOUNDATION_SHELL_URL . '/assets/vendor/fastclick.js', false );\n\t\twp_enqueue_script( 'foundation', MAERA_FOUNDATION_SHELL_URL . '/assets/foundation.min.js', 'jquery' );\n\n\t\t// Add our custom styles\n\t\twp_register_style( 'maera_foundation_custom', MAERA_FOUNDATION_SHELL_URL . '/assets/css/style.css' );\n\t\twp_enqueue_style( 'maera_foundation_custom' );\n\n\t}", "function naked_scripts() { \n\n\t// get the theme directory style.css and link to it in the header\n\twp_enqueue_style('bootstrap', get_stylesheet_directory_uri() . '/styles/bootstrap.css');\n\t// wp_enqueue_style('theme', get_stylesheet_directory_uri() . '/styles/bootstrap-theme.css');\n\twp_enqueue_style('chocolat', get_stylesheet_directory_uri() . '/styles/chocolat.css');\n\twp_enqueue_style('owl', get_stylesheet_directory_uri() . '/styles/owl.carousel.css');\n\twp_enqueue_style('waves', get_stylesheet_directory_uri() . '/styles/waves.min.css');\n\twp_enqueue_style('style.css', get_stylesheet_directory_uri() . '/style.css');\n\twp_enqueue_style('accademia', get_stylesheet_directory_uri() . '/styles/accademia.css');\n\t\n\t// add fitvid\n\t// wp_enqueue_script( 'naked-fitvid', get_template_directory_uri() . '/js/jquery.fitvids.js', array( 'jquery' ), NAKED_VERSION, true );\n\twp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), NAKED_VERSION, true );\n\twp_enqueue_script( 'chocolat', get_template_directory_uri() . '/js/chocolat.js', array( 'jquery' ), NAKED_VERSION, true );\n\twp_enqueue_script( 'owl', get_template_directory_uri() . '/js/owl.carousel.js', array( 'jquery' ), NAKED_VERSION, true );\n\twp_enqueue_script( 'waves', get_template_directory_uri() . '/js/waves.min.js', array( 'jquery' ), NAKED_VERSION, true );\n\twp_enqueue_script( 'accademia', get_template_directory_uri() . '/js/accademia.js', array( 'jquery' ), NAKED_VERSION, true );\n\t\n\t// add theme scripts\n\t// wp_enqueue_script( 'naked', get_template_directory_uri() . '/js/theme.min.js', array(), NAKED_VERSION, true );\n \n}", "function enqueue_vpr_assets() {\n\n\t\t// Enqueue Theme Scripts\n \t\twp_deregister_script( 'jquery' );\n \twp_register_script( 'jquery', includes_url( '/js/jquery/jquery.js' ), false, NULL, true );\n \twp_enqueue_script( 'jquery' );\n\n\n\t\t// Enqueue Theme Scripts\n\n\t\twp_enqueue_script( 'Scripts', get_template_directory_uri() . '/app/scripts/script.min.js', null, '1.0.0', true );\n\n\t\t// Enqueue Theme Styles\n\n\t\twp_enqueue_style( 'Style', get_template_directory_uri() . '/app/style/style.min.css', null, '1.0.0' );\n\n\t}", "function theme_scripts() {\n wp_enqueue_style('main', CSS . '/main.css');\n wp_enqueue_style('my', CSS . '/my.css');\n wp_enqueue_script('scripts', JS . '/main.js', array('jquery'), null, true);\n }", "public function enqueue_scripts()\n {\n wp_enqueue_script($this->fast_social_sharing, plugin_dir_url(__FILE__) . 'js/fast-social-sharing-public.js', array( 'jquery' ), $this->version, false);\n }", "function inject_scripts() {\n\n\tglobal $wp_styles, $wp_scripts;\n\n\t//Default way of loading styles. Version number added to ensure\n\t//the correct version is sent to the client regardless of caching.\n\twp_register_style( 'style', get_stylesheet_uri(), false, '1.0.0' );\n\twp_enqueue_style( 'style' );\n\n\t// Adds an ie8 and below stylesheet:\t\n\twp_enqueue_style( 'ie8_style', get_stylesheet_directory_uri() . '/css/ie8.css', array( 'style' ) );\n\twp_style_add_data( 'ie8_style', 'conditional', 'lte IE 8' );\n\n\n\t$js_dir = get_template_directory_uri() . '/js';\n\t$js_libs = $js_dir . '/bower_components';\n\n\t//Loads requirejs, all scripts are set true to push them into the footer:\n\twp_enqueue_script( 'requrejs', $js_libs . '/requirejs/require.js', array(), '', true );\n\n\n\t//config file that depends on requirejs.\n\twp_register_script( 'optimize', $js_dir . '/optimize.min.js', '', '', true );\n\n\n\t//Creates a json object so the configjs knows its directory. \n\twp_localize_script( 'optimize', 'dir', array(\n\t\t'path'\t\t=> $js_dir,\n\t\t'ajax_url'\t=> admin_url( 'admin-ajax.php' )\n\t));\n\n\n\twp_enqueue_script( 'optimize', '', '', '', true );\n\n\t// Styles for the lightbox plugin.\n\twp_register_style('lightbox-style', $js_libs . '/lightbox2/dist/css/lightbox.min.css' );\n\twp_enqueue_style( 'lightbox-style' );\n\n}", "public function enqueue_scripts()\n {\n wp_enqueue_script($this->andmoraho_vendors, plugin_dir_url(__FILE__) . 'js/andmoraho-vendors-admin.js', array( 'jquery' ), $this->version, false);\n }", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array( 'jquery' ), BRAND_VER );\n\t\t\twp_enqueue_style( 'jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css' );\n\t\t\twp_enqueue_style( 'jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css' );\n\n\t\t}", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array( 'jquery' ), BRAND_VER );\n\t\t\twp_enqueue_style( 'jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css' );\n\t\t\twp_enqueue_style( 'jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css' );\n\n\t\t}", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array( 'jquery' ), BRAND_VER );\n\t\t\twp_enqueue_style( 'jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css' );\n\t\t\twp_enqueue_style( 'jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css' );\n\n\t\t}", "function flexiauto_scripts_loader() {\n\t\t/* Load custom styles */\n\t\twp_enqueue_style('reset', TPL_DIR . '/assets/css/vendor/reset.css');\n\t\twp_enqueue_style('bootstrap-styles', TPL_DIR . '/assets/css/vendor/bootstrap.min.css');\n\t\twp_enqueue_style('flexi-styles', TPL_DIR . '/assets/css/flexi.min.css');\n\n\t\t/* Load custom scripts */\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', TPL_DIR . '/assets/js/vendor/jquery.min.js', array(), false, true);\n\t\twp_enqueue_script('jquery');\n\n\t\twp_enqueue_script('bootstrap-scripts', TPL_DIR . '/assets/js/vendor/bootstrap.min.js', array(), false, true);\n\t\twp_enqueue_script('nicescroll', TPL_DIR . '/assets/js/vendor/jquery.nicescroll.min.js', array(), false, true);\n\t\twp_enqueue_script('jquery-validate', TPL_DIR . '/assets/js/vendor/jquery.validate.min.js', array(), false, true);\n\t\twp_enqueue_script('match-height', TPL_DIR . '/assets/js/vendor/jquery.matchHeight.min.js', array(), false, true);\n\t\twp_enqueue_script('flexi-scripts', TPL_DIR . '/assets/js/flexi.min.js', array(), false, true);\n\n\t}", "function mgr_add_scripts(){\n wp_enqueue_style('mgr-main-style',plugins_url().'/includes/my-github-repos/css/style.css');\n wp_enqueue_script('mgr-main-script',plugins_url().'/includes/my-github-repos/js/main.js');\n}", "function wagw_scripts() {\n\t\t$theme = wp_get_theme();\n\t\t$ver = $theme->get( 'Version' );\n\t$themecsspath = get_stylesheet_directory() . '/style.css';\n\t$style_ver = filemtime( $themecsspath );\n\twp_enqueue_style( 'wagw-style', get_stylesheet_uri(),array(),$style_ver );\n\n\twp_enqueue_script( 'wagw-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );\n\n\twp_enqueue_script( 'wagw-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\n\twp_enqueue_script( 'thickbox', true );\n\twp_enqueue_style( 'thickbox' );\n\n\tif ( is_page_template( 'slider-page.php' ) ) {\n\t\twp_enqueue_style( 'flexslider-css', get_stylesheet_directory_uri() . '/flexslider/flexslider.css' );\n\t}\n\n}", "function admin_scripts() {\r\n\t\t\twp_register_style( 'wpeologs_backend_css', WPEO_LOGS_URL . '/assets/css/backend.css', '', WPEO_LOGS_VERSION);\r\n\t\t\twp_enqueue_style( 'wpeologs_backend_css');\r\n\r\n\t\t\twp_enqueue_style( 'dashicons' );\r\n\r\n\t\t\twp_register_script( 'wpeologs_chart_js', WPEO_LOGS_URL . '/assets/js/chart.js');\r\n\t\t\twp_enqueue_script( 'wpeologs_chart_js' );\r\n\r\n\t\t\twp_register_script( 'wpeologs_backend_js', WPEO_LOGS_URL . '/assets/js/backend.js');\r\n\t\t\twp_enqueue_script( 'wpeologs_backend_js' );\r\n\t\t}", "function assets() {\n\t\tif ( ! is_admin() ) {\n\t\t\twp_enqueue_style( '_yourthemename-style', get_theme_file_uri( '/dist/css/bundle.css' ), array(), _YOURTHEMENAME_VER );\n\n\t\t\twp_deregister_script( 'jquery' );\n\t\t\twp_enqueue_script( '_yourthemename-scripts', get_theme_file_uri( '/dist/js/bundle.min.js' ), array(), _YOURTHEMENAME_VER, true );\n\t\t}\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t}", "public function enqueue_scripts() {\n\n /**\n * All styles goes here\n */\n wp_enqueue_style( 'wp-allmeta-styles', plugins_url( 'css/style.css', __FILE__ ), false, date( 'Ymd' ) );\n\n /**\n * All scripts goes here\n */\n wp_enqueue_script( 'wp-allmeta-scripts', plugins_url( 'js/script.js', __FILE__ ), array( 'jquery' ), false, true );\n\n\n /**\n * Example for setting up text strings from Javascript files for localization\n *\n * Uncomment line below and replace with proper localization variables.\n */\n // $translation_array = array( 'some_string' => __( 'Some string to translate', 'baseplugin' ), 'a_value' => '10' );\n // wp_localize_script( 'base-plugin-scripts', 'baseplugin', $translation_array ) );\n\n }", "public function enqueue_scripts()\n {\n }", "public function register_scripts()\r\n\t{\r\n\t\twp_register_style('poll', plugins_url('assets/poll.css', __DIR__));\r\n\t\twp_register_script('vue', 'https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js', array('jquery'), null, true);\r\n\t\twp_register_script('poll', plugins_url('assets/poll.js', __DIR__), array('vue'), null, true);\r\n\t}" ]
[ "0.84234697", "0.82742506", "0.8254844", "0.8219376", "0.82153755", "0.8205327", "0.820173", "0.81967133", "0.8116241", "0.8116241", "0.8106494", "0.80856234", "0.808051", "0.80735797", "0.80656993", "0.80442953", "0.80377364", "0.8012059", "0.80067956", "0.7996983", "0.79703134", "0.796617", "0.79319805", "0.7923465", "0.7923464", "0.79227334", "0.7921282", "0.7914122", "0.7912718", "0.7904076", "0.7892771", "0.78839004", "0.7877816", "0.78771436", "0.7860869", "0.78576833", "0.7854215", "0.78540283", "0.78484505", "0.78467745", "0.78442836", "0.7842312", "0.7835866", "0.7835666", "0.78311706", "0.7828841", "0.78170955", "0.7809848", "0.780598", "0.78055114", "0.7804617", "0.7800409", "0.7800133", "0.77972734", "0.77971256", "0.77881026", "0.7776941", "0.77688456", "0.7768327", "0.77676666", "0.77662456", "0.7763896", "0.7760722", "0.7751357", "0.7750817", "0.77479565", "0.7742753", "0.7733865", "0.772689", "0.77238315", "0.7723746", "0.77235687", "0.7718505", "0.77133167", "0.770326", "0.77031374", "0.76984674", "0.7697276", "0.76972353", "0.7696963", "0.76935357", "0.76912004", "0.7687762", "0.7683935", "0.76799047", "0.7678805", "0.76786953", "0.76769847", "0.7674465", "0.767379", "0.76695794", "0.76695794", "0.76695794", "0.7668644", "0.76666313", "0.7666426", "0.7662803", "0.7661626", "0.7661505", "0.766137", "0.76574683" ]
0.0
-1
Display navigation to next/previous pages when applicable
function calvero_content_nav( $nav_id ) { global $wp_query, $post; // Don't print empty markup on single pages if there's nowhere to navigate. if ( is_single() ) { $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) return; } // Don't print empty markup in archives if there's only one page. if ( $wp_query->max_num_pages < 2 && ( is_home() || is_archive() || is_search() ) ) return; $nav_class = 'site-navigation paging-navigation'; if ( is_single() ) $nav_class = 'site-navigation post-navigation'; ?> <nav role="navigation" id="<?php echo $nav_id; ?>" class="<?php echo $nav_class; ?>"> <h1 class="assistive-text"><?php _e( 'Post navigation', 'calvero' ); ?></h1> <?php if ( is_single() ) : // navigation links for single posts ?> <?php previous_post_link( '<div class="nav-previous">%link</div>', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'calvero' ) . '</span> %title' ); ?> <?php next_post_link( '<div class="nav-next">%link</div>', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'calvero' ) . '</span>' ); ?> <?php elseif ( $wp_query->max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) : // navigation links for home, archive, and search pages ?> <?php if ( get_next_posts_link() ) : ?> <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'calvero' ) ); ?></div> <?php endif; ?> <?php if ( get_previous_posts_link() ) : ?> <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'calvero' ) ); ?></div> <?php endif; ?> <?php endif; ?> </nav><!-- #<?php echo $nav_id; ?> --> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function next() {\n if ($this->currentPage < $this->totalPage) {\n print '<li><a href=\"' . $this->url . '&page=' . ($this->currentPage + 1) . '\">&gt;</a></li>';\n }\n }", "abstract protected function setPreviousPage();", "public function list_pages() {\n\t\t$this->print_prev();\n\n\t\tif ($this->current_page+2 >= $this->total_pages-1) {\n\t\t\t$this->pages_right();\n\t\t} else {\n\t\t\t$this->pages_left();\n\t\t}\n\n\t\t$this->print_next();\n\t}", "private function prev() {\n if ($this->currentPage > 1) {\n print '<li><a href=\"' . $this->url . '&page=' . ($this->currentPage - 1) . '\">&lt;</a></li>';\n }\n }", "function show_navigation()\n {\n }", "function horizon_theme_paging_nav() {\n\t\t$mid = 2; // Total of items that will show along with the current page.\n\t\t$end = 1; // Total of items displayed for the last few pages.\n\t\t$show = false; // Show all items.\n\n\t\techo horizon_theme_pagination( $mid, $end, false );\n\t}", "function honeycomb_paging_nav() {\n\t\tglobal $wp_query;\n\n\t\t$args = array(\n\t\t\t'type' \t => 'list',\n\t\t\t'next_text' => _x( 'Next', 'Next post', 'honeycomb' ),\n\t\t\t'prev_text' => _x( 'Previous', 'Previous post', 'honeycomb' ),\n\t\t\t);\n\n\t\tthe_posts_pagination( $args );\n\t}", "function post_navigation() {\n\t\techo '<div class=\"navigation\">';\n\t\techo '\t<div class=\"next-posts\">'.get_next_posts_link('&laquo; Older Entries').'</div>';\n\t\techo '\t<div class=\"prev-posts\">'.get_previous_posts_link('Newer Entries &raquo;').'</div>';\n\t\techo '</div>';\n\t}", "function post_navigation() {\n\t\techo '<div class=\"navigation\">';\n\t\techo '\t<div class=\"next-posts\">'.get_next_posts_link('&laquo; Older Entries').'</div>';\n\t\techo '\t<div class=\"prev-posts\">'.get_previous_posts_link('Newer Entries &raquo;').'</div>';\n\t\techo '</div>';\n\t}", "private function print_previous_page_link() {\n\n\t\t$this->print_anchor(\n\t\t\t$this->get_paged_url( max( 1, $this->current_page - 1 ) ),\n\t\t\t__( 'Go to the previous page', 'multilingual-press' ),\n\t\t\t'prev-page' . $this->disable_first,\n\t\t\t'&lsaquo;'\n\t\t);\n\t}", "function ninja_forms_mp_nav_update_current_page(){\r\n\tglobal $ninja_forms_processing;\r\n\r\n\t$form_id = $ninja_forms_processing->get_form_ID();\r\n\r\n\tif( $ninja_forms_processing->get_extra_value( '_current_page' ) ){\r\n\t\t$current_page = $ninja_forms_processing->get_extra_value( '_current_page' );\r\n\t}else{\r\n\t\t$current_page = 1;\r\n\t}\t\r\n\tif( $ninja_forms_processing->get_extra_value( '_page_count' ) ){\r\n\t\t$page_count = $ninja_forms_processing->get_extra_value( '_page_count' );\r\n\t}else{\r\n\t\t$page_count = 1;\r\n\t}\r\n\r\n\t$nav = '';\r\n\tif( $ninja_forms_processing->get_extra_value( '_prev' ) ){\r\n\t\t$nav = 'prev';\r\n\t\tif( $current_page != 1 ){\r\n\t\t\t$current_page--;\r\n\t\t}\r\n\t}\r\n\r\n\tif( $ninja_forms_processing->get_extra_value( '_next' ) ){\r\n\t\t$nav = 'next';\r\n\t\tif( $current_page != $page_count ){\r\n\t\t\t$current_page++;\r\n\t\t}\r\n\t}\r\n\r\n\tif( $nav != '' ){\r\n\t\tif ( function_exists( 'ninja_forms_conditionals_field_filter' ) ) {\r\n\t\t\tninja_forms_conditionals_field_filter( $form_id );\r\n\t\t}\r\n\t\t$show = ninja_forms_mp_check_page_conditional( $form_id, $current_page );\r\n\r\n\t\t$ninja_forms_processing->update_extra_value( '_current_page', $current_page );\r\n\r\n\t\tif( ( $current_page <= $page_count ) AND !$show ){\r\n\t\t\tninja_forms_mp_nav_update_current_page();\r\n\t\t}\r\n\t}\t\t\r\n}", "private function stepNav() {\n $course = $this->step->course;\n\t\t$root = $course->root;\n\t\t$stepUrl = $this->step->url;\n\n\t\t$prev = $this->stepSection->prev;\n\t\t$prevUrl = $prev !== null ? $prev->url : $stepUrl;\n\n\t\t$next = $this->stepSection->next;\n\t\t$nextUrl = $next !== null ? $next->url : $stepUrl;\n\t\t\n\t\t$html = <<<END1\n<div class=\"cl-stepnav-div\"><nav class=\"cl-stepnav cl-nav\"><div><ul>\n<li><a href=\"$stepUrl\"><span>Return to Step Page</span>\n<img alt=\"Return to Step\" width=\"28\" height=\"25\" src=\"$root/vendor/cl/step/img/returnstep.png\" /></a></li>\nEND1;\n\n\t\t// Extra menu items here\n\t\tforeach($this->step->menuExtra as $extra) {\n\t\t\t$html .= $extra->html($this->stepSection, $this->user);\n\t\t}\n\n\t\t$html .= <<<HTML\n<li><a href=\"$prevUrl\"><span>Previous Section</span>\n<img alt=\"Mark Complete\" height=\"25\" src=\"$root/vendor/cl/site/img/previcon.png\" width=\"40\" /></a></li>\n<li><a href=\"$nextUrl\"><span>Next Section</span>\n<img alt=\"Mark Complete\" height=\"25\" src=\"$root/vendor/cl/site/img/nexticon.png\" width=\"40\" /></a></li>\n<li><a href=\"$nextUrl\" class=\"cl-step-completed-next\"><span>Mark Completed and Next Section</span>\n<img alt=\"Mark Complete\" height=\"25\" src=\"$root/vendor/cl/site/img/checknext.png\" width=\"40\" /></a></li>\n<li class=\"cl-step-progress\"></li>\nHTML;\n\n\t\t// Appended menu items here\n\t\tforeach($this->step->menuAppend as $extra) {\n\t\t\t$html .= $extra->html($this->stepSection, $this->user);\n\t\t}\n\t\t\n\t\t/*\n\t\t * End of menu bar \n\t\t */\n\t\t$html .= <<<HTML\n</ul></div>\n</nav></div>\nHTML;\n\t\n\t\treturn $html;\n\t}", "function honeycomb_post_nav() {\n\t\t$args = array(\n\t\t\t'next_text' => '%title',\n\t\t\t'prev_text' => '%title',\n\t\t\t);\n\t\tthe_post_navigation( $args );\n\t}", "function thb_single_prev_custom_pagination() {\n\t\t$post = get_previous_post();\n\n\t\tif ( $post == '' ) {\n\t\t\treturn;\n\t\t}\n\n\t\techo \"<div class='thb-single-previous-nav-wrapper'>\";\n\t\t\techo \"<a href='\" . get_permalink( $post->ID ) . \"'>\";\n\t\t\t\techo \"<span>\" . __( 'Previous post', 'thb_text_domain' ) . \"</span>\";\n\t\t\t\techo \"<p class='thb-single-nav-title'>\" . thb_text_format( esc_html( $post->post_title ) ) . \"</p>\";\n\t\t\techo \"</a>\";\n\t\techo \"</div>\";\n\t}", "function orbital_paging_nav() {\n \n if ( $GLOBALS['wp_query']->max_num_pages < 2 ) { return; } ?>\n \n <nav class=\"nav--paging\">\n \n <?php if ( get_next_posts_link() ) : ?>\n <div class=\"nav__previous\"><?php next_posts_link( __( '<span class=\"meta-nav\">&larr;</span> Older posts', 'rj' ) ); ?></div>\n <?php endif; ?>\n \n <?php if ( get_previous_posts_link() ) : ?>\n <div class=\"nav__next\"><?php previous_posts_link( __( 'Newer posts <span class=\"meta-nav\">&rarr;</span>', 'rj' ) ); ?></div>\n <?php endif; ?>\n \n </nav>\n \n <?php\n}", "public function pageNav()\n {\n $pager = $this->getPublisher()->getPagination()['pager'];\n $html = \"\\n<nav>\\n <ul class=\\\"pagination\\\">\";\n\n if ($pager['pages']['prev']) {\n $html .= \"\\n <li><a href=\\\"\".$pager['pages']['prev'].\n \"\\\" aria-label=\\\"\".$this->getConfig()->ls('ui.nav.previous').\n \"\\\"><span aria-hidden=\\\"true\\\">&laquo;</span></a><li>\";\n } else\n $html .= \"\\n <li class=\\\"disabled\\\"><span><span aria-hidden=\\\"true\\\">&laquo;</span></span></li>\";\n\n $pages = $this->getPublisher()->getPagination()['page_menu']['pages'];\n foreach($pages as $page_num => $data) {\n if ($data['url']) // not the current page\n $html .= \"\\n <li><a href=\\\"\".$data['url'].\"\\\">\".$page_num.\"</a></li>\";\n else\n $html .= \"\\n <li class=\\\"active\\\"><span>\".$page_num.\"<span class=\\\"sr-only\\\">(current)</span></span></li>\";\n }\n\n if ($pager['pages']['next']) {\n $html .= \"\\n <li><a href=\\\"\".$pager['pages']['next'].\n \"\\\" aria-label=\\\"\".$this->getConfig()->ls('ui.nav.next').\n \"\\\"><span aria-hidden=\\\"true\\\">&raquo;</span></a><li>\";\n } else\n $html .= \"\\n <li class=\\\"disabled\\\"><span><span aria-hidden=\\\"true\\\">&raquo;</span></span></li>\";\n\n $html .= \"\\n </ul>\\n</nav>\\n\\n\";\n\n return $html;\n }", "public function actionbar_navigation() {\n $currentpage = format_flexpage_cache()->get_current_page();\n $options = array();\n foreach (format_flexpage_cache()->get_pages() as $page) {\n $options[$page->get_id()] = $this->pad_page_name($page, true);\n }\n\n if ($prevpage = format_flexpage_cache()->get_previous_page($currentpage)) {\n $previcon = new pix_icon('t/moveleft', get_string('gotoa', 'format_flexpage', format_string($prevpage->get_name())));\n $prevpage = $this->output->action_icon($prevpage->get_url(), $previcon);\n $prevpage = html_writer::tag('span', $prevpage, array('id' => 'format_flexpage_prevpage'));\n } else {\n $prevpage = '';\n }\n if ($nextpage = format_flexpage_cache()->get_next_page($currentpage)) {\n $nexticon = new pix_icon('t/removeright', get_string('gotoa', 'format_flexpage', format_string($nextpage->get_name())));\n $nextpage = $this->output->action_icon($nextpage->get_url(), $nexticon);\n $nextpage = html_writer::tag('span', $nextpage, array('id' => 'format_flexpage_nextpage'));\n } else {\n $nextpage = '';\n }\n $jumpselect = new single_select($this->page->url, 'pageid', $options, $currentpage->get_id(), array(), 'jumptopageid');\n $jumpselect->set_label(get_string('jumptoflexpage', 'format_flexpage'), array('class' => 'accesshide'));\n\n $jumptopage = html_writer::tag('span', $this->output->render($jumpselect), array('id' => 'format_flexpage_jumptopage'));\n $helpicon = $this->pix_icon('help', get_string('help'), 'moodle', array('id' => 'format_flexpage_actionbar_help'));\n $helpicon = html_writer::tag('span', $helpicon);\n\n return html_writer::tag('div', $prevpage.$jumptopage.$nextpage.$helpicon, array('id' => 'format_flexpage_actionbar_nav'));\n }", "function nextPrev($curpage, $pages) \n { \n $next_prev = \"\"; \n\n if (($curpage-1) <= 0) \n { \n $next_prev .= \"Previous\"; \n } \n else \n { \n $next_prev .= \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?page=\".($curpage-1).\"\\\" alt=\\\"Halaman sebelumnya ...\\\">Previous</a>\"; \n } \n\n $next_prev .= \" | \"; \n\n if (($curpage+1) > $pages) \n { \n $next_prev .= \"Next\"; \n } \n else \n { \n $next_prev .= \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?page=\".($curpage+1).\"\\\" alt=\\\"Halaman berikut ...\\\">Next</a>\"; \n } \n\n return $next_prev; \n }", "function page_navigation2($cpage=1,$url)\r\n{\r\n if($cpage<1||$cpage>$this->page_count) $cpage=1;\r\n if($cpage>1)\r\n {\r\n $before=$cpage-1;\r\n $str=\"<a href='\".str_replace(\"{page}\",$before,$url).\" '>Previous</a>\";\r\n }\r\n if($cpage<$this->page_count){\r\n\t$next=$cpage+1;\r\n\t$str.=\" <a href='\".str_replace(\"{page}\",$next,$url).\" '>Next</a> \";\r\n }\r\n $ib=($cpage-$this->prepage)>1?($cpage-$this->prepage):1 ;\r\n $ie=($cpage + $this->nextpage)<=$this->page_count ? ($cpage + $this->nextpage):$this->page_count; \r\n for($i=$ib;$i<=$ie;$i++){\r\n if($i== $cpage)\r\n $str .= \"&nbsp; <a href='\".str_replace(\"{page}\",$i,$url).\"'><font color=red>\".$i.\"</font></a>&nbsp;\";\r\n else{\r\n $str .= \"&nbsp; <a href='\".str_replace(\"{page}\",$i,$url).\"'>\".$i.\"</a>&nbsp;\";\r\n }\r\n }\r\n $str.='&nbsp;Total Records:'.$this->item_count;\r\nreturn $str;\r\n\r\n}", "function nextPage() {\n\tglobal $activePages, $currentView, $currentArticle, $currentArticlePage;\n $root = '/' . $_GET['language'] . '/';\n\t\n\t// If we're on the home page, the next button should point to the first article\n\tif( $currentView == 'home' ) {\n\t\treturn $root . getArrayFirstIndex( $activePages );\n\t}\n\t// If we're on the credits page, the next button should be inactive\n\telse if( $currentView == 'credits' ) {\n\t\treturn false;\n\t}\n\t// If we're on the last page, send to credits\n\telse if( $currentArticle == 'theend' ) {\n\t\treturn $root . 'credits';\n\t}\n\t// If we're on a regular article page get the next one\n\tif($activePages[$currentArticle]['numberOfPages'] == $currentArticlePage) {\n\t\tif( !$activePages[nextPrevArticleName('next')]['active'] ) return $root . 'theend';\n\t\treturn $root . nextPrevArticleName('next');\n\t} elseif($activePages[$currentArticle]['numberOfPages'] > $currentArticlePage) {\n\t\treturn $root . $currentArticle . '/' . (string)($currentArticlePage+1);\n\t}\n}", "public function getNextPage();", "private function print_pagination_links() {\n\n\t\tif ( 1 < $this->total_pages ) {\n\t\t\t?>\n\t\t\t<span class=\"pagination-links\">\n\t\t\t\t<?php\n\t\t\t\t$this->print_first_page_link();\n\t\t\t\t$this->print_previous_page_link();\n\t\t\t\t$this->print_current_page_display();\n\t\t\t\t$this->print_next_page_link();\n\t\t\t\t$this->print_last_page_link();\n\t\t\t\t?>\n\t\t\t</span>\n\t\t\t<?php\n\t\t}\n\t}", "function buildNavigation($pageNum_Recordset1,$totalPages_Recordset1,$prev_Recordset1,$next_Recordset1,$separator=\" | \",$max_links=10, $show_page=true)\n{\n GLOBAL $maxRows_rs_forn,$totalRows_rs_forn;\n\t$pagesArray = \"\"; $firstArray = \"\"; $lastArray = \"\";\n\tif($max_links<2)$max_links=2;\n\tif($pageNum_Recordset1<=$totalPages_Recordset1 && $pageNum_Recordset1>=0)\n\t{\n\t\tif ($pageNum_Recordset1 > ceil($max_links/2))\n\t\t{\n\t\t\t$fgp = $pageNum_Recordset1 - ceil($max_links/2) > 0 ? $pageNum_Recordset1 - ceil($max_links/2) : 1;\n\t\t\t$egp = $pageNum_Recordset1 + ceil($max_links/2);\n\t\t\tif ($egp >= $totalPages_Recordset1)\n\t\t\t{\n\t\t\t\t$egp = $totalPages_Recordset1+1;\n\t\t\t\t$fgp = $totalPages_Recordset1 - ($max_links-1) > 0 ? $totalPages_Recordset1 - ($max_links-1) : 1;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$fgp = 0;\n\t\t\t$egp = $totalPages_Recordset1 >= $max_links ? $max_links : $totalPages_Recordset1+1;\n\t\t}\n\t\tif($totalPages_Recordset1 >= 1) {\n\t\t\t#\t------------------------\n\t\t\t#\tSearching for $_GET vars\n\t\t\t#\t------------------------\n\t\t\t$_get_vars = '';\t\t\t\n\t\t\tif(!empty($_GET) || !empty($HTTP_GET_VARS)){\n\t\t\t\t$_GET = empty($_GET) ? $HTTP_GET_VARS : $_GET;\n\t\t\t\tforeach ($_GET as $_get_name => $_get_value) {\n\t\t\t\t\tif ($_get_name != \"pageNum_rs_forn\") {\n\t\t\t\t\t\t$_get_vars .= \"&$_get_name=$_get_value\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$successivo = $pageNum_Recordset1+1;\n\t\t\t$precedente = $pageNum_Recordset1-1;\n\t\t\t$firstArray = ($pageNum_Recordset1 > 0) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_forn=$precedente$_get_vars\\\">$prev_Recordset1</a>\" : \"$prev_Recordset1\";\n\t\t\t# ----------------------\n\t\t\t# page numbers\n\t\t\t# ----------------------\n\t\t\tfor($a = $fgp+1; $a <= $egp; $a++){\n\t\t\t\t$theNext = $a-1;\n\t\t\t\tif($show_page)\n\t\t\t\t{\n\t\t\t\t\t$textLink = $a;\n\t\t\t\t} else {\n\t\t\t\t\t$min_l = (($a-1)*$maxRows_rs_forn) + 1;\n\t\t\t\t\t$max_l = ($a*$maxRows_rs_forn >= $totalRows_rs_forn) ? $totalRows_rs_forn : ($a*$maxRows_rs_forn);\n\t\t\t\t\t$textLink = \"$min_l - $max_l\";\n\t\t\t\t}\n\t\t\t\t$_ss_k = floor($theNext/26);\n\t\t\t\tif ($theNext != $pageNum_Recordset1)\n\t\t\t\t{\n\t\t\t\t\t$pagesArray .= \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_forn=$theNext$_get_vars\\\">\";\n\t\t\t\t\t$pagesArray .= \"$textLink</a>\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t} else {\n\t\t\t\t\t$pagesArray .= \"$textLink\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t$theNext = $pageNum_Recordset1+1;\n\t\t\t$offset_end = $totalPages_Recordset1;\n\t\t\t$lastArray = ($pageNum_Recordset1 < $totalPages_Recordset1) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_forn=$successivo$_get_vars\\\">$next_Recordset1</a>\" : \"$next_Recordset1\";\n\t\t}\n\t}\n\treturn array($firstArray,$pagesArray,$lastArray);\n}", "function mittencrate2014_paging_nav($pages = false) {\n global $paged;\n\n if (empty($paged)) {\n $paged = 1;\n }\n\n // only get total pages if not set\n if (!$pages) {\n global $wp_query;\n \n $pages = $wp_query->max_num_pages;\n \n if (!$pages) {\n $pages = 1;\n }\n }\n\n // Don't print empty markup if there's only one page.\n if ( $pages < 2 ) {\n return;\n }\n\n ?>\n <div class=\"paging-navigation\">\n \n <?php if ( $paged < $pages ) : ?>\n <div class=\"nav-previous\">\n <a href=\"<?php echo get_pagenum_link($paged + 1); ?>\">&larr; Older posts</a>\n </div>\n <?php endif; ?>\n\n <?php if ( $paged > 1 ) : ?>\n <div class=\"nav-next\">\n <a href=\"<?php echo get_pagenum_link($paged - 1); ?>\">Newer posts &rarr;</a>\n </div>\n <?php endif; ?>\n \n </div><!-- .navigation -->\n <?php\n}", "function thb_single_next_custom_pagination() {\n\t\t$post = get_next_post();\n\n\t\tif ( $post == '' ) {\n\t\t\treturn;\n\t\t}\n\n\t\techo \"<div class='thb-single-next-nav-wrapper'>\";\n\t\t\techo \"<a href='\" . get_permalink( $post->ID ) . \"'>\";\n\t\t\t\techo \"<span>\" . __( 'Next post', 'thb_text_domain' ) . \"</span>\";\n\t\t\t\techo \"<p class='thb-single-nav-title'>\" . thb_text_format( esc_html( $post->post_title ) ) . \"</p>\";\n\t\t\techo \"</a>\";\n\t\techo \"</div>\";\n\t}", "public function getNav() \n {\n //@return : $stri_html : affichage du html de la navigation\n \n\t\t$stri_html =\"\";\n \n //**** START - navigation previous\n //si la page précédente > 1 alors affichage du lien sinon affichage du label (if previous page > 1 then put link else label)\n\t\t$stri_html .= ($this->int_page_prev > 0) ? $this->obj_a_prev->htmlValue() : $this->obj_lb_prev->htmlValue(); \n\t\t$stri_html .= \" | \";\n\t\t//**** END - navigation previous\n\t\t\n\t\t\n //**** DEBUT corps navigator\n\n // calcule le milieu pour les liens de page dans le but d'avoir la page courante au centre de la navigation (determine the middle of link to post courant page in middle)\n\t\t$int_middle = floor($this->int_limit_page / 2);\n\n\t\t// calcule la page minimum à afficher dans les liens (determine the min page)\n $minpage = (($this->int_page - $int_middle)<1) ? 1 : $this->int_page - $int_middle;\t\t\n\n // calcule la page maximum à afficher dans les liens (determine the max page)\n\t\t$maxpage = (($this->int_page + $int_middle)> $this->int_pages)? $this->int_pages : ($this->int_page + $int_middle);\n\n // pour chaque lien de navigation (post each page)\n\t\tforeach (range($minpage, $maxpage) as $i) \n {\n\t\t\tif ($i == $this->int_page) \n { \n // selected page\n $this->obj_lb_courant_page->setValue($i);\n\t\t\t\t$stri_html .= $this->obj_lb_courant_page->htmlValue(); \n\t\t\t} \n else \n {\n // other page\n $this->obj_a_page->setValue($i);\n $this->obj_a_page->setOnClick(\"document.form_page.start.value=\".$i.\";document.form_page.submit();\");\n \n\t\t\t\t$stri_html.=\" \".$this->obj_a_page->htmlValue().\" \";\n\t\t\t}\n\t\t}\n\n //**** END corps navigation\n \n \n //**** START - navigation next\n //si la page suivante <= nb de pages alors affichage du lien sinon affichage du label (if next page <= number of page then put link else label)\n\t\t$stri_html .= \" | \";\n\t\t$stri_html .= ($this->int_page_next <= $this->int_pages) ? $this->obj_a_next->htmlValue() : $this->obj_lb_next->htmlValue(); \n //**** END - navigation next\n\n\t\treturn $stri_html;\n\t}", "protected function renderListNavigation()\n {\n $totalPages = ceil($this->totalItems / $this->iLimit);\n\n $content = '';\n\n // Show page selector if not all records fit into one page\n if ($totalPages > 1) {\n $first = $previous = $next = $last = '';\n $listURL = $this->listURL('', $this->table);\n\n // 1 = first page\n $currentPage = floor(($this->firstElementNumber + 1) / $this->iLimit) + 1;\n\n // Compile first, previous, next, last and refresh buttons\n if ($currentPage > 1) {\n $labelFirst = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:first');\n\n $first = '<a href=\"' . $listURL . '&pointer=0\"><img' . IconFactory::skinImg('control_first.gif')\n . 'alt=\"' . $labelFirst . '\" title=\"' . $labelFirst . '\" /></a>';\n } else {\n $first = '<img' . IconFactory::skinImg('control_first_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n if (($currentPage - 1) > 0) {\n $labelPrevious = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:previous');\n\n $previous = '<a href=\"' . $listURL . '&pointer=' . (($currentPage - 2) * $this->iLimit) . '\"><img' . IconFactory::skinImg('control_previous.gif')\n . 'alt=\"' . $labelPrevious . '\" title=\"' . $labelPrevious . '\" /></a>';\n } else {\n $previous = '<img' . IconFactory::skinImg('control_previous_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n if (($currentPage + 1) <= $totalPages) {\n $labelNext = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:next');\n\n $next = '<a href=\"' . $listURL . '&pointer=' . (($currentPage) * $this->iLimit) . '\"><img' . IconFactory::skinImg('control_next.gif')\n . 'alt=\"' . $labelNext . '\" title=\"' . $labelNext . '\" /></a>';\n } else {\n $next = '<img' . IconFactory::skinImg('control_next_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n if ($currentPage != $totalPages) {\n $labelLast = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:last');\n\n $last = '<a href=\"' . $listURL . '&pointer=' . (($totalPages - 1) * $this->iLimit) . '\"><img' . IconFactory::skinImg('control_last.gif')\n . 'alt=\"' . $labelLast . '\" title=\"' . $labelLast . '\" /></a>';\n } else {\n $last = '<img' . IconFactory::skinImg('control_last_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n $pageIndicator = sprintf($GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:pageIndicator'),\n $currentPage, $totalPages);\n\n if ($this->totalItems > ($this->firstElementNumber + $this->iLimit)) {\n $lastElementNumber = $this->firstElementNumber + $this->iLimit;\n } else {\n $lastElementNumber = $this->totalItems;\n }\n $rangeIndicator = '<span class=\"pageIndicator\">'\n . sprintf($GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:rangeIndicator'),\n $this->firstElementNumber + 1, $lastElementNumber, $this->totalItems)\n . '</span>';\n\n $content .= '<div class=\"ttnewsadmin-pagination\">'\n . $first . $previous\n . '&nbsp;'\n . $rangeIndicator . '&nbsp;('\n . $pageIndicator . ')&nbsp;'\n . $next . $last\n . '</div>';\n } // end of if pages > 1\n\n $data = Array();\n $titleColumn = $this->fieldArray[0];\n $data[$titleColumn] = $content;\n\n return ($this->addElement(1, '', $data));\n }", "function bones_page_navi()\n{\n\tglobal $wp_query;\n\t$bignum = 999999999;\n\tif ($wp_query->max_num_pages <= 1)\n\t\treturn;\n\techo '<nav class=\"pagination\">';\n\techo paginate_links(array(\n\t\t'base' => str_replace($bignum, '%#%', esc_url(get_pagenum_link($bignum))),\n\t\t'format' => '',\n\t\t'current' => max(1, get_query_var('paged')),\n\t\t'total' => $wp_query->max_num_pages,\n\t\t'prev_text' => '&larr;',\n\t\t'next_text' => '&rarr;',\n\t\t'type' => 'list',\n\t\t'end_size' => 0,\n\t\t'mid_size' => 1\n\t));\n\techo '</nav>';\n}", "function buildNavigation($pageNum_Recordset1,$totalPages_Recordset1,$prev_Recordset1,$next_Recordset1,$separator=\" | \",$max_links=10, $show_page=true)\n{\n GLOBAL $maxRows_rs_video,$totalRows_rs_video;\n\t$pagesArray = \"\"; $firstArray = \"\"; $lastArray = \"\";\n\tif($max_links<2)$max_links=2;\n\tif($pageNum_Recordset1<=$totalPages_Recordset1 && $pageNum_Recordset1>=0)\n\t{\n\t\tif ($pageNum_Recordset1 > ceil($max_links/2))\n\t\t{\n\t\t\t$fgp = $pageNum_Recordset1 - ceil($max_links/2) > 0 ? $pageNum_Recordset1 - ceil($max_links/2) : 1;\n\t\t\t$egp = $pageNum_Recordset1 + ceil($max_links/2);\n\t\t\tif ($egp >= $totalPages_Recordset1)\n\t\t\t{\n\t\t\t\t$egp = $totalPages_Recordset1+1;\n\t\t\t\t$fgp = $totalPages_Recordset1 - ($max_links-1) > 0 ? $totalPages_Recordset1 - ($max_links-1) : 1;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$fgp = 0;\n\t\t\t$egp = $totalPages_Recordset1 >= $max_links ? $max_links : $totalPages_Recordset1+1;\n\t\t}\n\t\tif($totalPages_Recordset1 >= 1) {\n\t\t\t#\t------------------------\n\t\t\t#\tSearching for $_GET vars\n\t\t\t#\t------------------------\n\t\t\t$_get_vars = '';\t\t\t\n\t\t\tif(!empty($_GET) || !empty($HTTP_GET_VARS)){\n\t\t\t\t$_GET = empty($_GET) ? $HTTP_GET_VARS : $_GET;\n\t\t\t\tforeach ($_GET as $_get_name => $_get_value) {\n\t\t\t\t\tif ($_get_name != \"pageNum_rs_video\") {\n\t\t\t\t\t\t$_get_vars .= \"&$_get_name=$_get_value\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$successivo = $pageNum_Recordset1+1;\n\t\t\t$precedente = $pageNum_Recordset1-1;\n\t\t\t$firstArray = ($pageNum_Recordset1 > 0) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_video=$precedente$_get_vars\\\">$prev_Recordset1</a>\" : \"$prev_Recordset1\";\n\t\t\t# ----------------------\n\t\t\t# page numbers\n\t\t\t# ----------------------\n\t\t\tfor($a = $fgp+1; $a <= $egp; $a++){\n\t\t\t\t$theNext = $a-1;\n\t\t\t\tif($show_page)\n\t\t\t\t{\n\t\t\t\t\t$textLink = $a;\n\t\t\t\t} else {\n\t\t\t\t\t$min_l = (($a-1)*$maxRows_rs_video) + 1;\n\t\t\t\t\t$max_l = ($a*$maxRows_rs_video >= $totalRows_rs_video) ? $totalRows_rs_video : ($a*$maxRows_rs_video);\n\t\t\t\t\t$textLink = \"$min_l - $max_l\";\n\t\t\t\t}\n\t\t\t\t$_ss_k = floor($theNext/26);\n\t\t\t\tif ($theNext != $pageNum_Recordset1)\n\t\t\t\t{\n\t\t\t\t\t$pagesArray .= \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_video=$theNext$_get_vars\\\">\";\n\t\t\t\t\t$pagesArray .= \"$textLink</a>\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t} else {\n\t\t\t\t\t$pagesArray .= \"$textLink\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t$theNext = $pageNum_Recordset1+1;\n\t\t\t$offset_end = $totalPages_Recordset1;\n\t\t\t$lastArray = ($pageNum_Recordset1 < $totalPages_Recordset1) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_video=$successivo$_get_vars\\\">$next_Recordset1</a>\" : \"$next_Recordset1\";\n\t\t}\n\t}\n\treturn array($firstArray,$pagesArray,$lastArray);\n}", "public function nextAction()\n {\n $this->pageAction('goToNextPage');\n }", "function registry_list_paging_nav() {\n\t\t$current_cats = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );\n\t\t$current_cat = $current_cats -> slug;\n\n\t\t$previous = -1;\n\t\t$next = 0;\n\t\t$count = 0;\n\t\t$args = array(\n\t\t\t'taxonomy' => 'reg_display_page',\n\t\t\t'orderby' => 'slug',\n\t\t\t'order' => 'ASC',\n\t\t\t'hierarchical' => 0,\n\t\t\t'hide_empty' => 1\n\t\t\t);\n\t\t $categories = get_categories($args);\n\n\t\t foreach ($categories as $cat) {\n\t\t\t$count++;\n\t\t\tif ($cat->slug == $current_cat) {\n\t\t\t $previous = $count - 2;\n\t\t\t $next = $count;\n\t\t\t}\n\t\t }\n\t?>\n\t<nav class=\"navigation paging-navigation\" role=\"navigation\">\n\t\t<h1 class=\"screen-reader-text\"><?php _e( 'Posts navigation', 'twentythirteen' ); ?></h1>\n\t\t<div class=\"nav-links\">\n\t\t\n\t\t\t\n\t\t\t<?php if ($previous >= 0) : \n\t\t\t\t$prev_link = get_term_link( $categories[$previous]->slug, 'reg_display_page' );\n\t\t\t\t$prev_title = $categories[$previous]->name;\t\t\n\t\t\t?>\n\t\t\t\t<div class=\"nav-next\">\n\t\t\t\t <?php echo \"<a href='$prev_link' title='View Registrations $prev_title'?> <span class='meta-nav'>&larr;</span> Registrations $prev_title </a> \"; ?>\n\t\t\t\t</div> <!-- .nav-next -->\n\t\t\t<?php endif; //$previous >=0 ?>\n \n\t\t\t<?php if ($next > 0 && $next < count($categories)) :\n\t\t\t\t$next_link = get_term_link( $categories[$next]->slug, 'reg_display_page' );\n\t\t\t\t$next_title = $categories[$next]->name;\t\n\t\t\t?>\n\t\t\t\t<div class=\"nav-previous\">\n\t\t\t\t <?php echo \"<a href='$next_link' title='View Registrations $next_title'?> Registrations $next_title <span class='meta-nav'>&rarr;</span></a> \"; ?>\n\t\t\t\t</div> <!-- .nav-previous -->\n \n\t\t\t<?php endif; //$next >=0?>\n\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n<?php }", "function show_page_links($base_url, $num_items, $per_page, $page)\n{\n //$base_url contains the address of the page and the order it is called with\n //e.g., 'asc' or 'desc' - the page handles this so we have to worry about it.\n\n $total_pages = ceil($num_items/$per_page);\n\n if ($total_pages == 1)\n {\n return '';\n }\n\n //initialize our $page_string variable wich will hold the links\n $page_string = '<p><span class=\"page_numbers\">';\n\n //SHOW UP TO 4 LINKS ON EITHER SIDE OF THE CURRENT PAGE\n\n //get the number of page links are available after the current page\n $num_succeeding_links = $total_pages - $page;\n\n //get the number of preceding links available before the current page\n $num_preceding_links = $page -1;\n\n //calculate our start and end values\n $start = $page - 4;\n if ( $start < 1)\n {\n $start = 1;\n }\n //if we have less than 10 total_page, use the number we have ($total_pages)\n $end = $total_pages;\n //but if end is more than 9 higher than $start, make $end 9 higher than $start\n //we only want to show 10 records per page (e.g., 1..10)\n if ( ($end - $start) > 9 )\n {\n $end= $start + 9;\n }\n\n //if the total number of succeeding links exceeds 4 show 4 and a >> at the end\n //the >> at the end is just the 5th succeeding link\n //do the same for preceding links if they are more than 4\n if ($total_pages > 10 && $page > 1) //don't show first page link except when we're not the first page\n {\n //create a << which points to the first page\n $page_string .= '<a title=\"first page\" href=\"'.$base_url.'&page=1\">&lt;&lt;</a>&nbsp;&nbsp;';\n //create a < which points to the current page -1 (shifts us left one)\n $val = $page-1;\n $page_string .= '<a title=\"previous page\" href=\"'.$base_url.'&page='.$val.'\">&lt;</a>&nbsp;&nbsp;';\n }\n for ($i=$start; $i<=$end; $i++)\n {\n if ($i == $page)\n {\n $page_string .= \" <b>[$i]</b> \";\n }\n else\n {\n $page_string .= ' <a title=\"page ' . $i . '\" href=\"'.$base_url.'&page='.$i.'\">'.$i.'</a> ';\n }\n }\n if ($total_pages > 10 && $page < $total_pages) //don't show last page link except when we're not on the last page\n {\n //create a > which points to the current page +1 (shifts us right one)\n $val = $page + 1;\n $page_string .= '&nbsp;&nbsp;<a title=\"next page\" href=\"'.$base_url.'&page='.$val.'\">&gt</a>';\n\n //create a >> which point to the last page\n $page_string .= '&nbsp;&nbsp;<a title=\"last page\" href=\"'.$base_url.'&page='.$total_pages.'\">&gt;&gt</a> ';\n }\n\n $page_string .= '</span></p>';\n\n return $page_string;\n\n}", "public function hasPreviousPage();", "function buildNavigation($pageNum_Recordset1,$totalPages_Recordset1,$prev_Recordset1,$next_Recordset1,$separator=\" | \",$max_links=10, $show_page=true)\n{\n GLOBAL $maxRows_rs_novinky,$totalRows_rs_novinky;\n\t$pagesArray = \"\"; $firstArray = \"\"; $lastArray = \"\";\n\tif($max_links<2)$max_links=2;\n\tif($pageNum_Recordset1<=$totalPages_Recordset1 && $pageNum_Recordset1>=0)\n\t{\n\t\tif ($pageNum_Recordset1 > ceil($max_links/2))\n\t\t{\n\t\t\t$fgp = $pageNum_Recordset1 - ceil($max_links/2) > 0 ? $pageNum_Recordset1 - ceil($max_links/2) : 1;\n\t\t\t$egp = $pageNum_Recordset1 + ceil($max_links/2);\n\t\t\tif ($egp >= $totalPages_Recordset1)\n\t\t\t{\n\t\t\t\t$egp = $totalPages_Recordset1+1;\n\t\t\t\t$fgp = $totalPages_Recordset1 - ($max_links-1) > 0 ? $totalPages_Recordset1 - ($max_links-1) : 1;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$fgp = 0;\n\t\t\t$egp = $totalPages_Recordset1 >= $max_links ? $max_links : $totalPages_Recordset1+1;\n\t\t}\n\t\tif($totalPages_Recordset1 >= 1) {\n\t\t\t#\t------------------------\n\t\t\t#\tSearching for $_GET vars\n\t\t\t#\t------------------------\n\t\t\t$_get_vars = '';\t\t\t\n\t\t\tif(!empty($_GET) || !empty($_GET)){\n\t\t\t\t$_GET = empty($_GET) ? $_GET : $_GET;\n\t\t\t\tforeach ($_GET as $_get_name => $_get_value) {\n\t\t\t\t\tif ($_get_name != \"pageNum_rs_novinky\") {\n\t\t\t\t\t\t$_get_vars .= \"&$_get_name=$_get_value\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$successivo = $pageNum_Recordset1+1;\n\t\t\t$precedente = $pageNum_Recordset1-1;\n\t\t\t$firstArray = ($pageNum_Recordset1 > 0) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_novinky=$precedente$_get_vars\\\">$prev_Recordset1</a>\" : \"$prev_Recordset1\";\n\t\t\t# ----------------------\n\t\t\t# page numbers\n\t\t\t# ----------------------\n\t\t\tfor($a = $fgp+1; $a <= $egp; $a++){\n\t\t\t\t$theNext = $a-1;\n\t\t\t\tif($show_page)\n\t\t\t\t{\n\t\t\t\t\t$textLink = $a;\n\t\t\t\t} else {\n\t\t\t\t\t$min_l = (($a-1)*$maxRows_rs_novinky) + 1;\n\t\t\t\t\t$max_l = ($a*$maxRows_rs_novinky >= $totalRows_rs_novinky) ? $totalRows_rs_novinky : ($a*$maxRows_rs_novinky);\n\t\t\t\t\t$textLink = \"$min_l - $max_l\";\n\t\t\t\t}\n\t\t\t\t$_ss_k = floor($theNext/26);\n\t\t\t\tif ($theNext != $pageNum_Recordset1)\n\t\t\t\t{\n\t\t\t\t\t$pagesArray .= \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_novinky=$theNext$_get_vars\\\">\";\n\t\t\t\t\t$pagesArray .= \"$textLink</a>\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t} else {\n\t\t\t\t\t$pagesArray .= \"$textLink\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t$theNext = $pageNum_Recordset1+1;\n\t\t\t$offset_end = $totalPages_Recordset1;\n\t\t\t$lastArray = ($pageNum_Recordset1 < $totalPages_Recordset1) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_novinky=$successivo$_get_vars\\\">$next_Recordset1</a>\" : \"$next_Recordset1\";\n\t\t}\n\t}\n\treturn array($firstArray,$pagesArray,$lastArray);\n}", "private function print_next_page_link() {\n\n\t\t$this->print_anchor(\n\t\t\t$this->get_paged_url( min( $this->total_pages, $this->current_page + 1 ) ),\n\t\t\t__( 'Go to the next page', 'multilingual-press' ),\n\t\t\t'next-page' . $this->disable_last,\n\t\t\t'&rsaquo;'\n\t\t);\n\t}", "function pb_single_next_prev() {\n\t// Only show on single post pages (not plants)\n\tif( !is_singular('post') ) {\n\t\treturn;\n\t}\n\n\t$previouspost_text = __( 'Older Posts', 'lean-kickstart' );\n\t$nextpost_text = __( 'Newer Posts', 'lean-kickstart' );\n\n\techo '<div class=\"archive-pagination pagination\">';\n\t\tprevious_post_link( '<div class=\"pagination-previous alignleft\">%link</div>', $previouspost_text );\n\t\tnext_post_link( '<div class=\"pagination-next alignright\">%link</div>', $nextpost_text );\n\techo '</div>';\n}", "public function getPreviousPage();", "public function LeftNavigation() {\n\t\t$pageId = (isset($_GET['page'])) ? (int)$_GET['page'] : 0;\n \n if(($page = DataObject::get_by_id('Page', $pageId))) {\n Director::set_current_page($page);\n }\n\n return $this->renderWith('LeftNavigation');\n }", "function showNavigation() {\n $action = $this->action;\n $start = $this->start;\n $amount = $this->amount;\n $minamount = $this->minamount;\n $maxamount = $this->maxamount;\n $blogid = $this->blogid;\n $search = hsc($this->search);\n $itemid = $this->itemid;\n\n $prev = $start - $amount;\n if ($prev < $minamount) $prev=$minamount;\n\n $enable_cat_select = in_array($action , array('itemlist' , 'browseownitems'));\n if ($enable_cat_select)\n $catid = isset($_POST['catid']) ? max(0,intval($_POST['catid'])) : 0;\n\n // maxamount not used yet\n // if ($start + $amount <= $maxamount)\n $next = $start + $amount;\n // else\n // $next = $start;\n\n ?>\n <table class=\"navigation\">\n <tr><td>\n <form method=\"post\" action=\"index.php\"><div>\n <input type=\"submit\" value=\"&lt;&lt; <?php echo _LISTS_PREV?>\" />\n <input type=\"hidden\" name=\"blogid\" value=\"<?php echo $blogid; ?>\" />\n <input type=\"hidden\" name=\"itemid\" value=\"<?php echo $itemid; ?>\" />\n <?php if ($enable_cat_select) echo '<input type=\"hidden\" name=\"catid\" value=\"' . $catid . '\" />'; ?>\n <input type=\"hidden\" name=\"action\" value=\"<?php echo $action; ?>\" />\n <input type=\"hidden\" name=\"amount\" value=\"<?php echo $amount; ?>\" />\n <input type=\"hidden\" name=\"search\" value=\"<?php echo $search; ?>\" />\n <input type=\"hidden\" name=\"start\" value=\"<?php echo $prev; ?>\" />\n </div></form>\n </td><td>\n <form method=\"post\" action=\"index.php\"><div>\n <input type=\"hidden\" name=\"blogid\" value=\"<?php echo $blogid; ?>\" />\n <input type=\"hidden\" name=\"itemid\" value=\"<?php echo $itemid; ?>\" />\n <?php if ($enable_cat_select) echo '<input type=\"hidden\" name=\"catid\" value=\"' . $catid . '\" />'; ?>\n <input type=\"hidden\" name=\"action\" value=\"<?php echo $action; ?>\" />\n <input name=\"amount\" size=\"3\" value=\"<?php echo $amount; ?>\" /> <?php echo _LISTS_PERPAGE?>\n <input type=\"hidden\" name=\"start\" value=\"<?php echo $start; ?>\" />\n <input type=\"hidden\" name=\"search\" value=\"<?php echo $search; ?>\" />\n <input type=\"submit\" value=\"&gt; <?php echo _LISTS_CHANGE?>\" />\n </div></form>\n </td><td>\n <form method=\"post\" action=\"index.php\"><div>\n <?php if ($enable_cat_select) echo $this->getFormSelectCategoryBlog($action, $blogid , $catid); ?>\n <input type=\"hidden\" name=\"blogid\" value=\"<?php echo $blogid; ?>\" />\n <input type=\"hidden\" name=\"itemid\" value=\"<?php echo $itemid; ?>\" />\n <input type=\"hidden\" name=\"action\" value=\"<?php echo $action; ?>\" />\n <input type=\"hidden\" name=\"amount\" value=\"<?php echo $amount; ?>\" />\n <input type=\"hidden\" name=\"start\" value=\"0\" />\n <input type=\"text\" name=\"search\" value=\"<?php echo $search; ?>\" size=\"16\" />\n <input type=\"submit\" value=\"&gt; <?php echo _LISTS_SEARCH?>\" />\n </div></form>\n </td><td>\n <form method=\"post\" action=\"index.php\"><div>\n <input type=\"submit\" value=\"<?php echo _LISTS_NEXT?> &gt; &gt;\" />\n <input type=\"hidden\" name=\"search\" value=\"<?php echo $search; ?>\" />\n <input type=\"hidden\" name=\"blogid\" value=\"<?php echo $blogid; ?>\" />\n <input type=\"hidden\" name=\"itemid\" value=\"<?php echo $itemid; ?>\" />\n <?php if ($enable_cat_select) echo '<input type=\"hidden\" name=\"catid\" value=\"' . $catid . '\" />'; ?>\n <input type=\"hidden\" name=\"action\" value=\"<?php echo $action; ?>\" />\n <input type=\"hidden\" name=\"amount\" value=\"<?php echo $amount; ?>\" />\n <input type=\"hidden\" name=\"start\" value=\"<?php echo $next; ?>\" />\n </div></form>\n </td></tr>\n </table>\n <?php }", "function link_to_next_item_show($text = null, $props = array())\n{\n if (!$text) {\n $text = __(\"Next Item &rarr;\");\n }\n $item = get_current_record('item');\n if ($next = $item->next()) {\n return link_to($next, 'show', $text, $props);\n }\n}", "function getPagesLinks()\n\t{\n\t\tglobal $mainframe;\n\n\t\t$lang =& JFactory::getLanguage();\n\n\t\t// Build the page navigation list\n\t\t$data = $this->_buildDataObject();\n\n\t\t$list = array();\n\n\t\t$itemOverride = false;\n\t\t$listOverride = false;\n\n\t\t$chromePath = JPATH_THEMES.DS.$mainframe->getTemplate().DS.'html'.DS.'pagination.php';\n\t\tif (file_exists($chromePath))\n\t\t{\n\t\t\trequire_once ($chromePath);\n\t\t\tif (function_exists('pagination_item_active') && function_exists('pagination_item_inactive')) {\n\t\t\t\t$itemOverride = true;\n\t\t\t}\n\t\t\tif (function_exists('pagination_list_render')) {\n\t\t\t\t$listOverride = true;\n\t\t\t}\n\t\t}\n\n\t\t// Build the select list\n\t\tif ($data->all->base !== null) {\n\t\t\t$list['all']['active'] = true;\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_active($data->all) : $this->_item_active($data->all);\n\t\t} else {\n\t\t\t$list['all']['active'] = false;\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);\n\t\t}\n\n\t\tif ($data->start->base !== null) {\n\t\t\t$list['start']['active'] = true;\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_active($data->start) : $this->_item_active($data->start);\n\t\t} else {\n\t\t\t$list['start']['active'] = false;\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);\n\t\t}\n\t\tif ($data->previous->base !== null) {\n\t\t\t$list['previous']['active'] = true;\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_active($data->previous) : $this->_item_active($data->previous);\n\t\t} else {\n\t\t\t$list['previous']['active'] = false;\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);\n\t\t}\n\n\t\t$list['pages'] = array(); //make sure it exists\n\t\tforeach ($data->pages as $i => $page)\n\t\t{\n\t\t\tif ($page->base !== null) {\n\t\t\t\t$list['pages'][$i]['active'] = true;\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_active($page) : $this->_item_active($page);\n\t\t\t} else {\n\t\t\t\t$list['pages'][$i]['active'] = false;\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_inactive($page) : $this->_item_inactive($page);\n\t\t\t}\n\t\t}\n\n\t\tif ($data->next->base !== null) {\n\t\t\t$list['next']['active'] = true;\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_active($data->next) : $this->_item_active($data->next);\n\t\t} else {\n\t\t\t$list['next']['active'] = false;\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);\n\t\t}\n\t\tif ($data->end->base !== null) {\n\t\t\t$list['end']['active'] = true;\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_active($data->end) : $this->_item_active($data->end);\n\t\t} else {\n\t\t\t$list['end']['active'] = false;\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);\n\t\t}\n\n\t\tif($this->total > $this->limit){\n\t\t\treturn ($listOverride) ? pagination_list_render($list) : $this->_list_render($list);\n\t\t}\n\t\telse{\n\t\t\treturn '';\n\t\t}\n\t}", "function link_pages($before = '<br />', $after = '<br />', $next_or_number = 'number', $nextpagelink = 'next page', $previouspagelink = 'previous page', $pagelink = '%', $more_file = '')\n {\n }", "function firstArrow(){\n\t\tglobal $paged;\n\n\t\t\n\t\t// This firs set of if's ads the arrows to the pagination\n // if there are more than 2 pages and the page is outside the range, before show the <<\n\t\t \n if($paged > 2 && $paged > $this->range+1 && $this->count < $this->pages) \n\t\t {\n\t\t\t $this->content .= \"<li><a href='\".get_pagenum_link($page).\"'>&laquo;</a></li>\";\n\t\t }\n\t\t\t\t \n\t\t\n\t}", "function prevPage() {\n\tglobal $activePages, $currentView, $currentArticle, $currentArticlePage;\n\t\n\t$root = '/' . $_GET['language'] . '/';\n\t\n\t// If we're on the home page, the prev button should be inactive\n\tif( $currentView == 'home' ) {\n\t\treturn false;\n\t}\n\t// If we're on the credits page, the prev button should point to the last article\n\telse if( $currentView == 'credits' ) {\n\t\treturn $root . getArrayLastIndex( $activePages );\n\t}\n\n\tif( empty(nextPrevArticleName('prev')) && $currentArticlePage == '1' ){\n\t\treturn $root;\n\t} elseif( $currentArticlePage == '1' ) {\n\t\treturn $root . nextPrevArticleName('prev') . '/' . $activePages[nextPrevArticleName('prev')]['numberOfPages'];\n\t} elseif($activePages[$currentArticle]['numberOfPages'] >= $currentArticlePage) {\n\t\treturn $root . $currentArticle . '/' . (string)($currentArticlePage-1);\n\t} else {\n\t\treturn $root . $currentArticle;\t\t\n\t}\n}", "function page_navi($before = '', $after = '') {\n\tglobal $wpdb, $wp_query;\n\t$request = $wp_query->request;\n\t$posts_per_page = intval(get_query_var('posts_per_page'));\n\t$paged = intval(get_query_var('paged'));\n\t$numposts = $wp_query->found_posts;\n\t$max_page = $wp_query->max_num_pages;\n\tif ( $numposts <= $posts_per_page ) { return; }\n\tif(empty($paged) || $paged == 0) {\n\t\t$paged = 1;\n\t}\n\t$pages_to_show = 7;\n\t$pages_to_show_minus_1 = $pages_to_show-1;\n\t$half_page_start = floor($pages_to_show_minus_1/2);\n\t$half_page_end = ceil($pages_to_show_minus_1/2);\n\t$start_page = $paged - $half_page_start;\n\tif($start_page <= 0) {\n\t\t$start_page = 1;\n\t}\n\t$end_page = $paged + $half_page_end;\n\tif(($end_page - $start_page) != $pages_to_show_minus_1) {\n\t\t$end_page = $start_page + $pages_to_show_minus_1;\n\t}\n\tif($end_page > $max_page) {\n\t\t$start_page = $max_page - $pages_to_show_minus_1;\n\t\t$end_page = $max_page;\n\t}\n\tif($start_page <= 0) {\n\t\t$start_page = 1;\n\t}\n\techo $before.'<nav class=\"page-navigation\"><ol class=\"grav_page_navi clearfix\">'.\"\";\n\tif ($start_page >= 2 && $pages_to_show < $max_page) {\n\t\t$first_page_text = \"First\";\n\t\techo '<li class=\"bpn-first-page-link\"><a href=\"'.get_pagenum_link().'\" title=\"'.$first_page_text.'\">'.$first_page_text.'</a></li>';\n\t}\n\techo '<li class=\"bpn-prev-link\">';\n\tprevious_posts_link('<<');\n\techo '</li>';\n\tfor($i = $start_page; $i <= $end_page; $i++) {\n\t\tif($i == $paged) {\n\t\t\techo '<li class=\"bpn-current\">'.$i.'</li>';\n\t\t} else {\n\t\t\techo '<li><a href=\"'.get_pagenum_link($i).'\">'.$i.'</a></li>';\n\t\t}\n\t}\n\techo '<li class=\"bpn-next-link\">';\n\tnext_posts_link('>>');\n\techo '</li>';\n\tif ($end_page < $max_page) {\n\t\t$last_page_text = \"Last\";\n\t\techo '<li class=\"bpn-last-page-link\"><a href=\"'.get_pagenum_link($max_page).'\" title=\"'.$last_page_text.'\">'.$last_page_text.'</a></li>';\n\t}\n\techo '</ol></nav>'.$after.\"\";\n}", "function display_links($max_page_links, $parameters = '') {\n global $request_type;\n\n $display_links_string = '';\n\n $class = '';\n\n if (zen_not_null($parameters) && (substr($parameters, -1) != '&')) $parameters .= '&';\n\n // previous button - not displayed on first page\n if ($this->current_page_number > 1) $display_links_string .= '<a href=\"' . zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=' . ($this->current_page_number - 1), $request_type) . '\" title=\" ' . PREVNEXT_TITLE_PREVIOUS_PAGE . ' \"><span class=\"prev_page\">' . PREVNEXT_BUTTON_PREV . '</span></a>';\n\n // check if number_of_pages > $max_page_links\n $cur_window_num = intval($this->current_page_number / $max_page_links);\n if ($this->current_page_number % $max_page_links) $cur_window_num++;\n\n $max_window_num = intval($this->number_of_pages / $max_page_links);\n if ($this->number_of_pages % $max_page_links) $max_window_num++;\n\n // previous window of pages\n if ($cur_window_num > 1) $display_links_string .= '<a href=\"' . zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=' . (($cur_window_num - 1) * $max_page_links), $request_type) . '\" title=\" ' . sprintf(PREVNEXT_TITLE_PREV_SET_OF_NO_PAGE, $max_page_links) . ' \">...</a>';\n\n // page nn button\n for ($jump_to_page = 1 + (($cur_window_num - 1) * $max_page_links); ($jump_to_page <= ($cur_window_num * $max_page_links)) && ($jump_to_page <= $this->number_of_pages); $jump_to_page++) {\n if ($jump_to_page == $this->current_page_number) {\n $display_links_string .= '&nbsp;<strong class=\"current\">' . $jump_to_page . '</strong>';\n } else {\n $display_links_string .= '&nbsp;<a href=\"' . zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=' . $jump_to_page, $request_type) . '\" title=\" ' . sprintf(PREVNEXT_TITLE_PAGE_NO, $jump_to_page) . ' \"><span>' . $jump_to_page . '</span></a>';\n }\n }\n\n // next window of pages\n if ($cur_window_num < $max_window_num) $display_links_string .= '<a href=\"' . zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=' . (($cur_window_num) * $max_page_links + 1), $request_type) . '\" title=\" ' . sprintf(PREVNEXT_TITLE_NEXT_SET_OF_NO_PAGE, $max_page_links) . ' \">...</a>&nbsp;';\n\n // next button\n if (($this->current_page_number < $this->number_of_pages) && ($this->number_of_pages != 1)) $display_links_string .= '<a href=\"' . zen_href_link($_GET['main_page'], $parameters . 'page=' . ($this->current_page_number + 1), $request_type) . '\" title=\" ' . PREVNEXT_TITLE_NEXT_PAGE . ' \"><span class=\"next_page\">' . PREVNEXT_BUTTON_NEXT . '</span></a>';\n\n if ($display_links_string == '&nbsp;<strong class=\"current\">1</strong>&nbsp;') {\n return '&nbsp;';\n } else {\n return $display_links_string;\n }\n }", "private function pagenav($num) {\n $lastpage = ceil($this->factory->getCount('history') / $this->itemsPerPage);\n $parms = array(\n 'first' => 1,\n 'previous' => (max($num-1,1)),\n 'next' => min($num+1,$lastpage),\n 'last' => $lastpage\n );\n return $this->parser->parse('itemnav',$parms,true);\n }", "private function beginning()\n {\n if ($this->current_page - 1 >= 1) {\n return '<li><a href=\"' . ($this->current_page - 1) . '\">«</a></li>';\n } else {\n return '<li class=\"disabled\"><a href=\"#\">«</a></li>';\n }\n }", "function pagination($currentPage, $itemCount, $itemsPerPage, $adjacentCount, $pageLinkTemplate, $showPrevNext = true) {\n $firstPage = 1;\n $lastPage = ceil($itemCount / $itemsPerPage);\n if ($lastPage <= 1) {\n return;\n }\n if ($currentPage <= $adjacentCount + $adjacentCount) {\n $firstAdjacentPage = $firstPage;\n $lastAdjacentPage = min($firstPage + $adjacentCount + $adjacentCount, $lastPage);\n } elseif ($currentPage > $lastPage - $adjacentCount - $adjacentCount) {\n $lastAdjacentPage = $lastPage;\n $firstAdjacentPage = $lastPage - $adjacentCount - $adjacentCount;\n } else {\n $firstAdjacentPage = $currentPage - $adjacentCount;\n $lastAdjacentPage = $currentPage + $adjacentCount;\n }\n echo '<ul class = \"pagination\">';\n if ($showPrevNext) {\n echo '<li>';\n if ($currentPage == $firstPage) {\n echo '<a class=\"inactive_link\"><span class=\"glyphicon glyphicon-chevron-left\"></span></a>';\n } else {\n echo '<a href=\"' . (is_callable($pageLinkTemplate) ? $pageLinkTemplate($currentPage - 1) : sprintf($pageLinkTemplate, $currentPage - 1)) . '\"><span class=\"glyphicon glyphicon-chevron-left\"></span></a>';\n }\n echo '</li>';\n }\n if ($firstAdjacentPage > $firstPage) {\n echo '<li>';\n echo '<a href=\"' . (is_callable($pageLinkTemplate) ? $pageLinkTemplate($firstPage) : sprintf($pageLinkTemplate, $firstPage)) . '\">' . $firstPage . '</a>';\n if ($firstAdjacentPage > $firstPage + 1) {\n echo '<a class=\"inactive_link\" id=\"ellipsis1\">...</a>';\n }\n echo '</li>';\n }\n for ($i = $firstAdjacentPage; $i <= $lastAdjacentPage; $i++) {\n if ($currentPage == $i) {\n echo '<li class=\"chosen_link\"><a class=\"inactive_link\"><span>' . $i . '</span></a></li>';\n } else {\n echo '<li><a href=\"' . (is_callable($pageLinkTemplate) ? $pageLinkTemplate($i) : sprintf($pageLinkTemplate, $i)) . '\">' . $i . '</a></li>';\n }\n }\n if ($lastAdjacentPage < $lastPage) {\n echo '<li>';\n if ($lastAdjacentPage < $lastPage - 1) {\n echo '<a class=\"inactive_link\" id=\"ellipsis2\">...</a>';\n }\n echo '<a href=\"' . (is_callable($pageLinkTemplate) ? $pageLinkTemplate($lastPage) : sprintf($pageLinkTemplate, $lastPage)) . '\">' . $lastPage . '</a>';\n echo '</li>';\n }\n if ($showPrevNext) {\n echo '<li>';\n if ($currentPage == $lastPage) {\n echo '<a class=\"inactive_link\"><span class=\"glyphicon glyphicon-chevron-right\"></span></a>';\n } else {\n echo '<a href=\"' . (is_callable($pageLinkTemplate) ? $pageLinkTemplate($currentPage + 1) : sprintf($pageLinkTemplate, $currentPage + 1)) . '\"><span class=\"glyphicon glyphicon-chevron-right\"></span></a>';\n }\n echo '</li>';\n }\n echo '</ul>';\n}", "function displayPaging() \r\n {\r\n $self = $_SERVER['PHP_SELF'];\r\n if($this->openPage<=0) {\r\n $next = 2;\r\n }\r\n\r\n else {\r\n $next = $this->openPage+1;\r\n }\r\n $prev = $this->openPage-1;\r\n $last = $this->pages;\r\n\t\t$queryString = '';\r\n\t\t\r\n\t\tif ($_GET['keywords']!= '') {\r\n\t\t\t$queryString .= '&keywords='.$_GET['keywords'];\r\n\t\t}\r\n\t\t\r\n\t\tif ($_GET['sort'] != '') {\r\n\t\t\t$queryString .= '&sort='.$_GET['sort'];\r\n\t\t}\r\n\t\t\r\n\t\tif ($_GET['filters']!='') {\r\n\t\t\t$queryString .= '&filters='.$_GET['filters'];\r\n\t\t}\r\n\t\t\t\t\t\r\n\t\tif ($_GET['cat']!='') {\r\n\t\t\t$queryString .= '&cat='.$_GET['cat'];\r\n\t\t}\r\n\t\t\r\n\t\tif ($_GET['media']!='') {\r\n\t\t\t$queryString .= '&media='.$_GET['media'];\r\n\t\t}\r\n\t\tif ($_GET['content']!='') {\r\n\t\t\t$queryString .= '&content='.$_GET['content'];\r\n\t\t}\r\n\t\tif ($_GET['genre']!='') {\r\n\t\t\t$queryString .= '&genre='.$_GET['genre'];\r\n\t\t}\r\n\r\n if($this->openPage > 1) {\r\n echo \",<a href=\\\"\".$_SERVER['SCRIPT_NAME'].\"?page=1\".$queryString.\"\\\">\";\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t\techo \"First</a><span style='color:#e5e5e5; padding-left:2px;padding-right:2px;'>|</span>\";\r\n \techo \",<a href=\\\"\".$_SERVER['SCRIPT_NAME'].\"?page=$prev\".$queryString.\"\\\">\";\r\n\t\t\t\t\t\r\n\t\t\techo \"Prev</a>]&nbsp;&nbsp;\";\r\n }\r\n else {\r\n echo \"[First<span style='color:#e5e5e5; padding-left:2px;padding-right:2px;'>|</span>\";\r\n echo \"Prev]&nbsp;&nbsp;\";\r\n }\r\n for($i=1;$i<=$this->pages;$i++) {\r\n if($i == $this->openPage) \r\n\t\t\t\tif ($i==1)\r\n \techo \"$i\";\r\n\t\t\t\telse \r\n\t\t\t\t\t echo \", $i\";\r\n else\r\n\t\t\tif ($i==1) {\r\n \t\techo \",<a href=\\\"\".$_SERVER['SCRIPT_NAME'].\"?page=$i\".$queryString.\"\\\">$i</a>\";\r\n\t\t\t\t}else{ \r\n \t\techo \",<a href=\\\"\".$_SERVER['SCRIPT_NAME'].\"?page=$i\".$queryString.\"\\\">$i</a>\";\r\n } }\r\n if($this->openPage < $this->pages) {\r\n echo \",<a href=\\\"\".$_SERVER['SCRIPT_NAME'].\"?page=$next\".$queryString.\"\\\">Next</a><span style='color:#e5e5e5; padding-left:2px;padding-right:2px;'>|</span>\";\r\n echo \",<a href=\\\"\".$_SERVER['SCRIPT_NAME'].\"?page=$last\".$queryString.\"\\\">Last</a>]\";\r\n }\r\n else {\r\n echo \"&nbsp;&nbsp;[Next<span style='color:#e5e5e5; padding-left:2px;padding-right:2px;'>|</span>\";\r\n echo \"Last]\";\r\n } \r\n }", "function add_navigation($tp, $page, $npages, $order, $mode, $extra_params)\n{\n #\n # Display links to change mode or ordering\n #\n $params = [\n 'page' => 1,\n 'order' => $order,\n ];\n $params = array_merge($params, $extra_params);\n\n if ($mode == \"thumbnail\") {\n $params[\"mode\"] = \"listing\";\n $tp['alt_display_label'] = 'Listing';\n } else {\n $params[\"mode\"] = \"thumbnail\";\n $tp['alt_display_label'] = 'Thumbnails';\n }\n $tp['ne_alt_display_url'] = encode_argv_url($params);\n\n $params = [\n 'page' => 1,\n 'mode' => $mode,\n ];\n $params = array_merge($params, $extra_params);\n\n if ($order == \"location\") {\n $params[\"order\"] = \"year\";\n $tp['alt_order_label'] = 'Year';\n } else {\n $params[\"order\"] = \"location\";\n $tp['alt_order_label'] = 'Location';\n }\n $tp['ne_alt_order_url'] = encode_argv_url($params);\n\n if ($npages <= 1) {\n return $tp;\n }\n\n if ($mode == \"thumbnail\") {\n #\n # Instantiate the page navigation templates for the top and bottom of\n # the page\n #\n $tp['page'] = $page;\n $tp['npages'] = $npages;\n\n $params = [\n 'mode' => $mode,\n 'order' => $order,\n ];\n $params = array_merge($params, $extra_params);\n\n if ($page > 1) {\n $params['page'] = 1;\n $tp['ne_nav_first_page_url'] = encode_argv_url($params);\n $params['page'] = $page - 1;\n $tp['ne_nav_prev_page_url'] = encode_argv_url($params);\n }\n\n if ($page < $npages) {\n $params['page'] = $page + 1;\n $tp['ne_nav_next_page_url'] = encode_argv_url($params);\n $params['page'] = $npages;\n $tp['ne_nav_last_page_url'] = encode_argv_url($params);\n }\n }\n\n return $tp;\n}", "public function main_navigation(){\r\n\r\n echo \"<ul>\";\r\n\r\n if(isset($this->navigationSettings)){\r\n\r\n foreach((array) $this->navigationSettings as $key => $value){\r\n echo \"<li>\";\r\n echo \"<a href='$value'>$key</a>\";\r\n echo \"</li>\";\r\n }\r\n\r\n }\r\n\r\n echo \"</ul>\";\r\n\r\n }", "function single_posts_nav() {\n \n $prev_post = get_previous_post();\n $next_post = get_next_post();\n ?>\n <nav class=\"single-box clearfix nav-single\">\n <?php if ( !empty( $prev_post ) ) { ?>\n <div class=\"nav-previous\">\n <?php previous_post_link ( '%link', '<i class=\"icomoon-chevron-left\"></i><span class=\"nav-title\">' . __( 'Artículo anterior', 'themetext' ) . '</span>%title', TRUE ); ?>\n </div>\n <?php } ?>\n\n <?php if ( !empty( $next_post ) ){ ?>\n <div class=\"nav-next\">\n <?php next_post_link( '%link', '<i class=\"icomoon-chevron-right\"></i><span class=\"nav-title\">' . __( 'Siguiente artículo', 'themetext' ) . '</span>%title', TRUE ); ?>\n </div>\n <?php } ?>\n </nav><!-- .nav-single -->\n\n <?php\n}", "function studiare_wp_link_pages() {\n\t$defaults = array(\n\t\t'before' => '<div class=\"page-numbers studiare_wp_link_pages\">',\n\t\t'after' => '</div>',\n\t\t'link_before' => '<div class=\"page-number\">',\n\t\t'link_after' => '</div>',\n\t\t'next_or_number' => 'number',\n\t\t'separator' => ' ',\n\t\t'nextpagelink' => esc_html__('Next page', 'studiare'),\n\t\t'previouspagelink' => esc_html__('Previous page', 'studiare'),\n\t\t'pagelink' => '%',\n\t\t'echo' => 1\n\t);\n\n\twp_link_pages($defaults);\n}", "function page_navi($before = '', $after = '') {\n\tglobal $wpdb, $wp_query;\n\t$request = $wp_query->request;\n\t$posts_per_page = intval(get_query_var('posts_per_page'));\n\t$paged = intval(get_query_var('paged'));\n\t$numposts = $wp_query->found_posts;\n\t$max_page = $wp_query->max_num_pages;\n\tif ( $numposts <= $posts_per_page ) { return; }\n\tif(empty($paged) || $paged == 0) {\n\t\t$paged = 1;\n\t}\n\t$pages_to_show = 7;\n\t$pages_to_show_minus_1 = $pages_to_show-1;\n\t$half_page_start = floor($pages_to_show_minus_1/2);\n\t$half_page_end = ceil($pages_to_show_minus_1/2);\n\t$start_page = $paged - $half_page_start;\n\tif($start_page <= 0) {\n\t\t$start_page = 1;\n\t}\n\t$end_page = $paged + $half_page_end;\n\tif(($end_page - $start_page) != $pages_to_show_minus_1) {\n\t\t$end_page = $start_page + $pages_to_show_minus_1;\n\t}\n\tif($end_page > $max_page) {\n\t\t$start_page = $max_page - $pages_to_show_minus_1;\n\t\t$end_page = $max_page;\n\t}\n\tif($start_page <= 0) {\n\t\t$start_page = 1;\n\t}\n\techo $before.'<nav class=\"page-navigation pagination\"><ol class=\"bones_page_navi clearfix\">'.\"\";\n\tif ($start_page >= 2 && $pages_to_show < $max_page) {\n\t\t$first_page_text = \"First\";\n\t\techo '<li class=\"bpn-first-page-link\"><a href=\"'.get_pagenum_link().'\" title=\"'.$first_page_text.'\">'.$first_page_text.'</a></li>';\n\t}\n\techo '<li class=\"bpn-prev-link\">';\n\tprevious_posts_link('<<');\n\techo '</li>';\n\tfor($i = $start_page; $i <= $end_page; $i++) {\n\t\tif($i == $paged) {\n\t\t\techo '<li class=\"bpn-current\">'.$i.'</li>';\n\t\t} else {\n\t\t\techo '<li><a href=\"'.get_pagenum_link($i).'\">'.$i.'</a></li>';\n\t\t}\n\t}\n\techo '<li class=\"bpn-next-link\">';\n\tnext_posts_link('>>');\n\techo '</li>';\n\tif ($end_page < $max_page) {\n\t\t$last_page_text = \"Last\";\n\t\techo '<li class=\"bpn-last-page-link\"><a href=\"'.get_pagenum_link($max_page).'\" title=\"'.$last_page_text.'\">'.$last_page_text.'</a></li>';\n\t}\n\techo '</ol></nav>'.$after.\"\";\n}", "function page_links($url, $nitems, $items_per_page, $start){\n // How many pages to potentially show before and after this one:\n $preshow = 3;\n $postshow = 3;\n\n $x = \"\";\n \n if ($nitems <= $items_per_page) return \"\";\n $npages = ceil($nitems / $items_per_page);\n $curpage = ceil($start / $items_per_page);\n\n // If this is not the first page, display \"previous\"\n //\n if ($curpage > 0){\n $x .= page_link(\n $url, $curpage-1, $items_per_page,\n tra(\"Previous\").\" &middot; \"\n );\n }\n\n if ($curpage - $preshow > 0) {\n $x .= page_link($url, 0, $items_per_page, \"1\");\n if ($curpage - $preshow > 1) {\n $x .= \" . . . \";\n } else {\n $x .= \" &middot; \";\n }\n }\n // Display a list of pages surrounding this one\n //\n for ($i=$curpage-$preshow; $i<=$curpage+$postshow; $i++){\n $page_str = (string)($i+1);\n if ($i < 0) continue;\n if ($i >= $npages) break;\n\n if ($i == $curpage) {\n $x .= \"<b>$page_str</b>\";\n } else {\n $x .= page_link($url, $i, $items_per_page, $page_str);\n }\n if ($i == $npages-1) break;\n if ($i == $curpage+$postshow) break;\n $x .= \" &middot; \";\n }\n\n if ($curpage + $postshow < $npages-1) {\n $x .= \" . . . \";\n $x .= page_link($url, $npages-1, $items_per_page, $npages);\n }\n // If there is a next page\n //\n if ($curpage < $npages-1){\n $x .= page_link(\n $url, $curpage+1, $items_per_page,\n \" &middot; \".tra(\"Next\")\n );\n }\n $x .= \"\\n\";\n return $x;\n}", "static public function NavBarTop() {\n\t\t$show_back = (strlen(self::$prev_page) > 0);\n\t\t$show_home = (strlen(self::$first_page) > 0);\n\t\t$show_next = (strlen(self::$next_page) > 0);\n\n\t\tif (!$show_back && !$show_home && !$show_next) {\n\t\t\treturn null;\n\t\t}\n\n\t\techo '<div class=\"center\" style=\"margin-top:-12px;margin-bottom:-18px;height:30px;\">';\n\t\tif ($show_back) {\n\t\t\techo '<a href=\"', self::$prev_page, '\">';\n\t\t\techo '<img alt=\"', (self::isGerman() ? 'Zurück' : 'Back'), '\" title=\"', (self::isGerman() ? 'Zurück' : 'Back'), '\" class=\"arrow_left {PNGCSS}\" src=\"', self::getImageURL(), '/arrow_left.png\" width=\"30\" height=\"15\" />';\n\t\t\techo '</a>';\n\t\t}else {\n\t\t\techo '<img alt=\"dummy\" title=\"\" src=\"', self::getImageURL(), '/blank.gif\" width=\"30\" height=\"30\" />';\n\t\t}\n\t\tif ($show_home) {\n\t\t\techo '<a href=\"', self::$first_page, '\">';\n\t\t\techo '<img alt=\"', (self::isGerman() ? 'Inhalt' : 'Content'), '\" title=\"', (self::isGerman() ? 'Inhalt' : 'Content'), '\" class=\"arrow_content {PNGCSS}\" src=\"', self::getImageURL(), '/arrow_info.png\" width=\"30\" height=\"26\" />';\n\t\t\techo '</a>';\n\t\t}else {\n\t\t\techo '<img alt=\"dummy\" title=\"\" src=\"', self::getImageURL(), '/blank.gif\" width=\"30\" height=\"30\" />';\n\t\t}\n\t\tif ($show_next) {\n\t\t\techo '<a href=\"', self::$next_page, '\">';\n\t\t\techo '<img alt=\"', (self::isGerman() ? 'Weiter' : 'Next'), '\" title=\"', (self::isGerman() ? 'Weiter' : 'Next'), '\" class=\"arrow_right {PNGCSS}\" src=\"', self::getImageURL(), '/arrow_right.png\" width=\"30\" height=\"15\" />';\n\t\t\techo '</a>';\n\t\t}else {\n\t\t\techo '<img alt=\"dummy\" title=\"\" src=\"', self::getImageURL(), '/blank.gif\" width=\"30\" height=\"30\" />';\n\t\t}\n\t\techo '</div>';\n\t}", "function orbital_post_nav() {\n \n $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n $next = get_adjacent_post( false, '', false );\n \n if ( ! $next && ! $previous ) { return; } ?>\n \n <nav class=\"nav--posts\">\n \n <?php\n previous_post_link( '<div class=\"nav__previous\">%link</div>', _x( '<span class=\"meta-nav\">&larr;</span>&nbsp;%title', 'Previous post link', 'rj' ) );\n next_post_link( '<div class=\"nav__next\">%link</div>', _x( '%title&nbsp;<span class=\"meta-nav\">&rarr;</span>', 'Next post link', 'rj' ) );\n ?>\n \n </nav>\n \n <?php\n}", "function f3f_horizontal_nav() { \r\n\tif( get_option( 'f3_horizontal_nav', 'true' ) != 'true' )\r\n\t\treturn;\r\n\r\n\trewind_posts(); ?>\r\n\r\n\t<nav id=\"page\">\r\n\t\t<ul>\r\n\t\t<?php while ( have_posts() ) : the_post(); ?>\r\n\t\t\t<li>\r\n\t\t\t\t<h6><a href=\"#article-<?php the_ID(); ?>\"><?php the_title(); ?></a></h6>\r\n\t\t\t\t<a href=\"#article-<?php the_ID(); ?>\">Post <?php the_ID(); ?></a>\r\n\t\t\t</li>\r\n\t\t<?php endwhile; ?>\r\n\t\t</ul>\r\n\t</nav>\r\n\t<?php\r\n}", "public function enableNavigation() {\n\t\t$this->enableNav = true;\n\t}", "function bab_pm_PrevNextLink($event, $topage, $label, $type, $sort = '', $dir = '', $crit = '', $method = '')\n{\n return join('', array(\n '<a href=\"?event='.$event.a.'step=subscribers'.a.'page='.$topage,\n ($sort) ? a.'sort='.$sort : '',\n ($dir) ? a.'dir='.$dir : '',\n ($crit) ? a.'crit='.$crit : '',\n ($method) ? a.'method='.$method : '',\n '\" class=\"navlink\">',\n ($type==\"prev\") ? '&#8249;'.sp.$label : $label.sp.'&#8250;',\n '</a>'\n ));\n}", "public function previousAction()\n {\n $this->pageAction('goToPreviousPage');\n }", "function fc_pagination_prevpage($paged, $max_page, $prevpage) {\n if( $max_page > 1 && $paged > 1 )\n $pagingString = '<li class=\"prev\"><a href=\"'.get_pagenum_link($paged-1). '\">'.$prevpage.'</a></li>';\n return $pagingString;\n}", "function admin_navi($pg_list, $prev, $next, $current_pg, $url, $count = 10)\n {\n\n $url = HOME_URL . $url;\n $html = null;\n $html .= \"<ul> \";\n if ($prev == 0) {\n $html .= \"<li class=\\\"prev\\\"></li> \";\n } else {\n $html .= \"<li class=\\\"prev\\\"><a href=\\\"\" . $url . $prev . \"\\\">&laquo; PREV</a></li> \";\n }\n\n if ($count > count($pg_list)) $count = count($pg_list);\n $interval = round($count / 2);\n $max = $current_pg + $interval + 1;\n $min = $current_pg - $interval + 1;\n if ($max > (count($pg_list) + 1)) {\n $max = (count($pg_list) + 1);\n $min = $max - $count;\n }\n if ($min < 1) {\n $min = 1;\n $max = $count + 1;\n }\n for ($i = $min; $i < $max; ++$i) {\n if ($current_pg == $i) {\n $html .= \"<li><em>\" . $i . \"</em></li> \";\n } else {\n $html .= \"<li><a href=\\\"\" . $url . $i . \"\\\">\" . $i . \"</a></li> \";\n }\n }\n\n if ($next == 0) {\n $html .= \"<li class=\\\"next\\\"></li> \";\n } else {\n $html .= \"<li class=\\\"next\\\"><a href=\\\"\" . $url . $next . \"\\\">NEXT &raquo;</a></li> \";\n }\n $html .= \"</ul> \";\n\n return $html;\n }", "function storefront_post_nav() {\n $args = array(\n 'next_text' => '<span class=\"screen-reader-text\">' . esc_html__( 'Next post:', 'storefront' ) . ' </span>%title',\n 'prev_text' => '<span class=\"screen-reader-text\">' . esc_html__( 'Previous post:', 'storefront' ) . ' </span>%title',\n );\n // the_post_navigation( $args );\n}", "function page_print_page_format_navigation($cm = null, $backtocourse = false, $return = false) {\n course_page::print_page_format_navigation($cm, $backtocourse, $return);\n}", "function generate_page_nav ( $db ){\n\t\treturn \"\n\t\t\t\t\".generate_site_nav($db);\n\t}", "function nextPage($text='next')\n\t{\n\t\tif (empty($this->_pageDetails)) { return false; }\n\t\tif (!empty($this->_pageDetails['nextPage']))\n\t\t{\n\t\t\tif($this->style == 'ajax')\n\t\t\t{\t\n\t\t\t\t//$t = $this->Ajax->linkToRemote($text, array(\"fallback\"=>$this->action.\"#\",\"url\" => $this->link.$this->_pageDetails['nextPage'],\"update\" => \"ajax_update\",\"method\"=>\"get\"));\n\t\t\t\t$t = $this->Ajax->link($text, $this->link.$this->_pageDetails['nextPage'],array(\"update\" => \"ajax_update\",\"method\"=>\"get\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$t = $this->Html->link('<strong>' . $text . '</strong>',$this->link.$this->_pageDetails['nextPage'], false, false, false);\n\t\t\t}\n\t\t\treturn $t;\n\t\t}\t\n\t\t//return '<span><strong>' . $text . '</strong></span>';\n\t\treturn false;\n\t}", "function cpl_print_button_pages($numArticle, $buttonSelected){\r\n if($numArticle != 0) {\r\n echo '<section>',\r\n '<p>Pages : </p>';\r\n for ($i=0; $i < $numArticle/4; $i++) {\r\n if($i+1 == $buttonSelected) {\r\n echo '<a id=\"linkDown\">',$i+1,'</a>';\r\n } else {\r\n echo '<a href=\"actus.php?buttonPage=',cp_encrypt_url([$i+1]),'\">',$i+1,'</a>';\r\n }\r\n }\r\n echo '</section>';\r\n }\r\n }", "function classiera_paging_nav() {\r\n\tglobal $wp_query;\r\n\r\n\t// Don't print empty markup if there's only one page.\r\n\tif ( $wp_query->max_num_pages < 2 )\r\n\t\treturn;\r\n\t?>\r\n\t<nav class=\"navigation paging-navigation\" role=\"navigation\">\r\n\t\t<h1 class=\"screen-reader-text\"><?php esc_html_e( 'Posts navigation', 'classiera' ); ?></h1>\r\n\t\t<div class=\"nav-links\">\r\n\r\n\t\t\t<?php if ( get_next_posts_link() ) : ?>\r\n\t\t\t<div class=\"nav-previous\"><?php next_posts_link(wp_kses( __( '<span class=\"meta-nav\">&larr;</span> Older posts', 'classiera' ), $allowed ) ); ?></div>\r\n\t\t\t<?php endif; ?>\r\n\r\n\t\t\t<?php if ( get_previous_posts_link() ) : ?>\r\n\t\t\t<div class=\"nav-next\"><?php previous_posts_link(wp_kses( __( 'Newer posts <span class=\"meta-nav\">&rarr;</span>', 'classiera' ), $allowed ) ); ?></div>\r\n\t\t\t<?php endif; ?>\r\n\r\n\t\t</div><!-- .nav-links -->\r\n\t</nav><!-- .navigation -->\r\n\t<?php\r\n}", "function howes_post_nav() {\n\tglobal $post;\n\n\t// Don't print empty markup if there's nowhere to navigate.\n\t$previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );\n\t$next = get_adjacent_post( false, '', false );\n\n\tif ( ! $next && ! $previous )\n\t\treturn;\n\t?>\n\t<nav class=\"navigation post-navigation\" role=\"navigation\">\n\t\t<div class=\"nav-links\">\n\t\t\t<?php previous_post_link( '%link', __( '<span class=\"meta-nav\"></span> Previous', 'howes' ) ); ?>\n\t\t\t<?php next_post_link( '%link', __( 'Next <span class=\"meta-nav\"></span>', 'howes' ) ); ?>\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "function tempera_comments_navigation() {\nif ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>\n\t\t\t<div class=\"navigation\">\n\t\t\t\t<div class=\"nav-previous\"><?php previous_comments_link( '<i class=\"icon-reply\"></i>'.__('Older Comments', 'tempera' ) ); ?></div>\n\t\t\t\t<div class=\"nav-next\"><?php next_comments_link( __( 'Newer Comments', 'tempera' ).'<i class=\"icon-forward\"></i>' ); ?></div>\n\t\t\t</div> <!-- .navigation -->\n<?php endif; // check for comment navigation \n}", "function display_links_version2($max_page_links, $parameters = '') {\n global $request_type;\n $display_links_string = '';\n $class = '';\n\n if (zen_not_null($parameters) && (substr($parameters, -1) != '&')) $parameters .= '&';\n\n \n // check if number_of_pages > $max_page_links\n $cur_window_num = intval($this->current_page_number / $max_page_links);\n if ($this->current_page_number % $max_page_links) $cur_window_num++;\n\n $max_window_num = intval($this->number_of_pages / $max_page_links);\n if ($this->number_of_pages % $max_page_links) $max_window_num++; \n // previous window of pages\n if ($cur_window_num > 1) \n {\n \t$previous_window_cur = \n \t$display_links_string .= '<p class=\"b\"><a href=\"' . zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=1', $request_type) . '\" title=\" ' . sprintf(PREVNEXT_TITLE_PREV_SET_OF_NO_PAGE, $max_page_links) . ' \"><img border=\"0\" src=\"/images/pre0.gif\"></a></p>'; \t\n }\n else \n {\n \t$display_links_string .= '<p class=\"b\"><img border=\"0\" src=\"/images/pre.gif\"></p>';\n }\n \n // previous button - not displayed on first page\n if ($this->current_page_number > 1) \n {\n \t$display_links_string .= '<p class=\"b\"><a href=\"' . zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=' . ($this->current_page_number - 1), $request_type) . '\" title=\" ' . PREVNEXT_TITLE_PREVIOUS_PAGE . ' class=\"pp\"><img border=\"0\" src=\"/images/pre_10.gif\"></a></p>'; \n }\n else \n {\n \t$display_links_string .= '<p class=\"b\"><img border=\"0\" src=\"/images/pre_1.gif\"></p>';\n }\n \n for($i=1;$i <= $this->number_of_pages;$i++){\n\t\t\t$pageSplit[] = array('id' => $i,'text'=>$i);\n\t}\n\t$display_links_string .='<p class=\"listspan\">';\n // page nn button\n $half_none_cur_window_num = intval(($max_page_links-1)/2);\n $half_none_cur_window_num = $half_none_cur_window_num==0?1:$half_none_cur_window_num ;\n $left_start_at_page=0;\n if ( $this->current_page_number<$half_none_cur_window_num)\n {\n \t$left_start_at_page = 1;\n }\n elseif (($this->number_of_pages- $this->current_page_number)<=$half_none_cur_window_num)\n {\n \t$left_start_at_page = $this->current_page_number-($max_page_links-($this->number_of_pages- $this->current_page_number));\n }\n else \n {\n \t$left_start_at_page = $this->current_page_number-$half_none_cur_window_num-1;\n }\n $left_start_at_page = $left_start_at_page<0?1:$left_start_at_page;\n for ($jump_to_page = $left_start_at_page; ($jump_to_page <= $left_start_at_page+$max_page_links) && ($jump_to_page <= $this->number_of_pages); $jump_to_page++) { \n if ($jump_to_page == $this->current_page_number) {\n $display_links_string .= '<strong class=\"r\">' . $jump_to_page . '</strong>&nbsp;&nbsp;';\n } else {\n $display_links_string .= '<a href=\"' . zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=' . $jump_to_page, $request_type) . '\" title=\" ' . sprintf(PREVNEXT_TITLE_PAGE_NO, $jump_to_page) . ' \">' . $jump_to_page . '</a>';\n }\n } \n $display_links_string .='</p>';\n // next button\n if (($this->current_page_number < $this->number_of_pages) && ($this->number_of_pages != 1)) \n {\n \t$display_links_string .= '<p class=\"b\"><a href=\"' . zen_href_link($_GET['main_page'], $parameters . 'page=' . ($this->current_page_number + 1), $request_type) . '\" title=\" ' . PREVNEXT_TITLE_NEXT_PAGE . ' \"><img border=\"0\" src=\"/images/next0.gif\"></a></p>';\n }\n else \n {\n \t$display_links_string .= '<p class=\"b\"><img border=\"0\" src=\"/images/next.gif\"></p>';\n }\n \n // next window of pages\n if ($cur_window_num < $max_window_num) \n {\n \t$display_links_string .= '<p class=\"b\"><a href=\"' . zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=' . $this->number_of_pages, $request_type) . '\" title=\" ' . sprintf(PREVNEXT_TITLE_NEXT_SET_OF_NO_PAGE, $max_page_links) . ' \"><img border=\"0\" src=\"/images/next_10.gif\"></a></p>';\n }\n else \n {\n \t$display_links_string .= '<p class=\"b\"><img border=\"0\" src=\"/images/next_1.gif\"></p>';\n }\n\n // go to the page\n $display_links_string .= '<p>&nbsp;Go To&nbsp;';\n $display_links_string .= zen_draw_pull_down_menu('page',$pageSplit,isset($_GET['page'])?$_GET['page']:'','onchange=\"changePage(this,\\''.cleanSameArg('page').'\\');\" class=\"select1\" rel=\"dropdown\"').'</p>';\n \n if ($display_links_string == '&nbsp;<strong class=\"current\">1</strong>&nbsp;') {\n return '&nbsp;';\n } else {\n return $display_links_string;\n }\n }", "function ming_paging_nav() {\n\t// Don't print empty markup if there's only one page.\n\tif ( $GLOBALS['wp_query']->max_num_pages < 2 ) {\n\t\treturn;\n\t}\n\n\t$paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;\n\t$pagenum_link = html_entity_decode( get_pagenum_link() );\n\t$query_args = array();\n\t$url_parts = explode( '?', $pagenum_link );\n\n\tif ( isset( $url_parts[1] ) ) {\n\t\twp_parse_str( $url_parts[1], $query_args );\n\t}\n\n\t$pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link );\n\t$pagenum_link = trailingslashit( $pagenum_link ) . '%_%';\n\n\t$format = $GLOBALS['wp_rewrite']->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';\n\t$format .= $GLOBALS['wp_rewrite']->using_permalinks() ? user_trailingslashit( 'page/%#%', 'paged' ) : '?paged=%#%';\n\n\t// Set up paginated links.\n\t$links = paginate_links( array(\n\t\t'base' => $pagenum_link,\n\t\t'format' => $format,\n\t\t'total' => $GLOBALS['wp_query']->max_num_pages,\n\t\t'current' => $paged,\n\t\t'mid_size' => 1,\n\t\t'add_args' => array_map( 'urlencode', $query_args ),\n\t\t'prev_text' => __( '&larr; Previous', 'ming' ),\n\t\t'next_text' => __( 'Next &rarr;', 'ming' ),\n\t) );\n\n\tif ( $links ) :\n\n\t?>\n\t\t<div class=\"pagination loop-pagination\">\n\t\t\t<?php echo $links; ?>\n\t\t</div><!-- .pagination -->\n\t<?php\n\tendif;\n}", "function prevPage($text='prev')\n\t{\n\t\tif (empty($this->_pageDetails)) { return false; }\n\t\tif ( !empty($this->_pageDetails['previousPage']) )\n\t\t{\n\t\t\tif($this->style == 'ajax')\n\t\t\t{\t\n\t\t\t\t//$t = $this->Ajax->linkToRemote($text, array(\"fallback\"=>$this->action.\"#\",\"url\" => $this->link.$this->_pageDetails['previousPage'],\"update\" => \"ajax_update\",\"method\"=>\"get\"));\n\t\t\t\t$t = $this->Ajax->link($text, $this->link.$this->_pageDetails['previousPage'],array(\"update\" => \"ajax_update\",\"method\"=>\"get\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$t = $this->Html->link('<strong>' . $text . '</strong>',$this->link.$this->_pageDetails['previousPage'], false, false, false);\n\t\t\t}\n\t\t\treturn $t;\n\t\t}\t\n\t\t//return '<span><strong>' . $text . '</strong></span>';\n\t\treturn false;\n\t}", "public static function prevpage(){\n\t\t// Make sure that user is not redirected back to Login, Register, ForgotPassword, etc.\n\t\t// List of Pages that user should never get redirected to when logged in\n\t\t$no_redir_pages = array(\"login\", \"register\", \"logout\", \"forgot-password\", \"resend-activation-email\", \"reset-password\", \"activate\",\n\t\t\t\t\t\t\t\t\"Login\", \"Register\", \"Logout\", \"Forgot-Password\", \"Resend-Activation-Email\", \"Reset-Password\", \"Activate\",\n\t\t\t\t\t\t\t\t\"Templates\", \"assets\");\n\t\t// Get Current Page so we have something to compair to\n\t\t$cur_page = $_SERVER['REQUEST_URI'];\n\t\t//Remove the extra forward slash from link\n\t\t$cur_page_a = ltrim($cur_page, DIR);\n\t\t// Get first part of the url (page name)\n\t\t$cur_page_b = explode('/', $cur_page_a);\n\t\t//Add current page to lang change session for redirect\n\t\t$_SESSION['lang_prev_page'] = $cur_page_a;\n\t\t// Check to see if we should log as a previous page\n\t\tif(strpos ($cur_page,\".\" ) === FALSE){\n\t\t\tif(!in_array($cur_page_b[0], $no_redir_pages)){\n\t\t\t\t$_SESSION['login_prev_page'] = $cur_page_a;\n\t\t\t}\n\t\t}\n\t}", "function AdvancedPagination($total, $current, $last) {\n $pages = [];\n if ($current < 1) {\n $current = 1;\n } elseif ($current > $last) {\n $current = $last;\n }\n $pages['current'] = $current;\n $pages['previous'] = ($current == 1) ? $current : $current - 1;\n $pages['next'] = ($current == $last) ? $last : $current + 1;\n $pages['last'] = $last;\n $pages['pages'] = [];\n $show = 5; # Number of page links to show\n #\n # At the beginning\n #\n if ($current == 1) {\n if ($pages['next'] == $current) {\n return $pages; # if one page only\n }\n for ($i = 0; $i < $show; $i++) {\n if ($i == $last) {\n break;\n }\n array_push($pages['pages'], $i + 1);\n }\n return $pages;\n }\n #\n # At the end\n #\n if ($current == $last) {\n $start = $last - $show;\n if ($start < 1) {\n $start = 0;\n }\n for ($i = $start; $i < $last; $i++) {\n array_push($pages['pages'], $i + 1);\n }\n return $pages;\n }\n #\n # In the middle\n #\n $start = $current - $show;\n if (($total > 5) && ($current > 3)) $start = $current - 3;\n if (($last - $current) < 2) $start = $current - 4;\n if ($start < 1) $start = 0;\n for ($i = $start; $i < $current; $i++) {\n array_push($pages['pages'], $i + 1);\n }\n for ($i = ($current + 1); $i < ($current + $show); $i++) {\n if ($i == ($last + 1)) {\n break;\n }\n array_push($pages['pages'], $i);\n }\n return $pages;\n}", "function nav_pages_struct(&$result, $q_string, $count, $REC_PER_PAGE) {\n \n\tglobal $label;\n\tglobal $list_mode;\n\t\n\tif ($list_mode=='PREMIUM') {\n\t\t$page = 'hot.php';\t\t\n\t} else {\n\t\t$page = $_SERVER[PHP_SELF];\n\t}\n\t$offset = $_REQUEST[\"offset\"];\n\t$show_emp = $_REQUEST[\"show_emp\"];\n\t\n\tif ($show_emp != '') {\n\t $show_emp = (\"&show_emp=$show_emp\");\n\t}\n\t$cat = $_REQUEST[\"cat\"];\n\tif ($cat != '') {\n\t $cat = (\"&cat=$cat\");\n\t}\n\t$order_by = $_REQUEST[\"order_by\"];\n\tif ($order_by != '') {\n\t $order_by = (\"&order_by=$order_by\");\n\t}\n\n\t$cur_page = $offset / $REC_PER_PAGE;\n\t$cur_page++;\n\t// estimate number of pages.\n\t$pages = ceil($count / $REC_PER_PAGE);\n\tif ($pages == 1) {\n\t return;\n\t}\n\t$off = 0;\n\t$p=1;\n\t$prev = $offset-$REC_PER_PAGE;\n\t$next = $offset+$REC_PER_PAGE;\n\n\tif ($prev===0) {\n\t\t$prev='';\n\t}\n\n\tif ($prev > -1) {\n\t $nav['prev'] = \"<a href='\".$page.\"?offset=\".$prev.$q_string.$show_emp.$cat.$order_by.\"'>\".$label[\"navigation_prev\"] .\"</a> \";\n\t \n\t}\n\tfor ($i=0; $i < $count; $i=$i+$REC_PER_PAGE) {\n\t if ($p == $cur_page) {\n\t\t $nav['cur_page'] = $p;\n\t\t \n\t\t \n\t } else {\n\t\t if ($off===0) {\n\t\t\t$off='';\n\t\t}\n\t\t if ($nav['cur_page'] !='') {\n\t\t\t $nav['pages_after'][$p] = $off;\n\t\t } else {\n\t\t\t$nav['pages_before'][$p] = $off;\n\t\t }\n\t }\n\t $p++;\n\t $off = $off + $REC_PER_PAGE;\n\t}\n\tif ($next < $count ) \n\t\t$nav['next'] = \" | <a href='\".$page.\"?offset=\".$next.$q_string.$show_emp.$cat.$order_by.\"'> \".$label[\"navigation_next\"].\"</a>\";\n\n\treturn $nav;\n}", "public function loadPreviousPage()\n {\n $prevPage = $this->results->getPreviousPage();\n $this->search($prevPage);\n }", "function pageNav($page, $lastPage, $pageType){\n\n\t\t/* Lets work with integers */\n\t\t$page = (int)$page;\n\n\t\t/* Build navigation */\n\t\t$prev = $page - 1;\n\t\t$next = $page + 1;\n\n\t\t/* Changes URL prefix based on Page Type */\n\t\t$prefix = $_GET[$pageType];\n\n\t\t/* Start HTML */\n\t\t$output = '<nav class=\"pagenav\"><ul>';\n\t\tif($prev !== 0) $output .= '<li class=\"prev\"><a href=\"#!/'.$pageType.'='.$prefix.'&amp;page='.$prev.'\">Previous</a></li>';\n\t\t$output .= '<li class=\"current\"><span class=\"current_page\">'.$page.'</span> of <span class=\"last\">'.$lastPage.'</span></li>';\n\t\tif($page < $lastPage)$output .= '<li class=\"next\"><a href=\"#!/'.$pageType.'&amp;page='.$next.'\">Next</a></li>';\n\t\t$output .= '</ul></nav>';\n\t\t\n\t\t/* Return HTML */\n\t\treturn $output;\n\t}", "function medicalrehab_post_nav() {\r\n\r\n\t// Don't print empty markup if there's nowhere to navigate.\r\n\r\n\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\r\n\r\n\t$next = get_adjacent_post( false, '', false );\r\n\r\n\tif ( ! $next && ! $previous ) {\r\n\r\n\t\treturn;\r\n\r\n\t}\r\n\r\n\t?>\r\n\r\n\t<nav class=\"navigation post-navigation\" role=\"navigation\">\r\n\r\n\t\t<h2 class=\"screen-reader-text\"><?php _e( 'Post navigation', 'medical-rehab' ); ?></h2>\r\n\r\n\t\t<div class=\"nav-links\">\r\n\r\n\t\t\t<?php\r\n\r\n\t\t\t\tprevious_post_link( '<div class=\"nav-previous\">%link</div>', _x( '%title', 'Previous post link', 'medical-rehab' ) );\r\n\r\n\t\t\t\tnext_post_link( '<div class=\"nav-next\">%link</div>', _x( '%title', 'Next post link', 'medical-rehab' ) );\r\n\r\n\t\t\t?>\r\n\r\n\t\t</div><!-- .nav-links -->\r\n\r\n\t</nav><!-- .navigation -->\r\n\r\n\t<?php\r\n\r\n}", "function link_to_previous_item_show($text = null, $props = array())\n{\n if (!$text) {\n $text = __('&larr; Previous Item');\n }\n $item = get_current_record('item');\n if ($previous = $item->previous()) {\n return link_to($previous, 'show', $text, $props);\n }\n}", "function content_nav() {\n\t\t$current_individual_nav_items = 0;\n\t\t$max_individual_nav_items = 4;\n\t\t\n\t\tforeach($this->data['content_actions'] as $key => $item) :\n\t\t\tif ( $current_individual_nav_items == $max_individual_nav_items ) { ?>\n\t\t\t\t<?\n\t\t\t}\n\t\t\t\n\t\t\techo $this->makeListItem( $key, $item );\n\t\t\t$current_individual_nav_items++;\n\t\tendforeach;\n\t\t\n\t\t?></ul></li><?\n\t}", "function classiera_post_nav() {\r\n\tglobal $post;\r\n\r\n\t// Don't print empty markup if there's nowhere to navigate.\r\n\t$previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );\r\n\t$next = get_adjacent_post( false, '', false );\r\n\r\n\tif ( ! $next && ! $previous )\r\n\t\treturn;\r\n\t?>\r\n\t<nav class=\"navigation post-navigation\" role=\"navigation\">\r\n\t\t<h1 class=\"screen-reader-text\"><?php esc_html_e( 'Post navigation', 'classiera' ); ?></h1>\r\n\t\t<div class=\"nav-links\">\r\n\r\n\t\t\t<?php previous_post_link( '%link', _x( '<span class=\"meta-nav\">&larr;</span> %title', 'Previous post link', 'classiera' ) ); ?>\r\n\t\t\t<?php next_post_link( '%link', _x( '%title <span class=\"meta-nav\">&rarr;</span>', 'Next post link', 'classiera' ) ); ?>\r\n\r\n\t\t</div><!-- .nav-links -->\r\n\t</nav><!-- .navigation -->\r\n\t<?php\r\n}", "public function override_next_page() {\n return false;\n }", "function displayPaging()\r\n {\r\n\t $InfoArray = $this->InfoArray();\r\n \r\n\t /* Everything below here are just examples! */\r\n\t\r\n\t /* Print our some info like \"Displaying page 1 of 49\" */\r\n\t echo \"Displaying page \" . $InfoArray[\"CURRENT_PAGE\"] . \" of \" . $InfoArray[\"TOTAL_PAGES\"] . \"<BR>\";\r\n\t echo \"Displaying results \" . $InfoArray[\"START_OFFSET\"] . \" - \" . $InfoArray[\"END_OFFSET\"] . \" of \" . $InfoArray[\"TOTAL_RESULTS\"] . \"<BR>\";\r\n\t\r\n\t /* Print our first link */\r\n\t if($InfoArray[\"CURRENT_PAGE\"]!= 1) {\r\n\t\t echo \"<a href='?page=1'>&lt;&lt;</a> \";\r\n\t } else {\r\n\t\t echo \"&lt;&lt; \";\r\n\t }\r\n\t\r\n\t /* Print out our prev link */\r\n\t if($InfoArray[\"PREV_PAGE\"]) {\r\n\t\t echo \"<a href='?page=\" . $InfoArray[\"PREV_PAGE\"] . \"'>Previous</a> | \";\r\n\t } else {\r\n\t\t echo \"Previous | \";\r\n\t }\r\n\t\r\n\t /* Example of how to print our number links! */\r\n\t for($i=0; $i<count($InfoArray[\"PAGE_NUMBERS\"]); $i++) {\r\n\t\t if($InfoArray[\"CURRENT_PAGE\"] == $InfoArray[\"PAGE_NUMBERS\"][$i]) {\r\n\t\t\t echo $InfoArray[\"PAGE_NUMBERS\"][$i] . \" | \";\r\n\t\t } else {\r\n\t\t\t echo \"<a href='?page=\" . $InfoArray[\"PAGE_NUMBERS\"][$i] . \"'>\" . $InfoArray[\"PAGE_NUMBERS\"][$i] . \"</a> | \";\r\n\t\t }\r\n\t }\r\n\t\r\n\t /* Print out our next link */\r\n\t if($InfoArray[\"NEXT_PAGE\"]) {\r\n\t\t echo \" <a href='?page=\" . $InfoArray[\"NEXT_PAGE\"] . \"'>Next</a>\";\r\n\t } else {\r\n\t\t echo \" Next\";\r\n\t }\r\n\t\r\n\t /* Print our last link */\r\n\t if($InfoArray[\"CURRENT_PAGE\"]!= $InfoArray[\"TOTAL_PAGES\"]) {\r\n\t\t echo \" <a href='?page=\" . $InfoArray[\"TOTAL_PAGES\"] . \"'>>></a>\";\r\n\t } else {\r\n\t\t echo \" &gt;&gt;\";\r\n\t }\r\n\t}", "function get_shows_nav( $args = '' ) {\n global $wp_query;\n\n $current_post_type = get_query_var('post_type');\n\n $defaults = array(\n 'show_notes_page' => ( isset( $_GET['show_notes_page'] ) ) ? $_GET['show_notes_page'] : 1,\n 'clip_page' => ( isset( $_GET['clip_page'] ) ) ? $_GET['clip_page'] : 1,\n 'episodes_page' => ( isset( $_GET['episodes_page'] ) ) ? $_GET['episodes_page'] : 1\n );\n\n $args = wp_parse_args($args, $defaults);\n\n $post_type_paged = $args[$current_post_type . '_page'];\n\n $max_pages = $wp_query->max_num_pages;\n\n echo \"<div class='shows_nav archive-navigation navigation' id='$current_post_type\" . \"_nav'>\";\n\n if( $post_type_paged <= $max_pages && $post_type_paged != 1 ) {\n $next_args = $args;\n $next_args[$current_post_type . '_page'] = $post_type_paged - 1;\n $next_link = '?' . http_build_query($next_args, '', '&amp;') . '#' . $current_post_type;\n\n echo \"<div class='nav-next nav-item'><a href='$next_link'> &larr; Newer</a></div>\";\n }\n\n if( $post_type_paged < $max_pages ) {\n $previous_args = $args;\n $previous_args[$current_post_type . '_page'] = $post_type_paged + 1;\n $previous_link = '?' . http_build_query($previous_args, '', '&amp;') . '#' . $current_post_type;\n\n echo \"<div class='nav-previous nav-item'><a href='$previous_link'>Older &rarr;</a></div>\";\n }\n\n echo \"</div>\";\n}", "function pager($page, $total, $pnumber, $page_link, $parameters)\n {\n $number = (int)($total/$pnumber);\n if((float)($total/$pnumber) - $number != 0) $number++;\n // Check on left links\n if($page - $page_link > 1)\n {\n echo \"<a href=$_SERVER[PHP_SELF]?page=1{$parameters}> <nobr>[1-$pnumber]</nobr></a>&nbsp;<em class=currentpage><nobr>&nbsp;...&nbsp;</nobr> </em>&nbsp;\";\n // Have one\n for($i = $page - $page_link; $i<$page; $i++)\n {\n echo \"&nbsp;<a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a>&nbsp;\";\n }\n }\n else\n {\n // Have no\n for($i = 1; $i<$page; $i++)\n {\n echo \"&nbsp;<a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a>&nbsp;\";\n }\n }\n // Check on right links\n if($page + $page_link < $number)\n {\n // Have one\n for($i = $page; $i<=$page + $page_link; $i++)\n {\n if($page == $i)\n echo \"<em class=currentpage><nobr>&nbsp;[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]&nbsp;</nobr> </em>\";\n else\n echo \"&nbsp;<a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a>&nbsp;\";\n }\n echo \"<em class=currentpage><nobr>&nbsp;...&nbsp;</nobr> </em>&nbsp;<a href=$_SERVER[PHP_SELF]?page=$number{$parameters}> <nobr>[\".(($number - 1)*$pnumber + 1).\"-$total]</nobr></a>&nbsp;\";\n }\n else\n {\n // Have no\n for($i = $page; $i<=$number; $i++)\n {\n if($number == $i)\n {\n if($page == $i)\n echo \"<em class=currentpage><nobr>&nbsp;[\".(($i - 1)*$pnumber + 1).\"-$total]&nbsp;</nobr></em>\";\n else\n echo \"&nbsp;<a href=$_SERVER[PHP_SELF]?page=$i{$parameters}>[\".(($i - 1)*$pnumber + 1).\"-$total]</a>&nbsp;\";\n }\n else\n {\n if($page == $i)\n echo \"<em class=currentpage><nobr>&nbsp;[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]&nbsp;</nobr> </em>\";\n else\n echo \"&nbsp;<a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a>&nbsp;\";\n }\n }\n }\n //echo \"<br><br>\";\n }", "function aquamin_pagination( $class = 'pagination', $prev_text = '', $next_text = '', $show_disabled = false ) {\n\tglobal $wp_query;\n\t$big = 999999999;\n\t$prev_text = ( '' !== $prev_text ? $prev_text : __( 'Previous', 'aquamin' ) );\n\t$next_text = ( '' !== $next_text ? $next_text : __( 'Next', 'aquamin' ) );\n\t$nav = paginate_links( array(\n\t 'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))),\n\t 'format' => '?paged=%#%',\n\t 'prev_text' => $prev_text,\n\t 'current' => max( 1, get_query_var( 'paged' ) ),\n\t 'total' => $wp_query->max_num_pages,\n\t 'next_text' => $next_text,\n\t) );\n\tif ( $nav ) {\n\t\t$html = $nav;\n\t\tif ( $show_disabled ) {\n\t\t\tif ( stripos( $html, 'prev page-numbers' ) === false ) {\n\t\t\t\t$html = ' <a href=\"javascript:void(0)\" aria-disabled=\"true\" class=\"prev page-numbers\">' . $prev_text . '</a> ' . $html;\n\t\t\t}\n\t\t\tif ( stripos( $html, 'next page-numbers' ) === false ) {\n\t\t\t\t$html = $html . ' <a href=\"javascript:void(0)\" aria-disabled=\"true\" class=\"next page-numbers\">' . $next_text . '</a> ';\n\t\t\t}\n\t\t}\n\t\techo '<div class=\"' . $class . '\">' . $html . '</div>';\n\t}\n}", "public function genPrevLink()\n\t{\n\t\t$this->pagination['prevLink'] = \"\";\t\n\t\tif($this->page > 1)\n\t\t{\n\t\t\t$page = $this->page-1;\n\t\t\t$item = $this->itemTpl;\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray('page page_prev',$this->prepend.$page.$this->append, '&lt;'),\n\t\t\t\t\t\t\t\t$item);\n\t\t\t$this->pagination['prevLink'] = $item;\n\t\t}\n\t}", "function cookingwp_post_nav() {\n\t// Don't print empty markup if there's nowhere to navigate.\n\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n\t$next = get_adjacent_post( false, '', false );\n\n\tif ( ! $next && ! $previous ) {\n\t\treturn;\n\t}\n\t?>\n\t<nav class=\"navigation post-navigation\" role=\"navigation\">\n\t\t<div class=\"nav-links\">\n\t\t\t<?php\n\t\t\t\tprevious_post_link( '<div class=\"nav-previous\">%link</div>', _x( '<span class=\"meta-nav\"><i class=\"fa fa-chevron-left\"></i></span>', 'Previous post link', 'cookingwp' ) );\n\t\t\t\tnext_post_link( '<div class=\"nav-next\">%link</div>', _x( '<span class=\"meta-nav\"><i class=\"fa fa-chevron-right\"></i></span>', 'Next post link', 'cookingwp' ) );\n\t\t\t?>\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "public static function getNavigator($currentPage) {\n\t\tif (strcmp ( $currentPage, \"/\" ) == 0) {\n\t\t\theader ( \"Location: \".ConfigUtil::getSiteName());\n\t\t\tdie ();\n\t\t}\n\t\t\n\t\t// if (! UserLoginUtils::isLogin ()) {\n\t\t// $this->redirect ( Yii::app ()->createUrl ( 'Site/login' ) );\n\t\t// }\n\t\t\n\t\t$currentPage = str_replace ( ConfigUtil::getAppName (), \"\", $currentPage );\n\t\t\n\t\t$link = explode ( \"/\", $currentPage );\n\t\t\n\t\t$_tmpPage = \"\";\n\t\tswitch (count ( $link )) {\n\t\t\tcase 3 :\n\t\t\t\tbreak;\n\t\t\tcase 4 :\n\t\t\t\t$_tmpPage = \"/\" . $link [3];\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$nav = \"\";\n\t\t\n\t\t$nav = $nav . \"<li>\";\n\t\t$nav = $nav . \"<i class=\\\"fa fa-home\\\"></i>\";\n\t\t$nav = $nav . \"<a href=\\\"\" . \"#\" . \"\\\">Home</a>\";\n\t\t$nav = $nav . \"</li>\";\n\t\t\n\t\t$criMenu = new CDbCriteria ();\n\t\t$criMenu->condition = \"URL_NAVIGATE = '/\" . $link [1] . \"/\" . $link [2] . ($link [2] == \"Report\" ? \"/\" . $link [3] : \"\") . \"'\";\n\t\t\n\t\t// echo \"<font color='red'>/\" . $link [1] . \"/\" . $link [2] . $_tmpPage .' ('.count($link).\")\". \"</font>\";\n\t\t\n\t\t$childs = Menu::model ()->findAll ( $criMenu );\n\t\tif (isset ( $childs )) {\n\t\t\t\n\t\t\tforeach ( $childs as $child ) {\n\t\t\t\t\n\t\t\t\tif (0 === strpos ( $currentPage, $child->URL_NAVIGATE )) {\n\t\t\t\t\t\n\t\t\t\t\t$criMenuParent = new CDbCriteria ();\n\t\t\t\t\t$criMenuParent->condition = \"MENU_ID = \" . $child->PREVIOUS_MENU_ID;\n\t\t\t\t\t\n\t\t\t\t\t$parent = Menu::model ()->findAll ( $criMenuParent );\n\t\t\t\t\tif (isset ( $parent [0] )) {\n\t\t\t\t\t\t$nav = $nav . \"<li>\";\n\t\t\t\t\t\t$nav = $nav . \"<i class=\\\"fa fa-angle-right\\\"></i>\";\n\t\t\t\t\t\t$nav = $nav . \"<a href=\\\"\" . (ConfigUtil::getAppName () . $child->URL_NAVIGATE) . \"\\\">\" . $parent [0]->MENU_NAME . \"</a>\";\n\t\t\t\t\t\t$nav = $nav . \"</li>\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$nav = $nav . \"<li>\";\n\t\t\t\t\t$nav = $nav . \"<i class=\\\"fa fa-angle-right\\\"></i>\";\n\t\t\t\t\t$nav = $nav . \"<a href=\\\"#\\\">\" . $child->MENU_NAME . \"</a>\";\n\t\t\t\t\t$nav = $nav . \"</li>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $nav;\n\t}", "private function paginate()\n\t{\n\t\tif ($this->_listModel) {\n\t\t\t$this->_listModel->loadNextPage();\n\t\t}\n\t}", "private function pageList() {\n //get pager range\n $this->getPagerRange();\n\n //loop specified ranged pager list\n\t\t//there is no link for current page number\n for ($i = $this->minPager; $i <= $this->maxPager; $i++) {\n if ($i == $this->currentPage) {\n print '<li class=\"current-page\">' . $i . '</li>';\n } else {\n print '<li><a href=\"' . $this->url . '&page=' . $i . '\">' . $i . '</a></li>';\n }\n }\n }", "function frg_list_pages_with_intro( $args ) {\n\n global $post;\n\n if ( $post->post_parent ) {\n $grandfather = array_reverse( get_post_ancestors( $post->ID ) )[0];\n $is_current_page_item = false;\n } else {\n $grandfather = $post->ID;\n $is_current_page_item = true;\n }\n\n ?><li class=\"page_item page-item-<?php echo $grandfather; ?><?php if ($is_current_page_item) echo \" current_page_item\"; ?>\">\n <a href=\"<?php echo the_permalink($grandfather); ?>\"><?php echo get_the_title($grandfather) ?> Intro</a>\n </li><?php\n\n wp_list_pages( $args );\n}", "function navigation (){\n}", "protected function renderPageNextPrev()\n {\n $pageCount = $this->pagination->getPageCount();\n if ($pageCount < 2 && $this->hideOnSinglePage) {\n return '';\n }\n\n $buttons = [];\n $currentPage = $this->pagination->getPage();\n\n // first page\n $firstPageLabel = $this->firstPageLabel === true ? '1' : $this->firstPageLabel;\n if ($firstPageLabel !== false) {\n $buttons[] = $this->renderPageButton($firstPageLabel, 0, $this->firstPageCssClass, $currentPage <= 0, false);\n }\n\n // prev page\n if ($this->prevPageLabel !== false) {\n if (($page = $currentPage - 1) < 0) {\n $page = 0;\n }\n $buttons[] = $this->renderPageButton($this->prevPageLabel, $page, $this->prevPageCssClass, $currentPage <= 0, false);\n }\n\n // next page\n if ($this->nextPageLabel !== false) {\n if (($page = $currentPage + 1) >= $pageCount - 1) {\n $page = $pageCount - 1;\n }\n $buttons[] = $this->renderPageButton($this->nextPageLabel, $page, $this->nextPageCssClass, $currentPage >= $pageCount - 1, false);\n }\n\n // last page\n $lastPageLabel = $this->lastPageLabel === true ? $pageCount : $this->lastPageLabel;\n if ($lastPageLabel !== false) {\n $buttons[] = $this->renderPageButton($lastPageLabel, $pageCount - 1, $this->lastPageCssClass, $currentPage >= $pageCount - 1, false);\n }\n\n return Html::tag('ul', implode(\"\\n\", $buttons), $this->options);\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 adt_paging_nav() {\n\t// Don't print empty markup if there's only one page.\n\tif ( $GLOBALS['wp_query']->max_num_pages < 2 ) {\n\t\treturn;\n\t}\n\n\t$paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;\n\t$pagenum_link = html_entity_decode( get_pagenum_link() );\n\t$query_args = array();\n\t$url_parts = explode( '?', $pagenum_link );\n\n\tif ( isset( $url_parts[1] ) ) {\n\t\twp_parse_str( $url_parts[1], $query_args );\n\t}\n\n\t$pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link );\n\t$pagenum_link = trailingslashit( $pagenum_link ) . '%_%';\n\n\t$format = $GLOBALS['wp_rewrite']->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';\n\t$format .= $GLOBALS['wp_rewrite']->using_permalinks() ? user_trailingslashit( 'page/%#%', 'paged' ) : '?paged=%#%';\n\n\t// Set up paginated links.\n\t$links = paginate_links( array(\n\t\t'base' => $pagenum_link,\n\t\t'format' => $format,\n\t\t'total' => $GLOBALS['wp_query']->max_num_pages,\n\t\t'current' => $paged,\n\t\t'mid_size' => 1,\n\t\t'add_args' => array_map( 'urlencode', $query_args ),\n\t\t'prev_text' => '&larr;',\n\t\t'next_text' => '&rarr;',\n\t) );\n\n\tif ( $links ) :\n\n\t?>\n\t<nav class=\"paginacion\" role=\"navigation\">\n\t\t<?php echo $links; ?>\n\t</nav><!-- .navigation -->\n\t<?php\n\tendif;\n}", "function paginate_start(){\nif(function_exists('wp_paginate')) {\nwp_paginate();\n} else{ ?><ul class=\"pager\">\n<li class=\"previous\"><?php previous_posts_link('&laquo; Newer Posts'); ?></li>\n<li class=\"next\"><?php next_posts_link('Older Posts &raquo;'); ?></li>\n</ul><?php } }", "function paginationLinks($perpage,$thisPage,$database,$searchThrough,$orderBy,$direction) {\n\t\n\t\t$useUrl = \"{$GLOBALS[\"fullSiteUrl\"]}?page=\";\n\t\t\n\t\t// Total entries per page\n\t\t$pagination = $perpage;\n\t\t\n\t\t// set absolute value of 0\n\t\t$zero = abs(\"0\");\n\n\t\t// Get the current page\n\t\t$page = abs($thisPage);\n\t\tif ($page != \"\") {\n\t\t\t$startat = $page * $pagination;\n\t\t} else {\n\t\t\t$startat = 0;\n\t\t}\n\t\t\n\t\tif ($page == \"0\") {\n\t\t\t$current_page = \"1\";\n\t\t} else {\n\t\t\t$current_page = $page;\n\t\t}\n\n\t\t// Initial count/setup\n\t\t$setupsql = \"select * from `{$database}`{$searchThrough}\";\n\n\t\t$load = mq($setupsql);\n\t\t$count = num($load);\n\t\t$addpages = $count / $pagination;\n\t\t$totalpages = round(floor($addpages));\n\t\t\n\t\t// Display the FIRST button\n\t\tif ($current_page != \"1\") {\n\t\t\t$next_current = $page;\n\t\t\t$nextpage = $next_current + 1;\t\n\t\t\t$first = '<a href=\"'.$useUrl.'1\">&lsaquo; First</a>';\n\t\t}\n\t\t// Display the PREVIOUS button\n\t\tif ($page > $zero && $current_page != \"1\") {\n\t\t\t$pre_current = $page;\n\t\t\t$previouspage = $pre_current - 1;\n\t\t\t$previous = '&nbsp;<a href=\"'.$useUrl.$previouspage.'\">&lt;</a>&nbsp;';\n\t\t}\n\t\t// Display list of pages\n\t\t$c=1;\n\t\t$start = $current_page - 2;\n\t\t$end = 1;\n\t\twhile ($c <= $totalpages) {\n\t\t\tif ($c >= $start && $end <= \"5\") {\n\t\t\t\tif ($c != $totalpages) { $space = \"&nbsp;\"; } else { $space = \"\"; }\n\t\t\t\tif ($c == $page) { $currentpage = ' class=\"active\"'; } else { $currentpage = \"\"; }\n\t\t\t\t$listpages .= '&nbsp;<a href=\"'.$useUrl.$c.'\"'.$currentpage.'>'.$c.'</a>'.$space;\n\t\t\t\t++$end;\n\t\t\t}\n\t\t\t++$c;\n\t\t}\n\t\t// TOTAL PAGES\n\t\tif ($c != \"1\") {\n\t\t\t$total_pages = $c - 1;\n\t\t\t$s = \"s\";\n\t\t} else {\n\t\t\t$total_pages = $c;\n\t\t\t$s = \"\";\n\t\t}\n\t\t// Display the LAST button\n\t\tif ($current_page != $total_pages) {\n\t\t\t$next_current = $page;\n\t\t\t$nextpage = $next_current + 1;\t\n\t\t\t$last = \"&nbsp;<a href='{$useUrl}{$totalpages}'> Last &rsaquo;</a>\";\n\t\t}\n\t\t// Display the NEXT button\n\t\tif (($page < $totalpages) && ($totalpages > 0) && ($current_page != $total_pages)) {\n\t\t\t$next_current = $page;\n\t\t\t$nextpage = $next_current + 1;\t\n\t\t\t$next = '&nbsp;<a href=\"'.$useUrl.$nextpage.'\">&gt;</a>';\n\t\t}\n\t\t\n\t\t// Page '.$current_page.' of '.$total_pages.' pages '.$pagination_links.'\n\t\treturn \"<p>Page {$current_page} of {$total_pages} page{$s} &nbsp;&nbsp;{$first} {$previous} {$listpages} {$next} {$last}</p>\";\n\n\t}" ]
[ "0.7237561", "0.7078976", "0.70148975", "0.700591", "0.6944309", "0.6763266", "0.6724295", "0.6657771", "0.6657771", "0.6627122", "0.6570699", "0.65706056", "0.6552235", "0.6455269", "0.6405863", "0.6384097", "0.63557094", "0.6351541", "0.634766", "0.6347223", "0.63387626", "0.632472", "0.632302", "0.63163704", "0.63155854", "0.6304517", "0.6266135", "0.6262531", "0.62604046", "0.62403125", "0.6234971", "0.6233406", "0.62285876", "0.6223453", "0.6222058", "0.6217284", "0.62168634", "0.6210683", "0.6201623", "0.61974144", "0.61946404", "0.61929756", "0.61845636", "0.61841875", "0.618275", "0.61731774", "0.6148711", "0.61479187", "0.6146077", "0.61447954", "0.6139885", "0.6115535", "0.61091006", "0.60945857", "0.60897905", "0.60885465", "0.60692394", "0.6064618", "0.6058674", "0.60578144", "0.60500777", "0.6047234", "0.604679", "0.6019352", "0.6015707", "0.60077137", "0.59863895", "0.59861666", "0.59847283", "0.5983558", "0.5980649", "0.5977227", "0.597513", "0.59710276", "0.59627455", "0.5961651", "0.5956589", "0.59514123", "0.5950607", "0.59484", "0.59457636", "0.5944105", "0.59423876", "0.5939635", "0.59261835", "0.59229225", "0.5922607", "0.5909992", "0.58982164", "0.58979726", "0.5889882", "0.58781177", "0.5867893", "0.58648044", "0.58634865", "0.5862525", "0.5859653", "0.5859441", "0.5858557", "0.58538026", "0.5848104" ]
0.0
-1
Template for comments and pingbacks. Used as a callback by wp_list_comments() for displaying the comments.
function calvero_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback' : case 'trackback' : ?> <li class="post pingback"> <p><?php _e( 'Pingback:', 'calvero' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'calvero' ), ' ' ); ?></p> <?php break; default : ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"> <article id="comment-<?php comment_ID(); ?>" class="comment"> <footer> <div class="comment-author vcard"> <?php echo get_avatar( $comment, 40 ); ?> <?php printf( __( '%s <span class="says">says:</span>', 'calvero' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?> </div><!-- .comment-author .vcard --> <?php if ( $comment->comment_approved == '0' ) : ?> <em><?php _e( 'Your comment is awaiting moderation.', 'calvero' ); ?></em> <br /> <?php endif; ?> <div class="comment-meta commentmetadata"> <a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><time pubdate datetime="<?php comment_time( 'c' ); ?>"> <?php /* translators: 1: date, 2: time */ printf( __( '%1$s at %2$s', 'calvero' ), get_comment_date(), get_comment_time() ); ?> </time></a> <?php edit_comment_link( __( '(Edit)', 'calvero' ), ' ' ); ?> </div><!-- .comment-meta .commentmetadata --> </footer> <div class="comment-content"><?php comment_text(); ?></div> <div class="reply"> <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> </div><!-- .reply --> </article><!-- #comment-## --> <?php break; endswitch; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ghostpool_comment_template( $comment, $args, $depth ) {\r\n\r\n\tswitch ( $comment->comment_type ) :\r\n\tcase 'pingback' :\r\n\tcase 'trackback' :\r\n\t\t\r\n\t?>\r\n\r\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\" itemscope itemtype=\"http://schema.org/Comment\">\r\n\r\n\t\t<div id=\"comment-<?php comment_ID(); ?>\" class=\"comment_container\">\r\n\t\t\t<p><?php esc_html_e( 'Pingback:', 'socialize' ); ?> <?php comment_author_link(); ?></p>\r\n\t\t</div>\r\n\t\r\n\t<?php break; default : \r\n\t\r\n\t// Login link\r\n\tif ( ghostpool_option( 'popup_box' ) == 'enabled' ) {\r\n\t\t$login_link = '#login';\r\n\t} else {\r\n\t\t$login_link = wp_login_url( apply_filters( 'the_permalink', get_permalink() ) );\r\n\t}\r\n\t\r\n\t?>\r\n\r\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID() ?>\" itemscope itemtype=\"http://schema.org/Comment\">\r\n\t\r\n\t\t<div id=\"comment-<?php comment_ID(); ?>\" class=\"comment_container\">\r\n\r\n\t\t\t<?php echo get_avatar( $comment, 60 ); ?>\r\n\t\t\r\n\t\t\t<div class=\"gp-comment-content\">\r\n\t\t\t\r\n\t\t\t\t<?php if ( $comment->comment_approved == '0' ) { ?>\r\n\t\t\t\t\r\n\t\t\t\t\t<p class=\"gp-comment-meta\"><em><?php esc_html_e( 'Your comment is awaiting approval.', 'socialize' ); ?></em></p>\r\n\t\t\t\t\r\n\t\t\t\t<?php } else { ?>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<p class=\"gp-comment-meta\">\r\n\t\t\t\t\r\n\t\t\t\t\t\t<strong itemprop=\"author\">\t\r\n\t\t\t\t\t\t\t<?php printf( '%s', comment_author_link() ); ?>\r\n\t\t\t\t\t\t</strong>\r\n\t\t\t\r\n\t\t\t\t\t\t<time itemprop=\"datePublished\" datetime=\"<?php echo get_comment_date( 'c' ); ?>\">\r\n\t\t\t\t\t\t\t<?php comment_time( get_option( 'date_format' ) ); ?>, <?php comment_time( get_option( 'time_format' ) ); ?>\r\n\t\t\t\t\t\t</time>\r\n\r\n\t\t\t\t\t</p>\t\t\t\t\r\n\r\n\t\t\t\t<?php } ?>\r\n\t\t\t\t\r\n\t\t\t\t<div itemprop=\"description\" class=\"gp-comment-description\"><?php comment_text(); ?></div>\r\n\t\t\t\t\r\n\t\t\t\t<?php if ( ! is_user_logged_in() && get_option( 'comment_registration' ) == 1 ) { ?>\r\n\t\t\t\t\t<a href=\"<?php echo $login_link; ?>\" rel=\"nofollow\" class=\"comment-reply-login\"><?php esc_html_e( 'Log in to reply', 'socialize' ); ?></a>\r\n\t\t\t\t<?php } else { \r\n\t\t\t\t\tcomment_reply_link( array_merge( $args, array( 'reply_text' => esc_html__( 'Reply', 'socialize' ), 'add_below' => 'comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); \r\n\t\t\t\t} ?>\r\n\r\n\t\t\t</div>\t\r\n\r\n\t\t</div>\r\n\r\n\t<?php break; endswitch;\r\n\r\n}", "function pixelgrade_comments_template() {\n\t\t// We need to pass the template path retrieved by our locate function so the component template is accounted for\n\t\t// If present in the root of the theme or child theme, `/comments.php` will take precedence.\n\t\tcomments_template( '/' . pixelgrade_make_relative_path( pixelgrade_locate_component_template( Pixelgrade_Blog::COMPONENT_SLUG, 'comments' ) ) );\n\t}", "public function comments()\n {\n $task = $this->getTask();\n $commentSortingDirection = $this->userMetadataCacheDecorator->get(UserMetadataModel::KEY_COMMENT_SORTING_DIRECTION, 'ASC');\n\n $this->response->html($this->template->render('CommentTooltip:board/tooltip_comments', array(\n 'task' => $task,\n 'comments' => $this->commentModel->getAll($task['id'], $commentSortingDirection)\n )));\n }", "function tempera_list_comments() {\t\n\t\t\t\t\twp_list_comments( array( 'callback' => 'tempera_comment' ) );\n\t\t\t}", "private function comments_wrapper()\n\t{\t\t\n\t\tif($_POST)\n\t\t\t$this->add_comment();\n\n\t\t$post_id = valid::id_key($this->filter);\n\t\t$owner_id = ($this->owner->logged_in())\n\t\t\t? $this->owner->get_user()->id\n\t\t\t: FALSE;\n\t\t\t\n\t\t# get the post with child comment.\n\t\t$post = ORM::Factory('forum_cat_post', $post_id)\n\t\t\t->select(\"\n\t\t\t\tforum_cat_posts.*, forum_cats.name, forum_cats.url,\n\t\t\t\t(SELECT owner_id \n\t\t\t\t\tFROM forum_comment_votes\n\t\t\t\t\tWHERE forum_cat_post_comment_id = forum_cat_posts.forum_cat_post_comment_id\n\t\t\t\t\tAND owner_id = '$owner_id'\n\t\t\t\t) AS has_voted\n\t\t\t\")\n\t\t\t->join('forum_cats', 'forum_cats.id', 'forum_cat_posts.forum_cat_id')\n\t\t\t->where('forum_cat_posts.id', $post_id)\n\t\t\t->find();\n\t\tif(!$post->loaded)\n\t\t\tEvent::run('system.404');\n\n\t\t$view = new View('public_forum/posts_comments_wrapper');\n\t\t$view->post\t\t\t= $post;\n\t\t$view->is_logged_in\t= $this->owner->logged_in();\t\n\t\t$view->owner\t= $owner_id;\n\t\t$view->comments_list = $this->get_comments_list($post_id);\n\t\t$view->selected\t\t= self::tab_selected('votes');\t\t\n\t\treturn $view;\n\t}", "function thinkup_input_commenttemplate( $comment, $args, $depth ) {\n\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p><?php esc_html_e( 'Pingback:', 'ESTSB'); ?> <?php comment_author_link(); ?><?php edit_comment_link( esc_html__( 'Edit', 'ESTSB' ), ' ' ); ?></p>\n\t<?php\n\t\tbreak;\n\t\tdefault :\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t\t\t<?php echo get_avatar( $comment, 70 ); ?>\n\t\t\t<header>\n\n\t\t\t\t<div class=\"comment-author\">\n\t\t\t\t\t<h4><?php printf( '%s', sprintf( '%s', get_comment_author_link() ) ); ?></h4>\n\t\t\t\t</div>\n\t\t\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t\t\t<em><?php esc_html_e( 'Your comment is awaiting moderation.', 'ESTSB'); ?></em>\n\t\t\t\t\t<br />\n\t\t\t\t<?php endif; ?>\n\n\t\t\t\t<span class=\"reply\">\n\t\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t\t</span>\n\n\t\t\t\t<div class=\"comment-meta\">\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\"><time datetime=\"<?php esc_attr( comment_time( 'c' ) ); ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tprintf( '%1$s', get_comment_date( \"j / M / Y\" ) ); ?>\n\t\t\t\t\t</time></a>\n\t\t\t\t\t<?php edit_comment_link( __( 'Edit', 'ESTSB' ), ' ' );\n\t\t\t\t\t?>\n\t\t\t\t</div>\n\n\t\t\t</header><div class=\"clearboth\"></div>\n\n\t\t\t<footer>\n\n\t\t\t\t<div class=\"comment-content\"><?php comment_text(); ?></div>\n\n\t\t\t</footer>\n\n\t\t</article><!-- #comment-## -->\n\n\t<?php\n\t\t\tbreak;\n\tendswitch;\n}", "function get_comments_popup_template()\n {\n }", "public function actionComments()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->render(\n\t\t\t'comments',\n\t\t\tarray(\n\t\t\t\t'_Comments' => Feedback::model()->findAll(array('order'=>'date_inserted DESC'))\n\t\t\t)\n\t\t);\n\t}", "function hermi_list_comments( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tglobal $post;\n\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p>\n\t\t\t<?php _e( 'Pingback:', 'hermi' ); ?>\n\t\t\t<?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'hermi' ), ' ' ); ?>\n\t\t</p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t?>\n\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\n\t\t\t<header class=\"comment-meta\">\n\t\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t\t<div class=\"avatar\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t// Output avatar image. The size of top level and child avatars can be set independently.\n\t\t\t\t\t\t\t$avatar_size = apply_filters( 'hermi_comment_avatar_size_top_level', 60 );\n\n\t\t\t\t\t\t\tif ( '0' != $comment->comment_parent ) {\n\t\t\t\t\t\t\t\t$avatar_size = apply_filters( 'hermi_comment_avatar_size_child', 60 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo get_avatar( $comment, $avatar_size );\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div><!-- .avatar -->\n\n\t\t\t\t\t<div class=\"links\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tprintf( __( '%1$s %2$s%3$s at %4$s%5$s', 'hermi' ),\n\t\t\t\t\t\t\t\tsprintf( '<div class=\"fn\">%s</div>',\n\t\t\t\t\t\t\t\t\t\t\t\t\tget_comment_author_link()\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'<a class=\"published-date\" href=\"' . esc_url( get_comment_link( $comment->comment_ID ) ) . '\">' . \n\t\t\t\t\t\t\t\t\t\t'<time pubdate datetime=\"' . esc_attr( get_comment_time( 'c' ) ) . '\">',\n\t\t\t\t\t\t\t\tesc_html( get_comment_date() ),\n\t\t\t\t\t\t\t\tesc_html( get_comment_time() ),\n\t\t\t\t\t\t\t\t'</time><i></i></a>'\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t// See hermi_comment_moderation_links(). We're outputting spam and delete links here too.\n\t\t\t\t\t\t\tif ( current_user_can( 'edit_post', $post->ID ) ) {\n\t\t\t\t\t\t\t\tedit_comment_link( __( 'Edit', 'hermi' ), ' ' );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div><!-- .links -->\n\t\t\t\t</div><!-- .comment-author .vcard -->\n\n\t\t\t\t<?php if ( $comment->comment_approved == '0' ) { ?>\n\t\t\t\t\t<em class=\"comment-awaiting-moderation\">\n\t\t\t\t\t\t<?php _e( 'Your comment is awaiting moderation.', 'hermi' ); ?>\n\t\t\t\t\t</em><br />\n\t\t\t\t<?php } ?>\n\t\t\t</header><!-- .comment-meta -->\n\n\n\t\t\t<div class=\"comment-body\">\n\t\t\t\t<div class=\"comment-content\">\n\t\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"reply-link-wrap\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\tcomment_reply_link( array_merge( $args, [\n\t\t\t\t\t\t\t'reply_text' => __( 'Reply', 'hermi' ),\n\t\t\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t\t\t'max_depth' => $args['max_depth']\n\t\t\t\t\t\t] ) );\n\t\t\t\t\t?>\n\t\t\t\t</div><!-- .reply-link-wrap -->\n\t\t\t</div><!-- .comment-body -->\n\n\t\t</article><!-- #comment-## -->\n\t<!-- WordPress handles the output of the closing </li> tag -->\n\t\n\t<?php\n\t\tbreak;\n\tendswitch;\n}", "function theme_comments($comment, $args, $depth) {\n\t$GLOBALS['comment'] = $comment;\n\n\tif (get_comment_type() == 'pingback' || get_comment_type() == 'trackback') : ?>\n\t\n\t\t<li class=\"pingback\" id=\"comment-<?php comment_ID(); ?>\">\n\n\t\t\t<article <?php comment_class('clearfix'); ?>>\n\t\t\t\n\t\t\t\t<header>\n\t\t\t\t\n\t\t\t\t\t<h4><?php _e('Pingback:', LANG ); ?></h4>\n\t\t\t\t\t<p><?php edit_comment_link(); ?></p>\n\t\t\t\t\t\n\t\t\t\t</header>\n\t\n\t\t\t\t<?php comment_author_link(); ?>\n\t\t\t\t\t\t\t\t\n\t\t\t</article>\n\t\t\n\t<?php endif; ?>\n\t\n\t<?php if (get_comment_type() == 'comment') : ?>\n\t\t<li id=\"comment-<?php comment_ID(); ?>\">\n\t\n\t\t\t<article <?php comment_class('clearfix'); ?>>\n\t\t\t\n\t\t\t\t<!-- Imagen Ávatar -->\n\t\t\t\t<figure class=\"comment-avatar\">\n\t\t\t\t\t<?php \n\t\t\t\t\t\t$avatar_size = 70;\n\t\t\t\t\t\tif ($comment->comment_parent != 0) {\n\t\t\t\t\t\t\t$avatar_size = 60;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\techo get_avatar($comment, $avatar_size);\n\t\t\t\t\t?>\n\t\t\t\t</figure> <!-- /.comment-avatar -->\n\n\t\t\t\t<!-- Contenedor de Comentario Contenido -->\n\t\t\t\t<div class=\"comment__content\">\n\t\t\t\t\t<!-- Author del Comentario -->\n\t\t\t\t\t<h4><?php comment_author_link(); ?> / <?php comment_date(); ?></h4>\n\n\t\t\t\t\t<?php if ($comment->comment_approved == false ) : ?>\n\t\t\t\t\t\t<p class=\"awaiting-moderation\"><?php _e('Tu comentario está esperando moderación.', LANG ); ?></p>\n\n\t\t\t\t\t\t<!-- Texto de Comentario -->\n\t\t\t\t\t\t<?php else : comment_text() . \"-\" . comment_reply_link( array_merge( $args , array( \n\t\t\t\t\t\t\t'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); \n\t\t\t\t\t\t?>\n\n\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t</div> <!-- /.comment__content -->\n\t\t\t\n\t\t\t</article>\n\t\t\t\n\t<?php endif;\t\n}", "function garland_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->type != 'forum') {\n $vars['content'] = '<h2 class=\"comments\">'. t('Comments') .'</h2>'. $vars['content'];\n }\n}", "function labs_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n<li class=\"post pingback\">\n <p>\n <?php _e( 'Pingback:', 'labs' ); ?>\n <?php comment_author_link(); ?>\n <?php edit_comment_link( __( 'Edit', 'labs' ), '<span class=\"edit-link\">', '</span>' ); ?>\n </p>\n <?php\n\t\t\tbreak;\n\t\tdefault :\n\t?>\n<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n <div class=\"comment-meta\">\n <div class=\"comment-author vcard\">\n <?php\n\t\t\t\t\t\t$avatar_size = 32;\n\t\t\t\t\t\tif ( '0' != $comment->comment_parent )\n\t\t\t\t\t\t\t$avatar_size = 32;\n\n\t\t\t\t\t\techo get_avatar( $comment, $avatar_size );\n\n\t\t\t\t\t\t/* translators: 1: comment author, 2: date and time */\n\t\t\t\t\t\tprintf( __( '%1$s | %2$s <span class=\"says\">said:</span>', 'labs' ),\n\t\t\t\t\t\t\tsprintf( '<span class=\"fn\">%s</span>', get_comment_author_link() ),\n\t\t\t\t\t\t\tsprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\t\t\tget_comment_time( 'Y-m-d' ),\n\t\t\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'labs' ), get_comment_date('Y-m-d'), get_comment_time('G:i') )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t?>\n <?php edit_comment_link( __( 'Edit', 'labs' ), '<span class=\"edit-link\">', '</span>' ); ?>\n </div>\n <!-- .comment-author .vcard -->\n \n <?php if ( $comment->comment_approved == '0' ) : ?>\n <em class=\"comment-awaiting-moderation\">\n <?php _e( 'Your comment is awaiting moderation.', 'labs' ); ?>\n </em> <br />\n <?php endif; ?>\n </div>\n <!-- .comment-meta -->\n \n <div class=\"comment-content\">\n <?php comment_text(); ?>\n </div>\n <div class=\"reply\">\n <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply <span>&darr;</span>', 'labs' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div>\n <!-- .reply --> \n </article>\n <!-- #comment-## -->\n \n <?php\n\t\t\tbreak;\n\tendswitch;\n}", "function tempera_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p><?php _e( 'Pingback: ', 'tempera' ); ?><?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)', 'tempera'), ' ' ); ?></p>\n\t<?php\n\t\tbreak;\n\t\tcase '' :\n\t\tdefault : \n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<div id=\"comment-<?php comment_ID(); ?>\">\n\t\t<div class=\"comment-author vcard\">\n\t\t\t<?php echo \"<div class='avatar-container' >\".get_avatar( $comment, 60 ).\"</div>\"; ?>\n\t\t\t<div class=\"comment-details\">\n\t\t\t\t<?php printf( '%s ', sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n\t\t\t\t<div class=\"comment-meta commentmetadata\">\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n\t\t\t\t\t<?php /* translators: 1: date, 2: time */\n\t\t\t\t\tprintf( '%1$s '.__('at', 'tempera' ).' %2$s', get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'tempera' ), ' ' );\n\t\t\t\t\t?>\n\t\t\t\t</div><!-- .comment-meta .commentmetadata -->\n\t\t\t</div> <!-- .comment-details -->\n\t\t</div><!-- .comment-author .vcard -->\n\t\t\n\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t<span class=\"comment-await\"><em><?php _e( 'Your comment is awaiting moderation.', 'tempera' ); ?></em></span>\n\t\t\t<br />\n\t\t<?php endif; ?>\n\n\n\t\t<div class=\"comment-body\"><?php comment_text(); ?>\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => '<i class=\"icon-reply\"></i>'.__('Reply','tempera'), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</div>\n\n\t</div><!-- #comment-## -->\n\n\t<?php\n\t\tbreak;\n\tendswitch;\n}", "function pmi_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->type != 'forum') {\n $vars['content'] = '<h2 class=\"comments\">'. t('Comments') .'</h2>'. $vars['content'];\n }\n}", "function darksnow_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p><?php _e( 'Pingback:', 'darksnow' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'darksnow' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<footer class=\"comment-meta\">\n\t\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t$avatar_size = 68;\n\t\t\t\t\t\tif ( '0' != $comment->comment_parent )\n\t\t\t\t\t\t\t$avatar_size = 39;\n\n\t\t\t\t\t\techo get_avatar( $comment, $avatar_size );\n\n\t\t\t\t\t\t/* translators: 1: comment author, 2: date and time */\n\t\t\t\t\t\tprintf( __( '%1$s on %2$s <span class=\"says\">said:</span>', 'darksnow' ),\n\t\t\t\t\t\t\tsprintf( '<span class=\"fn\">%s</span>', get_comment_author_link() ),\n\t\t\t\t\t\t\tsprintf( '<a href=\"%1$s\"><time pubdate datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'darksnow' ), get_comment_date(), get_comment_time() )\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\t<?php edit_comment_link( __( 'Edit', 'darksnow' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t\t\t</div><!-- .comment-author .vcard -->\n\n\t\t\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t\t\t<em class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'darksnow' ); ?></em>\n\t\t\t\t\t<br />\n\t\t\t\t<?php endif; ?>\n\n\t\t\t</footer>\n\n\t\t\t<div class=\"comment-content\"><?php comment_text(); ?></div>\n\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply <span>&darr;</span>', 'darksnow' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\n\t<?php\n\t\t\tbreak;\n\tendswitch;\n}", "public function comments()\n {\n $comments = $this->comment->getAllComments();\n $this->buildView(array('comments' => $comments));\n }", "function maennaco_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->type != 'forum') {\n $vars['content'] = '<h2 class=\"comments\">' . t('Comments') . '</h2>' . $vars['content'];\n }\n}", "function twentytwelve_comment( $comment, $args, $depth ) {\n\t\t$GLOBALS['comment'] = $comment;\n\t\tswitch ( $comment->comment_type ) :\n\t\t\tcase 'pingback':\n\t\t\tcase 'trackback':\n\t\t\t\t// Display trackbacks differently than normal comments.\n\t\t?>\n\t\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t<p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// Proceed with normal comments.\n\t\t\t\tglobal $post;\n\t\t?>\n\t\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<header class=\"comment-meta comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t\techo get_avatar( $comment, 44 );\n\t\t\t\t\tprintf(\n\t\t\t\t\t\t'<cite><b class=\"fn\">%1$s</b> %2$s</cite>',\n\t\t\t\t\t\tget_comment_author_link(),\n\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span>' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''\n\t\t\t\t\t);\n\t\t\t\t\tprintf(\n\t\t\t\t\t\t'<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t);\n\t\t\t\t\t?>\n\t\t\t\t</header><!-- .comment-meta -->\n\n\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>\n\t\t\t<?php endif; ?>\n\n\t\t\t\t<section class=\"comment-content comment\">\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t<?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '<p class=\"edit-link\">', '</p>' ); ?>\n\t\t\t\t</section><!-- .comment-content -->\n\n\t\t\t\t<div class=\"reply\">\n\t\t\t\t<?php\n\t\t\t\tcomment_reply_link(\n\t\t\t\t\tarray_merge(\n\t\t\t\t\t\t$args, array(\n\t\t\t\t\t\t\t'reply_text' => __( 'Reply', 'twentytwelve' ),\n\t\t\t\t\t\t\t'after' => ' <span>&darr;</span>',\n\t\t\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t\t\t'max_depth' => $args['max_depth'],\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n?>\n\t\t\t\t</div><!-- .reply -->\n\t\t\t</article><!-- #comment-## -->\n\t\t<?php\n\t\t\t\tbreak;\n\t\tendswitch; // end comment_type check\n\t}", "function starter_comment_block() {\n $items = array();\n $number = variable_get('comment_block_count', 10);\n\n foreach (comment_get_recent($number) as $comment) {\n //kpr($comment->changed);\n //print date('Y-m-d H:i', $comment->changed);\n $items[] =\n '<h3>' . l($comment->subject, 'comment/' . $comment->cid, array('fragment' => 'comment-' . $comment->cid)) . '</h3>' .\n ' <time datetime=\"'.date('Y-m-d H:i', $comment->changed).'\">' . t('@time ago', array('@time' => format_interval(REQUEST_TIME - $comment->changed))) . '</time>';\n }\n\n if ($items) {\n return theme('item_list', array('items' => $items, 'daddy' => 'comments'));\n }\n else {\n return t('No comments available.');\n }\n}", "function td_comment( $comment, $args, $depth ) {\r\n $GLOBALS['comment'] = $comment;\r\n\r\n $td_isPingTrackbackClass = '';\r\n\r\n if($comment->comment_type == 'pingback') {\r\n $td_isPingTrackbackClass = 'pingback';\r\n }\r\n\r\n if($comment->comment_type == 'trackback') {\r\n $td_isPingTrackbackClass = 'trackback';\r\n }\r\n\r\n if (!empty($comment->comment_author_email)) {\r\n $td_comment_auth_email = $comment->comment_author_email;\r\n } else {\r\n $td_comment_auth_email = '';\r\n }\r\n\r\n $td_article_date_unix = @strtotime(\"{$comment->comment_date_gmt} GMT\");\r\n //print_r($td_article_date_unix);\r\n\r\n\r\n\t?>\r\n <li class=\"comment <?php echo $td_isPingTrackbackClass ?>\" id=\"comment-<?php comment_ID() ?>\">\r\n\t\t\t<article>\r\n\t <footer>\r\n <?php\r\n\t //echo get_template_directory_uri() . \"/images/avatar.jpg\";\r\n\t //echo get_avatar($td_comment_auth_email, 50, get_template_directory_uri() . \"/images/avatar.jpg\");\r\n\t echo get_avatar($td_comment_auth_email, 50);\r\n ?>\r\n <cite><?php comment_author_link() ?></cite>\r\n\r\n <a class=\"comment-link\" href=\"#comment-<?php comment_ID() ?>\">\r\n <time pubdate=\"<?php echo $td_article_date_unix ?>\"><?php comment_date() ?> at <?php comment_time() ?></time>\r\n </a>\r\n </footer>\r\n\r\n <div class=\"comment-content\">\r\n <?php if ($comment->comment_approved == '0') { ?>\r\n <em><?php echo __td('Your comment is awaiting moderation', TD_THEME_NAME); ?></em>\r\n <?php }\r\n comment_text(); ?>\r\n </div>\r\n\r\n\t <div class=\"comment-meta\" id=\"comment-<?php comment_ID() ?>\">\r\n <?php comment_reply_link(array_merge( $args, array(\r\n 'depth' => $depth,\r\n 'max_depth' => $args['max_depth'],\r\n 'reply_text' => __td('Reply', TD_THEME_NAME),\r\n 'login_text' => __td('Log in to leave a comment', TD_THEME_NAME)\r\n )))\r\n ?>\r\n </div>\r\n </article>\r\n <?php\r\n\r\n}", "function comments_template($template) {\n global $__FB_COMMENT_EMBED;\n global $post;\n global $comments;\n\n if (!apply_filters('fbc_force_enabled', false, $post)) {\n\n if ( is_page() && apply_filters('fbc_disable_on_pages', false) ) {\n return '';\n }\n\n if ( !( is_singular() && ( have_comments() || 'open' == $post->comment_status ) ) ) {\n return '';\n }\n\n if ( $post->post_status != 'publish' || !empty($_REQUEST['preview'])) {\n return '';\n }\n\n if ( !$this->is_enabled() ) {\n return $template;\n }\n\n }\n\n $__FB_COMMENT_EMBED = true;\n return dirname(__FILE__).'/comments.php';\n }", "public function the_comments( array $args = array() ) {\n\t\t$args = array_merge(\n\t\t\t$args,\n\t\t\tarray(\n\t\t\t\t'style' => 'ol',\n\t\t\t\t'short_ping' => true,\n\t\t\t)\n\t\t);\n\n\t\t$amp_live_list = skeleton_wp()->using_amp_live_list_comments();\n\n\t\tif ( $amp_live_list ) {\n\t\t\t$comment_order = get_option( 'comment_order' );\n\t\t\t$comments_per_page = get_option( 'page_comments' ) ? (int) get_option( 'comments_per_page' ) : 10000;\n\t\t\t$poll_inverval = MINUTE_IN_SECONDS * 1000;\n\n\t\t\t?>\n\t\t\t<amp-live-list\n\t\t\t\tid=\"amp-live-comments-list-<?php the_ID(); ?>\"\n\t\t\t\t<?php echo ( 'asc' === $comment_order ) ? ' sort=\"ascending\" ' : ''; ?>\n\t\t\t\tdata-poll-interval=\"<?php echo esc_attr( $poll_inverval ); ?>\"\n\t\t\t\tdata-max-items-per-page=\"<?php echo esc_attr( $comments_per_page ); ?>\"\n\t\t\t>\n\t\t\t<?php\n\n\t\t\tadd_filter( 'navigation_markup_template', array( $this, 'filter_add_amp_live_list_pagination_attribute' ) );\n\t\t}\n\n\t\t?>\n\t\t<ol class=\"comment-list\"<?php echo $amp_live_list ? ' items' : ''; ?>>\n\t\t\t<?php wp_list_comments( $args ); ?>\n\t\t</ol><!-- .comment-list -->\n\t\t<?php\n\n\t\tthe_comments_navigation();\n\n\t\tif ( $amp_live_list ) {\n\t\t\tremove_filter( 'navigation_markup_template', array( $this, 'filter_add_amp_live_list_pagination_attribute' ) );\n\n\t\t\t?>\n\t\t\t\t<div update>\n\t\t\t\t\t<button class=\"button\" on=\"tap:amp-live-comments-list-<?php the_ID(); ?>.update\"><?php esc_html_e( 'New comment(s)', 'skeleton-wp' ); ?></button>\n\t\t\t\t</div>\n\t\t\t</amp-live-list>\n\t\t\t<?php\n\t\t}\n\t}", "function wp_dashboard_recent_comments_control()\n {\n }", "public function index() {\n $items = $this->model->getCustomerComment();\n $data = array(\n 'items' => $items,\n );\n $this->template->write_view('content', 'FRONTEND/customer_comment', $data);\n $this->template->render();\n }", "function twentytwelve_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t// Display trackbacks differently than normal comments.\n\t?>\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t<p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t\t// Proceed with normal comments.\n\t\tglobal $post;\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<header class=\"comment-meta comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t\techo get_avatar( $comment, 44 );\n\t\t\t\t\tprintf( '<cite><b class=\"fn\">%1$s</b> %2$s</cite>',\n\t\t\t\t\t\tget_comment_author_link(),\n\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span>' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''\n\t\t\t\t\t);\n\t\t\t\t\tprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</header><!-- .comment-meta -->\n\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>\n\t\t\t<?php endif; ?>\n\t\t\t<section class=\"comment-content comment\">\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t<?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '<p class=\"edit-link\">', '</p>' ); ?>\n\t\t\t</section><!-- .comment-content -->\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'twentytwelve' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\t<?php\n\t\tbreak;\n\tendswitch; // end comment_type check\n}", "function tempera_comments_on() {\nglobal $temperas;\nforeach ($temperas as $key => $value) { ${\"$key\"} = $value; }\t\n\tif ( comments_open() && ! post_password_required() && $tempera_blog_show['comments'] && ! is_single()) :\n\t\tprint '<div class=\"comments-link\"><i class=\"icon-comments icon-metas\" title=\"' . __('Comments', 'tempera') . '\"></i>';\n\t\tprintf ( comments_popup_link( __( '<b>0</b>', 'tempera' ), __( '<b>1</b>', 'tempera' ), __( '<b>%</b>', 'tempera' ),(''),__('<b>-</b>','tempera') ));\n\t\tprint '</div>';\n\tendif;\n}", "function twentytwelve_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t// Display trackbacks differently than normal comments.\n\t?>\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t<p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t\t// Proceed with normal comments.\n\t\tglobal $post;\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<header class=\"comment-meta comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t\techo get_avatar( $comment, 44 );\n\t\t\t\t\tprintf( '<cite class=\"fn\">%1$s %2$s</cite>',\n\t\t\t\t\t\tget_comment_author_link(),\n\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span> ' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''\n\t\t\t\t\t);\n\t\t\t\t\tprintf( '<a href=\"%1$s\"><time pubdate datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</header><!-- .comment-meta -->\n\n\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>\n\t\t\t<?php endif; ?>\n\n\t\t\t<section class=\"comment-content comment\">\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t<?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '<p class=\"edit-link\">', '</p>' ); ?>\n\t\t\t</section><!-- .comment-content -->\n\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply <span>&darr;</span>', 'twentytwelve' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\t<?php\n\t\tbreak;\n\tendswitch; // end comment_type check\n}", "public function action_index()\n\t{\n\t\t$code_id = $this->request->param('code_id');\n\t\t\n\t\tif ($code_id)\n\t\t{\n\t\t\t$view = View::factory('widgets/comment/index')\n\t\t\t\t->bind('comments', $comments);\n\t\t\t\t\n\t\t\t$comments = $this->_format_comments(\n\t\t\t\tORM::factory('comment')\n\t\t\t\t\t->where('code_id', '=', $code_id)\n\t\t\t\t\t->order_by('date_posted', 'ASC')\n\t\t\t\t\t->find_all()\n\t\t\t);\n\t\t\t\n\t\t\t$this->request->response()->body($view);\n\t\t}\n\t}", "function twentytwelve_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t// Display trackbacks differently than normal comments.\n\t?>\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t<p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t\t// Proceed with normal comments.\n\t\tglobal $post;\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<header class=\"comment-meta comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t\techo get_avatar( $comment, 44 );\n\t\t\t\t\tprintf( '<cite><b class=\"fn\">%1$s</b> %2$s</cite>',\n\t\t\t\t\t\tget_comment_author_link(),\n\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span>' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''\n\t\t\t\t\t);\n\t\t\t\t\tprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</header><!-- .comment-meta -->\n\n\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>\n\t\t\t<?php endif; ?>\n\n\t\t\t<section class=\"comment-content comment\">\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t<?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '<p class=\"edit-link\">', '</p>' ); ?>\n\t\t\t</section><!-- .comment-content -->\n\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'twentytwelve' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\t<?php\n\t\tbreak;\n\tendswitch; // end comment_type check\n}", "function thinkup_input_comments() {\n\t$args = array( \n\t\t'callback' => 'thinkup_input_commenttemplate', \n\t);\n\twp_list_comments( $args );\n}", "function register_block_core_comment_template()\n {\n }", "function twentytwelve_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t// Display trackbacks differently than normal comments.\n\t?>\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t<p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t\t// Proceed with normal comments.\n\t\tglobal $post;\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<header class=\"comment-meta comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t\techo get_avatar( $comment, 44 );\n\t\t\t\t\tprintf( '<cite class=\"fn\">%1$s %2$s</cite>',\n\t\t\t\t\t\tget_comment_author_link(),\n\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span> ' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''\n\t\t\t\t\t);\n\t\t\t\t\tprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</header><!-- .comment-meta -->\n\n\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>\n\t\t\t<?php endif; ?>\n\n\t\t\t<section class=\"comment-content comment\">\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t<?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '<p class=\"edit-link\">', '</p>' ); ?>\n\t\t\t</section><!-- .comment-content -->\n\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'twentytwelve' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\t<?php\n\t\tbreak;\n\tendswitch; // end comment_type check\n}", "function ivan_comment( $comment, $args, $depth ) {\r\n\t$GLOBALS['comment'] = $comment;\r\n\r\n\tif ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>\r\n\r\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\r\n\t\t<div class=\"comment-body\">\r\n\t\t\t<?php _e( 'Pingback:', 'ivan_domain' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit', 'ivan_domain' ), '<span class=\"edit-link\">', '</span>' ); ?>\r\n\t\t</div>\r\n\r\n\t<?php else : ?>\r\n\r\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>\r\n\t\t<article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body\">\r\n\t\t\t<div class=\"row\">\r\n\r\n\t\t\t\t<div class=\"comment-avatar-holder\">\r\n\t\t\t\t\t<?php echo get_avatar( $comment, 100 ); ?>\r\n\t\t\t\t\t<?php if(get_the_author_meta('ID') == $comment->user_id) : ?>\r\n\t\t\t\t\t<span class=\"author-tag hidden-xs\"><?php _e(\"Author\", 'ivan_domain'); ?></span>\r\n\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"comment-content-holder\">\r\n\r\n\t\t\t\t\t<footer class=\"comment-meta\">\r\n\t\t\t\t\t\t<div class=\"comment-author vcard\">\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<?php printf( __( '%s', 'ivan_domain' ), sprintf( '<h5 class=\"fn\">%s</h5>', get_comment_author_link() ) ); ?>\r\n\r\n\t\t\t\t\t\t\t<div class=\"comment-date\">\r\n\t\t\t\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\" class=\"comment-time\">\r\n\t\t\t\t\t\t\t\t\t<time datetime=\"<?php comment_time( 'c' ); ?>\">\r\n\t\t\t\t\t\t\t\t\t\t<?php printf( _x( '%1$s at %2$s', '1: date, 2: time', 'ivan_domain' ), get_comment_date(), get_comment_time() ); ?>\r\n\t\t\t\t\t\t\t\t\t</time>\r\n\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t<?php edit_comment_link( __( 'Edit', 'ivan_domain' ), '<span class=\"edit-link\">', '</span>' ); ?>\r\n\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t</div><!-- .comment-author -->\r\n\r\n\t\t\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\r\n\t\t\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'ivan_domain' ); ?></p>\r\n\t\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t\t</footer><!-- .comment-meta -->\r\n\r\n\t\t\t\t\t<div class=\"comment-content\">\r\n\t\t\t\t\t\t<?php comment_text(); ?>\r\n\t\t\t\t\t</div><!-- .comment-content -->\r\n\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t\tcomment_reply_link( array_merge( $args, array(\r\n\t\t\t\t\t\t\t'add_below' => 'div-comment',\r\n\t\t\t\t\t\t\t'depth'\t => $depth,\r\n\t\t\t\t\t\t\t'max_depth' => $args['max_depth'],\r\n\t\t\t\t\t\t\t'before'\t=> '<div class=\"reply\">',\r\n\t\t\t\t\t\t\t'after'\t => '</div>',\r\n\t\t\t\t\t\t\t'reply_text'=> __('Reply', 'ivan_domain'),\r\n\t\t\t\t\t\t) ) );\r\n\t\t\t\t\t?>\r\n\r\n\t\t\t\t</div><!-- .col-md-# -->\r\n\t\t\t\t<div class=\"clearfix\"></div>\r\n\t\t\t</div><!-- .row -->\r\n\t\t</article><!-- .comment-body -->\r\n\r\n\t<?php\r\n\tendif;\r\n}", "function block_core_comment_template_render_comments($comments, $block)\n {\n }", "public function templateComment()\n {\n // just showing how powerful can commenting be with extension\n }", "function twentytwelve_comment($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n switch ($comment->comment_type) :\n case 'pingback' :\n case 'trackback' :\n // Display trackbacks differently than normal comments.\n ?>\n <li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n <p><?php _e('Pingback:', 'twentytwelve'); ?> <?php comment_author_link(); ?> <?php edit_comment_link(__('(Edit)', 'twentytwelve'), '<span class=\"edit-link\">', '</span>'); ?></p>\n <?php\n break;\n default :\n // Proceed with normal comments.\n global $post;\n ?>\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n <header class=\"comment-meta comment-author vcard\">\n <?php\n echo get_avatar($comment, 44);\n printf('<cite class=\"fn\">%1$s %2$s</cite>', get_comment_author_link(),\n // If current post author is also comment author, make it known visually.\n ( $comment->user_id === $post->post_author ) ? '<span> ' . __('Post author', 'twentytwelve') . '</span>' : ''\n );\n printf('<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>', esc_url(get_comment_link($comment->comment_ID)), get_comment_time('c'),\n /* translators: 1: date, 2: time */ sprintf(__('%1$s at %2$s', 'twentytwelve'), get_comment_date(), get_comment_time())\n );\n ?>\n </header><!-- .comment-meta -->\n\n <?php if ('0' == $comment->comment_approved) : ?>\n <p class=\"comment-awaiting-moderation\"><?php _e('Your comment is awaiting moderation.', 'twentytwelve'); ?></p>\n <?php endif; ?>\n\n <section class=\"comment-content comment\">\n <?php comment_text(); ?>\n <?php edit_comment_link(__('Edit', 'twentytwelve'), '<p class=\"edit-link\">', '</p>'); ?>\n </section><!-- .comment-content -->\n\n <div class=\"reply\">\n <?php comment_reply_link(array_merge($args, array('reply_text' => __('Reply', 'twentytwelve'), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?>\n </div><!-- .reply -->\n </article><!-- #comment-## -->\n <?php\n break;\n endswitch; // end comment_type check\n }", "function starter_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\n\tif ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>\n\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\n\t\t<div class=\"comment-body\">\n\t\t\t<?php _e( 'Pingback:', 'starter' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit', 'starter' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t</div>\n\n\t<?php else : ?>\n\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>\n\t\t<article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body\">\n\t\t\t<footer class=\"comment-meta\">\n\t\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t\t<?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?>\n\t\t\t\t\t<?php printf( __( '%s <span class=\"says\">says:</span>', 'starter' ), sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n\t\t\t\t</div><!-- .comment-author -->\n\n\t\t\t\t<div class=\"comment-metadata\">\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n\t\t\t\t\t\t<time datetime=\"<?php comment_time( 'c' ); ?>\">\n\t\t\t\t\t\t\t<?php printf( _x( '%1$s at %2$s', '1: date, 2: time', 'starter' ), get_comment_date(), get_comment_time() ); ?>\n\t\t\t\t\t\t</time>\n\t\t\t\t\t</a>\n\t\t\t\t\t<?php edit_comment_link( __( 'Edit', 'starter' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t\t\t</div><!-- .comment-metadata -->\n\n\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'starter' ); ?></p>\n\t\t\t\t<?php endif; ?>\n\t\t\t</footer><!-- .comment-meta -->\n\n\t\t\t<div class=\"comment-content\">\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t</div><!-- .comment-content -->\n\n\t\t\t<?php\n\t\t\t\tcomment_reply_link( array_merge( $args, array(\n\t\t\t\t\t'add_below' => 'div-comment',\n\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t'max_depth' => $args['max_depth'],\n\t\t\t\t\t'before' => '<div class=\"reply\">',\n\t\t\t\t\t'after' => '</div>',\n\t\t\t\t) ) );\n\t\t\t?>\n\t\t</article><!-- .comment-body -->\n\n\t<?php\n\tendif;\n}", "function twentyeleven_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p><?php _e( 'Pingback:', 'twentyeleven' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<footer class=\"comment-meta\">\n\t\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t$avatar_size = 68;\n\t\t\t\t\t\tif ( '0' != $comment->comment_parent )\n\t\t\t\t\t\t\t$avatar_size = 39;\n\n\t\t\t\t\t\techo get_avatar( $comment, $avatar_size );\n\n\t\t\t\t\t\t/* translators: 1: comment author, 2: date and time */\n\t\t\t\t\t\tprintf( __( '%1$s on %2$s <span class=\"says\">said:</span>', 'twentyeleven' ),\n\t\t\t\t\t\t\tsprintf( '<span class=\"fn\">%s</span>', get_comment_author_link() ),\n\t\t\t\t\t\t\tsprintf( '<a href=\"%1$s\"><time pubdate datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\t\t\tget_comment_time( 'f j, Y' ),\n\t\t\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\t\t\tsprintf( __( '%1$s', 'twentyeleven' ), get_comment_date() )\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\t<?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t\t\t</div><!-- .comment-author .vcard -->\n\n\t\t\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t\t\t<em class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentyeleven' ); ?></em>\n\t\t\t\t\t<br />\n\t\t\t\t<?php endif; ?>\n\n\t\t\t</footer>\n\n\t\t\t<div class=\"comment-content\"><?php comment_text(); ?></div>\n\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply <span>&darr;</span>', 'twentyeleven' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\n\t<?php\n\t\t\tbreak;\n\tendswitch;\n}", "public function comments()\n\t{\n\t\t$this->_crud->set_table('ent_cr_comments');\n\t\t$this->_crud->set_subject('Comment');\n\t\t$this->_crud->set_relation('ent_cr_recipes_id','ent_cr_recepies','title');\n\t\t$this->_crud->display_as('ent_cr_recepies_id', 'Recipe');\n\t\t$this->_crud->required_fields('name', 'email', 'comments', 'ent_cr_recipes_id');\n\t\tstatic::$data['name'] = 'crud';\n\t\tstatic::$data['content_replace'] = $this->_crud->render();\n\n\t\t$this->_crud_output('main', static::$data);\n\t}", "function gravit_comment( $comment, $args, $depth ) {\r\r\n\t$GLOBALS['comment'] = $comment;\r\r\n\r\r\n\tif ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>\r\r\n\r\r\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\r\r\n\t\t<div class=\"comment-body\">\r\r\n\t\t\t<?php _e( 'Pingback:', 'gravit' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '<i class=\"fa fa-pencil-square-o\"></i> Edit', 'gravit' ), '<span class=\"edit-link\">', '</span>' ); ?>\r\r\n\t\t</div>\r\r\n\r\r\n\t<?php else : ?>\r\r\n\r\r\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>\r\r\n\t\t<article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body\">\r\r\n\t\t\t<footer class=\"comment-meta\">\r\r\n\t\t\t\t<div class=\"comment-author vcard\">\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\t<?php if ( 0 != $args['avatar_size'] ) { echo get_avatar( $comment, $args['avatar_size'] ); } ?>\r\r\n\r\r\n\t\t\t\t\t<div class=\"comment-name\">\r\r\n\t\t\t\t\t\t<?php printf( __( '%s', 'gravit' ), sprintf( '<span class=\"fn\">%s</span>', get_comment_author_link() ) ); ?>\r\r\n\t\t\t\t\t\t<div class=\"author-star\">\r\r\n\t\t\t\t\t\t\t<i class=\"fa fa-star\"></i>\r\r\n\t\t\t\t\t\t</div>\r\r\n\t\t\t\t\t</div>\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\t<div class=\"comment-metadata\">\r\r\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\r\r\n\t\t\t\t\t\t<time datetime=\"<?php comment_time( 'c' ); ?>\">\r\r\n\t\t\t\t\t\t\t<?php printf( _x( '%1$s at %2$s', '1: date, 2: time', 'gravit' ), get_comment_date(), get_comment_time() ); ?>\r\r\n\t\t\t\t\t\t</time>\r\r\n\t\t\t\t\t</a>\r\r\n\t\t\t\t\t<?php edit_comment_link( __( '| Edit', 'gravit' ), '<span class=\"edit-link\">', '</span>' ); ?>\r\r\n\t\t\t\t\t</div><!-- .comment-metadata -->\r\r\n\r\r\n\t\t\t\t</div><!-- .comment-author -->\r\r\n\r\r\n\t\t\t\t<div class=\"comment-content\">\r\r\n\t\t\t\t\t<?php comment_text(); ?>\r\r\n\t\t\t\t</div><!-- .comment-content -->\t\t\t\t\r\r\n\r\r\n\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\r\r\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'gravit' ); ?></p>\r\r\n\t\t\t\t<?php endif; ?>\r\r\n\t\t\t</footer><!-- .comment-meta -->\t\t\t\r\r\n\r\r\n\t\t\t<?php\r\r\n\t\t\t\tcomment_reply_link( array_merge( $args, array(\r\r\n\t\t\t\t\t'add_below' => 'div-comment',\r\r\n\t\t\t\t\t'depth' => $depth,\r\r\n\t\t\t\t\t'max_depth' => $args['max_depth'],\r\r\n\t\t\t\t\t'before' => '<div class=\"reply\">',\r\r\n\t\t\t\t\t'after' => '</div>',\r\r\n\t\t\t\t) ) );\r\r\n\t\t\t?>\r\r\n\r\r\n\t\t</article><!-- .comment-body -->\r\r\n\t<?php\r\r\n\tendif;\r\r\n}", "function pelham_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) :\n case 'pingback' :\n case 'trackback' :\n // Display trackbacks differently than normal comments.\n ?>\n <li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n <p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n <?php\n break;\n default :\n // Proceed with normal comments.\n global $post;\n ?>\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n <header class=\"comment-meta comment-author vcard\">\n <?php\n echo get_avatar( $comment, 44 );\n printf( '<cite class=\"fn\">%1$s %2$s</cite>',\n get_comment_author_link(),\n // If current post author is also comment author, make it known visually.\n ( $comment->user_id === $post->post_author ) ? '<span> ' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''\n );\n printf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n esc_url( get_comment_link( $comment->comment_ID ) ),\n get_comment_time( 'c' ),\n /* translators: 1: date, 2: time */\n sprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\n );\n ?>\n </header><!-- .comment-meta -->\n\n <?php if ( '0' == $comment->comment_approved ) : ?>\n <p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>\n <?php endif; ?>\n\n <section class=\"comment-content comment\">\n <?php comment_text(); ?>\n <?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '<p class=\"edit-link\">', '</p>' ); ?>\n </section><!-- .comment-content -->\n\n <div class=\"reply\">\n <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'twentytwelve' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div><!-- .reply -->\n </article><!-- #comment-## -->\n <?php\n break;\n endswitch; // end comment_type check\n}", "public function showAllComments()\n {\n foreach ($this->_commentsArray as $comment) {\n echo commentsTemplate($this->_view, $comment);\n }\n }", "function get_ajax_comments($url) {\n\n while (have_posts()) : the_post();\n comments_template('/templates/comments.php');\n endwhile;\n}", "function mpcth_comment( $comment, $args, $depth ) {\r\n\t$GLOBALS['comment'] = $comment;\r\n\r\n\tif(get_comment_author_email() == get_the_author_meta('email')){\r\n\t\t$author = \"comment_author\";\r\n\t} else {\r\n\t\t$author =\"\";\r\n\t}\r\n\r\n\tswitch ( $comment->comment_type ) :\r\n\t\tcase 'pingback' :\r\n\t\tcase 'trackback' :\r\n\t\t// Display trackbacks differently than normal comments.\r\n\t?>\r\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\r\n\t\t<p><?php _e('Pingback:', 'mpcth'); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __('(Edit)', 'mpcth'), '<span class=\"edit-link\">', '</span>' ); ?></p>\r\n\t<?php\r\n\t\t\tbreak;\r\n\t\tdefault :\r\n\r\n\t\t// Proceed with normal comments.\r\n\t\tglobal $post;\r\n\t?>\r\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\r\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\r\n\t\t\t<header class=\"comment-meta comment-author vcard\">\r\n\t\t\t\t<?php\r\n\t\t\t\t\techo get_avatar( $comment, 80 );\r\n\t\t\t\t\tprintf('<cite>%1$s </cite>',\r\n\t\t\t\t\t\tget_comment_author_link(),\r\n\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\r\n\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span> ' . __('Post author', 'mpcth') . '</span>' : ''\r\n\t\t\t\t\t);\r\n\t\t\t\t\tprintf('- <a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\r\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\r\n\t\t\t\t\t\tget_comment_time( 'c' ),\r\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\r\n\t\t\t\t\t\tsprintf( __('%1$s at %2$s', 'mpcth'), get_comment_date(), get_comment_time() )\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\tcomment_reply_link( array_merge( $args, array( 'reply_text' => __('reply', 'mpcth'), 'before' => ' - ', 'after' => '', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) );\r\n\r\n\t\t\t\t\techo (($author != \"\") ? ' - <span>' . __('author', 'mpcth') . '</span>' : '');\r\n\t\t\t\t\techo '<a class=\"comment-fold mpcth-sc-icon-up-open\" href=\"#\"></a>';\r\n\r\n\t\t\t\t?>\r\n\t\t\t</header><!-- .comment-meta -->\r\n\r\n\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\r\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e('Your comment is awaiting moderation.', 'mpcth'); ?></p>\r\n\t\t\t<?php endif; ?>\r\n\r\n\t\t\t<section class=\"comment-content comment\">\r\n\t\t\t\t<?php comment_text(); ?>\r\n\t\t\t\t\r\n\t\t\t</section><!-- .comment-content -->\r\n\t\t</article><!-- #comment-## -->\r\n\t<?php\r\n\t\tbreak;\r\n\tendswitch; // end comment_type check\r\n}", "function newsdot_comments_link() {\n\t\tif ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {\n\t\t\techo '<span class=\"comments-link\">';\n\t\t\techo '<i class=\"far fa-comments mr-1\"></i>';\n\t\t\tcomments_popup_link(\n\t\t\t\tsprintf(\n\t\t\t\t\twp_kses(\n\t\t\t\t\t\t/* translators: %s: post title */\n\t\t\t\t\t\t__( 'Leave a Comment<span class=\"screen-reader-text\"> on %s</span>', 'newsdot' ),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'span' => array(\n\t\t\t\t\t\t\t\t'class' => array(),\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\twp_kses_post( get_the_title() )\n\t\t\t\t)\n\t\t\t);\n\t\t\techo '</span>';\n\t\t}\n\t}", "function flexfour_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t// Display trackbacks differently than normal comments.\n\t?>\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t<p><?php _e( 'Pingback:', 'flexfour' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'flexfour' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t\t// Proceed with normal comments.\n\t\tglobal $post;\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<header class=\"comment-meta comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<cite class=\"fn\">%1$s %2$s</cite>',\n\t\t\t\t\t\tget_comment_author_link(),\n\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span> ' . __( 'Post author', 'flexfour' ) . '</span>' : ''\n\t\t\t\t\t);\n\t\t\t\t\tprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\" itemprop=\"commentTime\">%3$s</time></a>',\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</header><!-- .comment-meta -->\n\n\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'flexfour' ); ?></p>\n\t\t\t<?php endif; ?>\n\n\t\t\t<section class=\"comment-content comment\" itemprop=\"commentText\">\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t<?php edit_comment_link( __( 'Edit', 'flexfour' ), '<p class=\"edit-link\">', '</p>' ); ?>\n\t\t\t</section><!-- .comment-content -->\n\n\t\t\t<div class=\"reply\" itemprop=\"replyToUrl\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'flexfour' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\t<?php\n\t\tbreak;\n\tendswitch; // end comment_type check\n\t\n\t}", "public function displayComments()\n {\n global $lexicon;\n $lexicon = new Lexicon(COMMENTIA_LEX_LOCALE);\n\n global $roles;\n $roles = new Roles();\n\n /**\n * Iterates through each comment recursively, and appends it to the var holding the HTML markup.\n *\n * @param array $comment An array containing all the comment data\n */\n\n foreach ($this->comments as $comment) {\n if (isset($this->comments['ucid-'.$comment['ucid']])) {\n $this->renderCommentView($comment['ucid']);\n unset($this->comments['ucid-'.$comment['ucid']]);\n }\n }\n\n if ($_SESSION['__COMMENTIA__']['member_is_logged_in']) {\n $this->html_output .= ('<div class=\"commentia-new_comment_area\">'.\"\\n\".'<h4>'.TITLES_NEW_COMMENT.'</h4>'.\"\\n\".'<textarea id=\"comment-box\" oninput=\"autoGrow(this);\"></textarea>'.\"\\n\".'<button id=\"post-comment-button\" onclick=\"postNewComment(this);\">'.COMMENT_CONTROLS_PUBLISH.'</button>'.\"\\n\".'</div>'.\"\\n\");\n }\n\n return $this->html_output;\n }", "function frmwrk_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t// Display trackbacks differently than normal comments.\n\t?>\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t<p><?php _e( 'Pingback:', 'frmwrk' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'frmwrk' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t\t// Proceed with normal comments.\n\t\tglobal $post;\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<header class=\"comment-meta comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t\techo get_avatar( $comment, 44 );\n\t\t\t\t\tprintf( '<cite class=\"fn\">%1$s %2$s</cite>',\n\t\t\t\t\t\tget_comment_author_link(),\n\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span> ' . __( 'Post author', 'frmwrk' ) . '</span>' : ''\n\t\t\t\t\t);\n\t\t\t\t\tprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'frmwrk' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</header><!-- .comment-meta -->\n\n\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'frmwrk' ); ?></p>\n\t\t\t<?php endif; ?>\n\n\t\t\t<section class=\"comment-content comment\">\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t<?php edit_comment_link( __( 'Edit', 'frmwrk' ), '<p class=\"edit-link\">', '</p>' ); ?>\n\t\t\t</section><!-- .comment-content -->\n\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'frmwrk' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\t<?php\n\t\tbreak;\n\tendswitch; // end comment_type check\n}", "function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n <div id=\"comment-<?php comment_ID(); ?>\" <?php comment_class('cf'); ?>>\n <?php echo comment_placeholder($comment, $args, $depth); ?>\n <?php // </li> is added by WordPress automatically ?>\n<?php\n}", "function twentyeleven_comment( $comment, $args, $depth ) {\n\t\n\t$GLOBALS['comment'] = $comment;\n\t\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :?>\n\t\n\t<li class=\"post pingback\">\n\t\t<p><?php _e( 'Pingback:', 'twentyeleven' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t?>\n\t\n\t<li <?php comment_class('cf'); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\n\t\t<div class=\"comment-meta\">\t\t\n\t\t<?php $avatar_size = 120; if ( '0' != $comment->comment_parent ) $avatar_size = 120;\n\t\t\techo get_avatar( $comment, $avatar_size );?>\n\t\t\t<div class=\"author-link\"><?php echo get_comment_author_link();?></div>\n\t\t\t\n\t\t\t<div class=\"date\"><?php echo get_comment_date('F j');?></div>\n\t\t\t<!--<div class=\"adminIcon\">ADMIN</div>-->\n\t\t</div><!--end commentMeta-->\n\t\n\t\t<div class=\"comment-body\">\n\t\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t<em class=\"comment-awaiting-moderation\">\n\t\t\t\t<?php _e( 'Your comment is awaiting moderation.', 'twentyeleven' ); ?></em>\n\t\t\t<br />\n\t\t\t<?php endif; ?>\n\t\t\t<?php comment_text(); ?>\n\t\t\t<?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class=\"edit-link\">', '</span>' ); ?>\t\t\t\t\t\n\t\t\n\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'REPLY', 'twentyeleven' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\n\t\t</div>\n</li>\n\t<?php\n\t\tbreak;\n\tendswitch;\n}", "public function comments() {\n\t\t\t\t\t\t\n\t\t\t$output = '';\n\t\t\t$total = get_comments_number();\n\t\t\t\n\t\t\t$output['label'] = __('Show Comments', 'theme translation');\n\t\t\t$output['link'] = $total >= 1 ? ($total == 1 ? sprintf(__('%s Comment', 'theme translation'), get_comments_number()) : sprintf(__('%s Comments', 'theme translation'), get_comments_number())) : __('No Comments', 'theme translation');\n\t\t\t$output['url'] = get_permalink().'#comments';\n\t\t\t$output['total'] = $total;\n\n\t\t\treturn $output;\n\t\t}", "function theme_comments_render_list($callback) {\n\t?>\n\t<?php if ( have_comments() ) : ?>\n\t\t<h3><?php comments_number('No Responses', 'One Response', '% Responses' );?></h3>\n\t\t<ol class=\"commentlist\">\n\t\t\t<?php wp_list_comments('callback=' . $callback); ?>\n\t\t</ol>\n\n\t\t<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>\n\t\t\t<div class=\"navigation\">\n\t\t\t\t<div class=\"alignleft\"><?php previous_comments_link() ?></div>\n\t\t\t\t<div class=\"alignright\"><?php next_comments_link() ?></div>\n\t\t\t</div>\n\t\t<?php endif; ?>\n\t<?php else : ?>\n\t\t<?php if ( comments_open() ) : ?>\n\t <!-- If comments are open, but there are no comments. -->\n\t\t <?php else : // comments are closed ?>\n\t\t\t<p class=\"nocomments\">Comments are closed.</p>\n\t\t<?php endif; ?>\n\t<?php endif; ?>\n\t<?php\n}", "function redart_comment_style( $comment, $args, $depth ) {\r\n\t$GLOBALS['comment'] = $comment;\r\n\tswitch ($comment->comment_type ) :\r\n\tcase 'pingback':\r\n\tcase 'trackback':\r\n\t\techo '<li class=\"post pingback\">';\r\n\t\techo \"<p>\";\r\n\t\tesc_html_e('Pingback:', 'redart');\r\n\t\tcomment_author_link();\r\n\t\tedit_comment_link(esc_html__('Edit', 'redart'), ' ', '');\r\n\t\techo \"</p>\";\r\n\t\tbreak;\r\n\r\n\tdefault:\r\n\tcase '':\r\n\t\techo \"<li \";\r\n\t\tcomment_class();\r\n\t\techo ' id=\"li-comment-';\r\n\t\tcomment_ID();\r\n\t\techo '\">';\r\n\t\techo '<article class=\"comment\" id=\"comment-';\r\n\t\tcomment_ID();\r\n\t\techo '\">';\r\n\r\n\t\techo '<header class=\"comment-author\">'.get_avatar($comment, 450).'</header>';\r\n\r\n\t\techo '<section class=\"comment-details\">';\r\n\t\techo '\t<div class=\"author-name\">';\r\n\t\techo \t\tcomment_reply_link(array_merge($args, array('reply_text' => ucfirst(get_comment_author_link()) , 'depth' => $depth, 'max_depth' => $args['max_depth'])));\r\n\t\techo '\t\t<span class=\"commentmetadata\"> / '.get_comment_date('d M Y').'</span>';\r\n\t\techo '\t</div>';\t\t\r\n\t\techo ' <div class=\"comment-body\">';\r\n\t\t\t\t\tcomment_text();\r\n\t\t\t\t\tif ($comment->comment_approved == '0') :\r\n\t\t\t\t\t\tesc_html_e('Your comment is awaiting moderation.', 'redart');\r\n\t\t\t\t\tendif;\r\n\t\t\t\t\tedit_comment_link(esc_html__('Edit', 'redart'));\r\n\t\techo '\t</div>';\r\n\t\techo '\t<div class=\"reply\">';\r\n\t\techo \t\tcomment_reply_link(array_merge($args, array('reply_text' => esc_html__('Reply', 'redart'), 'depth' => $depth, 'max_depth' => $args['max_depth'])));\r\n\t\techo '\t</div>';\r\n\t\techo '</section>';\r\n\t\techo '</article><!-- .comment-ID -->';\r\n\t\tbreak;\r\n\tendswitch;\r\n}", "function my_custom_comment( $comment, $args, $depth ) {\n\t\n\t$GLOBALS['comment'] = $comment;\n\n\t// Display trackbacks differently than normal comments.\n\tswitch ( $comment->comment_type ) :\n\n\n\t\t// pingback or trackback\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t?>\n\t\t\n\t\t\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\n\t\t\t<p>Pingback: <?php comment_author_link(); ?></p>\n\t\t<?php\n\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t// normal comment\n\t\tdefault :\n\t\tglobal $post;\n\t\t?>\n\t\t\n\t\t<li id=\"li-comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\t\n\t\t\t<section id=\"comment-<?php comment_ID(); ?>\" class=\"row\">\n\t\t\t\n\t\t\t\t<header class=\"comment-author vcard\">\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"avatar\"><?php echo get_avatar( $comment, 60 ); ?></div>\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"meta comment-meta\">\n\t\n\t\t\t\t\t\t<p class=\"name\">\n\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tprintf( '<b class=\"fn\">%1$s</b> %2$s', get_comment_author_link(),\n\t\t\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span>Post author</span>' : '' );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</p>\n\t\n\t\t\t\t\t\t<p class=\"time\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\t\t\tsprintf( '%1$s at %2$s', get_comment_date( 'm/d/y' ), get_comment_time() ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</p>\n\t\n\t\t\t\t\t\t<?php edit_comment_link( 'Edit comment', '<p class=\"edit-link\">', '</p>' ); ?>\n\t\t\t\t\t\n\t\t\t\t\t</div><!-- meta -->\n\t\t\t\t</header><!-- comment-author -->\n\t\t\t\t\n\t\t\t\t<article class=\"comment-content content\">\n\t\t\t\t\n\t\t\t\t\t<?php \n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( '0' == $comment->comment_approved ) echo( '<p class=\"comment-awaiting-moderation\">Your comment is awaiting moderation.</p>' );\n\t\n\t\t\t\t\t\tcomment_text();\n\t\t\t\t\t\t\n\t\t\t\t\t?>\n\t\t\t\t\t\n\t\t\t\t\t<p class=\"reply-link\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => 'Reply', 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t\t\t\t\n\t\t\t\t\t</p>\n\t\t\t\t\t\t\n\t\t\t\t</article><!-- .comment-content -->\n\t\n\t\n\t\t\t</section><!-- #comment-## -->\n\t\t\n\t\t<?php\n\t\tbreak;\n\t\t\n\tendswitch; // end comment_type check\n\t\n}", "function emc_discussion_comments() {\r\n\r\n\t// Get two random comments from the current post\r\n\t$args = array(\r\n\t\t'post_id' => get_the_ID(),\r\n\t\t'status' => 'approve',\r\n\t);\r\n\t$comment_query = new WP_Comment_Query;\r\n\t$comments = $comment_query->query( $args );\r\n\r\n\tif ( ! empty( $comments ) ) {\r\n\t\tshuffle( $comments );\r\n\t\t$comments = array_slice( $comments, 0, 2 );\r\n\t\tdbgx_trace_var( $comments );\r\n\r\n\t\t$html = '';\r\n\t\t// Loop through each comment\r\n\t\tforeach ( $comments as $comment ) {\r\n\t\t\t$excerpt = wp_trim_words( $comment->comment_content, 35 );\r\n\t\t\t$commenter = sprintf( __( '&mdash; <a href=\"%1$s\" title=\"%2$s\">%3$s</a>', 'emc' ),\r\n\t\t\t\tget_comment_link( $comment ),\r\n\t\t\t\tsprintf( __( 'View the full comment by %s', 'emc' ), esc_attr( $comment->comment_author ) ),\r\n\t\t\t\tesc_html( $comment->comment_author )\r\n\t\t\t);\r\n\t\t\t$html .= '<div class=\"emc-comment\">';\r\n\t\t\t$html .= '<blockquote>' . esc_html( $excerpt ) . '</blockquote>';\r\n\t\t\t$html .= '<p class=\"emc-commenter-link\">' . $commenter . '</p>';\r\n\t\t\t$html .= '</div><!-- .emc-comment -->';\r\n\r\n\t\t}\r\n\t} else {\r\n\t\t$html = sprintf( __( '<p class=\"emc-no-comments\">No comments yet. Be the first and <a href=\"%s\" title=\"Start the discussion\">let us know what you think!</a></p>', 'emc' ),\r\n\t\t\tget_permalink()\r\n\t\t);\r\n\t}\r\n\r\n\techo $html;\r\n\r\n}", "function flawless_comment( $comment, $args, $depth ) {\r\n $GLOBALS[ 'comment' ] = $comment;\r\n switch ( $comment->comment_type ) :\r\n case '' :\r\n ?>\r\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\" data-comment_id=\"<?php comment_ID(); ?>\">\r\n <?php echo get_avatar( $comment, 80 ); ?>\r\n\r\n <div id=\"comment-<?php comment_ID(); ?>\" class=\"comment-content\">\r\n <div class=\"comment-author vcard\">\r\n\r\n <?php printf( __( '%s', 'flawless' ), sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\r\n <span class=\"comment-meta commentmetadata\"><a\r\n href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\r\n <?php\r\n /* translators: 1: date, 2: time */\r\n printf( __( '%1$s at %2$s', 'flawless' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '( Edit )', 'flawless' ), ' ' );\r\n ?>\r\n\r\n <span class=\"reply\">\r\n <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args[ 'max_depth' ] ) ) ); ?>\r\n </span><!-- .reply -->\r\n </span><!-- .comment-meta .commentmetadata -->\r\n </div>\r\n <!-- .comment-author .vcard -->\r\n <?php if ( $comment->comment_approved == '0' ) : ?>\r\n <em><?php _e( 'Your comment is awaiting moderation.', 'flawless' ); ?></em>\r\n <br/>\r\n <?php endif; ?>\r\n\r\n <div class=\"comment-body\"><?php comment_text(); ?></div>\r\n </div><!-- #comment-## -->\r\n\r\n <?php\r\n break;\r\n case 'pingback' :\r\n case 'trackback' :\r\n ?>\r\n <li class=\"post pingback\">\r\n <p><?php _e( 'Pingback:', 'flawless' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '( Edit )', 'flawless' ), ' ' ); ?></p>\r\n <?php\r\n break;\r\n endswitch;\r\n }", "protected function comments_view(array $options = array()){\r\n\r\n\t\t/* Options */\r\n\t\tif (Utility::is_loopable($options)){\r\n\t\t\tforeach($options as $key => $value){\r\n\t\t\t\tswitch($key){\r\n\t\t\t\t\tcase 'type':\r\n\t\t\t\t\t\t$type = $value;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* Get display data */\r\n\t\t$object = $this->get_commentable_object();\r\n\t\t$commentCount = count($object['comments']);\r\n\t\t\r\n\t\t/* Load template */\r\n\t\tinclude(BLUPATH_TEMPLATES.'/newcomments/wrapper.php');\r\n\r\n\t}", "function phptemplate_preprocess_comment_wrapper(&$vars) {\r\n $vars['display_mode'] = COMMENT_MODE_FLAT_EXPANDED;\r\n $vars['display_order'] = COMMENT_ORDER_OLDEST_FIRST;\r\n $vars['comment_controls_state'] = COMMENT_CONTROLS_HIDDEN;\r\n}", "private function my_comments_list()\n\t{\n\t\t$comments = ORM::factory('forum_cat_post_comment')\n\t\t\t->with('forum_cat_post')\n\t\t\t->where(array(\n\t\t\t\t'owner_id'\t=> $this->owner->get_user()->id,\n\t\t\t\t'is_post'\t\t=> '0'\n\t\t\t))\n\t\t\t->orderby(\"forum_cat_post_comments.$this->sort_by\", $this->order)\n\t\t\t->find_all();\n\t\tif(0 == $comments->count())\n\t\t\treturn 'No comments added yet.';\n\t\t\t\n\t\t$view = new View('public_forum/my_comments_list');\n\t\t$view->comments = $comments;\n\t\treturn $view;\n\t}", "function phptemplate_comment_wrapper($content, $node) {\n if (!$content || $node->type == 'forum') {\n return '<div id=\"comments\">'. $content .'</div><a name=\"comments\"></a>';\n }\n else {\n return '<div id=\"comments\"><h2 class=\"comments\">'. t('Comments') .'</h2>'. $content .'</div><a name=\"comments\"></a>';\n }\n}", "function cosmetics_comment_form() {\n\n if ( comments_open() || get_comments_number() ) :\n?>\n\n <div class=\"site-comments\">\n <?php comments_template( '', true ); ?>\n </div>\n\n<?php\n endif;\n}", "function tempera_number_comments() { ?>\n\t\t\t<h3 id=\"comments-title\"><i class=\"icon-replies\" ></i>\n\t\t\t\t<?php printf( _n( 'One Comment:', '%1$s Comments:', get_comments_number(), 'tempera' ),\n\t\t\t\tnumber_format_i18n( get_comments_number() )); ?>\n\t\t\t</h3>\n<?php }", "function twentyten_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase '' :\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<div id=\"comment-<?php comment_ID(); ?>\">\n\t\t<div class=\"comment-author vcard\">\n\t\t\t<?php echo get_avatar( $comment, 40 ); ?>\n\t\t\t<?php printf( __('%s <span class=\"says\">says:</span>','twentyten'), sprintf('<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n\t\t</div><!-- .comment-author .vcard -->\n\t\t<?php if ( $comment->comment_approved == '0') : ?>\n\t\t\t<em><?php _e('Your comment is awaiting moderation.','twentyten'); ?></em>\n\t\t\t<br />\n\t\t<?php endif; ?>\n\n\t\t<div class=\"comment-meta commentmetadata\"><a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n\t\t\t<?php\n\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\tprintf( __('%1$s at %2$s','twentyten'), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __('(Edit)','twentyten'),' ');\n\t\t\t?>\n\t\t</div><!-- .comment-meta .commentmetadata -->\n\n\t\t<div class=\"comment-body\"><?php comment_text(); ?></div>\n\n\t\t<div class=\"reply\">\n\t\t\t<?php comment_reply_link( array_merge( $args, array('depth' => $depth,'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t</div><!-- .reply -->\n\t</div><!-- #comment-## -->\n\n\t<?php\n\t\t\tbreak;\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p><?php _e('Pingback:','twentyten'); ?> <?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)','twentyten'),' '); ?></p>\n\t<?php\n\t\t\tbreak;\n\tendswitch;\n}", "function list_pings($comment, $args, $depth) {\r\n\r\n\t$GLOBALS['comment'] = $comment; ?>\r\n\t\r\n\t<li id=\"comment-<?php comment_ID(); ?>\">\r\n\t\t<span class=\"author\"><?php comment_author_link(); ?></span> - \r\n\t\t<span class=\"date\"><?php echo get_comment_date() ?></span>\r\n\t\t<span class=\"pingcontent\"><?php comment_text() ?></span>\r\n\r\n<?php \r\n}", "function voyage_mikado_comment($comment, $args, $depth) {\n\n $GLOBALS['comment'] = $comment;\n\n global $post;\n\n $is_pingback_comment = $comment->comment_type == 'pingback';\n $is_author_comment = $post->post_author == $comment->user_id;\n\n $comment_class = 'mkdf-comment clearfix';\n\n if($is_author_comment) {\n $comment_class .= ' mkdf-post-author-comment';\n }\n\n if($is_pingback_comment) {\n $comment_class .= ' mkdf-pingback-comment';\n }\n\n ?>\n\n <li>\n <div class=\"<?php echo esc_attr($comment_class); ?>\">\n <?php if(!$is_pingback_comment) { ?>\n <div class=\"mkdf-comment-image\"> <?php echo voyage_mikado_kses_img(get_avatar($comment, 75)); ?> </div>\n <?php } ?>\n <div class=\"mkdf-comment-text\">\n <div class=\"mkdf-comment-info\">\n <h5 class=\"mkdf-comment-name\">\n <?php if($is_pingback_comment) {\n esc_html_e('Pingback:', 'voyage');\n } ?>\n <?php echo wp_kses_post(get_comment_author_link()); ?>\n </h5>\n <span class=\"mkdf-comment-date\"><?php comment_time(get_option('date_format')); ?><?php esc_html_e(' at ', 'voyage'); ?><?php comment_time(get_option('time_format')); ?></span>\n </div>\n\n <?php if(!$is_pingback_comment) { ?>\n <div class=\"mkdf-text-holder\" id=\"comment-<?php echo comment_ID(); ?>\">\n <?php comment_text(); ?>\n <div class=\"mkdf-comment-reply-holder\">\n <?php\n comment_reply_link(array_merge($args, array(\n 'depth' => $depth,\n 'max_depth' => $args['max_depth']\n )));\n edit_comment_link();\n ?>\n </div>\n </div>\n <?php } ?>\n </div>\n </div>\n <?php //li tag will be closed by WordPress after looping through child elements ?>\n\n <?php\n }", "function rusticmodern_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase '' :\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<div id=\"comment-<?php comment_ID(); ?>\">\n\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t<?php echo get_avatar( $comment, 40 ); ?>\n\t\t\t\t<?php printf( __( '%s <span class=\"says\">says:</span>', 'rusticmodern' ), sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n\t\t\t</div><!-- .comment-author .vcard -->\n\t\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t\t<em class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'rusticmodern' ); ?></em>\n\t\t\t\t<br />\n\t\t\t<?php endif; ?>\n\n\t\t\t<div class=\"comment-meta commentmetadata\"><a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n\t\t\t\t<?php\n\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\tprintf( __( '%1$s at %2$s', 'rusticmodern' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'rusticmodern' ), ' ' );\n\t\t\t\t?>\n\t\t\t</div><!-- .comment-meta .commentmetadata -->\n\n\t\t\t<div class=\"comment-body\"><?php comment_text(); ?></div>\n\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</div><!-- #comment-## -->\n\n\t<?php\n\t\t\tbreak;\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p><?php _e( 'Pingback:', 'rusticmodern' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'rusticmodern' ), ' ' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\tendswitch;\n}", "function cinerama_edge_comment( $comment, $args, $depth ) {\n\t\t$GLOBALS['comment'] = $comment;\n\t\t\n\t\tglobal $post;\n\t\t\n\t\t$is_pingback_comment = $comment->comment_type == 'pingback';\n\t\t$is_author_comment = $post->post_author == $comment->user_id;\n\t\t\n\t\t$comment_class = 'edgtf-comment clearfix';\n\t\t\n\t\tif ( $is_author_comment ) {\n\t\t\t$comment_class .= ' edgtf-post-author-comment';\n\t\t}\n\t\t\n\t\tif ( $is_pingback_comment ) {\n\t\t\t$comment_class .= ' edgtf-pingback-comment';\n\t\t}\n\t\t?>\n\t\t\n\t\t<li>\n\t\t<div class=\"<?php echo esc_attr( $comment_class ); ?>\">\n\t\t\t<?php if ( ! $is_pingback_comment ) { ?>\n\t\t\t\t<div class=\"edgtf-comment-image\"> <?php echo cinerama_edge_kses_img( get_avatar( $comment, 'thumbnail' ) ); ?> </div>\n\t\t\t<?php } ?>\n\t\t\t<div class=\"edgtf-comment-text\">\n\t\t\t\t<div class=\"edgtf-comment-date\"><?php comment_time( get_option( 'date_format' ) ); ?></div>\n\t\t\t\t<div class=\"edgtf-comment-info\">\n\t\t\t\t\t<h5 class=\"edgtf-comment-name vcard\">\n\t\t\t\t\t\t<?php if ( $is_pingback_comment ) {\n\t\t\t\t\t\t\tesc_html_e( 'Pingback:', 'cinerama' );\n\t\t\t\t\t\t} ?>\n\t\t\t\t\t\t<?php echo wp_kses_post( get_comment_author_link() ); ?>\n\t\t\t\t\t</h5>\n\t\t\t\t</div>\n\t\t\t\t<?php if ( ! $is_pingback_comment ) { ?>\n\t\t\t\t\t<div class=\"edgtf-text-holder\" id=\"comment-<?php echo comment_ID(); ?>\">\n\t\t\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t\t</div>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php\n\t\t\t\tcomment_reply_link( array_merge( $args, array(\n\t\t\t\t\t'reply_text' => esc_html__( 'reply', 'cinerama' ),\n\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t'max_depth' => $args['max_depth']\n\t\t\t\t) ) );\n\t\t\t\tedit_comment_link( esc_html__( 'edit', 'cinerama' ) );\n\t\t\t\t?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php //li tag will be closed by WordPress after looping through child elements ?>\n\t\t<?php\n\t}", "function ffeeeedd_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) {\n case 'pingback' :\n case 'trackback' :\n // On affiche différemment les trackbacks. ?>\n <li <?php comment_class(); ?>>\n <p><?php _e( 'Pingback :', 'ffeeeedd' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'ffeeeedd' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n <?php break;\n default :\n // On passe aux commentaires standards.\n global $post; ?>\n <li itemscope itemtype=\"http://schema.org/UserComments\">\n <article role=\"article\">\n <header>\n <?php echo get_avatar( $comment, 44 );\n printf( '<cite itemprop=\"creator\">%1$s %2$s</cite>',\n get_comment_author_link(),\n ( $comment->user_id === $post->post_author ) ? '<small> (' . __( 'Post author', 'ffeeeedd' ) . ' ) </small>' : ''\n );\n printf( '<time datetime=\"%2$s\" itemprop=\"commentTime\">%3$s</time>',\n esc_url( get_comment_link( $comment->comment_ID ) ),\n get_comment_time( 'c' ),\n sprintf( '%1$s à %2$s', get_comment_date(), get_comment_time() )\n ); ?>\n </header>\n\n <?php if ( '0' == $comment->comment_approved ) { ?>\n <p><?php _e( 'Your comment is awaiting moderation.', 'ffeeeedd' ); ?>.</p>\n <?php } ?>\n\n <div itemprop=\"commentText\">\n <?php comment_text(); ?>\n <?php edit_comment_link( __( 'Edit', 'ffeeeedd' ), '<p>', '</p>' ); ?>\n </div>\n\n <div class=\"reply\" itemprop=\"replyToUrl\">\n <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'ffeeeedd' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div>\n </article>\n <?php break;\n }\n }", "function listCommentsBack()\n{\n $comments = getAllComments();\n require('view/backend/manageCommentsView.php');\n}", "function flatsome_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p><?php _e( 'Pingback:', 'flatsome' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'flatsome' ), '<span class=\"edit-link\">', '<span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment-inner\">\n\n <div class=\"flex-row align-top\">\n <div class=\"flex-col\">\n <div class=\"comment-author mr-half\">\n <?php echo get_avatar( $comment, 70 ); ?>\n </div>\n </div><!-- .large-3 -->\n\n <div class=\"flex-col flex-grow\">\n <?php printf( __( '%s <span class=\"says\">says:</span>', 'flatsome' ), sprintf( '<cite class=\"strong fn\">%s</cite>', get_comment_author_link() ) ); ?>\n <?php if ( $comment->comment_approved == '0' ) : ?>\n <em><?php _e( 'Your comment is awaiting moderation.', 'flatsome' ); ?></em>\n <br />\n <?php endif; ?>\n\n <div class=\"comment-content\"><?php comment_text(); ?></div>\n\n\n <div class=\"comment-meta commentmetadata uppercase is-xsmall clear\">\n <a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\"><time datetime=\"<?php comment_time( 'c' ); ?>\" class=\"pull-left\">\n <?php printf( _x( '%1$s at %2$s', '1: date, 2: time', 'flatsome' ), get_comment_date(), get_comment_time() ); ?>\n </time></a>\n <?php edit_comment_link( __( 'Edit', 'flatsome' ), '<span class=\"edit-link ml-half strong\">', '<span>' ); ?>\n\n <div class=\"reply pull-right\">\n <?php\n comment_reply_link( array_merge( $args,array(\n 'depth' => $depth,\n 'max_depth' => $args['max_depth'],\n ) ) );\n ?>\n </div><!-- .reply -->\n </div><!-- .comment-meta .commentmetadata -->\n\n </div><!-- .flex-col -->\n </div><!-- .flex-row -->\n\t\t</article>\n <!-- #comment -->\n\n\t<?php\n\t\t\tbreak;\n\tendswitch;\n}", "function wap8_trackbacks( $comment ) {\n$GLOBALS['comment'] = $comment; ?>\n<li><?php printf( __( '%s', 'designcrumbs' ), get_comment_author_link() ) ?> <?php edit_comment_link( __( 'Edit', 'designcrumbs' ), '<span>', '</span>' ); ?>\n<?php\n}", "function wolf_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t// Display trackbacks differently than normal comments.\n\t?>\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\n\t\t<p><?php _e( 'Pingback:', 'wolf' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit', 'wolf' ), '<span class=\"ping-meta\"><span class=\"edit-link\">', '</span></span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t\t// Proceed with normal comments.\n\t?>\n\t<li id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\n\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t<?php echo get_avatar( $comment, 74 ); ?>\n\t\t\t</div><!-- .comment-author -->\n\n\t\t\t<header class=\"comment-meta\">\n\t\t\t\t<cite class=\"fn\"><?php comment_author_link(); ?></cite>\n\t\t\t\t<?php\n\t\t\t\t\tprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\tsprintf( _x( '%1$s at %2$s', '1: date, 2: time', 'wolf' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t);\n\t\t\t\t\tedit_comment_link( __( 'Edit', 'wolf' ), '<span class=\"edit-link\">', '<span>' );\n\t\t\t\t?>\n\t\t\t</header><!-- .comment-meta -->\n\n\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'wolf' ); ?></p>\n\t\t\t<?php endif; ?>\n\n\t\t\t<div class=\"comment-content\">\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t</div><!-- .comment-content -->\n\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'wolf' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\t<?php\n\t\tbreak;\n\tendswitch; // End comment_type check.\n}", "function animo_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) :\n case 'pingback' :\n case 'trackback' :\n ?>\n <li <?php comment_class('comment'); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <div class=\"media-body\"><?php _e( 'Pingback:', 'animo' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'animo' ), ' ' ); ?></div>\n </li>\n <?php\n break;\n\n default :\n $class = array('comment_wrap');\n if ($depth > 1) {\n $class[] = 'chaild';\n }\n ?>\n <!-- Comment Item -->\n <li <?php comment_class('comment'); ?> id=\"comment-<?php comment_ID(); ?>\">\n\n <div class=\"comment-body\">\n <figure class=\"comment-avatar\">\n <?php echo get_avatar( $comment, 45 ); ?>\n </figure>\n\n <div class=\"comment-content\">\n <div class=\"comment-meta\">\n <h6><?php comment_author_link();?></h6>\n <time><?php echo comment_date(get_option('date_format')) ?>, <?php echo comment_date(get_option('time_format')) ?></time>\n </div>\n <?php if ( $comment->comment_approved == '0' ) : ?>\n <em><?php _e( 'Your comment is awaiting moderation.', 'animo' ); ?></em>\n <?php endif; ?>\n <?php comment_text(); ?>\n\n <div class=\"comment-rate\">\n <a href=\"#\" class=\"up\"><i class=\"fa fa-angle-up\"></i></a>\n <a href=\"#\" class=\"down\"><i class=\"fa fa-angle-down\"></i></a>\n </div>\n <?php $reply = get_comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => 2 ) ) );\n if (!empty($reply)): ?>\n <?php echo wp_kses_post($reply); ?>\n <?php endif;\n edit_comment_link( __( 'Edit', 'animo' ), '', '' );\n ?>\n\n <!--share comment-->\n\n </div>\n </div>\n <?php\n break;\n endswitch;\n}", "function custom_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n ?>\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n <div class=\"comment-author\"><?php printf(__('By %1$s on %2$s at %3$s', 'flipblog'),\n get_comment_author_link(),\n get_comment_date(),\n get_comment_time() );\n edit_comment_link(__('Edit', 'flipblog'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n', 'your-theme') ?>\n <div class=\"comment-content\">\n <?php comment_text() ?>\n </div>\n<?php }", "function _showComments(&$comments,$template, $maxToShow = -1, $NumToShow = -1, $start = 1, $pages = 0, $sord = 'ASC',$showNone = 1, $highlight = '') {\r\n\t\tglobal $CONF, $manager;\r\n\r\n\t\t// create parser object & action handler\r\n\t\t$actions =& new COMMENTACTIONS($comments);\r\n\t\t$parser =& new PARSER($actions->getDefinedActions(),$actions);\r\n\t\t$actions->setTemplate($template);\r\n\t\t$actions->setParser($parser);\r\n\r\n\t\tif ($maxToShow == 0) {\r\n\t\t\t$comments->commentcount = $comments->amountComments();\r\n\t\t} else {\r\n\t\t\t$query = 'SELECT c.citem as itemid, c.cnumber as commentid, c.cbody as body, c.cuser as user, c.cmail as userid, c.cmember as memberid, c.ctime, c.chost as host, c.cip as ip, c.cblog as blogid'\r\n\t\t\t\t . ' FROM '.sql_table('comment').' as c'\r\n\t\t\t\t . ' WHERE c.citem=' . $comments->itemid;\r\n\t\t\tif ($sord == 'RAND()') $query .= ' ORDER BY RAND()';\r\n else $query .= ' ORDER BY c.ctime '.$sord;\r\n if ($NumToShow >= 0) $query .= ' LIMIT '.intval($start - 1).','.$NumToShow;\r\n\r\n\t\t\t$commres = sql_query($query);\r\n\t\t\t$comments->commentcount = mysql_num_rows($commres);\r\n\t\t}\r\n\r\n\t\t// if no result was found\r\n\t\tif ($comments->commentcount == 0) {\r\n\t\t\t// note: when no reactions, COMMENTS_HEADER and COMMENTS_FOOTER are _NOT_ used\r\n\t\t\tif ($showNone) $parser->parse($template['COMMENTS_NONE']);\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\t// if too many comments to show\r\n\t\tif (($maxToShow != -1) && ($comments->commentcount > $maxToShow)) {\r\n\t\t\t$parser->parse($template['COMMENTS_TOOMUCH']);\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\t$parser->parse($template['COMMENTS_HEADER']);\r\n\r\n if ($pages && ($comments->commentcount < $comments->amountComments())) {\r\n $this->_pagelinks($start,$NumToShow,$comments->amountComments());\r\n }\r\n\r\n\t\twhile ( $comment = mysql_fetch_assoc($commres) ) {\r\n\t\t\t$comment['timestamp'] = strtotime($comment['ctime']);\r\n\t\t\t$actions->setCurrentComment($comment);\r\n\t\t\t$actions->setHighlight($highlight);\r\n\t\t\t$manager->notify('PreComment', array('comment' => &$comment));\r\n\t\t\t$parser->parse($template['COMMENTS_BODY']);\r\n\t\t\t$manager->notify('PostComment', array('comment' => &$comment));\r\n\t\t}\r\n\r\n if ($pages && ($comments->commentcount < $comments->amountComments())) {\r\n $this->_pagelinks($start,$NumToShow,$comments->amountComments());\r\n }\r\n\r\n\t\t$parser->parse($template['COMMENTS_FOOTER']);\r\n\r\n\t\tmysql_free_result($commres);\r\n\r\n\t\treturn $comments->commentcount;\r\n\t}", "public function get_index()\n\t{\n\t\tAcl::can('get_comments_index');\n\n\t\t$comments = Cache::remember(Config::get('cache.key').'comments', function() { return Blog_Comment::with(array('blog_post', 'user'))->active(); }, 60*24);\n\n\t\t$this->layout->title = 'Blog Comments';\n\t\t$this->layout->content = View::make('blog.comments.index')->with('comments', $comments);\n\t}", "function better_comments( $comment, $args, $depth ) {\n\n\t// Get correct tag used for the comments\n\tif ( 'div' === $args['style'] ) {\n\t\t$tag = 'div';\n\t\t$add_below = 'comment';\n\t} else {\n\t\t$tag = 'li';\n\t\t$add_below = 'div-comment';\n\t} ?>\n\n\t<<?php echo $tag; ?> <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?> id=\"comment-<?php comment_ID() ?>\">\n\n\t<?php\n\t// Switch between different comment types\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' : ?>\n\t\t<div class=\"pingback-entry\"><span class=\"pingback-heading\"><?php esc_html_e( 'Pingback:' ); ?></span> <?php comment_author_link(); ?></div>\n\t<?php\n\t\tbreak;\n\t\tdefault :\n\n\t\tif ( 'div' != $args['style'] ) { ?>\n\t\t\t<div id=\"div-comment-<?php comment_ID() ?>\" class=\"comment-body\">\n\t\t<?php } ?>\n\t\t\t<div class=\"comment-author\">\n\n\t\t\t\t<?php\n\t\t\t\t\t$comment_id = $commentID;\n\t\t\t\t\t$comment = get_comment( $comment_id );\n\t\t\t\t\t$comment_author_id = $comment -> user_id;\n\n\t\t\t\t\t$avatar = get_the_author_meta('user_login', $comment_author_id);\n\t\t\t\t\t$display_name = get_the_author_meta('display_name', $comment_author_id);\n\t\t\t\t?>\n\t\t\t\t\t\n\t\t\t\t<a href=\"<?php echo get_author_posts_url( get_the_author_meta( 'ID' ), $avatar ); ?>\">\n\t\t\t\t\t<div class=\"user-avatar lg\">\n\t\t\t\t\t\t<?php echo get_avatar( $comment, 56 ); ?>\n\t\t\t\t\t</div>\n\t\t\t\t</a>\n\t\t\t</div><!-- .comment-author -->\n\t\t\t<div class=\"comment-details\">\n\t\t\t\t<div class=\"comment-meta commentmetadata\">\n\t\t\t\t\t<div class=\"author\" data-toggle=\"tooltip\" title=\"<?php echo $avatar; ?>\"><a href=\"<?php echo get_author_posts_url( get_the_author_meta( 'ID' ), $avatar ); ?>\"><?php echo $display_name; ?></a></div>\n\n\t\t\t\t\t<?php\n\t\t\t\t\t\tglobal $post;\n\t\t\t\t\t\tif ( $comment->user_id === $post->post_author ) { echo '<span class=\"badge badge-primary ml-2 mr-auto\">Autor</span>'; }\n\t\t\t\t\t?>\n\n\t\t\t\t\t<?php\n\t\t\t\tedit_comment_link( __( 'Edit' ), ' ', '' ); ?>\n\t\t\t\t</div><!-- .comment-meta -->\n\t\t\t\t<div class=\"comment-text\"><?php comment_text(); ?></div><!-- .comment-text -->\n\t\t\t\t<?php\n\t\t\t\t// Display comment moderation text\n\t\t\t\tif ( $comment->comment_approved == '0' ) { ?>\n\t\t\t\t\t<em class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.' ); ?></em><br/><?php\n\t\t\t\t} ?>\n\t\t\t\t<div class=\"reply\">\n\t\t\t\t<div><?php echo get_simple_likes_button( get_comment_ID(), 1 ); ?></div> <span class=\"mx-2\">·</span> \n\t\t\t\t<?php\n\t\t\t\t// Display comment reply link\n\t\t\t\tcomment_reply_link( array_merge( $args, array(\n\t\t\t\t\t'add_below' => $add_below,\n\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t'max_depth' => $args['max_depth']\n\t\t\t\t) ) ); ?>\n\n\t\t\t\t<?php if( '0' == $comment->comment_parent ): ?>\n\t\t\t\t\t<span class=\"mx-2\">·</span> \n\t\t\t\t<?php endif; ?>\n\n\t\t\t\t<a class=\"time\" href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ); ?>\"><?php\n\t\t\t\t\tprintf(\n\t\t\t\t\t\t__( '%1$s' ),\n\t\t\t\t\t\tget_comment_date()\n\t\t\t\t\t); ?>\n\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t</div><!-- .comment-details -->\n\t<?php\n\t\tif ( 'div' != $args['style'] ) { ?>\n\t\t\t</div>\n\t\t<?php }\n\t// IMPORTANT: Note that we do NOT close the opening tag, WordPress does this for us\n\t\tbreak;\n\tendswitch; // End comment_type check.\n}", "function cmsmasters_post_comments($template_type = 'page', $show = true) {\n\t$out = '';\n\t\n\t\n\tif (comments_open()) {\n\t\tif ($template_type == 'page') {\n\t\t\t$out = cmsmasters_comments('cmsmasters_post_comments');\n\t\t} elseif ($template_type == 'post') {\n\t\t\t$cmsmasters_option = cmsmasters_get_global_options();\n\t\t\t\n\t\t\tif ($cmsmasters_option[CMSMASTERS_SHORTNAME . '_blog_post_comment']) {\n\t\t\t\t$out = cmsmasters_comments('cmsmasters_post_comments');\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\tif ($show) {\n\t\techo $out;\n\t} else {\n\t\treturn $out;\n\t}\n}", "public function render()\n\t{\n\t\t$this->prefix = 'comment';\n\n\t\t$comments = $this->model->getComments();\n\n\t\t$this->items = $comments;\n\n\t\t$user = JFactory::getUser();\n\t\t$this->canDeleteComments = $user->authorise('comment.delete', 'com_monitor');\n\t\t$this->canEditComments = $user->authorise('comment.edit', 'com_monitor');\n\t\t$this->canEditOwnComments = $user->authorise('comment.edit.own', 'com_monitor');\n\t\t$this->canEditIssues = $user->authorise('issue.edit', 'com_monitor');\n\t\t$this->canEditOwnIssues = $user->authorise('issue.edit.own', 'com_monitor');\n\t\t$this->canEditProjects = $user->authorise('project.edit', 'com_monitor');\n\n\t\t$this->setLayout('default');\n\n\t\t$this->addToolbar();\n\n\t\treturn parent::render();\n\t}", "function bootstrap_list_comments( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\r\n?>\n<li class=\"media\">\n\t<a class=\"pull-left\" href=\"#\"><?php echo get_avatar( $comment, 64 ); ?></a>\n <div class=\"media-body\">\n <div class=\"media-heading\"><strong><?php printf(get_comment_author_link()); ?></strong> said on <?php printf( '%1$s at %2$s', get_comment_date(), get_comment_time()); edit_comment_link('<i class=\"icon-edit\"></i> Edit', ' | '); ?></div>\n <?php\n comment_text();\n comment_reply_link( array_merge( $args, array(\n \t\t'reply_text'\t=>\t__( 'Reply <span>&darr;</span>', 'the-bootstrap' ),\n \t\t'depth'\t\t\t=>\t$depth,\n \t\t'max_depth'\t\t=>\t$args['max_depth']\n\t\t\t\t\t) ) ); ?>\n </div>\n</li>\n<?php\r\n}", "function custom_pings($comment, $args, $depth)\r\n{\r\n $GLOBALS['comment'] = $comment;\r\n ?>\r\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\r\n <div class=\"comment-author\"><?php printf(\r\n __('By %1$s on %2$s at %3$s', 'eti-theme'),\r\n get_comment_author_link(),\r\n get_comment_date(),\r\n get_comment_time()\r\n );\r\n edit_comment_link(__('Edit', 'eti-theme'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?>\r\n </div>\r\n <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n', 'eti-theme') ?>\r\n <div class=\"comment-content\">\r\n <?php comment_text() ?>\r\n </div>\r\n <?php }", "function custom_pings($comment, $args, $depth) {\n\t $GLOBALS['comment'] = $comment;\n\t ?>\n\t <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n\t <div class=\"comment-author\"><?php printf(__('By %1$s on %2$s at %3$s', 'tif-wordpress'),\n\t get_comment_author_link(),\n\t get_comment_date(),\n\t get_comment_time() );\n\t edit_comment_link(__('Edit', 'tif-wordpress'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n\t <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n', 'tif-wordpress') ?>\n\t <div class=\"comment-content\">\n\t <?php comment_text() ?>\n\t </div>\n\t<?php }", "function custom_pings($comment, $args, $depth) {\n\t $GLOBALS['comment'] = $comment;\n\t ?>\n\t <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n\t <div class=\"comment-author\"><?php printf(__('By %1$s on %2$s at %3$s', 'hbd-theme'),\n\t get_comment_author_link(),\n\t get_comment_date(),\n\t get_comment_time() );\n\t edit_comment_link(__('Edit', 'hbd-theme'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n\t <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n', 'hbd-theme') ?>\n\t <div class=\"comment-content\">\n\t <?php comment_text() ?>\n\t </div>\n\t<?php }", "public function index()\n {\n $PostComments = PostComment::where(['post_comment_id'=>null])->orderBy('date_create', 'desc')->paginate(20);\n\n return view('backend.post_comments.list', [\n 'list' => $PostComments\n ]);\n }", "function tweet_comment_comments_template( $path ) {\n\t// Override theme tempalte.\n\treturn dirname( __FILE__) . '/' . 'comments.php';\n}", "function bones_comments($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n\t<li <?php comment_class(); ?>>\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix\">\n\t\t\t<header class=\"comment-author vcard\">\n\t\t\t\t<?php echo get_avatar($comment,$size='32',$default='<path_to_url>' ); ?>\n\t\t\t\t<?php printf(__('<cite class=\"fn\">%s</cite>'), get_comment_author_link()) ?>\n\t\t\t\t<time><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php printf(__('%1$s'), get_comment_date(), get_comment_time()) ?></a></time>\n\t\t\t\t<?php edit_comment_link(__('(Edit)'),' ','') ?>\n\t\t\t</header>\n\t\t\t<?php if ($comment->comment_approved == '0') : ?>\n \t\t\t<div class=\"help\">\n \t\t\t<p><?php _e('Your comment is awaiting moderation.') ?></p>\n \t\t</div>\n\t\t\t<?php endif; ?>\n\t\t\t<section class=\"comment_content clearfix\">\n\t\t\t\t<?php comment_text() ?>\n\t\t\t</section>\n\t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t</article>\n <!-- </li> is added by wordpress automatically -->\n<?php\n}", "function hybrid_comments_callback( $comment, $args, $depth ) {\n\tglobal $hybrid;\n\t$GLOBALS['comment'] = $comment;\n\t$GLOBALS['comment_depth'] = $depth;\n\n\t/* Get the comment type of the current comment. */\n\t$comment_type = get_comment_type( $comment->comment_ID );\n\n\t/* Create an empty array if the comment template array is not set. */\n\tif ( !isset( $hybrid->comment_template) || !is_array( $hybrid->comment_template ) )\n\t\t$hybrid->comment_template = array();\n\n\t/* Check if a template has been provided for the specific comment type. If not, get the template. */\n\tif ( !isset( $hybrid->comment_template[$comment_type] ) ) {\n\n\t\t/* Create an array of template files to look for. */\n\t\t$templates = array( \"comment-{$comment_type}.php\" );\n\n\t\t/* If the comment type is a 'pingback' or 'trackback', allow the use of 'comment-ping.php'. */\n\t\tif ( 'pingback' == $comment_type || 'trackback' == $comment_type )\n\t\t\t$templates[] = 'comment-ping.php';\n\n\t\t/* Add the fallback 'comment.php' template. */\n\t\t$templates[] = 'comment.php';\n\n\t\t/* Locate the comment template. */\n\t\t$template = locate_template( $templates );\n\n\t\t/* Set the template in the comment template array. */\n\t\t$hybrid->comment_template[ $comment_type ] = $template;\n\t}\n\n\t/* If a template was found, load the template. */\n\tif ( !empty( $hybrid->comment_template[ $comment_type ] ) )\n\t\trequire( $hybrid->comment_template[ $comment_type ] );\n}", "public function view_comments(array $options = array()){\r\n\r\n\t\t/* Options */\r\n\t\tif (Utility::iterable($options)){\r\n\t\t\tforeach($options as $key => $value){\r\n\t\t\t\tswitch($key){\r\n\t\t\t\t\tcase 'extraCss':\r\n\t\t\t\t\t\t$extraCss = $value;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* Get comments */\r\n\t\t$object = $this->get_commentable_object();\r\n\t\t$comments = $object['comments'];\r\n\t\tif (empty($comments)){\r\n\t\t\tinclude(BLUPATH_TEMPLATES.'/newcomments/none.php');\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t$commentsModel = $this->getModel('newcomments');\r\n\t\t$commentsModel->addDetails($comments);\r\n\r\n\t\t/* Prepare pagination */\r\n\t\t$commentPagination = Pagination::simple(array(\r\n\t\t\t'limit' => BluApplication::getSetting('commentListingLength', 12),\r\n\t\t\t'total' => count($comments),\r\n\t\t\t'current' => Request::getInt('comments', 1),\r\n\t\t\t'url' => '?comments='\r\n\t\t));\r\n\t\t$commentPagination->chop($comments);\r\n\r\n\t\t/* Display */\r\n\t\t$alt = false;\r\n\t\tinclude(BLUPATH_TEMPLATES.'/newcomments/listing.php');\r\n\r\n\t}", "public function listComments()\n\t{\n\t\t$commentsManager = new Comments();\n\t\t$listComments = $commentsManager-> getListComments(); \n\t\trequire('view/ViewBackEnd/commentsAdminView.php');\n\t}", "function twentyten_comment( $comment, $args, $depth ) {\n\t\t$GLOBALS['comment'] = $comment;\n\t\tswitch ( $comment->comment_type ) :\n\t\t\tcase '':\n\t\t?>\n\t\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<div id=\"comment-<?php comment_ID(); ?>\">\n\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t<?php echo get_avatar( $comment, 40 ); ?>\n\t\t\t\t<?php printf( __( '%s <span class=\"says\">says:</span>', 'twentyten' ), sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n\t\t\t</div><!-- .comment-author .vcard -->\n\t\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t\t<em class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em>\n\t\t\t\t<br />\n\t\t\t<?php endif; ?>\n\n\t\t\t<div class=\"comment-meta commentmetadata\"><a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n\t\t\t\t<?php\n\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\tprintf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(), get_comment_time() );\n\t\t\t\t\t?>\n\t\t\t\t\t</a>\n\t\t\t\t\t<?php\n\t\t\t\t\tedit_comment_link( __( '(Edit)', 'twentyten' ), ' ' );\n\t\t\t\t?>\n\t\t\t\t</div><!-- .comment-meta .commentmetadata -->\n\n\t\t\t\t<div class=\"comment-body\"><?php comment_text(); ?></div>\n\n\t\t\t\t<div class=\"reply\">\n\t\t\t\t<?php\n\t\t\t\tcomment_reply_link(\n\t\t\t\t\tarray_merge(\n\t\t\t\t\t\t$args, array(\n\t\t\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t\t\t'max_depth' => $args['max_depth'],\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n?>\n\t\t\t\t</div><!-- .reply -->\n\t\t\t</div><!-- #comment-## -->\n\n\t\t<?php\n\t\t\t\tbreak;\n\t\t\tcase 'pingback':\n\t\t\tcase 'trackback':\n\t\t?>\n\t\t<li class=\"post pingback\">\n\t\t<p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' ); ?></p>\n\t<?php\n\t\t\t\tbreak;\n\t\tendswitch;\n\t}", "function custom_comments($comment, $args, $depth) {\n\t $GLOBALS['comment'] = $comment;\n\t $GLOBALS['comment_depth'] = $depth;\n\t ?>\n\t <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n\t <div class=\"comment-author vcard\"><img src=\"<?php echo get_template_directory_uri(); ?>/img/comments-icon.png\" alt=\"comments\" /> <strong><em>By <?php commenter_link() ?></em></strong>: <?php echo $comment->comment_content; ?></div>\n\t\t\t<div class=\"spacer\"></div>\n\t <!--<div class=\"comment-meta\"><?php //printf(__('Posted %1$s at %2$s <span class=\"meta-sep\">|</span> <a href=\"%3$s\" title=\"Permalink to this comment\">Permalink</a>', 'hbd-theme'),\n\t // get_comment_date(),\n\t // get_comment_time(),\n\t // '#comment-' . get_comment_ID() );\n\t // edit_comment_link(__('Edit', 'hbd-theme'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n\t\t\t\t\t\t\n\t\t\t\t-->\n\t <?php if ($comment->comment_approved == '0') _e(\"\\t\\t\\t\\t\\t<span class='unapproved'>Your comment is awaiting moderation.</span>\\n\", 'hbd-theme') ?>\n\t <!-- <div class=\"comment-content\">\n\t \n\t </div> -->\n\t <?php // echo the comment reply link\n\t //if($args['type'] == 'all' || get_comment_type() == 'comment') :\n\t // comment_reply_link(array_merge($args, array(\n\t // 'reply_text' => __('Reply','hbd-theme'),\n\t // 'login_text' => __('Log in to reply.','hbd-theme'),\n\t // 'depth' => $depth,\n\t // 'before' => '<div class=\"comment-reply-link\">',\n\t // 'after' => '</div>'\n\t // )));\n\t //endif;\n\t ?>\n\t<?php }", "function custom_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n ?>\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n <div class=\"comment-author\"><?php printf(__('By %1$s on %2$s at %3$s', 'Foundation'),\n get_comment_author_link(),\n get_comment_date(),\n get_comment_time() );\n edit_comment_link(__('Edit', 'Foundation'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n', 'Foundation') ?>\n <div class=\"comment-content\">\n <?php comment_text() ?>\n </div>\n<?php }", "function custom_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n ?>\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n <div class=\"comment-author\"><?php printf(__('By %1$s on %2$s at %3$s', 'your-theme'),\n get_comment_author_link(),\n get_comment_date(),\n get_comment_time() );\n edit_comment_link(__('Edit', 'your-theme'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n', 'your-theme') ?>\n <div class=\"comment-content\">\n <?php comment_text() ?>\n </div>\n<?php }", "function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n\t<li <?php comment_class(); ?>>\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix comment-container\">\n\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t/*\n\t\t\t\t\tthis is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n\t\t\t\t\techo get_avatar($comment,$size='32',$default='<path_to_url>' );\n\t\t\t\t*/\n\t\t\t\t?>\n\t\t\t\t<?php // custom gravatar call ?>\n\t\t\t\t<?php\n\t\t\t\t\t// create variable\n\t\t\t\t\t$bgauthemail = get_comment_author_email();\n\t\t\t\t?>\n\t\t\t\t<img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=64\" class=\"load-gravatar avatar avatar-48 photo\" height=\"64\" width=\"64\" src=\"<?php echo get_template_directory_uri(); ?>/images/favicon.png\" />\n\t\t\t\t<?php // end custom gravatar call ?>\n\t\t\t</div>\n <div class=\"comment-content\">\n <?php printf(__( '<cite class=\"fn\">%s |</cite>', 'bonestheme' ), get_comment_author_link()) ?>\n <time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'bonestheme' )); ?> </a></time>\n <?php edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ?>\n \t\t\t<?php if ($comment->comment_approved == '0') : ?>\n \t\t\t\t<div class=\"alert alert-info\">\n \t\t\t\t\t<p><?php _e( 'Your comment is awaiting moderation.', 'bonestheme' ) ?></p>\n \t\t\t\t</div>\n \t\t\t<?php endif; ?>\n \t\t\t<section class=\"comment_content clearfix\">\n \t\t\t\t<?php comment_text() ?>\n \t\t\t</section>\n \t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </div> <!-- END comment-content -->\n\t\t</article>\n\t<?php // </li> is added by WordPress automatically ?>\n<?php\n}", "function register_legacy_post_comments_block()\n {\n }", "function tempera_comments_navigation() {\nif ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>\n\t\t\t<div class=\"navigation\">\n\t\t\t\t<div class=\"nav-previous\"><?php previous_comments_link( '<i class=\"icon-reply\"></i>'.__('Older Comments', 'tempera' ) ); ?></div>\n\t\t\t\t<div class=\"nav-next\"><?php next_comments_link( __( 'Newer Comments', 'tempera' ).'<i class=\"icon-forward\"></i>' ); ?></div>\n\t\t\t</div> <!-- .navigation -->\n<?php endif; // check for comment navigation \n}", "public function commentsAction()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t$user = Application_Model_User::getAuth();\r\n\r\n\t\t\t$id = $this->_request->getPost('id');\r\n\r\n\t\t\tif (!v::intVal()->validate($id))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('Incorrect post value: ' .\r\n\t\t\t\t\tvar_export($id, true));\r\n\t\t\t}\r\n\r\n\t\t\tif (!Application_Model_News::checkId($id, $post, ['join'=>false]))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('Incorrect post ID');\r\n\t\t\t}\r\n\r\n\t\t\t$start = $this->_request->getPost('start', 0);\r\n\r\n\t\t\tif (!v::intVal()->validate($start))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('Incorrect start value: ' .\r\n\t\t\t\t\tvar_export($start, true));\r\n\t\t\t}\r\n\r\n\t\t\t$limit = 30;\r\n\t\t\t$model = new Application_Model_Comments;\r\n\t\t\t$comments = $model->findAllByNewsId($id, [\r\n\t\t\t\t'limit' => $limit,\r\n\t\t\t\t'start' => $start,\r\n\t\t\t\t'owner_thumbs' => [[55,55]]\r\n\t\t\t]);\r\n\r\n\t\t\t$response = ['status' => 1];\r\n\r\n\t\t\tif (count($comments))\r\n\t\t\t{\r\n\t\t\t\tforeach ($comments as $comment)\r\n\t\t\t\t{\r\n\t\t\t\t\t$response['data'][] = My_ViewHelper::render('post/_comment', [\r\n\t\t\t\t\t\t'user' => $user,\r\n\t\t\t\t\t\t'comment' => $comment,\r\n\t\t\t\t\t\t'post' => $post,\r\n\t\t\t\t\t\t'limit' => 250\r\n\t\t\t\t\t]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$count = max($post->comment - ($start + $limit), 0);\r\n\r\n\t\t\t\tif ($count > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$response['label'] = $model->viewMoreLabel($count);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception $e)\r\n\t\t{\r\n\t\t\tMy_Log::exception($e);\r\n\t\t\t$response = [\r\n\t\t\t\t'status' => 0,\r\n\t\t\t\t'message' => $e instanceof RuntimeException ? $e->getMessage() :\r\n\t\t\t\t\t'Internal Server Error'\r\n\t\t\t];\r\n\t\t}\r\n\r\n\t\t$this->_helper->json($response);\r\n\t}", "function bones_comments($comment, $args, $depth) {\r\n $GLOBALS['comment'] = $comment; ?>\r\n\t<li <?php comment_class(); ?>>\r\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix\">\r\n\t\t\t<header class=\"comment-author vcard\">\r\n\t\t\t\t<?php echo get_avatar($comment,$size='32',$default='<path_to_url>' ); ?>\r\n\t\t\t\t<?php printf(__('<cite class=\"fn\">%s</cite>'), get_comment_author()) ?>\r\n\t\t\t\t<time><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php printf(__('%1$s'), get_comment_date(), get_comment_time()) ?></a></time>\r\n\t\t\t\t<?php edit_comment_link(__('(Edit)'),' ','') ?>\r\n\t\t\t</header>\r\n\t\t\t<?php if ($comment->comment_approved == '0') : ?>\r\n \t\t\t<div class=\"help\">\r\n \t\t\t<p><?php _e('Your comment is awaiting moderation.') ?></p>\r\n \t\t</div>\r\n\t\t\t<?php endif; ?>\r\n\t\t\t<section class=\"comment_content clearfix\">\r\n\t\t\t\t<?php comment_text() ?>\r\n\t\t\t</section>\r\n\t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\r\n\t\t</article>\r\n <!-- </li> is added by wordpress automatically -->\r\n<?php\r\n}", "function tz_list_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n<li id=\"comment-<?php comment_ID(); ?>\"><?php comment_author_link(); ?>\n<?php }", "function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n\t<li <?php comment_class(); ?>>\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix\">\n\t\t\t<header class=\"comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t/*\n\t\t\t\t\tthis is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n\t\t\t\t\techo get_avatar($comment,$size='32',$default='<path_to_url>' );\n\t\t\t\t*/\n\t\t\t\t?>\n\t\t\t\t<!-- custom gravatar call -->\n\t\t\t\t<?php\n\t\t\t\t\t// create variable\n\t\t\t\t\t$bgauthemail = get_comment_author_email();\n\t\t\t\t?>\n\t\t\t\t<img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=32\" class=\"load-gravatar avatar avatar-48 photo\" height=\"32\" width=\"32\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n\t\t\t\t<!-- end custom gravatar call -->\n\t\t\t\t<?php printf(__( '<cite class=\"fn\">%s</cite>', 'bonestheme' ), get_comment_author_link()) ?>\n\t\t\t\t<time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'bonestheme' )); ?> </a></time>\n\t\t\t\t<?php edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ?>\n\t\t\t</header>\n\t\t\t<?php if ($comment->comment_approved == '0') : ?>\n\t\t\t\t<div class=\"alert alert-info\">\n\t\t\t\t\t<p><?php _e( 'Your comment is awaiting moderation.', 'bonestheme' ) ?></p>\n\t\t\t\t</div>\n\t\t\t<?php endif; ?>\n\t\t\t<section class=\"comment_content clearfix\">\n\t\t\t\t<?php comment_text() ?>\n\t\t\t</section>\n\t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t</article>\n\t<!-- </li> is added by WordPress automatically -->\n<?php\n}" ]
[ "0.7316677", "0.6964057", "0.69519836", "0.681965", "0.6768409", "0.6735581", "0.67349035", "0.66827005", "0.66730416", "0.6658727", "0.66319704", "0.65822315", "0.65627444", "0.65619814", "0.65600204", "0.65505296", "0.6548833", "0.6527826", "0.6489724", "0.6489368", "0.64790076", "0.64774734", "0.64770323", "0.6476046", "0.64731616", "0.64694184", "0.6468194", "0.6467946", "0.6463422", "0.64537346", "0.6453693", "0.6440573", "0.64375573", "0.64361244", "0.64271796", "0.64189893", "0.6409861", "0.640769", "0.640679", "0.6403235", "0.6389173", "0.63723207", "0.6366137", "0.6362838", "0.6353415", "0.63525194", "0.63458115", "0.6334974", "0.6322869", "0.6322352", "0.630235", "0.6291151", "0.6290197", "0.62895906", "0.6275436", "0.62535334", "0.62503594", "0.6211046", "0.6206621", "0.6203634", "0.6193187", "0.6186815", "0.61780876", "0.61727107", "0.6163519", "0.6161838", "0.61557597", "0.61514574", "0.6143343", "0.6125031", "0.608161", "0.6074948", "0.6059723", "0.60503936", "0.60471344", "0.6045081", "0.6042508", "0.6041473", "0.60304844", "0.6028935", "0.6022757", "0.6022558", "0.60219485", "0.60178566", "0.6007967", "0.60045403", "0.59959906", "0.5994684", "0.59797657", "0.5972433", "0.597103", "0.5963737", "0.5953069", "0.5947915", "0.594651", "0.5935226", "0.5934667", "0.59245753", "0.59227705", "0.5922363" ]
0.6320915
50
ends check for calvero_comment() Register widgetized area and update sidebar with default widgets
function shape_widgets_init() { register_sidebar( array( 'name' => __( 'Primary Widget Area', 'shape' ), 'id' => 'sidebar-1', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h1 class="widget-title">', 'after_title' => '</h1>', ) ); register_sidebar( array( 'name' => __( 'Secondary Widget Area', 'shape' ), 'id' => 'sidebar-2', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h1 class="widget-title">', 'after_title' => '</h1>', ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function anipics_add_widget_area(){\n register_sidebar(array(\n 'id' => 'projet',\n 'name' => 'Photo gallery',\n 'description' => ' Apparait au centre',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h1>',\n 'after_title' => '</h1>'\n ));\n register_sidebar(array(\n 'id' => 'footer',\n 'name' => 'footer',\n 'description' => ' Apparait bas',\n 'before_widget' => '<div class=\"col s4\" style=\"margin: 0 18em 0 3em \" >',\n 'after_widget' => '</div>',\n 'before_title' => '<h1>',\n 'after_title' => '</h1>'\n ));\n register_sidebar(array(\n 'id' => 'footer2',\n 'name' => 'footer2',\n 'description' => ' Apparait bas',\n 'before_widget' => '<div class=\"col s6\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h1>',\n 'after_title' => '</h1>'\n ));\n}", "function widget_init() {\n if ( function_exists('register_sidebar') )\n \n register_sidebar(\n array(\n 'name' => 'Footer',\n 'before_widget' => '<div class = \"footer\">',\n 'after_widget' => '</div>',\n 'before_title' => '',\n 'after_title' => '',\n ));\n\n register_sidebar(\n array(\n 'name' => 'Event Navigation',\n 'before_widget' => '<div class=\"custom-widget top-round card slight-shadow card_container flex-column-reverse\">',\n 'after_widget' => '</div>',\n 'before_title' => '<div class=\"card_title\">',\n 'after_title' => '</div>',\n ));\n\n register_sidebar(\n array(\n 'name' => 'Frontpage News',\n 'before_widget' => '<div class=\"custom-widget card top-round slight-shadow card_container flex-column-reverse\">',\n 'after_widget' => '</div>',\n 'before_title' => '<div class=\"card_title\">',\n 'after_title' => '</div>',\n ));\n\n }", "function dl_widget_init() {\n\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Página de Contacto',\n\t\t'id'\t\t\t=> 'contact-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Barra Lateral',\n\t\t'id'\t\t\t=> 'sidebar-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Search Menu',\n\t\t'id'\t\t\t=> 'menu-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\n}", "function add_sidebar_area(){\n\t\t\tif(!empty($_POST['qode-add-widget'])){\n\t\t\t\t$this->sidebars = get_option($this->stored);\n\t\t\t\t$name = $this->get_name(sanitize_text_field($_POST['qode-add-widget']));\n\n\t\t\t\tif(empty($this->sidebars)){\n\t\t\t\t\t$this->sidebars = array($name);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->sidebars = array_merge($this->sidebars, array($name));\n\t\t\t\t}\n\n\t\t\t\tupdate_option($this->stored, $this->sidebars);\n\t\t\t\twp_redirect( admin_url('widgets.php') );\n\t\t\t\tdie();\n\t\t\t}\n\t\t}", "public function add_widget_areas() {\n\n\t\tregister_sidebar( array(\n\t\t\t'id' => 'wpchaos-obj-featured',\n\t\t\t'name' => __('CHAOS Object - Featured','wpchaosclient'),\n\t\t\t'before_widget' => '',\n\t\t\t'after_widget' => '',\n\t\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t\t'after_title' => '</h2>',\n\t\t) );\n\n\t\tregister_sidebar( array(\n\t\t\t'id' => 'wpchaos-obj-main',\n\t\t\t'name' => __('CHAOS Object - Main','wpchaosclient'),\n\t\t\t'before_widget' => '',\n\t\t\t'after_widget' => '',\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\n\t\tregister_sidebar( array(\n\t\t\t'id' => 'wpchaos-obj-sidebar',\n\t\t\t'name' => __('CHAOS Object - Sidebar','wpchaosclient'),\n\t\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</li>',\n\t\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t\t'after_title' => '</h4>',\n\t\t) );\n\n\t\t register_widget( 'WPChaosObjectAttrWidget' );\n\t\t register_widget( 'WPChaosObjectMultiWidget' );\n\t}", "function widgets_init_now() {\n\t\tregister_sidebar( array(\n\t\t\t'name' => 'Текст вверху шапки'\n\t\t\t,'id' => 'header_top'\n\t\t\t,'description' => 'Добавьте сюда виджет \"Текст\" из левой части страницы. Несколько виджетов будут расположены в строчку. Названия виджетов на сайте не отобразятся'\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => 'Блок для виджета рассылки в подвале'\n\t\t\t,'id' => 'footer_mailings'\n\t\t\t,'description' => 'Добавьте сюда виджет \"Текст\" из левой части страницы. Названия виджетов на сайте не отобразятся'\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => 'Блок контактов в подвале'\n\t\t\t,'id' => 'footer_contacts'\n\t\t\t,'description' => 'Добавьте сюда виджет \"Текст\" из левой части страницы. Названия виджетов на сайте не отобразятся'\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => 'Подробнее о системе обучения в Linguamore'\n\t\t\t,'id' => 'homepage_education-feats'\n\t\t\t,'description' => 'Блок, расположенный на странице \"Преимущества\". Добавьте сюда виджет \"Rich Text\" из левой части страницы. Иконки можно добавить кнопкой \"Add Media\". Названия виджетов на сайте не отобразятся'\n\t\t) );\n\t}", "function yellow_widgets_init() {\n\n\tregister_sidebar( array(\n\t 'name' => 'Sidebar',\n\t 'id' => 'sidebar',\n\t 'before_widget' => '<div class=\"media-body\">',\n\t 'after_widget' => '</div>',\n\t 'before_title' => '<div class=\"card-header\">',\n\t 'after_title' => '</div>',\n\t));\n\tregister_sidebar( array(\n\t\t'name' => 'Footer',\n\t\t'id' => 'footer',\n\t\t'before_widget' => '',\n\t\t'after_widget' => '',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t ));\n\t\n \n }", "function register_widget_areas()\n {\n register_sidebar(array(\n 'name' => 'Latest Tweets',\n 'id' => 'latest_tweets',\n 'description' => 'latest tweets',\n 'before_widget' => '<section class=\"widget-area latest-tweets\">',\n 'after_widget' => '</section>',\n 'before_title' => '<h4>',\n 'after_title' => '</h4>',\n ));\n }", "function ncc_widget_areas_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Dekstop Flyout (Left)',\n\t\t'id' => 'desktop_flyout_left',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t));\n register_sidebar( array(\n\t\t'name' => 'Dekstop Flyout (Center)',\n\t\t'id' => 'desktop_flyout_center',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t));\n register_sidebar( array(\n 'name' => 'Dekstop Flyout (Right)',\n 'id' => 'desktop_flyout_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ));\n register_sidebar( array(\n 'name' => 'Sidebar (Pages)',\n 'id' => 'sidebar_pages',\n 'before_widget' => '<div class=\"widget-class__blog\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ));\n register_sidebar( array(\n 'name' => 'Sidebar (Blog)',\n 'id' => 'sidebar_blog',\n 'before_widget' => '<div class=\"widget-class__blog\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ));\n}", "function parques_widget_init()\n{\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'progress-bar',\n\t\t\t'name'\t\t\t=> 'Barra de progreso',\n\t\t\t'description'\t=> 'Barra de progreso que indica el avance del proyecto',\n\t\t\t'before_widget' => '<div>',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'widget-footer',\n\t\t\t'name'\t\t\t=> \"footer\",\n\t\t\t'description'\t=> 'footer con la infomacion del contacto en todas las pag',\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"col-sm-4\">',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'widget-social',\n\t\t\t'name'\t\t\t=> \"widget-social\",\n\t\t\t'description'\t=> 'Contenido para las redes sociales',\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget-social\" >',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'widget-gallery',\n\t\t\t'name'\t\t\t=> \"widget-gallery\",\n\t\t\t'description'\t=> 'widget para el plugin de galerias',\n\t\t\t'before_widget' => '<div class=\"widget-gallery\" >',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'widget-banner',\n\t\t\t'name'\t\t\t=> \"widget-banner\",\n\t\t\t'description'\t=> 'Banner para parques del rio.',\n\t\t\t'before_widget' => '<div id=\"widget-banner\" >',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'widget-home',\n\t\t\t'name'\t\t\t=> \"widget-home\",\n\t\t\t'description'\t=> 'Contenido relacionado con articulos del sitio.',\n\t\t\t'before_widget' => '<div id=\"widget-home\" >',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'widget-progreso',\n\t\t\t'name'\t\t\t=> \"widget-progreso\",\n\t\t\t'description'\t=> 'Widget con barra de progreso del proyecto.',\n\t\t\t'before_widget' => '<div id=\"widget-progreso\" class=\"hidden-xs\" >',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'widget-categorias',\n\t\t\t'name'\t\t\t=> \"widget-categorias\",\n\t\t\t'description'\t=> 'Widget con categorías del proyecto.',\n\t\t\t'before_widget' => '<div id=\"widget-categorias\" >',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'sidebar',\n\t\t\t'name'\t\t\t=> \"sidebar\",\n\t\t\t'description'\t=> 'Sidebar',\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget-%1$s\" >',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n\n\tregister_sidebar( \n\t\tarray(\n\t\t\t'id' \t\t=> 'nav-menu-narrativa',\n\t\t\t'name'\t\t\t=> \"nav-menu-narrativa\",\n\t\t\t'description'\t=> 'Sidebar',\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget-%1$s\" >',\n\t\t\t'after_widget' => '</div>',\n\t\t)\n\t);\n}", "function Task_widgets_init() {\n \n // The SideBar\n register_sidebar( array(\n 'name' => esc_html__( 'SideBar', 'Task' ),\n 'id' => 'sidebar-1',\n 'description' => esc_html__( 'Add widgets here.', 'Task' ),\n 'before_widget' => '',\n 'after_widget' => '',\n ) );\n \n // The Banner Above The Navigation Bar In The Header\n register_sidebar( array(\n 'name' => esc_html__( 'Banner Above Navigation Bar', 'Task' ),\n 'id' => 'sidebar-2',\n 'description' => esc_html__( 'Add widgets here.', 'Task' ),\n 'before_widget' => '',\n 'after_widget' => '',\n ) );\n \n // The Square Banner Next To The 3 Main Posts\n register_sidebar( array(\n 'name' => esc_html__( 'The Square Banner Next To The 3 Main Posts', 'Task' ),\n 'id' => 'sidebar-3',\n 'description' => esc_html__( 'Add widgets here.', 'Task' ),\n 'before_widget' => '',\n 'after_widget' => '',\n ) );\n \n // The Side Banner In The Left\n register_sidebar( array(\n 'name' => esc_html__( 'The Side Banner In The Left', 'Task' ),\n 'id' => 'sidebar-4',\n 'description' => esc_html__( 'Add widgets here.', 'Task' ),\n 'before_widget' => '',\n 'after_widget' => '',\n ) );\n \n }", "function ac_widgets_init() \n{\n register_sidebar( array(\n 'name' => __( 'Main Sidebar', 'acframework' ),\n 'id' => 'sidebar',\n 'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'acframework' ),\n 'before_widget' => '<div class=\"widget\" id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n register_sidebar( array(\n 'name' => __('Form Container', 'acframework'),\n 'id' => 'ac-form-container',\n 'description' => __('Homepage form widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ) );\n register_sidebar(array(\n 'name' => __('Footer Left', 'acframework'),\n 'id' => 'ac-footer-left',\n 'description' => __('Left footer widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ));\n register_sidebar(array(\n 'name' => __('Footer Left Center', 'acframework'),\n 'id' => 'ac-footer-center-left',\n 'description' => __('Center-left footer widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ));\n register_sidebar(array(\n 'name' => __('Footer Right Center', 'acframework'),\n 'id' => 'ac-footer-center-right',\n 'description' => __('Center-Right footer widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ));\n register_sidebar( array(\n 'name' => __('Footer Right', 'acframework'),\n 'id' => 'ac-footer-right',\n 'description' => __('Right footer widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ) ); \n}", "function add_widget_sidebar()\r\n{\r\n register_sidebar(\r\n array(\r\n 'name' => 'Sidebar',\r\n 'id' => 'main-sidebar',\r\n )\r\n );\r\n register_sidebar(\r\n array(\r\n 'name' => 'Sidebar du footer',\r\n 'id' => 'footer-sidebar',\r\n )\r\n );\r\n}", "function blank_widgets_init(){\n\n/*===================================\n\n Widget Areas header.php\n\n=====================================*/\n\n // // Widget Area: Header Contact\n // register_sidebar(array(\n // 'name' => ('Header Contact'),\n // 'id' => 'header-contact',\n // 'description' => 'Contact Info in Header',\n // 'before_widget' => '<div class=\"widget-header-contact\">',\n // 'after_widget' => '</div>',\n // 'before_title' => '<h5 class=\"header-contact-widget-title\">',\n // 'after_title' => '</h5>'\n // ));\n\n // Widget Area: Header Social\n register_sidebar(array(\n 'name' => ('Header Social'),\n 'id' => 'header-social',\n 'description' => 'Social Meida Info in Header',\n 'before_widget' => '<div class=\"widget-header-social\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h5 class=\"header-social-widget-title\">',\n 'after_title' => '</h5>'\n ));\n\n/*===================================\n\n Widget Areas footer.php\n\n=====================================*/\n\n // Widget Area: Left Footer\n register_sidebar(array(\n 'name' => ('Left Footer'),\n 'id' => 'left-footer',\n 'description' => 'Left Widget Area in Footer',\n 'before_widget' => '<div class=\"widget-left-footer\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h5 class=\"left-footer-widget-title\">',\n 'after_title' => '</h5>'\n ));\n\n // Widget Area: Middle Footer\n register_sidebar(array(\n 'name' => ('Middle Footer'),\n 'id' => 'middle-footer',\n 'description' => 'Middle Widget Area in Footer',\n 'before_widget' => '<div class=\"widget-middle-footer\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h5 class=\"middle-footer-widget-title\">',\n 'after_title' => '</h5>'\n ));\n\n // Widget Area: Right Footer\n register_sidebar(array(\n 'name' => ('Right Footer'),\n 'id' => 'right-footer',\n 'description' => 'Right Widget Area in Footer',\n 'before_widget' => '<div class=\"widget-right-footer\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h5 class=\"right-footer-widget-title\">',\n 'after_title' => '</h5>'\n ));\n\n/*===================================\n\n Widget Areas page-home.php\n\n=====================================*/\n\n // Widget Area: Homepage Hero Image\n register_sidebar(array(\n 'name' => ('Homepage Hero Image'),\n 'id' => 'homepage-hero-image',\n 'description' => 'Hero Image on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-hero-image\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-hero-image-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Truck Types\n register_sidebar(array(\n 'name' => ('Homepage Truck Types'),\n 'id' => 'homepage-truck-types',\n 'description' => 'Truck Types Section on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-truck-types\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-truck-types-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Middle Image\n register_sidebar(array(\n 'name' => ('Homepage Middle Image'),\n 'id' => 'homepage-middle-image',\n 'description' => 'Middle Image on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-middle-image\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-middle-image-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Services Header\n register_sidebar(array(\n 'name' => ('Homepage Services Title'),\n 'id' => 'homepage-services-title',\n 'description' => 'Services Title on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-services-title\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-services-title-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Services One\n register_sidebar(array(\n 'name' => ('Homepage Services One'),\n 'id' => 'homepage-services-one',\n 'description' => 'Services One on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-services-one\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-services-one-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Services Two\n register_sidebar(array(\n 'name' => ('Homepage Services Two'),\n 'id' => 'homepage-services-two',\n 'description' => 'Services Two on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-services-two\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-services-two-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Services Three\n register_sidebar(array(\n 'name' => ('Homepage Services Three'),\n 'id' => 'homepage-services-three',\n 'description' => 'Services Three on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-services-three\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-services-three-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Services Four\n register_sidebar(array(\n 'name' => ('Homepage Services Four'),\n 'id' => 'homepage-services-four',\n 'description' => 'Services Four on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-services-four\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-services-four-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Services Five\n register_sidebar(array(\n 'name' => ('Homepage Services Five'),\n 'id' => 'homepage-services-five',\n 'description' => 'Services Five on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-services-five\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-services-five-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Locations Header\n register_sidebar(array(\n 'name' => ('Homepage Locations Title'),\n 'id' => 'homepage-locations-title',\n 'description' => 'Locations Title on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-locations-title\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-locations-title-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Locations One\n register_sidebar(array(\n 'name' => ('Homepage Locations One'),\n 'id' => 'homepage-locations-one',\n 'description' => 'Locations One on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-locations-one\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-locations-one-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Locations Two\n register_sidebar(array(\n 'name' => ('Homepage Locations Two'),\n 'id' => 'homepage-locations-two',\n 'description' => 'Locations Two on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-locations-two\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-locations-two-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n }", "function register_Zappy_Lates_Comment_Widget() {\n register_widget('Zappy_Lates_Comment_Widget');\n}", "function iiess_widgets(){\n register_sidebar(array(\n 'name' => 'Sidebar Eventos',\n 'id' => 'sidebar',\n 'before_widget' => '<div class=\"widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"text-center texto-primario\">',\n 'after_title' => '</h3>'\n ));\n}", "function ourWidgetsInit(){\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Sidebar',\n\t\t\t'id' => 'sidebar1',\n\t\t\t'before_widget' => '<div class=\"widget-item\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h4 class=\"my-special-class\">',\n\t\t\t'after_title' => '</h4>'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 1',\n\t\t\t'id' => 'footer1'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 2',\n\t\t\t'id' => 'footer2'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 3',\n\t\t\t'id' => 'footer3'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 4',\n\t\t\t'id' => 'footer4'\n\t\t));\n\t}", "function phoenix_widget_setup() {\n register_sidebar(array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar-1',\n 'class' => 'custom',\n 'description' => 'Single post of blog sidebar',\n ));\n}", "function mgc_widgets_init() {\n\n // Area 1, located in the sidebar. Empty by default.\n register_sidebar( array(\n 'name' => __( 'First Sidebar Widget Area', 'mgc' ),\n 'id' => 'first-sidebar-widget-area',\n 'description' => __( 'The first sidebar widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h2 class=\"widget-title title\">',\n 'after_title' => '</h2>',\n ) );\n\n // Area 2, located in the page. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Second Sidebar Widget Area', 'mgc' ),\n 'id' => 'second-sidebar-widget-area',\n 'description' => __( 'The second sidebar widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h2 class=\"widget-title title\">',\n 'after_title' => '</h2>',\n ) );\n\n // Area 3, located in the page. Empty by default.\n register_sidebar( array(\n 'name' => __( 'First Page Widget Area', 'mgc' ),\n 'id' => 'first-page-widget-area',\n 'description' => __( 'The first page widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n // Area 4, located in the page. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Second Page Widget Area', 'mgc' ),\n 'id' => 'second-page-widget-area',\n 'description' => __( 'The second page widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n // Area 5, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'First Footer Widget Area', 'mgc' ),\n 'id' => 'first-footer-widget-area',\n 'description' => __( 'The first footer widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n // Area 6, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Second Footer Widget Area', 'mgc' ),\n 'id' => 'second-footer-widget-area',\n 'description' => __( 'The second footer widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n // Area 7, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Third Footer Widget Area', 'mgc' ),\n 'id' => 'third-footer-widget-area',\n 'description' => __( 'The third footer widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n}", "function __construct(){\n\t\t\t$this->stored\t= 'qode_sidebars';\n\t\t\t$this->title = esc_html__('Custom Widget Area','bridge');\n\n\t\t\tadd_action('load-widgets.php', array(&$this, 'load_assets') , 5 );\n\t\t\tadd_action('widgets_init', array(&$this, 'register_custom_sidebars') , 1000 );\n\t\t\tadd_action('wp_ajax_qode_ajax_delete_custom_sidebar', array(&$this, 'delete_sidebar_area') , 1000 );\n\n\t\t\t// Migrate old custom sidebars to new\n\t\t\tadd_action( 'after_setup_theme', array( $this, 'migrate_custom_sidebars' ) );\n\t\t}", "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 posifon_widgets_init() {\n\t// Area 1, located at the top of the sidebar.\n\tregister_sidebar( array(\n\t\t'name' => __( 'Standard Sidebar', 'posifon' ),\n\t\t'id' => 'primary-widget-area',\n\t\t'description' => __( 'The primary widget area', 'posifon' ),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3>',\n\t\t'after_title' => '</h3>',\n\t) );\n\n\t// Area 3, located on template-omoss.\n\tregister_sidebar( array(\n\t\t'name' => __( 'Om Oss Sidebar', 'posifon' ),\n\t\t'id' => 'third-widget-area',\n\t\t'description' => __( 'Widget area shown on the \"om\" page template', 'posifon' ),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3>',\n\t\t'after_title' => '</h3>',\n\t) );\n\n \t// Area 4, located in the footer. Empty by default.\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer Widget Area 1', 'posifon' ),\n\t\t'id' => 'footer-widget-area-1',\n\t\t'description' => __( 'Footer column 1', 'posifon' ),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget-1 %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n \t// Area 5, located in the footer. Empty by default.\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer Widget Area 2', 'posifon' ),\n\t\t'id' => 'footer-widget-area-2',\n\t\t'description' => __( 'Footer column 2', 'posifon' ),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget-2 %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n\t// Area 6, located in the footer. Empty by default.\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer Widget Area 3', 'posifon' ),\n\t\t'id' => 'footer-widget-area-3',\n\t\t'description' => __( 'Footer column 3', 'posifon' ),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget-3 %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n\t// Area 7, located in the footer at the bottom of the page. Empty by default.\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer bottom area', 'posifon' ),\n\t\t'id' => 'footer-widget-area-4',\n\t\t'description' => __( 'Full span bottom area', 'posifon' ),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget-4 %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n}", "function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Footer sidebar',\n 'id' => 'footer_1',\n 'before_widget' => '<div id=\"blog_subscription-2\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3>',\n 'after_title' => '</h3>',\n ) );\n\n }", "function inxboilerplate_widgets_init() {\n register_sidebar( array(\n \"name\" => __( \"Sidebar\", \"inxboilerplate\" ),\n \"id\" => \"r_sidebar\",\n \"before_widget\" => '<section id=\"%1$s\" class=\"widget %2$s\">',\n \"after_widget\" => \"</section>\",\n \"before_title\" => '<h3 class=\"wigtitle\">',\n \"after_title\" => \"</h3>\",\n ) );\n}", "function mythemepost_widgets(){ \n register_sidebar( array(\n 'name' => 'Lavel Up New Widget Area',\n 'id' => 'level_up_new_widget_area',\n 'before_widget' => '<aside>',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n \n ));\n}", "function bethel_register_widget_areas() {\n\tunregister_sidebar( 'header-right' ); // Remove the right header widget area\n\tgenesis_register_sidebar (array ('id' => 'header-right-top', 'name' => 'Header Right Top', 'description' => 'The upper widget to the right of the header image.'));\t\n\tgenesis_register_sidebar (array ('id' => 'footer-bottom', 'name' => 'Footer Bottom', 'description' => 'Full-width widget at the very bottom of the page.'));\t\n}", "function registerBBwidget(){\r\n\tregister_widget('BbWidgetArea');\r\n\t\r\n\t}", "function add_widget_Support() {\n register_sidebar( array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n}", "function ourWidgetsInit() {\n // register widget location\n register_sidebar( array(\n 'name' => 'Sidebarr',\n 'id' => 'sidebar1',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"a-special-class\">',\n 'after_title' => '</h2>'\n ));\n\n register_sidebar( array(\n 'name' => 'Footer Area 1',\n 'id' => 'footer1',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>'\n ));\n\n register_sidebar( array(\n 'name' => 'Footer Area 2',\n 'id' => 'footer2',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>'\n ));\n\n register_sidebar( array(\n 'name' => 'Footer Area 3',\n 'id' => 'footer3',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>'\n ));\n\n register_sidebar( array(\n 'name' => 'Footer Area 4',\n 'id' => 'footer4',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>'\n ));\n}", "function inhabitent_widget() {\nregister_sidebar(array(\n'name' => 'Sidebar Info',\n'id' => 'sidebar-info',\n'description' => 'Add a text block with your business hours',\n// 'before_widget' => '<aside id=\"%1$s\">',\n'before_widget' => '<aside>',\n'after_widget' => '</aside>',\n'before_title' => '<h2 class=\"widget-title\">',\n'after_title' => '</h2>'\n));\n\n// We registered a sidebar into the WP backend....so we could put widgets into it.\t\nregister_sidebar(array(\n\t'name' => 'Footer Info',\n\t'id' => 'footer-info',\n\t'description' => 'Add a text block for your footer',\n\t'before_widget' => '<aside class=\"%1$s\">',\n\t'after_widget' => '</aside>',\n\t'before_title' => '<h2 class=\"widget-title\">',\n\t'after_title' => '</h2>'\n\t));\n\n}", "function gymfitness_widgets(){\n register_sidebar( array(\n 'name'=>'Sidebar 1',\n 'id' => 'sidebar_1',\n 'before-widget' => '<div class=\"widget\">', \n 'after-widget' => '</div>', \n 'before_title' => '<h3 class=\"text-center texto-primario\">',\n 'after_title' => '</h3>'\n\n\n ));\n register_sidebar( array(\n 'name'=>'Sidebar 2',\n 'id' => 'sidebar_2',\n 'before-widget' => '<div class=\"widget\">', \n 'after-widget' => '</div>', \n 'before_title' => '<h3 class=\"text-center texto-primario\">',\n 'after_title' => '</h3>'\n\n\n ));\n}", "function widget_registration($name, $id, $description, $beforeWidget, $afterWidget, $beforeTitle, $afterTitle) {\n register_sidebar(\n array(\n 'name' => $name,\n 'id' => $id,\n 'description' => $description,\n 'before_widget' => $beforeWidget,\n 'after_widget' => $afterWidget,\n 'before_title' => $beforeTitle,\n 'after_title' => $afterTitle,\n )\n );\n}", "function gphq_widgets_init() {\t\n\tregister_sidebar( array(\n\t\t'name' => 'Home Page Middle Sidebar',\n\t\t'id' => 'home-rss',\n\t\t'description' => 'Middle column of homepage above events',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Home Page Right Sidebar',\n\t\t'id' => 'homepage-widget-area',\n\t\t'description' => 'Main right column sidebar on homepage only',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Main Blog Sidebar',\n\t\t'id' => 'primary-widget-area',\n\t\t'description' => 'This widget area is for the sidebar on the blog only',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Footer Widget Area',\n\t\t'id' => 'first-footer-widget-area',\n\t\t'description' => 'Main footer area widget',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Secondary Widget Area',\n\t\t'id' => 'secondary-widget-area',\n\t\t'description' => 'The secondary widget area',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n}", "function theme_widgets_init() {\n\t // Area 1\n\t register_sidebar( array (\n\t 'name' => 'Primary Widget Area',\n\t 'id' => 'primary_widget_area',\n\t 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t 'after_widget' => \"</li>\",\n\t 'before_title' => '<h3 class=\"widget-title\">',\n\t 'after_title' => '</h3>',\n\t ) );\n\n\t // Area 2\n\t register_sidebar( array (\n\t 'name' => 'Secondary Widget Area',\n\t 'id' => 'secondary_widget_area',\n\t 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t 'after_widget' => \"</li>\",\n\t 'before_title' => '<h3 class=\"widget-title\">',\n\t 'after_title' => '</h3>',\n\t ) );\n\t}", "function theme_widgets_init() {\n\t // Area 1\n\t register_sidebar( array (\n\t 'name' => 'Primary Widget Area',\n\t 'id' => 'primary_widget_area',\n\t 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t 'after_widget' => \"</li>\",\n\t 'before_title' => '<h3 class=\"widget-title\">',\n\t 'after_title' => '</h3>',\n\t ) );\n\n\t // Area 2\n\t register_sidebar( array (\n\t 'name' => 'Secondary Widget Area',\n\t 'id' => 'secondary_widget_area',\n\t 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t 'after_widget' => \"</li>\",\n\t 'before_title' => '<h3 class=\"widget-title\">',\n\t 'after_title' => '</h3>',\n\t ) );\n\t}", "function twentyten_widgets_init() {\n\t// Area 1, located at the top of the sidebar.\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'pp' ),\n\t\t'id' => 'sidebar-principal',\n\t\t'description' => __( 'Arraste os itens desejados até aqui. ', 'pp' ),\n\t\t'before_widget' => '<div class=\"widget %2$s\" id=\"%1$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2 style=\"display:none;\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\n}", "function kcsite_widgets_init() {\t\t\t\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'Left sidebar', 'kcsite' ),\n\t\t\t'id' => 'sidebar-l',\n\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t'after_widget' => '</aside>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t));\t\t\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'Right sidebar', 'kcsite' ),\n\t\t\t'id' => 'sidebar-r',\n\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t'after_widget' => \"</aside>\",\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t));\n/*\n\t\tregister_sidebar( array(\n\t\t\t'name' => __('Banners Before Footer', 'kcsite'),\n\t\t\t'id' => 'sidebar-banners-before-footer',\n\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s help-inline\">',\n\t\t\t'after_widget' => \"</aside>\",\n\t\t\t//'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t//'after_title' => '</h3>',\n\t\t) );*/\n\t}", "function bp_widgets_init() {\n // register_sidebar( array(\n // 'name' => __( 'Footer Widget Area', 'holstein' ),\n // 'id' => 'footer-widget',\n // 'description' => __( 'Appears on the bottom of every page.', 'holstein' ),\n // 'before_widget' => '<div class=\"col\">',\n // 'after_widget' => '</div>',\n // 'before_title' => '<h2>',\n // 'after_title' => '</h2>'\n // ) );\n\n register_sidebar( array(\n 'name' => __( 'Right Sidebar Widget Area', 'bp' ),\n 'id' => 'right-sidebar',\n 'description' => __( 'Appears on the right side of the blog index.', 'bp' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>'\n ) );\n\n // register_sidebar( array(\n // 'name' => __( 'Left Sidebar Widget Area', 'holstein' ),\n // 'id' => 'left-sidebar',\n // 'description' => __( 'Appears on the left side of pages', 'holstein' ),\n // 'before_widget' => '<div id=\"%1$s\" class=\"area %2$s\">',\n // 'after_widget' => '</div>',\n // 'before_title' => '<h3>',\n // 'after_title' => '</h3>'\n // ) ); \n}", "public static function registerWidgetAreas()\n {\n /**\n * Footer Area\n */\n register_sidebar(array(\n 'id' => 'footer-area',\n 'name' => __('Footerarea', 'Helsingborg'),\n 'description' => __('Arean längst ner på sidan', 'Helsingborg'),\n 'before_widget' => '<div class=\"left large-6 medium-6 print-6 columns\"><div class=\"footer-content\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h2 class=\"footer-title\">',\n 'after_title' => '</h2>'\n ));\n\n /**\n * Slider Area\n */\n register_sidebar(array(\n 'id' => 'slider-area',\n 'name' => __('Topparea', 'Helsingborg'),\n 'description' => __('Visas under huvudmenyn', 'Helsingborg'),\n 'before_widget' => '<div class=\"large-12 medium-12 small-12 print-12 columns widget\">' .\n '<div class=\"box %2$s\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h3>',\n 'after_title' => '</h3>'\n ));\n\n /**\n * Content Area\n */\n register_sidebar(array(\n 'id' => 'content-area',\n 'name' => __('Innehållsarea', 'Helsingborg'),\n 'description' => __('Visas strax under en artikels brödtext', 'Helsingborg'),\n 'before_widget' => '<div class=\"box box-outlined widget %2$s\">',\n 'after_widget' => '</div>'\n ));\n\n /**\n * Content Area Bottom\n */\n register_sidebar(array(\n 'id' => 'content-area-bottom',\n 'name' => __('Innehåll bottenarea', 'Helsingborg'),\n 'description' => __('Visas under vänstermeny och artikel (fullbredd) ', 'Helsingborg'),\n 'before_widget' => '<div class=\"large-12 medium-12 small-12 print-12 columns widget\">' .\n '<div class=\"box box-outlined %2$s\">',\n 'after_widget' => '</div>'\n ));\n\n /**\n * Service Area\n */\n register_sidebar(array(\n 'id' => 'service-area',\n 'name' => __('Servicearea', 'Helsingborg'),\n 'description' => __('De service-länkar som visas i grått fält på startsidan', 'Helsingborg'),\n 'before_widget' => '<div class=\"widget columns large-4 medium-4 small-12 pprint-4\">',\n 'after_widget' => '</div>'\n ));\n\n /**\n * Fun Facts Area\n */\n register_sidebar(array(\n 'id' => 'fun-facts-area',\n 'name' => __('Fakta', 'Helsingborg'),\n 'description' => __('Faktarutor som visas innan footer (visar tre slumpmässiga).', 'Helsingborg'),\n 'before_widget' => '<div class=\"widget columns large-3 medium-3 print-3 left\">',\n 'after_widget' => '</div>'\n ));\n\n /**\n * Left Sidebar\n */\n register_sidebar(array(\n 'id' => 'left-sidebar',\n 'name' => __('Vänster area', 'Helsingborg'),\n 'description' => __('Visas ovanför vänstermenyn.', 'Helsingborg'),\n 'before_widget' => '<div class=\"large-12 medium-12 small-12 print-12 columns widget\">' .\n '<div class=\"box box-filled widget %2$s\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n ));\n\n /**\n * Left Sidebar Bottom\n */\n register_sidebar(array(\n 'id' => 'left-sidebar-bottom',\n 'name' => __('Vänster bottenarea', 'Helsingborg'),\n 'description' => __('Visas under vänstermenyn.', 'Helsingborg'),\n 'before_widget' => '<div class=\"large-12 medium-12 small-12 print-12 columns widget\">' .\n '<div class=\"box box-filled widget %2$s\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n ));\n\n /**\n * Right Sidebar\n */\n register_sidebar(array(\n 'id' => 'right-sidebar',\n 'name' => __('Höger area', 'Helsingborg'),\n 'description' => __('Visas i högerspalten.', 'Helsingborg'),\n 'before_widget' => '<div class=\"large-12 medium-12 small-12 print-12 columns widget\">' .\n '<div class=\"box box-filled widget %2$s\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n ));\n }", "function jn_widgets_init() {\n register_sidebar( array(\n 'name' => __('Main Sidebar', 'jn'),\n 'id' => 'sidebar-1',\n 'description' => __('The default sidebar to be used on pages','jn'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n ));\n}", "function boiler_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'boiler' ),\n\t\t'id' => 'sidebar-1',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t'after_title' => '</h1>',\n\t) );\n}", "function ajy_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Header', 'ajy' ),\n\t\t'id' => 'header-widget-area',\n 'description' => 'These are widgets for the header.',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n \n register_sidebar( array(\n\t\t'name' => __( 'Navigation', 'ajy' ),\n\t\t'id' => 'nav-widget-area',\n 'description' => 'These are widgets for the navigation area.',\n\t\t'before_widget' => '', //no wrapper\n\t\t'after_widget' => '',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n \n register_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'ajy' ),\n\t\t'id' => 'sidebar-widget-area',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n \n register_sidebar( array(\n\t\t'name' => __( 'Footer', 'ajy' ),\n\t\t'id' => 'footer-widget-area',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n}", "public function register_sidebars() {\n\n\t\t\t// Get widget areas\n\t\t\tif ( empty( $this->widget_areas ) ) {\n\t\t\t\t$this->widget_areas = $this->get_widget_areas();\n\t\t\t}\n\n\t\t\t// Original widget areas is empty\n\t\t\t$this->orig = array();\n\n\t\t\t// Save widget areas\n\t\t\tif ( ! empty( $this->orig ) && $this->orig != $this->widget_areas ) {\n\t\t\t\t$this->widget_areas = array_unique( array_merge( $this->widget_areas, $this->orig ) );\n\t\t\t\t$this->save_widget_areas();\n\t\t\t}\n\n\t\t\t// If widget areas are defined add a sidebar area for each\n\t\t\tif ( is_array( $this->widget_areas ) ) {\n\t\t\t\tforeach ( array_unique( $this->widget_areas ) as $widget_area ) {\n\t\t\t\t\t$args = array(\n\t\t\t\t\t\t'id'\t\t\t=> sanitize_key( $widget_area ),\n\t\t\t\t\t\t'name'\t\t\t=> $widget_area,\n\t\t\t\t\t\t'class'\t\t\t=> 'wprt-custom',\n\t\t\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t\t\t'after_widget' => '</div>',\n\t\t\t\t\t\t'before_title' => '<h2 class=\"widget-title\"><span>',\n\t\t\t\t\t\t'after_title' => '</span></h2>'\n\t\t\t\t\t);\n\t\t\t\t\tregister_sidebar( $args );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function calslabs_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Top Right Hours',\n\t\t'id' => 'top_right_area',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\n}", "function MyPenandPantry_WidgetInit()\n{\n\tregister_sidebar(array(\n\t\t'name' => 'Social-icon-bar',\n\t\t'id' => 'sidebar1',\n\t\t'before_widget' => '<div class=\"widget-item\">',\n\t\t'after_widget' => '</div>'\n\t));\n}", "function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Widget oben rechts',\n 'id' => 'widget_top_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Widget mitte rechts',\n 'id' => 'widget_center_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Widget unten rechts',\n 'id' => 'widget_bottom_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Newsletter Widget',\n 'id' => 'newsletter_widget',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Custom Footer Widget',\n 'id' => 'footer_widget',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n\n}", "function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Home right sidebar',\n 'id' => 'home_right_1',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"rounded\">',\n 'after_title' => '</h2>',\n ) );\n }", "function control_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'control' ),\n\t\t'id' => 'sidebar-1',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t'after_title' => '</h1>',\n\t) );\n}", "function gymfitness_widgets(){\n\n register_sidebar(array(\n 'name' => 'Sidebar 1', \n 'id' => 'sidebar_1',\n 'before_widget' => '<div class=\"\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>'\n ));\n register_sidebar(array(\n 'name' => 'Sidebar 2', \n 'id' => 'sidebar_2',\n 'before_widget' => '<div class=\"\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>'\n ));\n\n}", "function ourWidgetsInit(){\n\n register_sidebar(array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar1',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"my-special-class\">',\n 'after_title' => '</h4>'\n\n ));\n}", "function register_widget_areas() {\n\t\tregister_sidebar( array(\n\t 'name' => __('Header: Hours of Operation and Contact'),\n\t 'id' => 'Header-Hours-of-operation-and-contact',\n\t 'description' => __('The logo section of the footer'),\n\t 'before_widget' => '<div id=\"%1$s\" class=\"widget-container %2$s\">',\n\t 'after_widget' => '</div>',\n\t // 'before_title' => '<h3 class=\"widget-title\">',\n\t // 'after_title' => '</h3>',\n\t ) );\n\n\t register_sidebar( array(\n\t 'name' => __('Testimonials'),\n\t 'id' => 'testimonials',\n\t 'description' => __('Testimonials section on homepage'),\n\t 'before_widget' => '<div id=\"%1$s\" class=\"widget-container %2$s\">',\n\t 'after_widget' => '</div>',\n\t // 'before_title' => '<h3 class=\"widget-title\">',\n\t // 'after_title' => '</h3>',\n\t ) );\n\n \tregister_sidebar( array(\n\t 'name' => __('Footer Logo and Contact Info'),\n\t 'id' => 'footer-logo-and-contact-info',\n\t 'description' => __('The logo section of the footer'),\n\t 'before_widget' => '<div id=\"%1$s\" class=\"widget-container %2$s\">',\n\t 'after_widget' => '</div>',\n\t 'before_title' => '<h3 class=\"widget-title\">',\n\t 'after_title' => '</h3>',\n\t ) );\n\n\t register_sidebar( array(\n\t 'name' => __('Footer Form'),\n\t 'id' => 'footer-form',\n\t 'description' => __('The form section of the footer'),\n\t 'before_widget' => '<div id=\"%1$s\" class=\"widget-container %2$s\">',\n\t 'after_widget' => '</div>',\n\t 'before_title' => '<h3 class=\"widget-title\">',\n\t 'after_title' => '</h3>',\n\t ) );\n\n\t register_sidebar( array(\n\t 'name' => __('Footer Map'),\n\t 'id' => 'footer-map',\n\t 'description' => __('The map section of the footer'),\n\t 'before_widget' => '<div id=\"%1$s\" class=\"widget-container %2$s\">',\n\t 'after_widget' => '</div>',\n\t 'before_title' => '<h3 class=\"widget-title\">',\n\t 'after_title' => '</h3>',\n\t ));\n\t \n\t register_sidebar( array(\n\t 'name' => __('Popup Logo and Contact Info'),\n\t 'id' => 'popup-logo-and-contact-info',\n\t 'description' => __('The logo section of the popup'),\n\t 'before_widget' => '<div id=\"%1$s\" class=\"widget-container %2$s\">',\n\t 'after_widget' => '</div>',\n\t 'before_title' => '<h3 class=\"widget-title\">',\n\t 'after_title' => '</h3>',\n\t ) );\n\t \n\t register_sidebar( array(\n\t 'name' => __('Popup Form'),\n\t 'id' => 'popup-form',\n\t 'description' => __('The form section of the popup'),\n\t 'before_widget' => '<div id=\"%1$s\" class=\"widget-container %2$s\">',\n\t 'after_widget' => '</div>',\n\t 'before_title' => '<h3 class=\"widget-title\">',\n\t 'after_title' => '</h3>',\n\t ));\n\t\n\t}", "function add_widgets() {\n\n register_sidebar( array(\n 'name' => 'Right Sidebar',\n 'id' => 'right_sidebar',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n}", "function uwmadison_widgets_init() {\n\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'Main Sidebar', 'uw-madison-160' ),\n\t\t\t'id' => 'sidebar-1',\n\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => \"</aside>\",\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\n\t}", "function register_block_core_post_comments_form()\n {\n }", "public function widgets_init() {\n\t\tregister_sidebar(\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Sidebar', 'hellish-simplicity' ),\n\t\t\t\t'id' => 'sidebar',\n\t\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"%2$s\">',\n\t\t\t\t'after_widget' => '</aside>',\n\t\t\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t\t\t'after_title' => '</h1>',\n\t\t\t)\n\t\t);\n\t}", "function pickleplease_sidebars_init() {\n\n // Register the New Footer Sidebar\n register_sidebar(array(\n \n // Title for the Widget Dashboard\n 'name' => 'New Sidebar',\n \n // ID for the XHTML Markup\n 'id' => 'new-sidebar',\n\n // Description for the Widget Dashboard Box\n 'description' => __('This is a right column widget area.', 'thematic'),\n\n // Do not edit these. It keeps Headers and lists consistent for Thematic\n 'before_widget' => thematic_before_widget(),\n 'after_widget' => thematic_after_widget(),\n 'before_title' => thematic_before_title(),\n 'after_title' => thematic_after_title(),\n ));\n\n\n // Unregister and sidebars you donŐt need based on its ID.\n // For a full list of Thematic sidebar IDs, look at /thematc/library/extensions/widgets-extensions.php\n //unregister_sidebar('primary-aside');\n unregister_sidebar('secondary-aside');\n unregister_sidebar('index-top');\n unregister_sidebar('index-insert');\n unregister_sidebar('index-bottom');\n unregister_sidebar('single-top');\n unregister_sidebar('single-insert');\n unregister_sidebar('single-bottom');\n unregister_sidebar('page-top');\n unregister_sidebar('page-bottom');\n }", "function mintshow_sidebar_widget_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Left Sidebar',\n\t\t'id' => 'left_sidebar_1',\n\t\t// 'before_widget' => '<div>',\n\t\t// 'after_widget' => '</div>',\n\t\t// 'before_title' => '<h2 class=\"rounded\">',\n\t\t// 'after_title' => '</h2>',\n\t) );\n\n}", "function gp_widgets_init() {\n\n /**\n * Register sidebars.\n */\n\n $sidebar_main = array_merge(\n array( 'name' => __( 'General Sidebar', 'gp' ), 'id' => 'sidebar-main' ),\n gp_get_default_widget_params()\n );\n register_sidebar( $sidebar_main );\n\n // $sidebar_post = array_merge(\n // array( 'name' => __( 'Blog Sidebar', 'gp' ), 'id' => 'sidebar-blog' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $sidebar_post );\n\n\n // $sidebar_post = array_merge(\n // array( 'name' => __( 'Blog Post Sidebar', 'gp' ), 'id' => 'sidebar-post' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $sidebar_post );\n\n\n // $sidebar_portfolio = array_merge(\n // array( 'name' => __( 'Portfolio Sidebar', 'gp' ), 'id' => 'sidebar-portfolio' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $sidebar_portfolio );\n\n\n // $sidebar_portfolio_single = array_merge(\n // array( 'name' => __( 'Portfolio Project Sidebar', 'gp' ), 'id' => 'sidebar-portfolio-single' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $sidebar_portfolio_single );\n\n // $persy_fuer_kmu = array_merge(\n // array( 'name' => __( 'Persy für KMU', 'gp' ), 'id' => 'persy-fuer-kmu' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $persy_fuer_kmu );\n\n // $persy_fuer_pdl = array_merge(\n // array( 'name' => __( 'Persy für PDL', 'gp' ), 'id' => 'persy-fuer-pdl' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $persy_fuer_pdl );\n\n // $persy_support = array_merge(\n // array( 'name' => __( 'Persy Support', 'gp' ), 'id' => 'persy-support' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $persy_support );\n\n $template_with_subnav = array_merge(\n array( 'name' => __( 'Template with subnav', 'gp' ), 'id' => 'sidebar-template-with-subnav' ),\n gp_get_default_widget_params()\n );\n register_sidebar( $template_with_subnav );\n\n\n // Removes the default styles that are packaged with the Recent Comments widget.\n add_filter( 'show_recent_comments_widget_style', '__return_false' );\n\n}", "function widget_wrap()\n{\n\tregister_widget('ag_pag_familie_w');\n\tregister_widget('ag_social_widget_container');\n\tregister_widget('ag_agenda_widget');\n}", "public function _register_widgets()\n {\n }", "function pts_widget_init() {\n\n register_sidebar( array(\n\t\t'name' => 'Top Widget',\n\t\t'id' => 'top_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s top-widgs\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Sidebar Widget',\n\t\t'id' => 'sidebar_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s sidebar-widgs\">',\n\t\t'after_widget' => '</div></div>',\n\t\t'before_title' => '<div class=\"widget_title_wrapper\"><h5 class=\"widgets_titles_sidebar\">',\n\t\t'after_title' => '</h5></div><div class=\"wca\">',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Single Post Widget',\n\t\t'id' => 'single_post_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s sidebar-widgs\">',\n\t\t'after_widget' => '</div></div>',\n\t\t'before_title' => '<div class=\"widget_title_wrapper\"><h5 class=\"widgets_titles_sidebar\">',\n\t\t'after_title' => '</h5></div><div class=\"wca\">',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'First Footer Widget',\n\t\t'id' => 'first_footer_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h5 class=\"widgets_titles\">',\n\t\t'after_title' => '</h5>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => 'Second Footer Widget',\n\t\t'id' => 'second_footer_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h5 class=\"widgets_titles\">',\n\t\t'after_title' => '</h5>',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Third Footer Widget',\n\t\t'id' => 'third_footer_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h5 class=\"widgets_titles\">',\n\t\t'after_title' => '</h5>',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Fourth Footer Widget',\n\t\t'id' => 'fourth_footer_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h5 class=\"widgets_titles\">',\n\t\t'after_title' => '</h5>',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Footer Right',\n\t\t'id' => 'footer_right',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n}", "function sbc_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Left Column',\n 'id' => 'left-col',\n 'before_widget' => '<div class=\"left-col widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"head widget-head\">',\n 'after_title' => '</h4>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Center Column',\n 'id' => 'center-col',\n 'before_widget' => '<div class=\"center-col widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"head widget-head\">',\n 'after_title' => '</h4>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Right Column',\n 'id' => 'right-col',\n 'before_widget' => '<div class=\"right-col widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"head widget-head\">',\n 'after_title' => '</h4>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Service Sidebar',\n 'id' => 'service-sidebar',\n 'before_widget' => '<div class=\"sidebar service-sidebar\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"head service-widget-head\">',\n 'after_title' => '</h4>',\n ) );\n\n}", "function ccac_2020_new_widgets_init() {\n /* Pinegrow generated Register Sidebars Begin */\n\n /* Pinegrow generated Register Sidebars End */\n}", "function register_block_core_comment_content()\n {\n }", "function emc_widgets_init() {\r\n\tregister_sidebar( array(\r\n\t\t'name' => __( 'Sidebar', 'emc' ),\r\n\t\t'id' => 'sidebar',\r\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t'after_widget' => \"</aside>\",\r\n\t\t'before_title' => '<h1 class=\"widget-title\">',\r\n\t\t'after_title' => '</h1>',\r\n\t) );\r\n\tregister_sidebar( array(\r\n\t\t'name' => __( 'Header', 'emc' ),\r\n\t\t'id' => 'header',\r\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t'after_widget' => \"</aside>\",\r\n\t\t'before_title' => '<h1 class=\"widget-title\">',\r\n\t\t'after_title' => '</h1>',\r\n\t) );\r\n\tregister_sidebar( array(\r\n\t\t'name' => __( 'Single View', 'emc' ),\r\n\t\t'id' => 'single',\r\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t'after_widget' => \"</aside>\",\r\n\t\t'before_title' => '<h1 class=\"widget-title\">',\r\n\t\t'after_title' => '</h1>',\r\n\t) );\r\n\tregister_sidebar( array(\r\n\t\t'name' => __( 'Footer – Left', 'emc' ),\r\n\t\t'id' => 'footer-left',\r\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t'after_widget' => \"</aside>\",\r\n\t\t'before_title' => '<h1 class=\"widget-title\">',\r\n\t\t'after_title' => '</h1>',\r\n\t) );\r\n\tregister_sidebar( array(\r\n\t\t'name' => __( 'Footer – Center', 'emc' ),\r\n\t\t'id' => 'footer-center',\r\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t'after_widget' => \"</aside>\",\r\n\t\t'before_title' => '<h1 class=\"widget-title\">',\r\n\t\t'after_title' => '</h1>',\r\n\t) );\r\n\tregister_sidebar( array(\r\n\t\t'name' => __( 'Footer – Right', 'emc' ),\r\n\t\t'id' => 'footer-right',\r\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t'after_widget' => \"</aside>\",\r\n\t\t'before_title' => '<h1 class=\"widget-title\">',\r\n\t\t'after_title' => '</h1>',\r\n\t) );\r\n\tregister_sidebar( array(\r\n\t\t'name' => __( 'Ideas Page Sidebar', 'emc' ),\r\n\t\t'id' => 'ideas-page-sidebar',\r\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t'after_widget' => \"</aside>\",\r\n\t\t'before_title' => '<h1 class=\"widget-title\">',\r\n\t\t'after_title' => '</h1>',\r\n\t) );\r\n}", "function YWR_2020_widgets_init()\n{\n register_sidebar(array(\n 'name' => __('General Page Sidebar', 'YWR_2020'),\n 'id' => 'sidebar-1',\n 'description' => __('Add widgets here to appear in your sidebar on standard pages.', 'YWR_2020'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget clearfix %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<div class=\"fancy-title title-bottom-border\"><h2>',\n 'after_title' => '</h2></div>',\n ));\n\n}", "function wpb_widgets_init()\n{\n\n register_sidebar(array(\n 'name' => 'Custom Header Widget Area',\n 'id' => 'custom-header-widget',\n 'before_widget' => '<div class=\"chw-widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"chw-title\">',\n 'after_title' => '</h2>',\n ));\n}", "static function register_search_widget_area(){\n\t\tregister_sidebar( array(\n\t\t\t'name' => 'Hot Search' ,\n\t\t\t'id' => 'hotsearch',\n\t\t\t'description' => 'Advanced Search beside user 1 widget',\n\t\t\t'before_widget' => '<div class=\"widget widget_hotsearch\" >',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widgettitle widgettitle_hotsearch\" >',\n\t\t\t'after_title' => '</h3>'\n\t\t));\n\t\t\n\t\tif(class_exists('widget_hot_search')){\n\t\t\tregister_widget( 'widget_hot_search' );\n\t\t}\n\t}", "function kopparpannan_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Left Sidebar', 'kopparpannan' ),\n 'id' => 'left',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s grid-sidebar-left\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h1 class=\"widget-title\">',\n 'after_title' => '</h1>',\n ) );\n \n register_sidebar( array(\n 'name' => __( 'Right Sidebar', 'kopparpannan' ),\n 'id' => 'right',\n 'before_widget' => '<ul><li id=\"%1$s\" class=\"widget %2$s grid-sidebad-right\">',\n 'after_widget' => '</li></ul>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n}", "function mocca_main_sidebar() {\n register_sidebar(array(\n 'name' => 'Mocca Sidebar',\n 'id' => 'mocca-sidebar', \n 'description' => 'Wordpress Apper SideBar',\n 'class' => 'sidebar-wordpress',\n 'before_widget' => '<div class=\"widget-content\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n ));\n }", "function russianroulette_widgets_init() {\n \tregister_sidebar( array(\n \t\t'name' => __( 'Sidebar', 'russianroulette' ),\n \t\t'id' => 'sidebar-1',\n \t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n \t\t'after_widget' => '</aside>',\n \t\t'before_title' => '<h1 class=\"widget-title\">',\n \t\t'after_title' => '</h1>',\n \t) );\n }", "function safed_widgets_init() {\n \n register_sidebar( array(\n 'name' => __( 'Widget Banner 1', 'safed' ),\n 'id' => 'banner_area_1',\n 'description' => __( 'Appears with [banner_one]', 'safed' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s safed__dynamic-module\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n \n register_sidebar( array(\n 'name' =>__( 'Widget Banner 2', 'safed'),\n 'id' => 'banner_area_2',\n 'description' => __( 'Appears with [banner_two]', 'safed' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s safed__dynamic-module\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n }", "function sidebar() {\n register_sidebar(\n array(\n 'name' => 'Pie de Pagina',\n 'id' => 'footer',\n 'description' => 'Zona de widget para el footer',\n 'before_title' => '<p>',\n 'after_title' => '</p>',\n 'before_widget' => '<div id=\"%1$s\" class=\"%2$s\">',\n 'after_widget' => '</div>',\n )\n );\n}", "function cbc_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Footer bar 1',\n\t\t'id' => 'footer_bar_1',\n\t\t'before_widget' => '<li>',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n\n}", "function arphabet_widgets_init() {\n\tregister_sidebar(\n\t\tarray(\n\t\t\t'name' => 'Counter',\n\t\t\t'id' => 'counter_1',\n\t\t\t'before_widget' => '<div class=\"csc_box\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h2 class=\"csc_title\">',\n\t\t\t'after_title' => ' <i class=\"fa fa-users\"></i></h2>'\n\t\t)\n\t);\n}", "function theme_widgets_init() {\n register_sidebar(array(\n 'name' => __('Main Widget Area', 'theme'),\n 'id' => 'sidebar-1',\n 'description' => __('Appears in the footer section of the site.', 'law-firm'),\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '',\n 'after_title' => '<',\n ));\n\n register_sidebar(array(\n 'name' => __('Secondary Widget Area', 'theme'),\n 'id' => 'sidebar-2',\n 'description' => __('Appears on posts and pages in the sidebar.', 'law-firm'),\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '',\n 'after_title' => '',\n ));\n}", "function our_widget_inits(){\n\tregister_sidebar(array(\n\t\t'name' => 'Sidebar',\n\t\t'id' => 'sidebar1',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s widget_area\">',\n\t\t'after_widget' => \"</div>\",\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t));\n\tregister_sidebar(array(\n\t\t'name' => 'Footer area 1',\n\t\t'id' => 'footer1',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t));\n\tregister_sidebar(array(\n\t\t'name' => 'Footer area 2',\n\t\t'id' => 'footer2',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t));\n\tregister_sidebar(array(\n\t\t'name' => 'Footer area 3',\n\t\t'id' => 'footer3',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t));\n}", "function brideliness_widgets_init() {\n\t// Default Sidebars\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Blog Sidebar', 'brideliness' ),\n\t\t\t'id' => 'sidebar-blog',\n\t\t\t'description' => esc_html__( 'Appears on single blog posts and on Blog Page', 'brideliness' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t\t'after_title' => '</span></h3>',\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Pages Sidebar', 'brideliness' ),\n\t\t\t'id' => 'sidebar-pages',\n\t\t\t'description' => esc_html__( 'Appears on Pages', 'brideliness' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t\t'after_title' => '</span></h3>',\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Header Top Panel Sidebar', 'brideliness' ),\n\t\t\t'id' => 'top-sidebar',\n\t\t\t'description' => esc_html__( 'Located at the top of site', 'brideliness' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s left-aligned\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<!--',\n\t\t\t'after_title' => '-->',\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Aside Logo Left sidebar(Standart Header)', 'brideliness' ),\n\t\t\t'id' => 'aside-logo-left-sidebar',\n\t\t\t'description' => esc_html__( 'Located to the left from header', 'brideliness' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '',\n\t\t\t'after_title' => '',\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Aside Logo Right sidebar(Standart Header)', 'brideliness' ),\n\t\t\t'id' => 'aside-logo-right-sidebar',\n\t\t\t'description' => esc_html__( 'Located to the right from header', 'brideliness' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '',\n\t\t\t'after_title' => '',\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t\t'name' => esc_html__( 'Aside Logo Sidebar(Fixed Header)' , 'brideliness' ),\n\t\t\t\t'id' => 'fixed-header',\n\t\t\t\t'description' => esc_html__( 'Located to the right of the Header', 'brideliness' ),\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t'after_widget' => '</div>',\n\t\t\t\t'before_title' => '',\n\t\t\t\t'after_title' => '',\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Menu Sidebar(Standart Header)', 'brideliness' ),\n\t\t\t'id' => 'menu-sidebar',\n\t\t\t'description' => esc_html__( 'Located to the right after menu', 'brideliness' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '',\n\t\t\t'after_title' => '',\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Front Page Sidebar', 'brideliness' ),\n\t\t\t'id' => 'sidebar-front',\n\t\t\t'description' => esc_html__( 'Appears on Front Page', 'brideliness' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t\t'after_title' => '</span></h3>',\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Shop Page Sidebar', 'brideliness' ),\n\t\t\t'id' => 'sidebar-shop',\n\t\t\t'description' => esc_html__( 'Appears on Products page', 'brideliness' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t\t'after_title' => '</span></h3>',\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Shop Page Special Filters Sidebar', 'brideliness' ),\n\t\t 'id' => 'filters-sidebar',\n\t\t 'description' => esc_html__( 'Located at the top of the products page', 'brideliness' ),\n\t\t 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t 'after_widget' => '</aside>',\n\t\t 'before_title' => '<h3 class=\"dropdown-filters-title\">',\n\t\t 'after_title' => '</h3>',\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Shop Bottom Sidebar #1', 'brideliness' ),\n\t\t 'id' => 'footer-content-bottom-shop1',\n\t\t 'description' => esc_html__( 'Located at the bottom content shop', 'brideliness' ),\n\t\t 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t 'after_widget' => '</div>',\n\t\t 'before_title' => '<h3 class=\"shop-bottom-sidebar\">',\n\t\t 'after_title' => '</h3>',\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Shop Bottom Sidebar #2', 'brideliness' ),\n\t\t 'id' => 'footer-content-bottom-shop2',\n\t\t 'description' => esc_html__( 'Located at the bottom content shop', 'brideliness' ),\n\t\t 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t 'after_widget' => '</div>',\n\t\t 'before_title' => '<h3 class=\"shop-bottom-sidebar\">',\n\t\t 'after_title' => '</h3>',\n\t\t ) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Single Product Sidebar', 'brideliness' ),\n\t\t\t'id' => 'sidebar-product',\n\t\t\t'description' => esc_html__( 'Appears on Single Products page', 'brideliness' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t\t'after_title' => '</span></h3>',\n\t\t) );\n\t\t// Footer Sidebars\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Footer Sidebar Col#1', 'brideliness' ),\n\t\t\t'id' => 'footer-sidebar-1',\n\t\t\t'description' => esc_html__( 'Located in the footer of the site', 'brideliness' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Footer Sidebar Col#2', 'brideliness' ),\n\t\t\t'id' => 'footer-sidebar-2',\n\t\t\t'description' => esc_html__( 'Located in the footer of the site', 'brideliness' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Footer Sidebar Col#3', 'brideliness' ),\n\t\t\t'id' => 'footer-sidebar-3',\n\t\t\t'description' => esc_html__( 'Located in the footer of the site', 'brideliness' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Footer Sidebar Col#4', 'brideliness' ),\n\t\t\t'id' => 'footer-sidebar-4',\n\t\t\t'description' => esc_html__( 'Located in the footer of the site', 'brideliness' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Footer Bottom Sidebar', 'brideliness' ),\n\t\t\t'id' => 'footer-bottom',\n\t\t\t'description' => esc_html__( 'Located in the footer of the site', 'brideliness' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\tif(brideliness_get_option('brideliness-specials-sidebar1')){\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Brideliness Specials Sidebar #1', 'brideliness' ),\n\t\t\t'id' => 'brideliness-specials-sidebar1',\n\t\t\t'description' => esc_html__( 'This sidebar can be placed in any part of your home page where Visual Composer plugin is used', 'brideliness' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget specials %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t\t'after_title' => '</span></h3>',\n\t\t\t) );\t\n\t}\n\tif(brideliness_get_option('brideliness-specials-sidebar2')){\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Brideliness Specials Sidebar #2', 'brideliness' ),\n\t\t\t'id' => 'brideliness-specials-sidebar2',\n\t\t\t'description' => esc_html__( 'This sidebar can be placed in any part of your home page where Visual Composer plugin is used', 'brideliness' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget specials %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t\t'after_title' => '</span></h3>',\n\t\t\t) );\t\n\t}\n\tif(brideliness_get_option('brideliness-specials-sidebar3')){\n\t\tregister_sidebar( array(\n\t\t\t'name' => esc_html__( 'Brideliness Specials Sidebar #3', 'brideliness' ),\n\t\t\t'id' => 'specials-front-page',\n\t\t\t'description' => esc_html__( 'This sidebar can be placed in any part of your home page where Visual Composer plugin is used', 'brideliness' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget specials-front-page %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t\t'after_title' => '</span></h3>',\n\t\t) );\n\t}\t\t\n\t}", "function arphabet_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => 'Event Widget',\n\t\t'id' => 'event_widget',\n\t)\n \t);\n\tregister_sidebar( array(\n\t\t'name' => 'Landing Photo Widget',\n\t\t'id' => 'landingphoto_widget',\n\t)\n \t);\n\tregister_sidebar( array(\n\t\t'name' => 'Gallery Widget',\n\t\t'id' => 'gallery_widget',\n\t)\n\t );\n\t register_sidebar( array(\n\t\t'name' => 'About Widget',\n\t\t'id' => 'about_widget',\n\t)\n \t);\n}", "function gs_widgets_init() {\r\n\tregister_sidebar(\r\n\t array(\r\n\t 'name' => 'Homepage Widgets',\r\n\t 'id' => 'homepage-widgets',\r\n\t 'description' => '',\r\n\t 'before_widget' => '<div id=\"%1$s\" class=\"home-widget %2$s four columns\"><div class=\"widget-container\">',\r\n\t 'after_widget' => '</div></div>',\r\n\t 'before_title' => '<h4>',\r\n\t 'after_title' => '</h4>', \r\n\t ));\r\n\r\n\tregister_sidebar(\r\n\t array(\r\n\t 'name' => 'Page Sidebar',\r\n\t 'id' => 'page-sidebar',\r\n\t 'description' => '',\r\n\t 'before_widget' => '<div id=\"%1$s\" class=\"%2$s side-widget\">',\r\n\t 'after_widget' => '</div>',\r\n\t 'before_title' => '<h4>',\r\n\t 'after_title' => '</h4>', \r\n\t ));\r\n\r\n\tregister_sidebar(\r\n\t array(\r\n\t 'name' => 'Blog Sidebar',\r\n\t 'id' => 'blog-sidebar',\r\n\t 'description' => '',\r\n\t 'before_widget' => '<div id=\"%1$s\" class=\"%2$s side-widget\">',\r\n\t 'after_widget' => '</div>',\r\n\t 'before_title' => '<h4>',\r\n\t 'after_title' => '</h4>', \r\n\t ));\r\n}", "function initiate_widgets() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Footer twitter',\n\t\t'id' => 'footer_twitter',\n\t\t'before_widget' => '<div class=\"c-twitter\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"o-twitter-header\">',\n\t\t'after_title' => '</h4>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => 'Footer facebook',\n\t\t'id' => 'footer_facebook',\n\t\t'before_widget' => '<div class=\"c-twitter\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"o-twitter-header\">',\n\t\t'after_title' => '</h4>',\n\t) );\n\n}", "function init_custom_widgets() {\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-top',\n\t\t'name' => __('Sidebar top', 'bonestheme'),\n\t\t'description' => __('Top sidebar area, present on all pages (default: Main Menu)', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-projects',\n\t\t'name' => __('Projects sidebar', 'bonestheme'),\n\t\t'description' => __('Active on single project pages only (default: Related People, Grants & Publications)', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-people',\n\t\t'name' => __('People sidebar', 'bonestheme'),\n\t\t'description' => __('Active on single people pages only.', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-homepage',\n\t\t'name' => __('Homepage sidebar', 'bonestheme'),\n\t\t'description' => __('Active on homepage, lower side bar area.', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-homepage-content',\n\t\t'name' => __('Homepage main', 'bonestheme'),\n\t\t'description' => __('Active on homepage, below main content area.', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>'\n\t));\n\t\n\t\n\n\t/* Custom widget's */\n\t\n\tregister_widget( 'All_People_Widget' );\n\tregister_widget( 'Related_People_Widget' );\n\n\tregister_widget( 'All_Projects_Widget' );\n\tregister_widget( 'Related_Projects_Widget' );\n\tregister_widget( 'Related_Grants_Widget' );\n\tregister_widget( 'Related_Publications_Widget' );\n\n}", "function wpdocs_theme_slug_widgets_init() {\nregister_sidebar( array(\n'name' => __( 'Main Sidebar' ),\n'id' => 'sidebar_1',\n'description' => __( 'aprafiq is a man' ),\n'before_widget' => '<aside id=\"main_sidebar\">',\n'after_widget' => '</aside>',\n'before_title' => '<h2>',\n'after_title' => '</h2>',\n) );\n}", "function urbanfitness_widgets()\n{\n //registering widget must write php code to show it\n register_sidebar([\n 'name' => 'Sidebar', //widget name on wordpress panel\n 'id' => 'sidebar', //we are passing this id to dynamic_widget('sidebar') must be unique for wordpress to identify\n 'before_widget' => '<div class=\"widget\">', //html before widget\n 'after_widget' => '</div>', //html after widget\n 'before_title' => '<h3 class=\"text-primary\">', //html before title\n 'after_title' => '</h3>', //html after title\n ]);\n}", "public static function register()\n {\n register_sidebar( array(\n 'name' => 'Widget Area 1',\n 'id' => 'widget_1',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n }", "function radium_do_bbpress_sidebar() {\n\n if ( ! dynamic_sidebar( 'sidebar-bbpress' ) && current_user_can( 'edit_theme_options' ) ) {\n radium_bbpress_widget_area_content( esc_html__( 'Forum Sidebar Widget Area', 'newsfront-bbpress' ) );\n }\n\n }", "function FoodByNight_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Footer Right',\n\t\t'id' => 'footer_right',\n\t\t'before_widget' => '<ul class=\"list-inline\">',\n\t\t'after_widget' => '</ul>',\n\t\t'before_title' => '<h2 class=\"rounded\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_widget( 'Social_Link_Widget' );\n\n\tregister_sidebar( array(\n\t\t'name' => 'Popups',\n\t\t'id' => 'popups',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2 class=\"rounded\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_widget( 'Contact_Popup_Widget' );\n\n}", "function wp_widget_control($sidebar_args)\n {\n }", "function wowaries_widgets_init() {\n /* WowAriesProject generated Register Sidebars Begin */\n\n /* WowAriesProject generated Register Sidebars End */\n}", "function nabi_widgets_init() {\n\n\t// Language Selector Widget\n\tregister_sidebar( array(\n\t\t'name' => 'Language Widget',\n\t\t'id' => 'languagewidget',\n\t\t'before_title' => ''\n\t) );\n\n\t// Second nav additionnal content Widget\n\tregister_sidebar( array(\n\t\t'name' => 'Second Nav Widget',\n\t\t'id' => 'secondnavwidget',\n\t\t'before_title' => ''\n\t) );\n\n}", "function arphabet_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Page Sidebar',\n\t\t'id' => 'page-sidebar',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n\n}", "function zanblog_widgets_init() {\r\n register_sidebar(array(\r\n 'name' => '幻灯片',\r\n 'before_widget' => '<figure class=\"slide hidden-xs\">',\r\n 'after_widget' => '</figure>'\r\n ));\r\n\r\n register_sidebar(array(\r\n 'name' => '搜索框',\r\n 'before_widget' => '<div class=\"search visible-lg\">',\r\n 'after_widget' => '</div>'\r\n ));\r\n\r\n register_sidebar(array(\r\n 'name' => '最热文章',\r\n 'before_widget' => '',\r\n 'after_widget' => ''\r\n ));\r\n\r\n register_sidebar(array(\r\n 'name' => '最新评论',\r\n 'before_widget' => '',\r\n 'after_widget' => ''\r\n ));\r\n\r\n register_sidebar(array(\r\n 'name' => '最新文章',\r\n 'before_widget' => '',\r\n 'after_widget' => ''\r\n ));\r\n\r\n register_sidebar(array(\r\n 'name' => '分类、标签、友链',\r\n 'before_widget' => '',\r\n 'after_widget' => ''\r\n ));\r\n}", "function cdn_register_widget_areas() {\n\t// Home, Single -- Before Content Ad\n\tgenesis_register_widget_area( array(\n\t\t'id' => 'cdn-home-after-header-widget',\n\t\t'name' => __( 'Home After Header Ad', 'cutedecision' ),\n\t\t'description' => __( 'Horizontal ad banner. Placed before the content, at the top of the page.', 'cutedecision' ),\n\t) );\n\n\t// Home -- Inside Content Ad\n\tgenesis_register_widget_area( array(\n\t\t\t'id' => 'cdn-home-inside-loop-widget',\n\t\t\t'name' => __( 'Home Inside Loop Ad', 'cutedecision' ),\n\t\t\t'description' => __( 'Ad banner... Placed...', 'cutedecision' ) // TODO: Заполнить description\n\t) );\n\n\t// Single -- After Content Ad\n\tgenesis_register_widget_area( array(\n\t\t\t'id' => 'cdn-single-after-loop-widget',\n\t\t\t'name' => __( 'Single After Content Ad', 'cutedecision' ),\n\t\t\t'description' => __( 'Ad banner... Placed...', 'cutedecision' )\n\t) );\n\n\t// Taxonomy -- Inside loop widget\n\tgenesis_register_widget_area( array(\n\t\t\t'id' => 'cdn-taxonomy-inside-loop-widget',\n\t\t\t'name' => __( 'Taxonomy Inside Loop', 'cutedecision' ),\n\t\t\t'description' => __( 'Ad banner... Placed...', 'cutedecision' )\n\t) );\n\n\t// LPHT Sidebar\n\tgenesis_register_sidebar( array(\n\t\t\t'id' => 'cdn-lpht-sidebar',\n\t\t\t'name' => __( 'LPHT Sidebar', 'cutedecision' ),\n\t\t\t'description' => __( 'This is a the sidebar displayed on Latest, Popular, Hot, Trending taxonomy pages.', 'cutedecision' )\n\t) );\n}", "public function add_widget_area() {\n\t\t\tif ( ! empty( $_POST['wprt-add-widget-input'] ) ) {\n\t\t\t\t$this->widget_areas = $this->get_widget_areas();\n\t\t\t\tarray_push( $this->widget_areas, $_POST['wprt-add-widget-input'] );\n\t\t\t\t$this->save_widget_areas();\n\t\t\t\twp_redirect( admin_url( 'widgets.php' ) );\n\t\t\t\tdie();\n\t\t\t}\n\t\t}", "function ptoys_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'ptoys' ),\n\t\t'id' => 'sidebar-1',\n\t\t'description' => __( 'Add widgets here to appear in your sidebar.', 'ptoys' ),\n\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</section>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n}", "function nwclean_widgets_init() {\n\t// Area 1, located in the footer. Empty by default.\n\tregister_sidebar( array(\n\t\t'name' => __( 'First Footer Widget Area', 'nw-cleanv2' ),\n\t\t'id' => 'first-footer-widget-area',\n\t\t'description' => __( 'The first footer widget area', 'nw-cleanv2' ),\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n\t// Area 2, located in the footer. Empty by default.\n\tregister_sidebar( array(\n\t\t'name' => __( 'Second Footer Widget Area', 'nw-cleanv2' ),\n\t\t'id' => 'second-footer-widget-area',\n\t\t'description' => __( 'The second footer widget area', 'nw-cleanv2' ),\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n\t// Area 3, located in the footer. Empty by default.\n\tregister_sidebar( array(\n\t\t'name' => __( 'Third Footer Widget Area', 'nw-cleanv2' ),\n\t\t'id' => 'third-footer-widget-area',\n\t\t'description' => __( 'The third footer widget area', 'nw-cleanv2' ),\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n\t// Area 4, located in the footer. Empty by default.\n\tregister_sidebar( array(\n\t\t'name' => __( 'Language bar', 'nw-cleanv2' ),\n\t\t'id' => 'language-bar',\n\t\t'description' => __( 'The language bar', 'nw-cleanv2' ),\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h3 class=\"widget-lang-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n}", "function wpstartup_widgetarea_html( $id, $type = false ){\n if( isset($id) && $id != '' ){\n if( function_exists('dynamic_sidebar') && function_exists('wp_startup_is_sidebar_active') && wp_startup_is_sidebar_active( $id ) ){\n $class = 'widgetbox';\n if( isset($type) && $type != '' ){\n $class = 'widgetbox widget-'.$type;\n echo '<div id=\"'.$id.'\" class=\"'.$class.'\">';\n }else{\n echo '<div id=\"'.$id.'\" class=\"'.$class.' columnbox colset'.wp_startup_is_sidebar_active( $id ).'\">';\n }\n dynamic_sidebar( $id );\n echo '<div class=\"clr\"></div></div>';\n }else if( is_customize_preview() ){\n\n echo '<div id=\"'.$id.'\" class=\"customizer-placeholder\"> -- Widget area '.$id.' -- </div>';\n\n }\n }\n}", "function instagram_widget_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Instagram',\n\t\t'id' => 'instagram',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n\n}", "function montheme_register_widget() {\n register_widget(YoutubeWidget::class);\n register_sidebar([\n 'id' => 'homepage',\n 'name' => __('Sidebar Accueil', 'montheme'),\n 'before_widget' => '<div class=\"p-4 %2$s\" id=\"%1$s\"',\n 'after_widget' => '</div>',\n 'before_title' => ' <h4 class=\"fst-italic\">',\n 'after_title' => '</h4>'\n ]);\n}", "function wpdocs_theme_slug_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Main Sidebar', 'webino' ),\n 'id' => 'sidebar-1',\n 'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'webino' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h2 class=\"widgettitle\">',\n 'after_title' => '</h2>',\n ) );\n}", "function news_sidebar_widget() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'subscribe',\n\t\t'id' => 'subscribe',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\" role=\"complementary\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\n}" ]
[ "0.71901685", "0.7148874", "0.7037574", "0.70273596", "0.7016282", "0.69845694", "0.6982371", "0.69762653", "0.6971091", "0.6956312", "0.6955987", "0.6915839", "0.6915346", "0.6898224", "0.6895815", "0.6884372", "0.68623924", "0.68318725", "0.6830272", "0.6789377", "0.678663", "0.6784888", "0.6782159", "0.67703414", "0.6761517", "0.6755896", "0.6750873", "0.67499775", "0.67415273", "0.67400587", "0.6739365", "0.67366827", "0.67342556", "0.67301387", "0.67301387", "0.6725935", "0.6719979", "0.6717253", "0.6714272", "0.6709045", "0.6706158", "0.669031", "0.66784877", "0.66421056", "0.6635367", "0.66338515", "0.6633412", "0.66304743", "0.66274625", "0.6625028", "0.66174865", "0.6614404", "0.66137165", "0.66122216", "0.6599797", "0.65990645", "0.65974313", "0.65960276", "0.6593847", "0.6583892", "0.65799403", "0.65767354", "0.65766984", "0.65719265", "0.6570858", "0.65698457", "0.65694517", "0.656793", "0.6565476", "0.6558931", "0.6558371", "0.65520716", "0.6551713", "0.65512043", "0.65385497", "0.65380013", "0.6536257", "0.6536043", "0.65307075", "0.6530173", "0.65285254", "0.65207595", "0.6506428", "0.6506248", "0.650228", "0.650159", "0.6493111", "0.6491012", "0.6485626", "0.6481468", "0.6470134", "0.64664835", "0.6463946", "0.6463833", "0.6460076", "0.6459574", "0.6459095", "0.6459085", "0.6456879", "0.6452728", "0.64521277" ]
0.0
-1
Hydrators all data at once.
protected function hydrateAllData() { return $this->_stmt->fetchAll(PDO::FETCH_KEY_PAIR); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function hydrate($data);", "function hydrate() : void;", "public function hydrate($data){\n foreach ($data as $key => $value){\n $method = 'set'.ucfirst($key);\n \n if (method_exists($this, $method)){\n $this->$method($value);\n }\n }\n }", "public function hydrate(array $data);", "public function hydrate(array $data){ \n \tforeach ($data as $key => $value){\n \t\t$method = 'set'.ucfirst($key); \n \tif (method_exists($this, $method)){\n \t$this->$method($value);\n }\n }\n\t}", "public function hydrate($data) {\n foreach ($data as $key => $value) {\n $method = 'set' . ucfirst($key);\n if(!isset($value)){\n $v = null;\n }else{\n $v = $value;\n }\n if (method_exists($this, $method)) {\n $this -> $method($v);\n }\n }\n\t}", "protected function hydrate($data){\n\n foreach($data as $field => $value){\n\n //field = marque_id\n //fieldarray = ['marque','id']\n $fieldArray = explode(\"_\", $field);\n\n if(isset($fieldArray[1]) && $fieldArray[1] == \"id\"){\n $manName = ucfirst($fieldArray[0]).\"Manager\";\n require_once(\"./model/managers/\".$manName.\".php\");\n $man = new $manName();\n $value = $man->findOneById($value);\n }\n \n $method = \"set\".ucfirst($fieldArray[0]);\n if(method_exists($this, $method)){\n $this->$method($value);\n }\n\n }\n }", "public function hydrate($data) {\r\n $this->orm->hydrate($data)->force_all_dirty();\r\n }", "public function hydrate($data)\n\t{\n\t\tforeach ($data as $attribut => $value)\n\t\t{\n\t\t\t$methode = 'set'.ucfirst($attribut);\n\t\t\tif (is_callable([$this, $methode]))\n\t\t\t{\n\t\t\t\t$this->$methode($value);\n\t\t\t}\n\t\t}\n\t}", "public function hydrate(array $data)\n {\n foreach ($data as $key => $value) {\n $method = 'set' . str_replace(\"_\", \"\", ucwords($key, \"_\"));\n if (method_exists($this, $method)) {\n $this->$method($value);\n }\n }\n }", "public function hydrate(array $data)\n {\n foreach ($data as $key => $value) {\n $method = 'set'.ucfirst($key);\n\n if (method_exists($this, $method)) {\n $this->$method($value);\n }\n }\n }", "abstract public function hydrate(array $data, $options);", "public function hydrate($data)\n\t{\n\t\tif (is_array($data))\n\t\t{\n\t\t\t//get our id back\n\t\t\t$this->id = $data['id'];\n\n\t\t\t//obviously we want to load our data.\n\t\t\t$this->data = $data['data'];\n\t\t}\n\t}", "public function getHydrator(): AbstractHydrator\n {\n return new FlarumPostsHydrator();\n }", "public function hydrate($object, array $data);", "public function hydrate( array $attributes ) {\n\n\t\t// Set all the field from $data\n\t\tforeach ( $attributes as $fieldName => $fieldValue ) {\n\t\t\t$this->set( $fieldName, $fieldValue );\n\t\t}\n\n\t}", "public function hydrate(): Collection\n\t{\n\t\t$className = get_class($this->model);\n\n\t\treturn $this->getRaw()->map(fn ($row) => (new $className())->forceFill($row));\n\t}", "public function hydrate($datas) {\n foreach($datas as $field => $value) {\n\n $elements = explode('_', $field); // array(0 => 'autor', 1 => 'id');\n\n $method = \"set\";\n foreach($elements as $e){\n $method .= ucfirst($e);\n }\n if(method_exists($this, $method)) {\n $this->$method($value);\n }\n }\n }", "public function hydrate($dataSet)\r\n {\r\n $this->id = $dataSet['id'];\r\n $this->nom = $dataSet['nom'];\r\n $this->archi = $dataSet['archi'];\r\n $this->version = $dataSet['version'];\r\n $this->ihm = $dataSet['ihm'];\r\n $this->visible = $dataSet['visible'];\r\n }", "public function hydrate($dataSet)\r\n {\r\n $this->id = $dataSet['id'];\r\n $this->nomRole = $dataSet['nom_role'];\r\n $this->description = $dataSet['description'];\r\n }", "public function hydrate(array $datas)\n\t{\n\t\tforeach ($datas as $key => $value)\n\t\t{\n\t\t $method = 'set'.ucfirst($key);\n\t\t if (method_exists($this, $method))\n\t\t\t$this->$method($value);\n\t\t}\n\t}", "protected function hydrate($dataSet)\r\n {\r\n $this->id = $dataSet['id'];\r\n $this->label = $dataSet['label'];\r\n $this->description = $dataSet['description'];\r\n $this->contenu = $dataSet['contenu'];\r\n }", "public function hydrate(array $attributes = []);", "protected function hydrate($dataSet)\r\n {\r\n $this->id = $dataSet['id'];\r\n $this->dateEnvoi = $dataSet['date_envoi'];\r\n $this->contenu = $dataSet['contenu'];\r\n $this->modele = $dataSet['modele_mail_id'];\r\n $this->destinataire = $dataSet['user_id'];\r\n }", "public function hydrate($donnees){\n foreach($donnees as $key => $value){\n //on delcare la varible method\n $method = 'set'.ucfirst($key);\n//on verifie si la methode existe\n if(method_exists($this,$method)){\n $this->$method($value);\n }\n }\n\n}", "private function collectData()\n {\n // Decode the API data\n $data = $this->callApi();\n\n // Convert the data to JSON\n // - We could return the response()->json($data) here\n // But instead I am converting to JSON to create an Array compatible with the Resource / Transformer / collections\n $json = json_encode($data);\n\n // And convert the JSON to an array for the Resource / Fractal Transformer\n $array = json_decode($json, true);\n\n // This could also be done in one line using:\n // $array = json_decode(json_encode($xml), true);\n // But it was easier as individual lines for improved commenting\n\n $this->data = collect(FloatRatesResource::collection($array[\"item\"])->resolve());\n }", "public static function hydrate($data)\n {\n return self::hydrateModelProperties(\n new self(),\n $data,\n array(),\n array()\n );\n }", "public function hydrate($someData) {\n\t\tforeach ($someData as $key => $value) {\n\t\t\t$method = 'set'.ucfirst($key);\n\t\t\tif (method_exists($this, $method)) {\n\t\t\t\t$this->$method($value);\n\t\t\t}\n\t\t}\n\t}", "public function hydrate(array $data) \n\t{\n\t\t// \t\t\t\"title\" => \"Mon titre\"\n\t\t// ]\n\t\tforeach ($data as $key => $value)\n\t\t{\n\t\t\t// $key = \"title\", $value = \"Mon titre\"\n\t\t\t$method = 'set' . ucfirst($key);\n\t\t\t// $method = setTitle\n\t\t\tif(method_exists($this, $method))\n {\n\t\t\t\t// $this->setTitle(\"Mon titre\")\n $this->$method($value);\n }\n\t\t}\n\t}", "protected function hydrate()\n {\n $state = $this->_payload->state();\n foreach ($state as $key => $value) {\n $type = null;\n try {\n $type = optional((new \\ReflectionProperty($this, $key))->getType())->getName();\n } catch(\\Exception $e) {\n }\n if ($type) {\n $model_key = optional(new $type)->getKeyName();\n if (optional($value)[$model_key]) {\n $model = (new $type)->find(optional($value)[$model_key]);\n if ($model && ! is_null($value)) {\n $this->hydrate_model_attributes($model, (array) $value);\n $this->{$key} = $model;\n } else {\n $model = (new $type);\n $this->hydrate_model_attributes($model, (array) $value);\n $this->{$key} = $model;\n }\n } else {\n $model = (new $type);\n $this->hydrate_model_attributes($model, (array) $value);\n $this->{$key} = $model;\n }\n } else {\n $this->{$key} = $value;\n }\n }\n }", "protected function loadCustomersData()\n {\n //Se recupera la informacion basica\n $attributes = ['customer_id', 'first_name', 'last_name', 'archived'];\n $data = Customer::orderBy('first_name')\n ->get($attributes);\n $customers = new Collection();\n\n //Ahora se recupera su estado\n foreach ($data as $record) {\n $customer = new stdClass();\n $customer->id = $record->customer_id;\n $customer->fullName = $record->first_name . ' ' . $record->last_name;\n $customer->archived = $record->archived == 0 ? false : true;\n\n //Recupero los creditos y abonos para calcular las estadisticas\n $credits = $record->credits()->orderBy('credit_date')->get();\n $payments = $record->payments()->orderBy('payment_date')->get();\n\n $statistics = $this->getState($credits, $payments);\n\n $customer->balance = $statistics->balance;\n $customer->state = $statistics->state;\n $customer->lastCredit = $statistics->lastCredit;\n $customer->balanceColor = $statistics->balanceState;\n $customer->time = $statistics->paymentTime;\n\n $customers->push((array) $customer);\n }\n\n $this->customers = $customers;\n }", "public function setHydration($value) {\n $this->hydrate = $value;\n }", "public function getHydrated() {\n return $this->hydrated;\n }", "public static function hydrate(array $datas)\n {\n foreach ($datas as $key => $value) {\n $method = 'set' . $key;\n if (method_exists(get_called_class(), $method)) {\n self::$method($value);\n }\n }\n }", "public function hydrate()\n {\n if($this->hydrated) return;\n\n $this->rules = $this->getRules();\n $this->elements = $this->input->only(array_keys($this->rules));\n\n // also fetch any confirmation field\n foreach($this->input->all() as $key => $value) \n {\n if(mb_substr($key, -12) === 'confirmation')\n {\n $this->elements[$key] = $value;\n }\n }\n\n $this->hydrated = true;\n }", "public function hydrate(array $properties);", "public function isHydrationEnabled(): bool;", "public function all()\n {\n // set the url\n $url = self::$apiUrl . self::$servicePoint;\n\n // get a raw response\n self::$rawData = self::apiCall($url, '', array('headers' => array('Accept: ' . self::$httpAccept), 'options' => $this->getOptions()));\n\n // decode it and set php native rough data....\n if (self::$httpAccept == 'application/xml') {\n self::$data = simplexml_load_string(self::$rawData);\n } elseif (self::$httpAccept == 'application/json') {\n self::$data = json_decode(self::$rawData);\n }\n\n $data = self::getData();\n\n if (is_object($data) && property_exists($data, 'context')) {\n $context = (array)$data->context;\n } else {\n $context = null;\n }\n\n $model = self::$model;\n $class = 'MIMAS\\\\Service\\Jorum\\\\' . strtoupper(substr($model, 0, 1)) . substr($model, 1);\n\n $data = array();\n\n foreach (self::getData()->$model as $i => $object) {\n $data[] = new $class((array)$object);\n }\n\n $ret = new \\MIMAS\\Service\\DataCollection($data, $context);\n\n return ($ret);\n }", "public function run()\n {\n collect($this->data)->each(function ($data) {\n if (is_null(Supplier::find($data['id']))) {\n Supplier::create([\n 'id' => $data['id'],\n 'name' => $data['name'],\n 'address' => $data['address'],\n 'phone_no' => $data['phone_no'],\n ]);\n }\n });\n }", "public function hydrate($values) {\n $blueprints = $this->getBlueprint()->getBlueprints();\n // Create a collection to store the hydrated fields\n $hydrated = collect([]);\n // Loop through each of the blueprints and hydrate\n $blueprints->each(function(Field $blueprint, $k) use ($hydrated, $values) {\n // Retrieve the field machine code\n $machine = $blueprint->getMachine();\n // Retrieve the field value\n $value = isset($values[$machine]) ? $values[$machine] : null;\n // Retrieve the hydrated field instance\n $hydrated->push($blueprint->hydrate($value));\n });\n // Update the current hydrated collection\n $this->setHydrated($hydrated);\n // Rebuild the index after each field is added\n $this->reIndex();\n // Return for chaining\n return $this;\n }", "public function hydrate(array $customer_datas)\r\n\t{\r\n\t\tforeach ($customer_datas as $key => $value)\r\n\t\t{\r\n\t\t\t// Get the setter name from attribute's name\r\n\t\t\t$method = 'set_'.ucfirst($key);\r\n\t\r\n\t\t\t// if the setter exist\r\n\t\t\tif (method_exists($this, $method))\r\n\t\t\t{\r\n\t\t\t\t// call the setter\r\n\t\t\t\t$this->$method($value);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function setHydrated($fields) {\n $this->hydrated = collect($fields);\n // Return for chaining\n return $this;\n }", "public function fetchData()\n {\n if (null === $this->data) {\n $adaptable = $this->getAdaptable();\n if ($adaptable instanceof \\ArrayObject) {\n $this->data = $adaptable->getArrayCopy();\n } else {\n $this->data = (array) $adaptable;\n }\n\n $page = $this->getPageNumber() - 1;\n $limit = $this->getItemsPerPage();\n $this->data = array_splice($this->data, $page * $limit, $limit);\n }\n }", "public function hydrate($row){\n $this->INE=$row['INE']; \n $this->name=$row['name']; \n $this->firstname=$row['firstname']; \n $this->mail=$row['mail'];\n $this->tel=$row['tel']; \n $this->adresse=$row['adresse']; \n }", "public function isHydrationEnabled()\n {\n return $this->_hydrate;\n }", "private function getData()\n {\n if (!$this->dataLoaded) {\n $this->refreshData();\n $this->dataLoaded = true;\n }\n }", "public function getAll()\n {\n $resultSet = $this->oMapper->getAll();\n\n $className = get_class($this);\n\n// $return = array();\n $dto = new EntityDTO($this->oDb, $this->oLogger);\n foreach ($resultSet as $key => $row) {\n $obj = new $className($dto);\n $obj->fillByObject($row);\n\n $this->aCollection[] = $obj;\n }\n unset($resultSet);\n\n return $this->aCollection;\n }", "public static function populateObjects(DataFetcherInterface $dataFetcher)\n {\n $results = array();\n\n // set the class once to avoid overhead in the loop\n $cls = static::getOMClass(false);\n // populate the object(s)\n while ($row = $dataFetcher->fetch()) {\n $key = MetaTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());\n if (null !== ($obj = MetaTableMap::getInstanceFromPool($key))) {\n // We no longer rehydrate the object, since this can cause data loss.\n // See http://www.propelorm.org/ticket/509\n // $obj->hydrate($row, 0, true); // rehydrate\n $results[] = $obj;\n } else {\n /** @var Meta $obj */\n $obj = new $cls();\n $obj->hydrate($row);\n $results[] = $obj;\n MetaTableMap::addInstanceToPool($obj, $key);\n } // if key exists\n }\n\n return $results;\n }", "protected function getPersistableDataArray() {}", "protected function getPersistableDataArray() {}", "protected function getPersistableDataArray() {}", "protected function getPersistableDataArray() {}", "private function _populate()\n {\n // populate Rgion\n foreach ($this->regionData as $region)\n {\n $this->region->create(\n $region['name'],\n $region['promotor_ID']\n );\n }\n \n // Populate branch\n foreach ($this->branchData as $branch)\n {\n $this->branch->create(\n $branch['name'],\n $branch['region_ID'],\n $branch['promotor_ID']\n );\n }\n\n // Popular Dealer \n foreach ($this->dealerData as $dealer)\n { \n $data = [\n 'region_ID' => $dealer['region_ID'],\n 'branch_ID' => $dealer['branch_ID'],\n 'dealer_account_ID' => $dealer['dealer_account_ID'],\n 'dealer_channel_ID' => $dealer['dealer_channel_ID'],\n 'dealer_type_ID' => $dealer['dealer_type_ID'],\n 'code' => $dealer['code'],\n 'name' => $dealer['name'],\n 'company' => $dealer['company'],\n 'address' => $dealer['address']\n ];\n\n $this->dealer->create($data);\n }\n\n foreach ($this->dealerChannelData as $dealerChannel)\n {\n $this->dealerChannel->create(\n $dealerChannel['name']\n );\n }\n\n // Populate dealer account\n foreach ($this->dealerAccountData as $dealerAccount)\n {\n $this->dealerAccount->create(\n $dealerAccount['name'],\n $dealerAccount['branch_ID'],\n $dealerAccount['promotor_ID']\n );\n }\n\n //Populate token\n foreach ($this->tokenData as $token)\n {\n $this->token->create(\n $token['dashboard_account_ID'],\n $token['token']\n );\n }\n\n // Populate promotor\n foreach ($this->promotorData as $promotor)\n { \n $this->promotor->create(\n $promotor['dealer_ID'],\n $promotor['phone'],\n $promotor['password'],\n $promotor['name'],\n $promotor['gender'],\n $promotor['type'],\n $promotor['parent_ID']\n );\n }\n\n // Populate report\n foreach ($this->reportData as $data)\n {\n return $this->report->create($data);\n\n }\n \n // Populate dashboard \n $accountIDs = [];\n\n foreach ($this->accountData as $account)\n {\n $accountIDs[] = $this->account->create(\n $account['email'],\n $account['name'],\n $account['last_access']\n );\n }\n\n return $accountIDs;\n }", "protected function hydrate($array){\r\n\t\tforeach ($array as $key => $value) {\r\n\t\t\t$methodName = 'set'.ucfirst($key);\r\n\t\t\tif(method_exists($this, $methodName)){\r\n\t\t\t\t$this->$methodName($value);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function obtainData()\n\t{\n\t\t$this->obtainDataReferences();\n\t\t$this->obtainDataOrders();\n\t}", "public function populate();", "private function prepareBusinessGreedyData( ) {\n $business_greedy_array = $this->load(['businessLogos'=> function($query){\n// return with the active logo only when calling business object\n $query->where('id', $this->logo_id);\n }, 'city', 'region', 'town', 'postcode', 'industry', 'businessTypes', 'users'])->toArray();\n (empty($business_greedy_array['business_logos'][0])) ? : $business_greedy_array['business_logos'] = (new BusinessLogoTransformer())->transform( $business_greedy_array['business_logos'][0]);\n (empty($business_greedy_array['city'])) ? : $business_greedy_array['city'] = (new CityTransformer())->transform( $business_greedy_array['city']);\n (empty($business_greedy_array['region'])) ? : $business_greedy_array['region'] = (new RegionTransformer())->transform( $business_greedy_array['region']);\n (empty($business_greedy_array['town'])) ? : $business_greedy_array['town'] = (new TownTransformer())->transform( $business_greedy_array['town']);\n (empty($business_greedy_array['postcode'])) ? : $business_greedy_array['postcode'] = (new PostcodeTransformer())->transform( $business_greedy_array['postcode']);\n (empty($business_greedy_array['industry'])) ? : $business_greedy_array['industry'] = (new IndustryTransformer())->transform( $business_greedy_array['industry']);\n (empty($business_greedy_array['business_types'])) ? : $business_greedy_array['business_types'] = (new BusinessTypesTransformer())->transformCollection( $business_greedy_array['business_types']);\n (empty($business_greedy_array['users'])) ? : $business_greedy_array['users'] = (new UserTransformer())->transformCollection( $business_greedy_array['users']);\n return $business_greedy_array;\n }", "public function seed()\n\t{\n\t\t$this->createDataType();\n\t\t$this->createDataRowForColumns();\n\t}", "abstract protected function _generateDataCollection();", "protected function _generateAll()\r\n {\r\n $this->_data['generatedObjects'] = [];\r\n\r\n $this->_beforeGenerateBegin();\r\n $this->_generate($this->getInitialObject());\r\n $this->_afterGenerateEnd();\r\n\r\n return $this->_data['generatedObjects'];\r\n }", "public function load()\n {\n $pdo = $this->getDbConnection();\n $query = \"SELECT * FROM {$this->dbTable}\";\n $data = $pdo->query($query)->fetchAll(\\PDO::FETCH_ASSOC);\n\n foreach ($data as ['key' => $key, 'value' => $value]) {\n $this->setData($key, $value);\n }\n }", "abstract protected function doFetchAll();", "function fetchAll($decorator)\n {\n $children = parent::fetchAll();\n foreach ($children as $key => $Calendar) {\n $children[$key] = & new $decorator($Calendar);\n }\n return $children;\n }", "public function anyData()\n {\n $datatables = $this->datatables();\n #custome datatable yajra in here \n return $datatables->make(true);\n }", "public function getHydratorFor($className);", "function loadData()\n\t{\n\t\tstatic $data;\n\t\t\n\t\tif(!$data)\n\t\t\t$data=self::getData();\n\n\t\tif(isset($data[$this->id]))\n\t\t\t$this->setValues((array)$data[$this->id]);\t\t\t\n\t}", "public function hydrate($id) {\n $data = $this->findById($id);\n \n $this->id = $id;\n $this->name = $data->name;\n $this->date = $data->date;\n $this->activity_id = $data->activity_id;\n }", "public static function populateObjects(DataFetcherInterface $dataFetcher)\n {\n $results = array();\n\n // set the class once to avoid overhead in the loop\n $cls = static::getOMClass(false);\n // populate the object(s)\n while ($row = $dataFetcher->fetch()) {\n $key = AliEmbonusTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());\n if (null !== ($obj = AliEmbonusTableMap::getInstanceFromPool($key))) {\n // We no longer rehydrate the object, since this can cause data loss.\n // See http://www.propelorm.org/ticket/509\n // $obj->hydrate($row, 0, true); // rehydrate\n $results[] = $obj;\n } else {\n /** @var AliEmbonus $obj */\n $obj = new $cls();\n $obj->hydrate($row);\n $results[] = $obj;\n AliEmbonusTableMap::addInstanceToPool($obj, $key);\n } // if key exists\n }\n\n return $results;\n }", "abstract public function populate();", "public function hydrate(array $donnee)\n\t{\n\t\tforeach($donnee as $key => $value)\n\t\t{\n\t\t\t$method = 'set'.ucfirst($key);\n\t\t\tif( method_exists($this, $method))\n\t\t\t{\n\t\t\t\t$this->$method($value);\n\t\t\t}\n\t\t\n\t\t}\n\t}", "public function hydrate(array $result)\n {\n $dataset = new Dataset($result);\n\n foreach ($this->attrs as $attr) {\n $dataset->write($attr->name, $this->deserialize($dataset, $attr));\n }\n\n $dataset->markPersisted();\n\n return $this->hydrateModel($dataset);\n }", "public function hydrate(array $data, $object)\n {\n foreach ($data as $key => $value) {\n\n $hydrateName = $this->hydrateName($key);\n\n if ($object->has($hydrateName)) {\n $method = 'set' . ucfirst($hydrateName);\n $value = $this->hydrateValue($hydrateName, $value, $data);\n $object->$method($value);\n }\n }\n\n return $object;\n }", "public function hydrateValuesDataProvider()\n {\n return [\n [\n [\n 'val1' => 1,\n 'val2' => 'text',\n 'val3' => false,\n 'val4' => 2,\n 'val5' => 3.5,\n ],\n [],\n ],\n ];\n }", "public function gatherData()\n {\n $data = array_merge($this->factory->getShared(), $this->data);\n\n foreach ($data as $key => $value) {\n if ($value instanceof Renderable) {\n $data[$key] = $value->render();\n }\n }\n\n return $data;\n }", "public function doData() {\n\t\t\t$dataSet = array();\n\t\t\t$dataSet['attribute:type'] = $this->dataType;\n\t\t\t$dataSet['attribute:action'] = $this->actionType;\n\n\t\t\tif($this->total) {\n\t\t\t\t$dataSet['attribute:total'] = $this->total;\n\n\t\t\t\tif(!is_null($this->offset)) {\n\t\t\t\t\t$dataSet['attribute:offset'] = $this->offset;\n\t\t\t\t}\n\n\t\t\t\tif(!is_null($this->limit)) {\n\t\t\t\t\t$dataSet['attribute:limit'] = $this->limit;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$dataSet = array_merge($dataSet, $this->data);\n\n\t\t\tcmsController::getInstance()->setAdminDataSet($dataSet);\n\t\t}", "public function flushData()\n\t{\n\t\t$class = get_class($this);\n\t\tunset($this->_data[$class]);\n\t}", "public function hydrate($tableau){\n foreach ($tableau as $key => $value) {\n //on declare methode \n $method = 'set'.ucfirst($key);\n\n //on verifie si la methode existe\n if(method_exists($this,$method)){\n $this->$method($value);\n }\n }\n }", "public function isHydrated() {\n\t\treturn !empty($this->originalData);\t\t\n\t}", "public function getHydrator(): object\n {\n return new $this->hydratorClass();\n }", "public function fetch()\n {\n foreach ($this->getData() as $id => $model_data) {\n if (!isset($model_data->id)) {\n $model_data->id = $id;\n }\n $this->add($model_data);\n }\n return $this;\n }", "public function run()\n {\n echo \"\\n\";\n echo \"/*---------------------------------------------- \\n\";\n echo \"| @Reset Data! \\n\";\n echo \"|----------------------------------------------*/ \\n\";\n\n $this->reset();\n\n\n echo \"\\n\";\n echo \"/*---------------------------------------------- \\n\";\n echo \"| @Populating Data! \\n\";\n echo \"|----------------------------------------------*/ \\n\";\n\n /*\n |-----------------------------------------------\n | @Roles\n |----------------------------------------------*/ \n $this->call(RolesTableSeeder::class);\n\n /*\n |-----------------------------------------------\n | @Groups\n |----------------------------------------------*/ \n $this->call(GroupsTableSeeder::class);\n\n /*\n |-----------------------------------------------\n | @Locations\n |----------------------------------------------*/ \n $this->call(LocationsTableSeeder::class);\n\n /*\n |-----------------------------------------------\n | @Organization\n |----------------------------------------------*/ \n $this->call(OrganizationTableSeeder::class);\n\n\t /*\n\t |-----------------------------------------------\n\t | @Employee Categories\n\t |----------------------------------------------*/ \t\n $this->call(EmployeeCategoriesTableSeeder::class);\n\n /*\n |-----------------------------------------------\n | @Form Template Categories\n |----------------------------------------------*/ \n $this->call(FormTemplateCategoriesTableSeeder::class);\n\n /*\n |-----------------------------------------------\n | @Event Categories\n |----------------------------------------------*/ \n $this->call(EventCategoriesTableSeeder::class);\n\n /*\n |-----------------------------------------------\n | @IDP Competency\n |----------------------------------------------*/ \n $this->call(IDPCompetencyTableSeeder::class);\n\n /*\n |-----------------------------------------------\n | @Default Forms\n |----------------------------------------------*/ \n // $this->call(FormsSeeder::class);\n\n /*\n |-----------------------------------------------\n | @Default Settings\n |----------------------------------------------*/ \n // $this->call(SettingsSeeder::class); \n\n \n echo \"\\n\" . \"Uncomment me to proceed to the sample data seeders\" . \"\\n\"; exit();\n\n echo \"\\n\";\n echo \"/*---------------------------------------------- \\n\";\n echo \"| @Populating Sample Data! \\n\";\n echo \"|----------------------------------------------*/ \\n\";\n\n /*\n |-----------------------------------------------\n | @Default Users\n |----------------------------------------------*/ \n // $this->call(UATUsersSeeder::class);\n\n /*\n | @Organization\n |----------------------------------------------*/ \n // $this->call(SampleOrganizationTableSeeder::class);\n\n /*\n | @Employees\n |----------------------------------------------*/\n // $this->call(SampleUserTableSeeder::class);\n\n /*\n |-----------------------------------------------\n | @Settings\n |----------------------------------------------*/ \n // $this->call(SampleSettingsTableSeeder::class);\n\n /*\n | @Form Templates\n |----------------------------------------------*/\n // $this->call(SampleFormTemplateTableSeeder::class);\n\n /*\n | @Events\n |----------------------------------------------*/ \n // $this->call(SampleEventsTableSeeder::class);\n\n /*\n | @IDP\n |----------------------------------------------*/ \n // $this->call(SampleIDPsTableSeeder::class); \n\n /*\n | @Requests\n |----------------------------------------------*/ \n // $this->call(SampleRequestsTableSeeder::class); \n }", "public abstract function fetchAllObjects();", "public static function populateObjects(DataFetcherInterface $dataFetcher)\n {\n $results = array();\n\n // set the class once to avoid overhead in the loop\n $cls = static::getOMClass(false);\n // populate the object(s)\n while ($row = $dataFetcher->fetch()) {\n $key = AliFcTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());\n if (null !== ($obj = AliFcTableMap::getInstanceFromPool($key))) {\n // We no longer rehydrate the object, since this can cause data loss.\n // See http://www.propelorm.org/ticket/509\n // $obj->hydrate($row, 0, true); // rehydrate\n $results[] = $obj;\n } else {\n /** @var AliFc $obj */\n $obj = new $cls();\n $obj->hydrate($row);\n $results[] = $obj;\n AliFcTableMap::addInstanceToPool($obj, $key);\n } // if key exists\n }\n\n return $results;\n }", "public function findAll($hydrateMode = AbstractQuery::HYDRATE_OBJECT);", "public static function populateObjects(DataFetcherInterface $dataFetcher)\n {\n $results = array();\n\n // set the class once to avoid overhead in the loop\n $cls = static::getOMClass(false);\n // populate the object(s)\n while ($row = $dataFetcher->fetch()) {\n $key = ArtistTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());\n if (null !== ($obj = ArtistTableMap::getInstanceFromPool($key))) {\n // We no longer rehydrate the object, since this can cause data loss.\n // See http://www.propelorm.org/ticket/509\n // $obj->hydrate($row, 0, true); // rehydrate\n $results[] = $obj;\n } else {\n $obj = new $cls();\n $obj->hydrate($row);\n $results[] = $obj;\n ArtistTableMap::addInstanceToPool($obj, $key);\n } // if key exists\n }\n\n return $results;\n }", "private function load_all(){\n foreach($this->selectAll('animal', '*', null, 'ORDER BY nom') as $animal){\n $animal['age_text'] = $this->interval($animal['age']);\n array_push($this->all, new Animal($animal));\n }\n }", "public function getDataMapper() {}", "private function hydrate($id) {\n\t\tif (!is_numeric($id)) {\n\t\t\tthrow New Exception('Id\\'s must be numbers to hydrate tables');\n\t\t}\n\t\t$results = $this->connection->fetchRow(\"SELECT * FROM {$this->table} WHERE \".self::$primaryKey[$this->table].\"='$id'\");\n\t\tif ($results) {\n\t\t\tforeach ($results as $key=>$value) {\n\t\t\t\t$this->originalData[$key] = $value;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public function getDecoratedData()\n {\n $this->prepareData();\n\n return $this->getData();\n }", "public function hydrate(array $donnees){\n\t\tforeach ($donnees as $key => $value){\n\t\t\t$method = 'set'.ucfirst($key);\n\t\t\tif (method_exists($this, $method)){\n\t\t\t\t$this->$method($value);\n\t\t\t}\n\t\t}\n\t}", "public function entityHydrator( $dataArr, $entity )\n {\n $hydrator = $this->getServiceLocator()->get('hydrateEntity');\n $hydrator( $dataArr , $entity );\n return $hydrator;\n }", "private function loadData(): void\n {\n $modules = BackendExtensionsModel::getModules();\n\n // split the modules in 2 separate data grid sources\n foreach ($modules as $module) {\n if ($module['installed']) {\n $this->installedModules[] = $module;\n } else {\n $this->installableModules[] = $module;\n }\n }\n }", "public function hydrate($document, $data, array $hints = []);", "protected function hydrate(array $result)\n {\n return $this->hydrator->hydrate($result['_source'], clone $this->prototype);\n }", "public function collectAllData()\n {\n $this->collectPlusCode();\n $this->collectGeographyData();\n $this->collectAddressData();\n\n return $this;\n }", "public static function cloneResultMapHydrate(array $data, $columnMap, $hydrationMode) {}", "public static function populateObjects(DataFetcherInterface $dataFetcher)\n {\n $results = array();\n\n // set the class once to avoid overhead in the loop\n $cls = static::getOMClass(false);\n // populate the object(s)\n while ($row = $dataFetcher->fetch()) {\n $key = CKOrderXmlTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());\n if (null !== ($obj = CKOrderXmlTableMap::getInstanceFromPool($key))) {\n // We no longer rehydrate the object, since this can cause data loss.\n // See http://www.propelorm.org/ticket/509\n // $obj->hydrate($row, 0, true); // rehydrate\n $results[] = $obj;\n } else {\n /** @var CKOrderXml $obj */\n $obj = new $cls();\n $obj->hydrate($row);\n $results[] = $obj;\n CKOrderXmlTableMap::addInstanceToPool($obj, $key);\n } // if key exists\n }\n\n return $results;\n }", "protected function lookupData()\n\t{\n\t\t//nope, load it normally.\n\t\t$data = $this->getData(true);\n\t\tif (count($data) && is_array($data))\n\t\t\n\t\tif (!empty($data))\n\t\t\t$this->hydrate($data);\n\t}", "public function hydrate(array $data, $omittedValidator = false)\n {\n if(!$omittedValidator){\n $result = $this->validator->validate($data);\n $this->details = $result;\n if($result->notValid()){\n return false;\n }\n }\n foreach ($data as $key => $value){\n if(!in_array($key, $this->map))\n continue;\n $key = array_search($key, $this->map);\n $this->set($key, $value);\n }\n return true;\n }", "public function run()\n {\n $data = [\n ['name' => 'Kids'],\n ['name' => 'Husband'],\n ['name' => 'Sister'],\n ];\n\n \\App\\Models\\Relation::truncate();\n\n foreach ($data as $value) {\n \\App\\Models\\Relation::create($value);\n }\n }" ]
[ "0.7236003", "0.7202339", "0.7118955", "0.70619434", "0.69078255", "0.69006133", "0.67590785", "0.67182034", "0.6655463", "0.6588129", "0.65584165", "0.6549516", "0.6303413", "0.6219743", "0.61083543", "0.6077466", "0.60385567", "0.6026907", "0.6003825", "0.5986207", "0.59838307", "0.5979907", "0.59498715", "0.5922943", "0.58043456", "0.57878524", "0.57176965", "0.57048565", "0.5697796", "0.569597", "0.56791466", "0.5678029", "0.5664898", "0.5646306", "0.5625671", "0.56129384", "0.56126034", "0.55961657", "0.5593927", "0.559153", "0.5544278", "0.55369335", "0.5521271", "0.5497098", "0.54942036", "0.5472356", "0.5449743", "0.5427548", "0.54273397", "0.54273397", "0.54272854", "0.54268897", "0.54188776", "0.54166174", "0.5412843", "0.54125", "0.54100424", "0.53990257", "0.53815615", "0.5349562", "0.53487146", "0.5340487", "0.5322535", "0.5318115", "0.5299785", "0.52996147", "0.5297591", "0.5287568", "0.52851564", "0.52847046", "0.52775323", "0.5264223", "0.5262036", "0.52617675", "0.52591634", "0.5235996", "0.5226515", "0.52257687", "0.522111", "0.5219309", "0.5218149", "0.5215976", "0.52072036", "0.52062225", "0.5194825", "0.51888096", "0.5187804", "0.5180632", "0.51799136", "0.51789856", "0.5178955", "0.5174299", "0.5173644", "0.5170675", "0.5167995", "0.51629156", "0.51595336", "0.5153544", "0.51527727", "0.514612" ]
0.67549247
7
Returns a rendered view.
public function renderView($view, array $parameters = array()) { return $this->controller->renderView($view, $parameters); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render()\n\t{\n\t\treturn $this->viewFactory->make($this->view)\n\t\t\t->with( 'presenter', $this )\n\t\t\t->render();\n\t}", "abstract protected function renderView();", "public function render()\n {\n try {\n $this->build();\n } catch (\\Exception $e) {\n return Handler::renderException($e);\n }\n\n return view($this->view, $this->variables())->render();\n }", "public function render() {\n\t\t$this->rendered = false;\n\t\tob_start();\n\t\t\t//RENDERING VIEW HERE\n\t\t\trequire_once(\"pages/View/\" . $this->_view);\n\t\t\t$this->content = ob_get_contents();\n\t\tob_end_clean();\n\t\t$this->rendered = true;\n\t\treturn ($this->content);\n\t}", "public function getView() {\n return $this->setView();\n }", "public function renderView()\n {\n // Is valid record\n $result = $this->prepareRecord();\n if ($result instanceof \\Illuminate\\Http\\RedirectResponse) {\n $this->redirect($result);\n }\n if ($this->contentType == \"json\") {\n $record = $this->Model->toArray();\n // Hook Filter viewModifyRecord\n $record = $this->doFilter(\"viewModifyRecord\", $record);\n // Send Response\n $JsonResponse = new JsonResponse($record, 200);\n $JsonResponse->send();\n exit;\n }\n // Render View\n $parameters = array(\n \"Scaffolding\" => $this,\n );\n $content = view($this->template . \".view\", $parameters)->render();\n return $content;\n }", "public function render()\n {\n $output = '';\n // render the injected views\n if (!empty($this->_views)) {\n foreach ($this->_views as $_view) {\n $output .= $_view->render();\n }\n }\n // render the current view\n $output .= $this->_doRender();\n return $output;\n }", "public function render(): mixed\n {\n return $this->view;\n }", "public function view(){\n\t\t$html = new \\Emagid\\Mvc\\Views\\Html(func_get_args());\n\n\t\treturn $html;\n\t}", "public function getView()\r\n {\r\n return $this->_controller->getView();\r\n }", "function render() \n {\n return View::factory($this->template_path . get_class($this))\n ->set('grid', $this)\n ->render();\n \n }", "protected function render(){\n //render view\n \n }", "public function __toString()\n {\n $this->rendered = true;\n\n return $this->render($this->view_file, $this->view_data);\n }", "public function render(): View\n {\n return view(static::getView(), $this->getViewData())\n ->layout(static::$layout, ['livewire' => $this]);\n }", "public function getView()\n {\n if (!$this->view) {\n $this->view = Kerisy::$app->get('view');\n $this->view->setDirectory($this->getViewPath());\n }\n return $this->view;\n }", "public function render() {\n\t\treturn $this->template( 'page' );\n\t}", "public function getView()\n {\n $view = App::$locator->view;\n if ($this->layout) {\n $view->setLayout($this->layout);\n }\n \n return $view;\n }", "public function render()\n {\n return $this\n ->blade_instance\n ->view()\n ->make(static::TEMPLATE_NAME, $this->entity_data)\n ->render();\n }", "public function getView()\n\t{\n\t\treturn $this->view;\n\t}", "protected function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n\t{\n\t\treturn View::make($this->viewName, [\n\t\t\t'items' => $this->items,\n\t\t]);\n\t}", "public function render()\n\t{\n\t\t$template = $this->environment->loadTemplate(\\Adhoc\\Locale::file($this->representation));\n\t\treturn $template->render((array)$this->view);\n\t}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function getView()\r\n {\r\n return $this->view;\r\n }", "public function render() {\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Executing all modules methods.\" );\n\t\tW2P::getInstance()->modules()->exec_all_functions();\n\t\t\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Generating rendering of the view: {$this->view}\" );\n\t\t\n\t\tob_start ();\n\t\tinclude_once (W2P_INCLUDE . W2P::getInstance()->configuration()->layout_path . '/views/' . $this->view . '.phtml');\n\t\t$this->content = ob_get_clean ();\n\t\t\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Content of the rendered view\" );\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Adding to the project layout\" );\n\t\t\n\t\tinclude (W2P_INCLUDE . W2P::getInstance()->configuration()->layout_path . '/' . $this->layout . '.phtml');\n\t\t\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Layout successfully mastered\" );\n\t\t\n\t\tif (W2P::getInstance()->configuration()->debug)\n\t\t\tW2P::getInstance()->debug()->save_debug ( W2P::getInstance()->configuration()->debug_format );\n\t}", "public function getView() {\n\t\treturn $this->view;\n\t}", "public function getView() {\n\t\treturn $this->view;\n\t}", "protected function getView()\n {\n $this->getBootstrap()->bootstrap('view');\n return $this->getBootstrap()->getResource('view');\n }", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();" ]
[ "0.8140855", "0.7790519", "0.7767289", "0.76162785", "0.7494709", "0.747654", "0.7456515", "0.74486965", "0.72972715", "0.72965056", "0.7284353", "0.72119683", "0.7206516", "0.72023666", "0.7199349", "0.7184391", "0.7173318", "0.7162857", "0.71106654", "0.70996267", "0.70694464", "0.70694464", "0.70694464", "0.70694464", "0.70694464", "0.70694464", "0.70694464", "0.70694464", "0.7067696", "0.70609885", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.70556974", "0.7055387", "0.7055387", "0.7055387", "0.7055387", "0.7055387", "0.7055387", "0.7055387", "0.7055387", "0.7055387", "0.7055387", "0.7055387", "0.7055387", "0.7055387", "0.7055387", "0.7055387", "0.7055387", "0.7055387", "0.70476496", "0.7044954", "0.70446455", "0.70446455", "0.704276", "0.7035499", "0.7035499", "0.7035499", "0.7035499", "0.7035499", "0.7035499", "0.7035499", "0.7035499", "0.7035499", "0.7035499", "0.7035499", "0.7035499", "0.7035499", "0.7035499" ]
0.0
-1
Returns true if the service id is defined.
public function has($id) { return $this->controller->has($id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasService(string $id): bool\n {\n return isset($this->getServices()[$id]);\n }", "public function isService(string $serviceId): bool;", "public function has($id): bool\n {\n // decorate service identifier\n $decoratedId = $this->serviceIdDecorator->decorate($id);\n // exit\n return isset($this->definitions[$decoratedId]);\n }", "public function has(string $serviceId): bool;", "public function offsetExists($id)\n\t{\n\t\treturn isset($this->services[$id]);\n\t}", "public function isSingleton(string $serviceId): bool;", "public static function hasService($serviceKey) {\n\t\treturn (isset(self::$services[$serviceKey]));\n\t}", "public function has($id): bool\n {\n if (false !== $this->getRegisteredId($id)) {\n return true;\n }\n\n try {\n $this->serviceLocator->locate($id, $this);\n } catch (NotFoundException $exception) {\n return false;\n }\n\n return true;\n }", "public function isAlias(string $serviceId): bool;", "public function serviceExists(string $serviceName): bool;", "public function isService() {\n\t\treturn true;\n\t}", "function have_services(){\n\t$services = get_services();\n\treturn !empty($services) && is_array($services);\n}", "protected function isServiceInternal(string $serviceId): bool\n {\n return isset(self::$services[$serviceId]);\n }", "public function has(string $id): bool\n {\n return isset($this->definitions[$id]);\n }", "public function isService() {\r\n\t\treturn false;\r\n\t}", "public function hasId(): bool\n {\n return $this->id !== null;\n }", "protected function has($id)\n {\n return $this->container->has($id);\n }", "public function hasId()\n {\n return $this->id !== null;\n }", "public function has(string $id): bool\n {\n return isset($this->definitions[$id]) || array_reduce(\n $this->delegates,\n fn($has, $container) => $has ?: $container->has($id),\n false\n );\n }", "public function has(string $id): bool\n {\n return isset($this->shared[$id])\n || class_exists($id)\n || interface_exists($id)\n || isset($this->alias[$id])\n || isset($this->scalar[$id])\n || isset($this->factory[$id]);\n }", "final public function hasService($name)\n {\n $services = $this->getServices();\n return isset($services[$name]);\n }", "public function isServiceEnabled(): bool\n {\n return $this->getModuleRegistry()->isModuleEnabled(SchemaConfigurationFunctionalityModuleResolver::SCHEMA_CONFIGURATION);\n }", "public function isDeferredService($service): bool\n {\n return isset($this->deferredServices[$service]);\n }", "public function hasId(){\n return $this->_has(17);\n }", "public function has($id)\n {\n return $this->container->has($id);\n }", "public function has($id)\n {\n return $this->container->has($id);\n }", "public function has($id)\n {\n return $this->container->has($id);\n }", "public function hasId()\n {\n $id = $this->getId();\n\n if (is_array($id)) {\n foreach ($id as $k => $v) {\n if (\"\" == \"$v\") {\n return false;\n }\n }\n }\n else if (\"\" == \"$id\") {\n return false;\n }\n\n return true;\n }", "public function isRegistered(){\n return isset($this->data['id']);\n }", "public function hasId()\n {\n $attributes = $this->getAttributes();\n\n if ( ! isset($attributes['id'])) return false;\n\n return true;\n }", "protected function isSingletonInternal(string $serviceId): bool\n {\n return isset(self::$singletons[$serviceId]);\n }", "public function findServiceById($service_id) {\n if (!empty($service_id)) {\n return $this->findService(array(\"service_uuid\" => $service_id));\n }\n return false;\n }", "public function bound($id): bool\n {\n return $this->isDeferredService($id) || parent::bound($id);\n }", "public function has($id)\n {\n return isset($this->container[$id]);\n }", "public function has($id)\n\t{\n\t\treturn array_key_exists($id, $this->registry);\n\t}", "public function isServiceLoaded(string $serviceName): bool;", "public function ifFrontendexiste($id_service){\n\t\t\t\t\t$sql = \"SELECT * FROM frontend WHERE id_service='\".$id_service.\"' \";\n\t\t\t\t\tif($this->db != null)\n\t\t\t\t\t {\n\t\t\t\t\t if($this->db->query($sql)->fetch() != null)\n\t\t\t\t\t {\n\t\t\t\t\t return true;\n\t\t\t\t\t }\n\t\t\t\t\t } \n\t\t\t\t\treturn false;\n\t\t\t\t\t }", "protected function isAliasInternal(string $serviceId): bool\n {\n return isset(self::$aliases[$serviceId]);\n }", "public function exists()\n {\n return ($this->id) ? true : false;\n }", "public function hasService($service, $context='default')\n {\n $this->logger->log(\"*** Dependency Injection - Looking for service $service\");\n if ($this->getServices()->has($service, $context)) {\n return self::SERVICE_IN_REGISTRY;\n }\n\n if ($this->getBuilder()->has($service, $context)) {\n return self::SERVICE_IN_BUILDER;\n }\n\n return self::SERVICE_NOT_FOUND;\n }", "public function exists($name)\n {\n return isset($this->services[$name]);\n }", "public function has($id) {\n return array_key_exists($id, $this->definitions)\n || array_key_exists($id, $this->entries);\n }", "public function has($id)\n\t{\n\t\treturn isset($this->registry[$id]);\n\t}", "public function hasId() : bool;", "public function has($id): bool\n\t{\n\t\treturn array_key_exists($id, $this->params);\n\t}", "public function has($id)\n {\n return isset($this->instances[$id]);\n }", "public function has($id): bool\n { \n if(class_exists($id)){\n return true;\n }else{\n return false;\n }\n }", "function exists()\r\n\t{\r\n\t\treturn ( ! empty($this->id));\r\n\t}", "public function hasId(): bool\n {\n return $this->getEntityDao()->hasId();\n }", "public function hasFortId()\n {\n return $this->FortId !== null;\n }", "public function setServiceId($serviceName = '')\r\n {\r\n if (!empty($serviceName)) {\r\n $this->serviceId = (int) clsSysServices::getInstance()->getServiceIdByNames($serviceName);\r\n }\r\n return true;\r\n }", "public static function isSupport($service) {\n return in_array($service, self::$serviceSupport);\n }", "public function has(string $id): bool\n {\n return array_key_exists($id, $this->bindings);\n }", "public function exists($id)\n {\n if (array_key_exists($id, $this->components)) {\n return true;\n }\n\n if (isset($this->instances[$id])) {\n return true;\n }\n\n return false;\n }", "public static function hasIdProperty(): bool\n {\n return static::getIdProperty() !== null;\n }", "public function has( $id ) \n {\n $id = Utils::normalizeClassName( $id );\n return $this->values->fetch( $id, $this->namespace ) ? true: false;\n }", "public function exists(string $id, string $type = self::DEFINITION_DEFAULT): bool\n {\n return array_key_exists($id, $this->definitions[$type]);\n }", "public function isStarted($id = self::DEFAULT_ID)\n {\n $id = (!$id) ? self::DEFAULT_ID : (string)$id;\n return isset($this->start[$id]);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "private function canServiceBeUsedWithReflectionBasedFactory(string $service): bool\n {\n if (! class_exists($service)) {\n return false;\n }\n\n if (PHP_VERSION_ID < 80100) {\n return true;\n }\n\n return ! enum_exists($service);\n }", "public function exists($id)\n\t{\n\t\treturn apc_exists($id);\n\t}", "function exists() {\n\t return !empty($this->id);\n\t}", "public function getServiceId()\n {\n if (array_key_exists(\"serviceId\", $this->_propDict)) {\n return $this->_propDict[\"serviceId\"];\n } else {\n return null;\n }\n }", "public function hasAppid()\n {\n return $this->appid !== null;\n }", "public function hasAppid()\n {\n return $this->appid !== null;\n }", "public function hasAppid()\n {\n return $this->appid !== null;\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function has($key)\n {\n $services = $this->internalGet($success, $token);\n if(!$success) {\n throw new \\RuntimeException(\"Failed to read services from storage\");\n }\n return isset($services[$key]);\n }", "public function has(string $id) : bool\n {\n return array_key_exists($id, $this->store);\n }", "public function exists( $id ) {\r\r\n if ($this->refresh) {\r\r\n $this->init();\r\r\n $this->refresh = false;\r\r\n }\r\r\n return isset($this->instances[$id]);\r\r\n }", "public function deleteService(int $id):bool\n {\n $deleteService = $this->pdo->prepare('DELETE FROM services WHERE id = :id');\n\n return $deleteService->execute(array( ':id' => $id));\n\n }", "public function exists()\n {\n return !empty($this->ID);\n }", "public function has(string $id): bool;", "public function is_application_id_in_config() {\n\t\treturn defined( 'ALGOLIA_APPLICATION_ID' );\n\t}", "public function __isset($id)\n {\n return $this->offsetExists($id);\n }", "protected function isServiceAvailable($service)\n {\n return in_array(\n strtolower($service), \n array_keys(config('awesio-auth.socialite.services'))\n );\n }", "function mci_is_webservice_call( $p_service, $p_data )\n{\n\tglobal $QUERY_STRING;\n\tglobal $_SERVER;\n\n\tif ( isset( $_SERVER['QUERY_STRING'] ) ) {\n\t\t$t_qs = $_SERVER['QUERY_STRING'];\n\t} else if( isset( $GLOBALS['QUERY_STRING'] ) ) {\n\t\t$t_qs = $GLOBALS['QUERY_STRING'];\n\t} else if( isset( $QUERY_STRING ) && $QUERY_STRING != '' ) {\n\t\t$t_qs = $QUERY_STRING;\n\t}\n\n\tif ( isset( $t_qs ) && preg_match( '/wsdl/', $t_qs ) ){\n\t\treturn false;\n\t} else if ( $p_data == '' && $p_service->wsdl ) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "public static function isDeferredService($service){\n return \\Illuminate\\Foundation\\Application::isDeferredService($service);\n }", "public function exists() {\n\t\treturn !is_null($this->id);\n\t}", "public function hasParameter(string $id): bool\n {\n return $this->exists($id, self::DEFINITION_PARAMETER);\n }" ]
[ "0.77505785", "0.7741814", "0.7675735", "0.7662306", "0.71190614", "0.7060176", "0.6848666", "0.6843727", "0.68127936", "0.6783198", "0.6751535", "0.6707439", "0.66986614", "0.6688981", "0.66340077", "0.65979433", "0.65260726", "0.6524459", "0.6519151", "0.65036356", "0.6471549", "0.6430324", "0.6428695", "0.6423059", "0.63812435", "0.63812435", "0.63812435", "0.63561964", "0.6331439", "0.63164616", "0.6310796", "0.629545", "0.6294113", "0.6278642", "0.6267979", "0.62626904", "0.6248745", "0.62372786", "0.62265056", "0.6224848", "0.6209413", "0.61962867", "0.61837566", "0.61787397", "0.6171269", "0.6160151", "0.6149895", "0.6146202", "0.6130334", "0.6129936", "0.6125427", "0.61171716", "0.611621", "0.61114705", "0.60922176", "0.6090757", "0.6064178", "0.60568255", "0.60496485", "0.60496485", "0.60496485", "0.60496485", "0.60496485", "0.60496485", "0.60496485", "0.60496485", "0.60496485", "0.60496485", "0.6049315", "0.6037458", "0.6032261", "0.60241497", "0.59988725", "0.59988725", "0.59988725", "0.5978278", "0.5978278", "0.5978278", "0.5978278", "0.5978278", "0.5978278", "0.5978278", "0.5978278", "0.5978278", "0.5978278", "0.5978278", "0.5978278", "0.5978278", "0.5961968", "0.59617436", "0.59601676", "0.5959963", "0.5950395", "0.5925352", "0.59238815", "0.5921985", "0.59112155", "0.5908404", "0.5899581", "0.58955544", "0.5895092" ]
0.0
-1